diff options
author | Tom Cherry <tomcherry@google.com> | 2015-11-05 10:07:53 -0800 |
---|---|---|
committer | Tom Cherry <tomcherry@google.com> | 2015-11-05 10:07:53 -0800 |
commit | a7c7bce252a6bce1539e9caa84420de3698029e7 (patch) | |
tree | e9118ab62eaecc0309cc2daf9a70736de15d8074 /libsync | |
parent | 1e2382a0277eb36fb57a3a54202945556dfd234b (diff) | |
download | system_core-a7c7bce252a6bce1539e9caa84420de3698029e7.tar.gz system_core-a7c7bce252a6bce1539e9caa84420de3698029e7.tar.bz2 system_core-a7c7bce252a6bce1539e9caa84420de3698029e7.zip |
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
Diffstat (limited to 'libsync')
-rw-r--r-- | libsync/tests/sync_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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; |