From 5b1e756298145bb1f38f71deb29872cbd9d2e77e Mon Sep 17 00:00:00 2001 From: mpi Date: Sun, 30 Apr 2017 10:11:03 +0000 Subject: [PATCH] Check that unsupported operation returns ENOSYS. --- regress/sys/kern/futex/futex.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.20.1