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

Alessandro Carminati
2022-11-04T12:09:41Z

Hello Richard,

Thanks for the detailed review.
If in the future I want to contribute more to the LTP project, I need
to provide myself with a CI pipeline like yours.
I appreciated the review that was very detailed, but I couldn't address
a single comment.

>> + if (!ioctl(fd, BTRFS_IOC_FS_INFO, &args)) {
>What happens if the test author allows this function to be called on
tmpfs, rootfs, etc.? Or if the FS is valid, but has the same issue as
BTRFS.

I have gone thorough all the file systems supported by LTP at this stage,
and I noticed that BTRFS is the only file system that owns this
singularity.
In addition to this, I also dared to assume that if device major number
is == 0 then the test is facing the BTRFS.
This assumption might not be true in general, but I tested it to be
true in the test supported file system.
Is your comment referring to this?

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 | 87 ++++++++++++++++++++++++++++++----------------
2 files changed, 63 insertions(+), 31 deletions(-)