On 5/26/20 10:43 PM, Bruce Dubbs wrote:
On 5/26/20 10:11 PM, Aurélien Lajoie wrote:
On Wed, May 27, 2020 at 1:36 AM Bruce Dubbs <bruce.dubbs@xxxxxxxxx>
wrote:
On 5/26/20 6:07 PM, Aurélien Lajoie wrote:
On Wed, May 27, 2020 at 12:34 AM Bruce Dubbs <bruce.dubbs@xxxxxxxxx>
wrote:
I'm getting three test failures and hope I can get someone to help.
The test failures are ipcs/mk-rm-msg, ipcs/mk-rm-sem, and
ipcs/mk-rm-shm.
Concentrating on mk-rm-msg, I found on the system:
./tests/output/ipcs/mk-rm-msg
./tests/ts/ipcs/mk-rm-msg
./tests/expected/ipcs/mk-rm-msg
The contents of the output and the expected files are identical:
How have you checked it ?
Yes. cmp ./tests/output/ipcs/mk-rm-msg ./tests/expected/ipcs/mk-rm-msg
gives no output.
Can be trailing spaces, final break line or other thing like this.
Can you share the files and the result of ./run.sh ipcs launch from
tests directory?
-------------------- util-linux regression tests --------------------
For development purpose only.
Don't execute on production system!
kernel: 5.6.11-lfs-9.1
options: --srcdir=/sources/util-linux-2.35.2/tests/.. \
--builddir=/sources/util-linux-2.35.2/tests/..
ipcs: headers ... OK
ipcs: limits overflow
.../sources/util-linux-2.35.2/tests/../tests/ts/ipcs/limits: line 42:
echo: write error: Invalid argument
OK
ipcs: basic limits ... OK
ipcs: mk-rm-msg ... FAILED (ipcs/mk-rm-msg)
ipcs: mk-rm-sem ... FAILED (ipcs/mk-rm-sem)
ipcs: mk-rm-shm ... FAILED (ipcs/mk-rm-shm)
---------------------------------------------------------------------
3 tests of 6 FAILED
I'll note that I am not running as root, line 42 of ts/ipcs/limits seems
to want to write to:
$ ls -l /proc/sys/kernel/shm*
-rw-r--r-- 1 root root 0 May 26 18:27 /proc/sys/kernel/shm_rmid_forced
-rw-r--r-- 1 root root 0 May 26 14:32 /proc/sys/kernel/shmall
-rw-r--r-- 1 root root 0 May 26 14:32 /proc/sys/kernel/shmmax
-rw-r--r-- 1 root root 0 May 26 14:32 /proc/sys/kernel/shmmni
I get this output as a non root user
./run.sh ipcs
-------------------- util-linux regression tests --------------------
For development purpose only.
Don't execute on production system!
kernel: 5.3.0-53-generic
options: --srcdir=/home/aurelienl/dev/util-linux/tests/.. \
--builddir=/home/aurelienl/dev/util-linux/tests/..
ipcs: headers ... OK
ipcs: limits overflow ... SKIPPED (no root
permissions)
ipcs: basic limits ... OK
ipcs: mk-rm-msg ... OK
ipcs: mk-rm-sem ... OK
ipcs: mk-rm-shm ... OK
---------------------------------------------------------------------
All 6 tests PASSED
---------------------------------------------------------------------
OK, thanks. Some very minor progress:
ipcs: headers ... OK
ipcs: limits overflow ... SKIPPED (no root permissions)
ipcs: basic limits ... OK
ipcs: mk-rm-msg ... FAILED (ipcs/mk-rm-msg)
ipcs: mk-rm-sem ... FAILED (ipcs/mk-rm-sem)
ipcs: mk-rm-shm ... FAILED (ipcs/mk-rm-shm)
3 tests of 6 FAILED
But I did find
$ cat diff/ipcs/*
--- /dev/null 2020-05-13 00:30:52.352031152 -0500
+++ /sources/util-linux-2.35.2/tests/output/ipcs/mk-rm-msg.err
2020-05-26 22:26:15.955322405 -0500
@@ -0,0 +1,2 @@
+ipcrm: failed to parse argument: '0xa12709c3
+0xa12709c3'
--- /dev/null 2020-05-13 00:30:52.352031152 -0500
+++ /sources/util-linux-2.35.2/tests/output/ipcs/mk-rm-sem.err
2020-05-26 22:26:15.984321830 -0500
@@ -0,0 +1,3 @@
+ipcrm: failed to parse argument: '0x1e5d8a7d
+0x1e5d8a7d
+0x1e5d8a7d'
--- /dev/null 2020-05-13 00:30:52.352031152 -0500
+++ /sources/util-linux-2.35.2/tests/output/ipcs/mk-rm-shm.err
2020-05-26 22:26:16.012321273 -0500
@@ -0,0 +1,2 @@
+ipcrm: failed to parse argument: '0x12dec276
+0x12dec276'
I just don't know what argument it was trying to pass.
I figured out what is happening.
The code in question is doing:
$TS_CMD_IPCMK -Q 2>>$TS_OUTPUT | ipcmk_output_handler $TS_OUTPUT
$TS_OUTDIR/id-msg
$TS_CMD_IPCRM -Q "$(
$TS_CMD_IPCS -q |
awk -v id=$(cat $TS_OUTDIR/id-msg) '{if ($2 == id){print $1}}'
)" >> $TS_OUTPUT 2>> $TS_ERRLOG
ipcs -q gives output like:
0x96067edf 52 tester 644 0 0
0x96067edf 52 tester 644 0 0
so it is trying to run:
ipcrm -Q 0x25cee277\n0x96067edf
which gives:
ipcrm: failed to parse argument: '0x25cee277'
'0x25cee277'
The question is why there are two identical entries in the ipcs output.
Could this be a kernel issue? Code or configuration? My kernel is 5.6.11.
-- Bruce