All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 3/9] syscalls/ipc: shmctl04: Rewrite from scratch.
Date: Mon, 7 Sep 2020 13:16:40 +0200	[thread overview]
Message-ID: <20200907111640.GA10649@yuki.lan> (raw)
In-Reply-To: <CAEemH2dHcasASDdXKypSwYkg7Yq1+ynO3-Z6QcxMwP6M=Qh3mQ@mail.gmail.com>

Hi!
> It failed many times on my personal laptop (5.4.19-100.fc30.x86_64).
> 
> $ cat /proc/sysvipc/shm
>        key      shmid   perms        size      cpid    lpid    nattch   uid
>   gid    cuid    cgid      atime         dtime              ctime
>      rss        swap
>          0          6         1600      524288   2778   5447      2     1000
>  1000  1000  1000 1595120306 1595120306 1595119412      4096        0
>          0          8         1600      524288   1903   2043      2     1000
>  1000  1000  1000 1595119515     0                 1595119515     24576
>    0
> 
> $ ./shmctl04
> tst_test.c:1245: INFO: Timeout per run is 0h 05m 00s
> shmctl04.c:119: PASS: SHM_INFO returned valid index 8
> shmctl04.c:70: PASS: used_ids = 3
> shmctl04.c:77: PASS: shm_rss = 7
> shmctl04.c:84: PASS: shm_swp = 0
> shmctl04.c:91: PASS: shm_tot = 257
> shmctl04.c:95: FAIL: highest shmid = 8, expected 65537
> 
> Summary:
> passed   5
> failed   1
> skipped  0
> warnings 0
> 
> After printing the shm_proc during test running, I guess the 'shmid' is not
> listing in number order sometimes which probably caused that failure.

Looking at the result closely, I guess that I messed up and got confused
here, the return value from SHM_INFO is highest index into the kernel
array, which is equal to highest shmid only by an accident on a freshly
booted machine. I will fix that part in v2.

> 'SHM_STAT_ANY' is introduced since Linux 4.17. We have to confirm the SUT
> supporting before we running it.
> 
> Also, we'd better define it in "ipcshm.h" to avoid compiling errors with
> the old distro.
> 
> shmctl04.c: In function 'verify_shminfo':
> shmctl04.c:114: error: 'SHM_STAT_ANY' undeclared (first use in this
> function)
> shmctl04.c:114: error: (Each undeclared identifier is reported only once
> shmctl04.c:114: error: for each function it appears in.)

Will fix as well.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2020-09-07 11:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 16:34 [LTP] [PATCH 0/9] Rewrite shmctl() testcases Cyril Hrubis
2020-07-17 16:34 ` [LTP] [PATCH 1/9] syscalls/ipc: shmctl02: Convert to the new library Cyril Hrubis
2020-07-19  2:51   ` Li Wang
2020-07-21 14:32   ` Martin Doucha
2020-07-17 16:34 ` [LTP] [PATCH 2/9] syscalls/ipc: shmctl03: Remove Cyril Hrubis
2020-07-17 16:34 ` [LTP] [PATCH 3/9] syscalls/ipc: shmctl04: Rewrite from scratch Cyril Hrubis
2020-07-19  7:48   ` Li Wang
2020-09-07 11:16     ` Cyril Hrubis [this message]
2020-07-28  9:16   ` Petr Vorel
2020-07-17 16:34 ` [LTP] [PATCH 4/9] syscalls/ipc: shmctl05 remove lib dependency Cyril Hrubis
2020-07-17 16:34 ` [LTP] [PATCH 5/9] lib/tst_assert: Add TST_ASSERT_ULONG() Cyril Hrubis
2020-07-17 16:34 ` [LTP] [PATCH 6/9] syscalls/ipc: Add shmctl() IPC_INFO test Cyril Hrubis
2020-07-19  9:36   ` Li Wang
2020-07-21 16:03   ` Martin Doucha
2020-07-17 16:34 ` [LTP] [PATCH 7/9] syscalls/ipc: Add shmctl07 test Cyril Hrubis
2020-07-19  9:50   ` Li Wang
2020-09-07 14:45     ` Cyril Hrubis
2020-07-17 16:34 ` [LTP] [PATCH 8/9] syscalls/ipc: Add shmctl IPC_SET test Cyril Hrubis
2020-07-20  2:26   ` Li Wang
2020-09-07 14:47     ` Cyril Hrubis
2020-07-22 10:35   ` Martin Doucha
2020-07-17 16:34 ` [LTP] [PATCH 9/9] syscalls/ipc: Rewrite shmctl01 Cyril Hrubis
2020-07-22 14:50   ` Martin Doucha
2020-07-20  7:14 ` [LTP] [PATCH 0/9] Rewrite shmctl() testcases Yang Xu

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=20200907111640.GA10649@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.