Reset persist.log.tag while running testing
The system property changes the default log level for "all" log tags
even including the unique tag that this test uses. So, if it is set in
DUT, testing the behavior of APIs like __android_log_is_loggable
becomes impossible, because the system property can override the log
level that is given to the API by the test.
Work around this issue by resetting the system property while running
this test. It is restored to its original value (if it had one), after
the test is done, either successfully or not.
Bug: 279123901
Test: adb shell setprop persist.log.tag I
Run `atest CtsLiblogTestCases:liblog_global_state`
Change-Id: I36a55472d101f48b371f7aeee576da92e86e9add
Merged-In: I36a55472d101f48b371f7aeee576da92e86e9add
(cherry picked from commit eaee83036f427f050d5337431917abd166193fe6)
(this also includes the build fix from 39b3388ecb8efcc515b9105a827745d2a8d9d7a7)
3 files changed