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: David Binderman <dcb314@hotmail.com> Cc: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
This commit is contained in:
parent
d770e558e2
commit
fee50f3c84
|
@ -191,7 +191,7 @@ int main(int argc, char *argv[])
|
||||||
if (res > 0) {
|
if (res > 0) {
|
||||||
atomic_set(&requeued, 1);
|
atomic_set(&requeued, 1);
|
||||||
break;
|
break;
|
||||||
} else if (res > 0) {
|
} else if (res < 0) {
|
||||||
error("FUTEX_CMP_REQUEUE_PI failed\n", errno);
|
error("FUTEX_CMP_REQUEUE_PI failed\n", errno);
|
||||||
ret = RET_ERROR;
|
ret = RET_ERROR;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue