autotest: using sensitive tpm_manager status
This is a workaround to let these autotests run on R86-13421.
BUG=b:176691740, b:178594014
TEST=test_that $DUT platform_*
Change-Id: Ia9f920841dae2131fbbf00076a4e570f89d73f6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2619407
Tested-by: Yi Chou <yich@google.com>
Reviewed-by: Leo Lai <cylai@google.com>
Commit-Queue: Yi Chou <yich@google.com>
(cherry picked from commit 20bf5c25d02d9f4fb55e51dbc0fadb3d801776fa)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2648148
Reviewed-by: Yi Chou <yich@google.com>
diff --git a/client/cros/tpm.py b/client/cros/tpm.py
index 1d58750..1793247 100644
--- a/client/cros/tpm.py
+++ b/client/cros/tpm.py
@@ -33,16 +33,16 @@
'Ready': True
}
"""
- out = run_cmd(TPM_MANAGER_CMD + ' status --nonsensitive')
+ out = run_cmd(TPM_MANAGER_CMD + ' status')
status = {}
- for field in ['is_enabled', 'is_owned']:
+ for field in ['enabled', 'owned']:
match = re.search('%s: (true|false)' % field, out)
if not match:
raise ChromiumOSError('Invalid TPM status: "%s".' % out)
status[field] = match.group(1) == 'true'
- status['Enabled'] = status['is_enabled']
- status['Owned'] = status['is_owned']
- status['Ready'] = status['is_enabled'] and status['is_owned']
+ status['Enabled'] = status['enabled']
+ status['Owned'] = status['owned']
+ status['Ready'] = status['enabled'] and status['owned']
return status