diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-01-15 15:52:41 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-01-17 19:17:41 +0100 |
commit | 9702a41cee31e3588e46485a5db06d1d7c222d30 (patch) | |
tree | 821082023cc14e6704589afd7bc261b516bc44b6 /rt/tst-mqueue9.c | |
parent | 5f3a7ebc358fdcbafcab4f1bf4067120fb519dfc (diff) | |
download | glibc-9702a41cee31e3588e46485a5db06d1d7c222d30.zip glibc-9702a41cee31e3588e46485a5db06d1d7c222d30.tar.gz glibc-9702a41cee31e3588e46485a5db06d1d7c222d30.tar.bz2 |
rt/tst-mqueue*: Return UNSUPPORTED when mq_open fails with ENOSYS
Rather than returning 0 or a failure.
Diffstat (limited to 'rt/tst-mqueue9.c')
-rw-r--r-- | rt/tst-mqueue9.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/rt/tst-mqueue9.c b/rt/tst-mqueue9.c index ef22336..fe991ec 100644 --- a/rt/tst-mqueue9.c +++ b/rt/tst-mqueue9.c @@ -21,6 +21,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <support/check.h> #include "tst-mqueue.h" #define TEST_FUNCTION do_test () @@ -41,11 +42,14 @@ do_test (void) if (q == (mqd_t) -1) { + if (errno == ENOSYS) + FAIL_UNSUPPORTED ("mq_open not supported"); + printf ("mq_open failed with: %m\n"); - return 0; + return 1; } - else - add_temp_mq (name); + + add_temp_mq (name); if (seteuid (1) != 0) { |