not found. Seems that CONFIG_FAIL_MAKE_REQUEST kernel config option not enabled"
}
+#
+# Check if the file system supports seek_data/hole
+#
+_require_seek_data_hole()
+{
+ testfile=$TEST_DIR/$$.seek
+ testseek=`$here/src/seek_sanity_test -t $testfile 2>&1`
+ rm -f $testfile &>/dev/null
+ echo $testseek | grep -q "Kernel does not support" && \
+ _notrun "File system does not support llseek(2) SEEK_DATA/HOLE"
+}
+
# check that a FS on a device is mounted
# if so, return mount point
#
{
int ret = -1;
int i = 0;
+ int opt;
+ int check_support = 0;
int numtests = sizeof(seek_tests) / sizeof(struct testrec);
if (argc != 2) {
return ret;
}
- base_file_path = (char *)strdup(argv[1]);
+ while ((opt = getopt(argc, argv, "t")) != -1) {
+ switch (opt) {
+ case 't':
+ check_support++;
+ break;
+ default:
+ fprintf(stderr, "Usage: %s [-t] base_file_path\n",
+ argv[0]);
+ return ret;
+ }
+ }
+
+ base_file_path = (char *)strdup(argv[optind]);
ret = test_basic_support();
- if (ret)
+ if (ret || check_support)
goto out;
for (i = 0; i < numtests; ++i) {
_supported_fs generic
_supported_os Linux
+_require_seek_data_hole
+
BASE_TEST_FILE=$TEST_DIR/seek_sanity_testfile
[ -x $here/src/seek_sanity_test ] || _notrun "seek_sanitfy_tester not built"
_supported_fs generic
_supported_os Linux
+_require_seek_data_hole
+
src=$TEST_DIR/seek_copy_testfile
dest=$TEST_DIR/seek_copy_testfile.dest