Commit graph

14 commits

Author SHA1 Message Date
Jesse Hall
82d377b585 sync: remove legacy sync info API
The legacy fence/pt info API has been deprecated for a while. This
change removes it from headers, so remaining users will have to switch
to the modern API when they're re-compiled. The functions are still
provided by libsync.so and tests remain, so existing binaries should
continue to work. Eventually these will be removed too, though, once
it's reasonable to expect those binaries to have been recompiled.

This reverts commit eed25df46a, which
reverted the previous attempt in commit
798ba95bda now that more users of the
legacy API have been converted.

Bug: 35326015
Test: make checkbuild
Test: adb shell dumpsys SurfaceFlinger --latency
2018-06-13 11:52:10 -07:00
Marissa Wall
eed25df46a Revert "sync: remove legacy sync info API"
This reverts commit 798ba95bda.

Brodcom uses the sync_fence_info_data directly.
https://android-build.googleplex.com/builds/submitted/4821789/elfin-userdebug/latest/view/logs/build_error.log

Change-Id: I72fed683397e9b10007b71253e20ded43726d377
2018-06-05 17:22:32 +00:00
Jesse Hall
798ba95bda sync: remove legacy sync info API
The legacy fence/pt info API has been deprecated for a while. This
change removes it from headers, so remaining users will have to switch
to the modern API when they're re-compiled. The functions are still
provided by libsync.so and tests remain, so existing binaries should
continue to work. Eventually these will be removed too, though, once
it's reasonable to expect those binaries to have been recompiled.

Bug: 35326015
Test: make checkbuild
Test: adb shell dumpsys SurfaceFlinger --latency
Change-Id: Id086fafe37c2bc1cfdca4a21107bc9208ed61f89
2018-05-23 16:45:48 -07:00
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