diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-04-30 10:11:04 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-04-30 10:11:04 +0000 |
commit | 22d14bd3c139dd25c22669e4e75a1ac94d35f79e (patch) | |
tree | adf767df743291812f5c4fccf0d0e1d1f5e175be | |
parent | cb6d8536338d1eb5ee375ec6c8ece2efd29f7ad0 (diff) |
Check that unsupported operation returns ENOSYS.
-rw-r--r-- | regress/sys/kern/futex/futex.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/regress/sys/kern/futex/futex.c b/regress/sys/kern/futex/futex.c index 643aa05cbdb..f60f9362067 100644 --- a/regress/sys/kern/futex/futex.c +++ b/regress/sys/kern/futex/futex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: futex.c,v 1.1 2017/04/30 09:03:58 mpi Exp $ */ +/* $OpenBSD: futex.c,v 1.2 2017/04/30 10:11:03 mpi Exp $ */ /* * Copyright (c) 2017 Martin Pieuchot * @@ -40,6 +40,9 @@ main(int argc, char *argv[]) struct timespec abs = { 0, 5000 }; pthread_t thread; + /* Invalid operation */ + assert(futex(&lock, 0xFFFF, 0, 0, NULL) == ENOSYS); + /* Incorrect pointer */ assert(futex_twait((void *)0xdeadbeef, 1, 0, NULL) == EFAULT); |