Commit fee50f3c authored by Darren Hart's avatar Darren Hart Committed by Shuah Khan

selftests/futex: Fix futex_cmp_requeue_pi() error handling

An earlier (pre-kernel-integration) refactoring of this code mistakenly
replaced the error condition, <, with a >. Use < to detect an error as
opposed to a successful requeue or signal race.
Reported-by: default avatarDavid Binderman <dcb314@hotmail.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent d770e558
......@@ -191,7 +191,7 @@ int main(int argc, char *argv[])
if (res > 0) {
atomic_set(&requeued, 1);
break;
} else if (res > 0) {
} else if (res < 0) {
error("FUTEX_CMP_REQUEUE_PI failed\n", errno);
ret = RET_ERROR;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment