[LTP] [PATCH 0/2] Fix tst_find_backing_dev adding BTRFS support and /dev/root missing case

Alessandro Carminati alessandro.carminati@gmail.com
Mon Nov 7 17:39:55 CET 2022


The test is specifically forbidden on tmpfs, but I agree with you that may
be some weird scenarios where the major is 0 and the filesystem is not BTRFS.
As predicted, if for example the ioctl_loop05 test is forced to run on tmpfs,
I found no way to make it if not change the code at tst_fs_in_skiplist, you
have a confusing error message:

tst_test.c:1526: TINFO: Timeout per run is 0h 00m 30s
tst_test.c:1278: TINFO: tmpfs is supported by the test
tst_device.c:94: TINFO: Found free device 0 '/dev/loop0'
loop0: detected capacity change from 0 to 2048
tst_device.c:545: TINFO: Use BTRFS specific strategy
tst_device.c:563: TBROK: opendir() failed: ENOENT (2)

LTP_SINGLE_FS_TYPE, if it is the env variable that was mentioned on the
previous mail in this thread, seems not to affect the fs skiplist.

By the way, I modified the code to produce a TBROK message if the ioctl
fails.
This version of the patch produces:

tst_test.c:1526: TINFO: Timeout per run is 0h 00m 30s
tst_test.c:1278: TINFO: tmpfs is supported by the test
tst_device.c:94: TINFO: Found free device 0 '/dev/loop0'
loop0: detected capacity change from 0 to 2048
tst_device.c:545: TINFO: Use BTRFS specific strategy
tst_device.c:562: TBROK: BTRFS ioctl failed. Is /tmp/iocVvqexV on a tmpfs?

Thanks
Alessandro

Alessandro Carminati (2):
  tst_find_backing_dev: Get dev name from /sys/dev/block/*/uevent
  c-test-api: Documentation updated

 doc/c-test-api.txt |  7 +++-
 lib/tst_device.c   | 91 +++++++++++++++++++++++++++++++---------------
 2 files changed, 66 insertions(+), 32 deletions(-)

-- 
2.34.1



More information about the ltp mailing list