done
return 1
}
+
+function ts_check_enosys_syscalls {
+ ts_check_test_command "$TS_HELPER_ENOSYS"
+ "$TS_HELPER_ENOSYS" ${@/#/-s } true 2> /dev/null
+ [ $? -ne 0 ] && ts_skip "test_enosys does not work: $*"
+}
};
const struct syscall syscalls[] = {
+#ifdef __NR_move_mount
{ "move_mount", __NR_move_mount },
+#endif
+#ifdef __NR_open_tree
{ "open_tree", __NR_open_tree },
+#endif
+#ifdef __NR_fsopen
{ "fsopen", __NR_fsopen },
+#endif
};
int main(int argc, char **argv)
. "$TS_TOPDIR"/functions.sh
ts_init "$*"
-ts_check_test_command "$TS_HELPER_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
ts_skip_nonroot
-"$TS_HELPER_ENOSYS" true 2> /dev/null
-[ "$?" -eq "$TS_EXIT_NOTSUPP" ] && ts_skip "test_enosys does not work"
test_mount_fallback() {
ts_init_subtest "$1"