From a7c7bce252a6bce1539e9caa84420de3698029e7 Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Thu, 5 Nov 2015 10:07:53 -0800 Subject: Fix isValid() condition for libsync tests Upstream modifications in K3.12 to the sw_sync driver set O_CLOEXEC on the fd's returned by the SW_SYNC_IOC_CREATE_FENCE ioctl, therefore we check the return of fcntl() for a non-negative value instead of strictly 0. Change-Id: If4c82750fcc0aa3a57f243fa2a94691e3150e4a4 --- libsync/tests/sync_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libsync') diff --git a/libsync/tests/sync_test.cpp b/libsync/tests/sync_test.cpp index 55cd68773..2c409dc27 100644 --- a/libsync/tests/sync_test.cpp +++ b/libsync/tests/sync_test.cpp @@ -50,7 +50,7 @@ public: bool isValid() const { if (m_fdInitialized) { int status = fcntl(m_fd, F_GETFD, 0); - if (status == 0) + if (status >= 0) return true; else return false; @@ -92,7 +92,7 @@ public: bool isValid() const { if (m_fdInitialized) { int status = fcntl(m_fd, F_GETFD, 0); - if (status == 0) + if (status >= 0) return true; else return false; -- cgit v1.2.3-54-g00ecf