Comments (5)
I'll look into this.
from util-linux.
I would like to know about the test platform.
- For / and /etc/fstab, which types of filesystems do you use? btrfs?
- Could you run "findmnt --raw --noheadings -oMAJ:MIN --target /"? I would like to see the output.
The test case depends on the output of the command line of 2.
The output is empty on your platform. It causes the failure.
findmnt may be already installed on the platform.
So, I would like to see the output of both versions of lsfd: the version installed to the system and 2.40-rc2.
If you run the test case under a privileged user, please run 2 under the privileged user.
If not, run it under a non-privileged user.
from util-linux.
I think what we're seeing is an artifact of the namespacing used to run the build. The 'modern' sbuild setup uses unshare to set up the build environment, and it seems like there is no / mountpoint in this case.
$ mount
/dev/vda2 on /var/cache/apt type xfs (rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota)
udev on /dev/null type devtmpfs (rw,nosuid,relatime,size=5036980k,nr_inodes=1259245,mode=755,inode64)
udev on /dev/zero type devtmpfs (rw,nosuid,relatime,size=5036980k,nr_inodes=1259245,mode=755,inode64)
udev on /dev/full type devtmpfs (rw,nosuid,relatime,size=5036980k,nr_inodes=1259245,mode=755,inode64)
udev on /dev/random type devtmpfs (rw,nosuid,relatime,size=5036980k,nr_inodes=1259245,mode=755,inode64)
udev on /dev/urandom type devtmpfs (rw,nosuid,relatime,size=5036980k,nr_inodes=1259245,mode=755,inode64)
udev on /dev/tty type devtmpfs (rw,nosuid,relatime,size=5036980k,nr_inodes=1259245,mode=755,inode64)
udev on /dev/console type devtmpfs (rw,nosuid,relatime,size=5036980k,nr_inodes=1259245,mode=755,inode64)
none on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=100005,mode=620,ptmxmode=666)
tmpfs on /dev/shm type tmpfs (rw,relatime,uid=100000,gid=100000,inode64)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
$ stat /
File: /
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 254,2 Inode: 101243848 Links: 18
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2024-03-02 13:50:25.577691762 +0000
Modify: 2024-03-02 13:50:31.841100010 +0000
Change: 2024-03-02 13:50:31.841100010 +0000
Birth: 2024-03-02 13:50:25.577691762 +0000
$ stat /etc/fstab
File: /etc/fstab
Size: 37 Blocks: 8 IO Block: 4096 regular file
Device: 254,2 Inode: 662037 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2024-03-02 13:50:25.609688727 +0000
Modify: 2023-11-16 13:31:04.000000000 +0000
Change: 2024-03-02 13:50:25.609688727 +0000
Birth: 2024-03-02 13:50:25.609688727 +0000
$ findmnt --raw --noheadings -oMAJ:MIN --target /
(no output)
from util-linux.
#2822 is an additional, but different problem, only observed on the official buildds.
from util-linux.
Thank you for your analysis.
Can I ask you to try the following patch?
I expect /proc and /proc/cmdnline are available on any platforms.
diff --git a/tests/expected/lsfd/mkfds-inotify b/tests/expected/lsfd/mkfds-inotify
index cb55f9669..6fc0d1291 100644
--- a/tests/expected/lsfd/mkfds-inotify
+++ b/tests/expected/lsfd/mkfds-inotify
@@ -1,4 +1,4 @@
INOTIFY.INODES.RAW: 0
-INOTIFY.INODES.RAW == FSTAB\x0aROOT
+INOTIFY.INODES.RAW == CMDLINE\x0aPROC
INOTIFY.INODES.RAW (JSON): 0
INOTIFY.INODES.RAW == EXPECTED_JSON
diff --git a/tests/ts/lsfd/mkfds-inotify b/tests/ts/lsfd/mkfds-inotify
index 3f26849dd..a44fd77d1 100755
--- a/tests/ts/lsfd/mkfds-inotify
+++ b/tests/ts/lsfd/mkfds-inotify
@@ -29,20 +29,22 @@ ts_cd "$TS_OUTDIR"
PID=
FD=3
-ROOT="$(stat -c %i /)"@"$($TS_CMD_FINDMNT --raw --noheadings -oMAJ:MIN --target /)"
-FSTAB="$(stat -c %i /etc/fstab)"@"$($TS_CMD_FINDMNT --raw --noheadings -oMAJ:MIN --target /etc/fstab)"
+dir=/proc
+file=/proc/cmdline
+PROC="$(stat -c %i $dir)"@"$($TS_CMD_FINDMNT --raw --noheadings -oMAJ:MIN --target $dir)"
+CMDLINE="$(stat -c %i $file)"@"$($TS_CMD_FINDMNT --raw --noheadings -oMAJ:MIN --target $file)"
{
- coproc MKFDS { "$TS_HELPER_MKFDS" inotify $FD; }
+ coproc MKFDS { "$TS_HELPER_MKFDS" inotify $FD dir=$dir file=$file ; }
if read -u ${MKFDS[0]} PID; then
EXPR='(PID == '"${PID}"') and (FD == '"$FD"')'
INODES_RAW=$(${TS_CMD_LSFD} --raw -n -o INOTIFY.INODES.RAW -Q "${EXPR}")
echo "INOTIFY.INODES.RAW": $?
- if [[ "$INODES_RAW" == "${FSTAB}"'\x0a'"${ROOT}" ]]; then
- echo "INOTIFY.INODES.RAW" == FSTAB'\x0a'ROOT
+ if [[ "$INODES_RAW" == "${CMDLINE}"'\x0a'"${PROC}" ]]; then
+ echo "INOTIFY.INODES.RAW" == CMDLINE'\x0a'PROC
else
echo "INOTIFY.INODES.RAW": "$INODES_RAW"
- echo "FSTAB": "$FSTAB"
- echo "ROOT": "$ROOT"
+ echo "CMDLINE": "$CMDLINE"
+ echo "PROC": "$PROC"
fi
INODES_RAW_JSON=$(${TS_CMD_LSFD} -J --raw -n -o INOTIFY.INODES.RAW -Q "${EXPR}")
echo "INOTIFY.INODES.RAW (JSON)": $?
@@ -51,7 +53,7 @@ FSTAB="$(stat -c %i /etc/fstab)"@"$($TS_CMD_FINDMNT --raw --noheadings -oMAJ:MIN
"lsfd": [
{
"inotify.inodes.raw": [
- "$FSTAB", "$ROOT"
+ "$CMDLINE", "$PROC"
]
}
]
from util-linux.
Related Issues (20)
- blkdiscard all unpartitioned space HOT 5
- hexdump hang when reading format file with --format-file HOT 1
- Heap Buffer Overflow in Hexdump when processing format files
- Multiple memory corruption problems in dmesg
- Any interest in better supporting library consumers who use CMake with find_package HOT 8
- libtool: "has not been installed" warnings and related errors for multiple libraries HOT 1
- support env. variables to define output columns in ls-like tools
- "hexdump file" displays incorrect Windows text file line termination HOT 4
- lsfd/mkfds-socketpair + mkfds-unix-stream-requiring-sockdiag tests fail on Debian buildds HOT 11
- `losetup --find` reports a lost loop device even in a container HOT 3
- run "lscpu",The value of "CPU min MHz" is 0
- run "lscpu",The value of "CPU min MHz" is 0
- Using the X-mount.idmap option in fstab HOT 2
- Use of explicit_bzero in sha1.c without checking if it is available
- dmesg --follow --json output fails to close object while waiting for the next message
- subdir mount `X-mount.subdir=` option do not work on bcachefs HOT 8
- mount(8): treat `-o $option=` as `FSCONFIG_SET_STRING` in new mount api
- fdisk: autocomplete for loading script file adds space to suggested filename
- meson: translated man pages HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from util-linux.