Fixes #2277
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
done
return 1
}
+
+function ts_check_enosys_syscalls {
+ ts_check_test_command "$TS_CMD_ENOSYS"
+ "$TS_CMD_ENOSYS" ${@/#/-s } true 2> /dev/null
+ [ $? -ne 0 ] && ts_skip "test_enosys does not work: $*"
+}
. "$TS_TOPDIR"/functions.sh
ts_init "$*"
-ts_check_test_command "$TS_CMD_ENOSYS"
ts_check_test_command "$TS_HELPER_ENOSYS"
-
-"$TS_CMD_ENOSYS" true 2> /dev/null
-[ "$?" -eq "$TS_EXIT_NOTSUPP" ] && ts_skip "enosys does not work"
+ts_check_enosys_syscalls fallocate fsopen execve
ts_init_subtest basic
. "$TS_TOPDIR"/functions.sh
ts_init "$*"
-ts_check_test_command "$TS_CMD_ENOSYS"
ts_check_test_command "$TS_CMD_MOUNT"
ts_check_test_command "$TS_CMD_UMOUNT"
ts_check_test_command "$TS_CMD_FINDMNT"
ts_check_test_command "$TS_CMD_LOSETUP"
+ts_check_enosys_syscalls open_tree fsopen mount_setattr
ts_skip_nonroot
-"$TS_CMD_ENOSYS" true 2> /dev/null
-[ "$?" -eq "$TS_EXIT_NOTSUPP" ] && ts_skip "enosys does not work"
test_mount_fallback() {
ts_init_subtest "$1"