]> git.ipfire.org Git - thirdparty/util-linux.git/commit
tests: (lsfd::mkfds-inotify) use findmnt(1) instead of stat(1) to get bdev numbers
authorMasatake YAMATO <yamato@redhat.com>
Fri, 5 Jan 2024 08:54:36 +0000 (17:54 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Fri, 5 Jan 2024 09:00:48 +0000 (18:00 +0900)
commitcc937cf3acfbdd89fd1ce318d764f89bfd0f12fc
tree339e055b1bcd994cef0964821e75ab1dfe63e752
parentfe139bbd691d82353518c4bacf21ce742eeaf4ea
tests: (lsfd::mkfds-inotify) use findmnt(1) instead of stat(1) to get bdev numbers

Close #2349

stat(2) on some filesystems including btrfs reports a block device
number (bdev number) with a offset. On the other hand, "inotify wd"
field of /proc/$pid/fdinfo/$fd for an inotify file reports bdev
numbers without offsets.

The offset caused the failure of lsfd::mkfds-inotify test case on
btrfs.  Unlike stat(2), findmnt can report bdev numbers without
offsets.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
tests/ts/lsfd/mkfds-inotify