fstests: skip AIO-related tests when CONFIG_AIO=n
authorEric Biggers <ebiggers@google.com>
Thu, 18 May 2017 22:49:10 +0000 (15:49 -0700)
committerEryu Guan <eguan@redhat.com>
Fri, 19 May 2017 07:06:30 +0000 (15:06 +0800)
commit9000551d9b7874ba8bc98a3b9dbf2526f3564527
treef89c59f1669eb5d9a41067c5d0aad0260c5cf96b
parentaaf96798d84a5554a92031fae386e7d8d5decce8
fstests: skip AIO-related tests when CONFIG_AIO=n

When running xfstests on a kernel configured with CONFIG_AIO=n, all
AIO-related tests fail, often due to an error similar to the
following:

    error Function not implemented during io_setup

This affected at least the following tests: generic/036,
generic/112, generic/113, generic/198, generic/207, generic/208,
generic/210, generic/211, generic/239, generic/323, generic/427,
xfs/240, xfs/241.

Fix this by enhancing the 'feature' program to allow testing for
asynchronous I/O support, then skipping all AIO-related tests when
AIO is unsupported.

This change is useful because CONFIG_AIO is sometimes disabled to
reduce the kernel's attack surface (e.g. see
https://android-review.googlesource.com/#/c/292158/).

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/rc
src/Makefile
src/feature.c
tests/generic/112
tests/generic/113
tests/xfs/240
tests/xfs/241