[LTP] [PATCH] shmctl01: don't use hardcoded index == 0 for SHM_STAT test

Petr Vorel pvorel@suse.cz
Mon May 20 21:58:05 CEST 2019


Hi Jan,

> Test fails on SHM_STAT testcase:
>    shmctl01    5  TFAIL  :  shmctl01.c:173: shmctl01 call failed
>                             errno = 22 : Invalid argument
>    shmctl(0, SHM_STAT, 0x601060)           = -EINVAL

> since following commit:
>    commit 99db46ea292780cd978d56932d9445b1e8bdafe8
>    Author: Manfred Spraul <manfred@colorfullife.com>
>    Date:   Tue May 14 15:46:36 2019 -0700
>      ipc: do cyclic id allocation for the ipc object.

> Don't rely on index 0 being always available, but instead
> use (maximum) index returned by SHM_INFO.

> Signed-off-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Petr Vorel <petr.vorel@gmail.com>

Good catch + further improvements.

Kind regards,
Petr


More information about the ltp mailing list