selftests: sync: Skip the test if kernel support is not found
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 31 May 2017 10:40:15 +0000 (20:40 +1000)
committerShuah Khan <shuahkh@osg.samsung.com>
Wed, 7 Jun 2017 16:07:21 +0000 (10:07 -0600)
commit4996976fcde4bb738ce68ca01a8b358d71aab7bb
tree0525d3181decf3b433210f119efb446e824e6d57
parenteff33cfa0631a8f887df5f941e6ad1ae9a43a013
selftests: sync: Skip the test if kernel support is not found

The "Sync framework" test doesn't work if the kernel has no support,
obviously. Rather than reporting a failure, check for the kernel support
by looking for /sys/kernel/debug/sync/sw_sync, and if not found skip the
test.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
tools/testing/selftests/sync/sync_test.c