[LTP] [PATCH v1 0/3] tst_device.c: Handle Android path for backing device
Edward Liaw
edliaw@google.com
Mon Mar 20 23:37:20 CET 2023
e1b1ae66b240 ("tst_find_backing_dev: Get dev name from
/sys/dev/block/*/uevent") added a hardcoded path to check for the
backing device in /dev. On Android, it needs to check /dev/block.
The set_dev_path function was renamed to set_dev_loop_path and its
return value was changed from 1 on success to 0 on success to be more
consistent with other functions. A check was added to
tst_find_free_loopdev in the event that the loop device is not ready
yet, which appears to happen occasionally on Android.
Edward Liaw (3):
tst_device.c: Use PATH_MAX more consistently
set_dev_loop_path: Refactor set_dev_path and check return value
tst_find_backing_dev: Also check /dev/block/ for backing device
lib/tst_device.c | 59 ++++++++++++++++++++++++++++++------------------
1 file changed, 37 insertions(+), 22 deletions(-)
--
2.40.0.rc1.284.g88254d51c5-goog
More information about the ltp
mailing list