syscalls/shmctl: Using TERRNO to macth errno
PATCH 1/1 syscalls/shmctl: Using TERRNO to macth errno
Hi Xu, Li,
On the other hand, we have created a shm in setup, why we query with SHM_INFO and return 0?
Best Regards,
Gongyi
Quoted 59 lines
Hi Gongyi
The
SHM_STAT_ANYcmd was introduced since kernel 4.17. I guess we should add check for it.Quoted 55 lines
Hi Li,
Yes, I find the problem in my testing of qemu with kernel version 4.4 and the config is
vexpress_defconfig.Specifically as follow:
tst_test.c:1294: TINFO: Timeout per run is 0h 05m 00s
shmctl04.c:119: TINFO: Test
SHM_STAT_ANYwith nobody user
TST_RET: 0SHM_STAT_ANY: 15shmctl04.c:134: TFAIL:
SHM_INFOhaven't returned a valid index: EINVAL
(22)shmctl04.c:150: TFAIL: Counted used = 0,
used_ids= 1shmctl04.c:85: TPASS:
used_ids= 1shmctl04.c:92: TPASS:
shm_rss= 0shmctl04.c:99: TPASS:
shm_swp= 0shmctl04.c:106: TPASS:
shm_tot= 1shmctl04.c:119: TINFO: Test
SHM_STAT_ANYwith root user
TST_RET: 0SHM_STAT_ANY: 15shmctl04.c:134: TFAIL:
SHM_INFOhaven't returned a valid index: EINVAL
(22)shmctl04.c:150: TFAIL: Counted used = 0,
used_ids= 1shmctl04.c:85: TPASS:
used_ids= 1shmctl04.c:92: TPASS:
shm_rss= 0shmctl04.c:99: TPASS:
shm_swp= 0shmctl04.c:106: TPASS:
shm_tot= 1Summary:
passed 8
failed 4
broken 0
skipped 0
warnings 0
PATCH 1/1 syscalls/shmctl: Using TERRNO to macth errno
Hi Gongyi
Quoted 3 lines
Hi Xu, Li,
On the other hand, we have created a shm in setup, why we query with
SHM_INFOand return 0?
Because SHM_INFO ignores shm_id parameter like IPC_INFO in kernel. We created a shm in setup just to make sure that there is at least one during the testrun.
Quoted 63 lines
Best Regards,
GongyiQuoted 59 lines
Hi Gongyi
The
SHM_STAT_ANYcmd was introduced since kernel 4.17. I guess we should add check for it.Quoted 55 lines
Hi Li,
Yes, I find the problem in my testing of qemu with kernel version 4.4 and the config is
vexpress_defconfig.Specifically as follow:
tst_test.c:1294: TINFO: Timeout per run is 0h 05m 00s
shmctl04.c:119: TINFO: Test
SHM_STAT_ANYwith nobody user
TST_RET: 0SHM_STAT_ANY: 15shmctl04.c:134: TFAIL:
SHM_INFOhaven't returned a valid index: EINVAL
(22)shmctl04.c:150: TFAIL: Counted used = 0,
used_ids= 1shmctl04.c:85: TPASS:
used_ids= 1shmctl04.c:92: TPASS:
shm_rss= 0shmctl04.c:99: TPASS:
shm_swp= 0shmctl04.c:106: TPASS:
shm_tot= 1shmctl04.c:119: TINFO: Test
SHM_STAT_ANYwith root user
TST_RET: 0SHM_STAT_ANY: 15shmctl04.c:134: TFAIL:
SHM_INFOhaven't returned a valid index: EINVAL
(22)shmctl04.c:150: TFAIL: Counted used = 0,
used_ids= 1shmctl04.c:85: TPASS:
used_ids= 1shmctl04.c:92: TPASS:
shm_rss= 0shmctl04.c:99: TPASS:
shm_swp= 0shmctl04.c:106: TPASS:
shm_tot= 1Summary:
passed 8
failed 4
broken 0
skipped 0
warnings 0