suspend: Fix SuspendSepolicyTests for sysfs paths with spaces
SuspendSepolicyTests was failing when sysfs wakeup node paths contained
spaces (e.g. "/sys/devices/.../GT 7936:00/wakeup/wakeup61"). The
original script constructed a space-separated array of paths from `adb
shell`, which incorrectly split paths containing spaces into multiple
invalid paths.
This CL fixes the path parsing by:
1. Modifying `get_wakeup_paths` to output paths separated by newlines
instead of a space-separated string.
2. Setting `IFS=$'\n'` before reading the output into `wakeup_paths` to
ensure paths with spaces are kept intact.
3. Adding quotes around path variables across various functions
so `adb shell` commands handle them correctly.
Bug: 499953896
Test: ./SuspendSepolicyTests.sh: No missing sysfs_wakeup labels
Flag: NONE test only
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:4427ac70d5036655226f89c06c7a824d8c0ddfd2
Merged-In: I38c54354cb44e1830081de6e9cb07df1c8498699
Change-Id: I38c54354cb44e1830081de6e9cb07df1c8498699
1 file changed