summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorDarren Hart <dvhart@infradead.org>2015-07-21 01:48:37 +0300
committerShuah Khan <shuahkh@osg.samsung.com>2015-07-21 03:29:38 +0300
commitfee50f3c8427aacabfb603229bf0a9056c3f2638 (patch)
tree0ede8dc00b075c1ea819683cbbbcfca86e3ecc3f /tools/testing
parentd770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 (diff)
downloadlinux-fee50f3c8427aacabfb603229bf0a9056c3f2638.tar.xz
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>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/futex/functional/futex_requeue_pi_signal_restart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/futex/functional/futex_requeue_pi_signal_restart.c b/tools/testing/selftests/futex/functional/futex_requeue_pi_signal_restart.c
index 7f0c756993af..3d7dc6afc3f8 100644
--- a/tools/testing/selftests/futex/functional/futex_requeue_pi_signal_restart.c
+++ b/tools/testing/selftests/futex/functional/futex_requeue_pi_signal_restart.c
@@ -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;