util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruce Dubbs <bruce.dubbs@gmail.com>
To: "Aurélien Lajoie" <orel@melix.net>,
	Util-Linux <util-linux@vger.kernel.org>
Subject: Re: util-linux-2.35.2 test failures
Date: Wed, 27 May 2020 00:13:03 -0500	[thread overview]
Message-ID: <1433cd9b-2f1a-f0e7-2f33-eeb3bbdf520e@gmail.com> (raw)
In-Reply-To: <a012e30b-4aad-5e6c-8e0b-2789fb2edf32@gmail.com>

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@gmail.com> 
>> 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@gmail.com> 
>>>> 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

  reply	other threads:[~2020-05-27  5:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 22:34 util-linux-2.35.2 test failures Bruce Dubbs
2020-05-26 23:07 ` Aurélien Lajoie
2020-05-26 23:36   ` Bruce Dubbs
2020-05-27  3:11     ` Aurélien Lajoie
2020-05-27  3:43       ` Bruce Dubbs
2020-05-27  5:13         ` Bruce Dubbs [this message]
2020-05-27 13:11 ` Karel Zak
2020-05-27 15:55   ` Bruce Dubbs
2020-05-27 18:07     ` Bruce Dubbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433cd9b-2f1a-f0e7-2f33-eeb3bbdf520e@gmail.com \
    --to=bruce.dubbs@gmail.com \
    --cc=orel@melix.net \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).