Protect against unexpected device wipe? |
|
Issue descriptionWould it be feasible to make device provisioning for tests opt-in via command line argument, or add a sanity check to verify that it's a previously-provisioned test device or a factory reset device? Developers are encouraged to run unittests as part of development, and I was surprised to see that the tests repeatedly rebooted my phone. While looking at the code, I saw that there's also logic to wipe Chrome data and even wipe the entire device that seems to be enabled by default. That's kind of scary since the phone I'm running the tests on has stuff on it I want to keep. (Even if the assumption is that people should only run tests on dedicated test devices, I think there's still a risk that someone may accidentally have left a non-test device connected to the dev PC's USB port.) Currently, there's an opt-out option --skip-clear-data, but IMHO it would be a lot safer if the default would be to not clear by default and have automated tests add a --clear-data option explicitly that's added by a higher-level driver script. That's assuming that the tests on bots are usually automated where the command line doesn't need to be typed manually. (If people frequently run tests on bots with manually specified command lines this would of course be annoying.) Alternatively, could there be a sanity check or heuristic to tell if a device is a bot test device, i.e. create a file in a known location when provisioning it for the first time, or checking if it's a freshly factory reset device, and not wiping if it's in an unknown state. For the record, I didn't lose any data due to this, but if I'm understanding it right it does seem like an accident waiting to happen.
,
Oct 27 2017
Sorry, I may have been confused. The unexpected device reboots happened from bin/run_gpu_unittests. I was trying to track down where this is happening to see if there's a flag to stop it from doing so, and got the impression that this was the third_party/catapult/devil/ code doing so, and that the wiping it was referring to in log messages was also the aggressive devil/ code. If it's different code, please disregard this bug. I can't currently reproduce the reboots with an intentional test failure, so I don't know what the specific messages were that I was seeing. |
|
►
Sign in to add a comment |
|
Comment 1 by jbudorick@chromium.org
, Oct 27 2017