[PATCH 1/2] tests: Additional IPC checks
Dmitry V. Levin
ldv at altlinux.org
Thu Sep 8 11:02:54 UTC 2016
On Wed, Sep 07, 2016 at 03:41:01PM +0300, Eugene Syromyatnikov wrote:
[...]
> + assert(semctl(0xfdb97531, 0xeca86420, 0xdeadbeef,
> + (unsigned long) 0xbadc0dedfacef00dULL) == -1);
> + printf("semctl\\(%d, %d, (IPC_64\\|)?%#x /\\* SEM_\\?\\?\\? \\*/, "
> + "\\[?%#lx\\]?\\) += %s\n",
> + 0xfdb97531, 0xeca86420, 0xdeadbeef,
> + (unsigned long) 0xbadc0dedfacef00dULL, sprintrc_grep(-1));
FAIL: ipc_sem
=============
Failed patterns of expected output:
semctl\(-38177487, -324508640, (IPC_64\|)?0xdeadbeef /\* SEM_\?\?\? \*/, \[?0xfacef00d\]?\) += -1 EINVAL \(Invalid argument\)
Actual output:
...
semctl(-38177487, -324508640, IPC_64|0xdeadbeef /* SEM_??? */, [0]) = -1 EINVAL (Invalid argument)
> + assert(semop(bogus_semid, sem_b2, bogus_nsops) == -1);
> + printf("semop(%d, [{%hu, %hd, %s%s%#hx}, %p], %u) = %s\n",
> + bogus_semid, sem_b2->sem_num, sem_b2->sem_op,
> + sem_b2->sem_flg & SEM_UNDO ? "SEM_UNDO|" : "",
> + sem_b2->sem_flg & IPC_NOWAIT ? "IPC_NOWAIT|" : "",
> + sem_b2->sem_flg & ~(SEM_UNDO | IPC_NOWAIT),
> + sem_b2 + 1, bogus_nsops, sprintrc(-1));
FAIL: semop
===========
3c3
< semop(-38177487, [{64206, -4083, SEM_UNDO|IPC_NOWAIT|0xa6ef}, 0xf75fa000], 3735928559) = -1 EINVAL (Invalid argument)
---
> semop(-38177487, 0xf75f9ffa, 3735928559) = -1 EINVAL (Invalid argument)
> + assert(semtimedop(bogus_semid, sem_b2, bogus_nsops, ts) == -1);
> + printf("semtimedop(%d, [{%hu, %hd, %s%s%#hx}, %p], %u, {%jd, %jd}) = "
> + "%s\n",
> + bogus_semid, sem_b2->sem_num, sem_b2->sem_op,
> + sem_b2->sem_flg & SEM_UNDO ? "SEM_UNDO|" : "",
> + sem_b2->sem_flg & IPC_NOWAIT ? "IPC_NOWAIT|" : "",
> + sem_b2->sem_flg & ~(SEM_UNDO | IPC_NOWAIT),
> + sem_b2 + 1, bogus_nsops,
> + (intmax_t) ts->tv_sec, (intmax_t) ts->tv_nsec,
> + sprintrc(-1));
FAIL: semop
===========
8c8
< semtimedop(-38177487, [{64206, -4083, SEM_UNDO|IPC_NOWAIT|0xa6ef}, 0xf75fa000], 3735928559, {1, 123456789}) = -1 EINVAL (Invalid argument)
---
> semtimedop(-38177487, 0xf75f9ffa, 3735928559, {1, 123456789}) = -1 EINVAL (Invalid argument)
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160908/a5bb70cc/attachment.bin>
More information about the Strace-devel
mailing list