Chrome OS Version: R68-10702.0.0
Chrome OS Platform: grunt
Steps To Reproduce:
(1) test_that --fast -b grunt ${IP} firmware_WriteProtect
(2)
(3)
Expected Result:
No exception about '_original_wp'.
Actual Result:
05/22 17:23:33.917 INFO | test_runner_utils:0259| autoserv| Installing autotest on ${IP}
05/22 17:23:33.934 INFO | test_runner_utils:0259| autoserv| Master ssh connection to ${IP} is down.
05/22 17:23:34.937 INFO | test_runner_utils:0259| autoserv| Starting master ssh connection '/usr/bin/ssh -a -x -N -o ControlMaster=yes -o ControlPath=/tmp/_autotmp_CmfpWxssh-master/socket -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o ConnectTimeout=30 -o ServerAliveInterval=900 -o ServerAliveCountMax=3 -o ConnectionAttempts=4 -o Protocol=2 -l root -p 22 ${IP}'
05/22 17:23:40.000 INFO | test_runner_utils:0259| autoserv| Timed out waiting for master-ssh connection to be established.
05/22 17:24:44.653 INFO | test_runner_utils:0259| autoserv| Master ssh connection to ${IP} is down.
05/22 17:24:44.655 INFO | test_runner_utils:0259| autoserv| Starting master ssh connection '/usr/bin/ssh -a -x -N -o ControlMaster=yes -o ControlPath=/tmp/_autotmp_Jnk6eussh-master/socket -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o ConnectTimeout=30 -o ServerAliveInterval=900 -o ServerAliveCountMax=3 -o ConnectionAttempts=4 -o Protocol=2 -l root -p 22 ${IP}'
05/22 17:24:49.716 INFO | test_runner_utils:0259| autoserv| Timed out waiting for master-ssh connection to be established.
05/22 17:25:54.283 INFO | test_runner_utils:0259| autoserv| Master ssh connection to ${IP} is down.
05/22 17:25:54.284 INFO | test_runner_utils:0259| autoserv| Starting master ssh connection '/usr/bin/ssh -a -x -N -o ControlMaster=yes -o ControlPath=/tmp/_autotmp_kO0Jepssh-master/socket -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o ConnectTimeout=30 -o ServerAliveInterval=900 -o ServerAliveCountMax=3 -o ConnectionAttempts=4 -o Protocol=2 -l root -p 22 ${IP}'
05/22 17:25:59.345 INFO | test_runner_utils:0259| autoserv| Timed out waiting for master-ssh connection to be established.
05/22 17:27:03.919 INFO | test_runner_utils:0259| autoserv| Master ssh connection to ${IP} is down.
05/22 17:27:03.921 INFO | test_runner_utils:0259| autoserv| Starting master ssh connection '/usr/bin/ssh -a -x -N -o ControlMaster=yes -o ControlPath=/tmp/_autotmp_FdkXpTssh-master/socket -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o ConnectTimeout=30 -o ServerAliveInterval=900 -o ServerAliveCountMax=3 -o ConnectionAttempts=4 -o Protocol=2 -l root -p 22 ${IP}'
05/22 17:27:08.988 INFO | test_runner_utils:0259| autoserv| Timed out waiting for master-ssh connection to be established.
05/22 17:28:13.533 INFO | test_runner_utils:0259| autoserv| The test failed with the following exception
05/22 17:28:13.534 INFO | test_runner_utils:0259| autoserv| Traceback (most recent call last):
05/22 17:28:13.534 INFO | test_runner_utils:0259| autoserv| File "/build/grunt/usr/local/build/autotest/client/common_lib/test.py", line 598, in _exec
05/22 17:28:13.535 INFO | test_runner_utils:0259| autoserv| _cherry_pick_call(self.initialize, *args, **dargs)
05/22 17:28:13.535 INFO | test_runner_utils:0259| autoserv| File "/build/grunt/usr/local/build/autotest/client/common_lib/test.py", line 746, in _cherry_pick_call
05/22 17:28:13.535 INFO | test_runner_utils:0259| autoserv| return func(*p_args, **p_dargs)
05/22 17:28:13.536 INFO | test_runner_utils:0259| autoserv| File "/build/grunt/usr/local/build/autotest/server/site_tests/firmware_WriteProtect/firmware_WriteProtect.py", line 18, in initialize
05/22 17:28:13.536 INFO | test_runner_utils:0259| autoserv| super(firmware_WriteProtect, self).initialize(host, cmdline_args)
05/22 17:28:13.537 INFO | test_runner_utils:0259| autoserv| File "/build/grunt/usr/local/build/autotest/server/cros/faft/firmware_test.py", line 134, in initialize
05/22 17:28:13.537 INFO | test_runner_utils:0259| autoserv| if not self.faft_client.system.dev_tpm_present():
05/22 17:28:13.538 INFO | test_runner_utils:0259| autoserv| File "/build/grunt/usr/local/build/autotest/server/cros/faft/rpc_proxy.py", line 33, in __call__
05/22 17:28:13.538 INFO | test_runner_utils:0259| autoserv| return self.__call_method(self.__name, *args, **dargs)
05/22 17:28:13.539 INFO | test_runner_utils:0259| autoserv| File "/build/grunt/usr/local/build/autotest/server/cros/faft/rpc_proxy.py", line 78, in __call_faft_client
05/22 17:28:13.539 INFO | test_runner_utils:0259| autoserv| self.connect()
05/22 17:28:13.539 INFO | test_runner_utils:0259| autoserv| File "/build/grunt/usr/local/build/autotest/server/cros/faft/rpc_proxy.py", line 85, in connect
05/22 17:28:13.540 INFO | test_runner_utils:0259| autoserv| autotest.Autotest(self._client).install()
05/22 17:28:13.540 INFO | test_runner_utils:0259| autoserv| File "/build/grunt/usr/local/build/autotest/server/autotest.py", line 259, in install
05/22 17:28:13.541 INFO | test_runner_utils:0259| autoserv| self._install(host=host, autodir=autodir, use_packaging=use_packaging)
05/22 17:28:13.541 INFO | test_runner_utils:0259| autoserv| File "/build/grunt/usr/local/build/autotest/server/autotest.py", line 338, in _install
05/22 17:28:13.541 INFO | test_runner_utils:0259| autoserv| autodir = self.get_install_dir(host)
05/22 17:28:13.542 INFO | test_runner_utils:0259| autoserv| File "/build/grunt/usr/local/build/autotest/server/autotest.py", line 156, in get_install_dir
05/22 17:28:13.542 INFO | test_runner_utils:0259| autoserv| install_dir = cls._find_installable_dir(host)
05/22 17:28:13.543 INFO | test_runner_utils:0259| autoserv| File "/build/grunt/usr/local/build/autotest/server/autotest.py", line 178, in _find_installable_dir
05/22 17:28:13.543 INFO | test_runner_utils:0259| autoserv| ', '.join(client_autodir_paths))
05/22 17:28:13.544 INFO | test_runner_utils:0259| autoserv| AutoservInstallError: Unable to find a place to install Autotest; tried /usr/local/autotest, /usr/local/autodir
05/22 17:28:13.544 INFO | test_runner_utils:0259| autoserv| Caught exception: 'firmware_WriteProtect' object has no attribute '_original_wp'
The issue here seems to be that if the autotest server fails to connect, firmware_WriteProtect's cleanup handler will be called without first calling initialize, which means the firmware_WriteProtect object has not yet had an '_original_wp' attribute set.
Comment 1 by bugdroid1@chromium.org
, May 25 2018