Commit graph

11 commits

Author SHA1 Message Date
Alexandros Frantzis
68223500ea libsync: Add fence info tests
This patch adds regression tests to check that the fence info returned
by libsync contains valid data.

Test: sync-unit-tests

Change-Id: I0c57c49b7be563efc9a43f12381059f20e0a4e52
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
2017-09-26 13:09:35 +03:00
Jesse Hall
41129a2526 sync: rename sync/sync.h to android/sync.h
Leave a temporary symlink from the old name to avoid having to change
all dependencies simultaneously.

Bug: 1901466
Test: m
Change-Id: Id210f0091457e52e1a6e048d241a723bdbe8779b
2017-02-23 18:44:50 -08:00
Jesse Hall
836661616f sync: implement sync_file_info
Also modifies sync-unit-test to use sync_file_info instead of the
deprecated sync_fence_info, but check that they match in several tests.

Bug: 35138793
Test: sync-unit-tests on bullhead
Change-Id: Ic672d1c89798435a8b71469500e82c770a66bf4d
2017-02-23 18:44:50 -08:00
mtezych
380b2f4fea libsync: Replace inserting tuple into unordered_map in favour of pair.
Inserting tuple into unordered_map relies on non standard libc++ extension:
http://stackoverflow.com/a/21313229
This change removes this dependency.

Test: sync-unit-tests (on hikey with SW_SYNC_USER built into kernel)
2017-01-30 23:39:03 +00:00
Gustavo Padovan
801492b8a6 libsync: tests: redefine PollOnDestroyedTimeline()
On mainline if the sw_sync timeline is destroyed the fences doesn't not
signal or error. So change the test to check if the fence is still there
by polling the fence with timeout zero and asserting if it is not
signalled.

Test: Sync unit tests still passes.
Change-Id: Icb8e629018eef35074ae91d0f29ed1f12e90492b
2017-01-17 14:29:41 -08:00
Gustavo Padovan
e4682802cb libsync: tests: remove WaitOnDestroyedTimeline test
The mainline Sync File implementation doesn't have wait ioctl anymore.
Only poll is supported now, and we already have a test for that.

Test: Sync unit tests still passes.
Change-Id: Iadde7b2173024af9b8d20316e640297cf214c645
2017-01-17 14:29:18 -08:00
Dan Willemsen
194edf772e Convert to Android.bp
See build/soong/README.md for more information.

I tested the following tests on a Nexus9 and linux host, and they
continued to pass:

/data/nativetest{,64}/bootstat_tests/bootstat_tests
out/host/linux-x86/bin/nativetest{,64}/bootstat_tests/bootstat_tests
/data/nativetest64/memunreachable_test/memunreachable_test
out/host/linux-x86/bin/nativetest{,64}/memunreachable_test/memunreachable_test

These continue to fail just like before this change:

/data/nativetest{,64}/sync_test/sync_test (was /system/bin/sync_test)
/data/nativetest{,64}/sync-unit-test/sync-unit-test
/data/nativetest/memunreachable_test/memunreachable_test

Test: See above
Change-Id: I691e564e0cf008dd363e3746223b153d712e024d
2016-08-26 16:19:21 -07:00
Tom Cherry
a7c7bce252 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
2015-11-05 10:07:53 -08:00
Elliott Hughes
bcc2b5f44a Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it's not needed.
Change-Id: I720b8ef1050da45a7833adef8219b6acb2cf3a38
2015-04-02 14:31:07 -07:00
Dan Albert
d0a793dca3 Remove uses of libcxx.mk.
This is a no-op.

Change-Id: Iecbcd5f6d818abbf98767a2e996c10f454b652e4
2015-03-27 11:24:04 -07:00
Riley Andrews
d0d7f6ac08 Add gtest conformance tests for libsync.
Not complete yet, but substantially more comprehensive than the
interactive test that was there before.

(cherry-picked from internal master, same change-id).
Change-Id: I9019b0a8babbc91f78aa850e0e288bbf05f93500
2014-10-11 02:10:23 +00:00