[LTP] [PATCH 0/3] tst_device: add support for overlayfs
Jeff Moyer
jmoyer@redhat.com
Fri Feb 7 16:28:05 CET 2025
Hi, Cyril,
Cyril Hrubis <chrubis@suse.cz> writes:
> Hi!
>> > tst_tmpdir.c:316: TINFO: Using
>> > /mnt/fstests/TEST_DIR/ovl-mnt/ltp-hSHEHy5M0s/LTP_aio4q4GMW as
>> > tmpdir (overlayfs filesystem)
>> > tst_test.c:1888: TINFO: LTP version: 20220121-2271-g91a10df22
>> > tst_test.c:1892: TINFO: Tested kernel: vendor kernel
>> > tst_test.c:1723: TINFO: Timeout per run is 0h 40m 00s
>> > aiocp.c:211: TINFO: Maximum AIO blocks: 65536
>> > tst_device.c:551: TINFO: Use BTRFS specific strategy
>> > tst_device.c:569: TBROK: BTRFS ioctl failed. Is . on a tmpfs?: ENOTTY (25)
>>
>> > The issue is that stat(2) on an overlayfs mount point will return a
>> > major device number of 0. The code assumes this is btrfs, and tries
>> > to issue a btrfs-specific ioctl. When that fails, the final message is
>> > printed that suggests this might be tmpfs.
>>
>> > I modified the code to use statfs(2) to get the file system type, and
>> > use that to determine which file system specific code to call. Finally, I
>> > added code to parse out the upper directory from the overlayfs mount options
>> > using libmount. libmount is part of util-linux, so it should be fairly
>>
>> We try to avoid external libraries to help testing kernel on some minimal
>> embedded devices. @Cyril: is it ok to drag libmount-devel?
>
> For the base LTP library? I would say no.
OK, I'll spin a version with custom parsing code.
Thanks for taking a look!
-Jeff
More information about the ltp
mailing list