strace/tests/mq.expected
Eugene Syromyatnikov 3e22464ec7 mq: Properly print mq_flags field
mq_flags field of struct mq_attr can contain only O_NONBLOCK flag (other
flags are treated as invalid by mq_getsetattr). Moreover, this field is
ignored by mq_open at all (O_NONBLOCK is set via oflag, not via attr
attribute).

* xlat/mq_attr_flags.in: New file.
* print_mq_attr.c: Include xlat/mq_attr_flags.h.
(printmqattr): New parameter, bool decode_flags; cast members of struct
mq_attr to long long type; use mq_attr_flags xlat for printing mq_flags;
print mq_flags as flags only in case decode_flags parameter is set
to true.
* mq.c (SYS_FUNC(mq_open)): Specify value of false for decode_flags
parameter of printmqattr call.
(SYS_FUNC(mq_getsetattr)): Specify value of true for decode_flags
parameter of printmqattr call.
* tests/mq.expected: Update expected output.
2016-10-29 02:54:02 +03:00

5 lines
313 B
Plaintext

mq_open\("strace-mq.test", O_RDONLY\|O_CREAT, 0700, NULL\) += 0
mq_getsetattr\(0, NULL, \{mq_flags=0, mq_maxmsg=[1-9][0-9]*, mq_msgsize=[1-9][0-9]*, mq_curmsgs=0\}\) += 0
mq_getsetattr\(0, \{mq_flags=0, mq_maxmsg=[1-9][0-9]*, mq_msgsize=[1-9][0-9]*, mq_curmsgs=0\}, NULL\) += 0
mq_unlink\("strace-mq.test"\) += 0