Modify EnterpriseUITest autotests to attempt to clear the TP... [chromiumos/third_party/autotest : master]

4 views
Skip to first unread message

Craig Harrison (Code Review)

unread,
May 3, 2012, 6:09:52 PM5/3/12
to
Craig Harrison has uploaded a new change for review.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................

Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.

BUG=chromium-os:29958
TEST=desktopui_EnterprisePolicyServer

Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
---
M client/cros/enterprise_ui_test.py
1 file changed, 1 insertion(+), 0 deletions(-)


git pull ssh://gerrit.chromium.org:29418/chromiumos/third_party/autotest refs/changes/15/21815/1
--
To view, visit https://gerrit.chromium.org/gerrit/21815
To unsubscribe, visit https://gerrit.chromium.org/gerrit/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Craig Harrison (Code Review)

unread,
May 3, 2012, 6:20:20 PM5/3/12
to Nirnimesh, Bartosz Fabianowski
Craig Harrison has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................




Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>
Gerrit-Reviewer: Bartosz Fabianowski <bar...@chromium.org>
Gerrit-Reviewer: Craig Harrison <cra...@chromium.org>
Gerrit-Reviewer: Nirnimesh <nirn...@chromium.org>

Craig Harrison (Code Review)

unread,
May 3, 2012, 6:26:30 PM5/3/12
to Nirnimesh, Bartosz Fabianowski
Craig Harrison has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 1:

A one liner to fix the case where the previous test aborted partway through and didn't clear the TPM.
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Nirnimesh (Code Review)

unread,
May 3, 2012, 7:30:43 PM5/3/12
to Craig Harrison, Bartosz Fabianowski
Nirnimesh has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 1: Looks good to me, approved
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Craig Harrison (Code Review)

unread,
May 3, 2012, 8:05:19 PM5/3/12
to Nirnimesh, Bartosz Fabianowski
Craig Harrison has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 1: Ready
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Bartosz Fabianowski (Code Review)

unread,
May 4, 2012, 4:03:24 AM5/4/12
to Craig Harrison, Nirnimesh
Bartosz Fabianowski has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 1:

Whenever I run the |tpm_clear| tool (which is what __tpm_clear() does), it tells me that the TPM will not actually be cleared until the next reboot.

At this point in the tests, is the TPM in a state where it can be usefully cleared without a reboot? Or would a reboot be required (which is not possible in client tests of course)?
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Craig Harrison (Code Review)

unread,
May 4, 2012, 12:11:17 PM5/4/12
to Nirnimesh, Bartosz Fabianowski
Craig Harrison has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 1: Not Ready
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Craig Harrison (Code Review)

unread,
May 4, 2012, 12:13:30 PM5/4/12
to Nirnimesh, Bartosz Fabianowski
Craig Harrison has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 1:

I believe you're right. That will require a little more work.
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Craig Harrison (Code Review)

unread,
May 4, 2012, 7:01:12 PM5/4/12
to Nirnimesh, Bartosz Fabianowski
Craig Harrison has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 2: Verified

Please review.
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Nirnimesh (Code Review)

unread,
May 4, 2012, 8:37:35 PM5/4/12
to Craig Harrison, Bartosz Fabianowski
Nirnimesh has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................




Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 3
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Nirnimesh (Code Review)

unread,
May 4, 2012, 9:16:57 PM5/4/12
to Craig Harrison, Bartosz Fabianowski
Nirnimesh has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 2: (5 inline comments)

Stupid gerrit. It posted my reply to the other patchset, which did not have comments.

....................................................
File client/cros/enterprise_ui_test.py
Line 93: try:
do not do try/catch. Just check if the file exists and act accordingly.

Line 94: with open(self._TPM_PASSWORD_FILE, 'r') as passwd_file:
'r' is redundant

Line 159: self.job.set_state('client_state', 'RETRY')
maybe call it 'REBOOT'

....................................................
File server/site_tests/desktopui_EnterprisePolicyServer/control
Line 21: # ('test_prod_enterprise_executive_user', {'prod': True}),
remove

....................................................
File server/site_tests/desktopui_EnterprisePolicyServer/desktopui_EnterprisePolicyServer.py
Line 55: if not self.job.get_state('client_state') == 'SUCCESS':
remove 'not' and use !=
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Craig Harrison (Code Review)

unread,
May 7, 2012, 1:17:50 PM5/7/12
to Nirnimesh, Bartosz Fabianowski
Craig Harrison has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 2: (5 inline comments)

....................................................
File client/cros/enterprise_ui_test.py
Line 93: try:
Done

Line 94: with open(self._TPM_PASSWORD_FILE, 'r') as passwd_file:
Done

Line 159: self.job.set_state('client_state', 'RETRY')
Done

....................................................
File server/site_tests/desktopui_EnterprisePolicyServer/control
Line 21: # ('test_prod_enterprise_executive_user', {'prod': True}),
Done

....................................................
File server/site_tests/desktopui_EnterprisePolicyServer/desktopui_EnterprisePolicyServer.py
Line 55: if not self.job.get_state('client_state') == 'SUCCESS':
Done
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Nirnimesh (Code Review)

unread,
May 7, 2012, 2:11:23 PM5/7/12
to Craig Harrison, Bartosz Fabianowski
Nirnimesh has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 4: (2 inline comments)

....................................................
File client/cros/enterprise_ui_test.py
Line 95: raise error.TestError('TPM is owned and TPM password file '
add path to file

Line 159: raise error.TestError('TPM was owned but is now cleared and needs '
I'm not sure this should be considered an error.
It's not an error as long as automation can proceed.
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 4
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Craig Harrison (Code Review)

unread,
May 7, 2012, 2:54:12 PM5/7/12
to Nirnimesh, Bartosz Fabianowski
Craig Harrison has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 4: (2 inline comments)

....................................................
File client/cros/enterprise_ui_test.py
Line 95: raise error.TestError('TPM is owned and TPM password file '
Done

Line 159: raise error.TestError('TPM was owned but is now cleared and needs '
Done
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 4
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Nirnimesh (Code Review)

unread,
May 7, 2012, 3:03:13 PM5/7/12
to Craig Harrison, Bartosz Fabianowski
Nirnimesh has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 6: Looks good to me, approved

(1 inline comment)

....................................................
File server/site_tests/desktopui_EnterprisePolicyServer/desktopui_EnterprisePolicyServer.py
Line 51: if self.job.get_state('client_state') == 'REBOOT':
this looks a little littered. It would be nice if run_client_test could re-run itself.
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 6
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Craig Harrison (Code Review)

unread,
May 7, 2012, 3:26:15 PM5/7/12
to Nirnimesh, Bartosz Fabianowski
Craig Harrison has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 6: (1 inline comment)

....................................................
File server/site_tests/desktopui_EnterprisePolicyServer/desktopui_EnterprisePolicyServer.py
Line 51: if self.job.get_state('client_state') == 'REBOOT':
Done
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 6
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Nirnimesh (Code Review)

unread,
May 7, 2012, 3:43:34 PM5/7/12
to Craig Harrison, Bartosz Fabianowski
Nirnimesh has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 7: (1 inline comment)

....................................................
File server/site_tests/desktopui_EnterprisePolicyServer/desktopui_EnterprisePolicyServer.py
Line 39: self.reboot_client()
The loop is ugly.
Just call self.run_client_test(sbutest, prod, enroll) after this line
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 7
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Craig Harrison (Code Review)

unread,
May 7, 2012, 5:03:30 PM5/7/12
to Nirnimesh, Bartosz Fabianowski
Craig Harrison has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 7: (1 inline comment)

Cleaned up run_client_test and improved doc strings. Ready for review.

....................................................
File server/site_tests/desktopui_EnterprisePolicyServer/desktopui_EnterprisePolicyServer.py
Line 39: self.reboot_client()
Done
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 7
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Nirnimesh (Code Review)

unread,
May 7, 2012, 5:22:16 PM5/7/12
to Craig Harrison, Bartosz Fabianowski
Nirnimesh has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 10: Looks good to me, approved
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 10
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>

Craig Harrison (Code Review)

unread,
May 7, 2012, 5:48:50 PM5/7/12
to Nirnimesh, Bartosz Fabianowski
Craig Harrison has posted comments on this change.

Change subject: Modify EnterpriseUITest autotests to attempt to clear the TPM if owned on test initialization.
......................................................................


Patch Set 10: Verified; Looks good to me, approved; Ready
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d053b09f9f823b5d7d017275ba346d5b0180492
Gerrit-PatchSet: 10
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Craig Harrison <cra...@chromium.org>
Reply all
Reply to author
Forward
0 new messages