From patchwork Sun Mar 3 15:09:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 10837061 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D2FB61390 for ; Sun, 3 Mar 2019 15:09:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE58D2A1D9 for ; Sun, 3 Mar 2019 15:09:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF9732A1DC; Sun, 3 Mar 2019 15:09:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 166282A1D9 for ; Sun, 3 Mar 2019 15:09:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726228AbfCCPJt (ORCPT ); Sun, 3 Mar 2019 10:09:49 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:32800 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726189AbfCCPJt (ORCPT ); Sun, 3 Mar 2019 10:09:49 -0500 Received: by mail-wm1-f65.google.com with SMTP id c13so2183496wmb.0; Sun, 03 Mar 2019 07:09:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=sLNwiOcQ3SEyY6Ts/ArK+3GSiIbJtfmWff1bEaOklLM=; b=HPHMPDlS0xxOo0EEsPaSw8bMHxw0SnWbYotehc161iNlTLoK8RwTydxTzBeOkyMh8i CbzK4pzj57ykQsOhIrgPojpisUm+jAqDC4UTzOGygiovvPfQIra43oSHZNlGnaNlO4LM cjqYvIURPEIZekp9xqvQmTLdjAA/4HpeqDhNnPRgIfblhWwWKye1FR6pr4OWqWS1Nbol nhJTPLG8iycMsFj+tU7QeCFc/J7pg2ml9flUnZaWlNyOIdJiUkNv1+XqvbEMF6q1m8uk GbK7sWJxd36Z2UlxmkpVjr+IhYCjqmkqYCk7Wr3AfkdMgBv7k4qha4t2CE1+bY+Popkq 2SfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sLNwiOcQ3SEyY6Ts/ArK+3GSiIbJtfmWff1bEaOklLM=; b=NdtsnwcqlNvLl6Itmx5/I9SlfKQJxhXkjccnFVyFQMl6PQ6nIBRRewY22/ougQJaE3 pxMc/Bhum/eJcQvJBvuxW+hELTJ97UiVRiNXBTbJyjwRF4EI7UlYcbfpqit/HSynLmKk rO+/kt6NkQT7gTdqTwr1Vj62DKXhUrb8IfUmrvEtA8dZsrlJgJG1q7SFmfKWkaPWrTvh CD0Jb5AyrkDxiFePxDIZ9c1j8Y7kNyQuzIzo3BII1bQplT5hPoV5+P7hLxWcRDePH4GU A+3/NHgraUDXnyyli6LbuKdfCSWOKenOUdI2pDwTIpABowFt1YF/xLY38oPWEYxW2G8F thoA== X-Gm-Message-State: APjAAAXnzRTokTa+q/mHX07dSFL7SMT7fVhonpMqiw34nKABuvD4XPJQ oQwMR8Z351qQTbsFlrlcWnk= X-Google-Smtp-Source: APXvYqzNriNXz6tQ4aMPyt+fw9U1qmsZQttEDRiXRqTZpIoyh3vR/Ij2BhSa22GRRkdfQCAS8hg0pw== X-Received: by 2002:a1c:1a86:: with SMTP id a128mr4199317wma.67.1551625786551; Sun, 03 Mar 2019 07:09:46 -0800 (PST) Received: from amir-VirtualBox.ctera.local (bzq-166-168-31-246.red.bezeqint.net. [31.168.166.246]) by smtp.gmail.com with ESMTPSA id b195sm3462111wmg.36.2019.03.03.07.09.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Mar 2019 07:09:45 -0800 (PST) From: Amir Goldstein To: Eryu Guan Cc: Miklos Szeredi , Eddie Horng , linux-unionfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH v2 1/2] fstests: Add more sanity to seek_sanity_test Date: Sun, 3 Mar 2019 17:09:39 +0200 Message-Id: <20190303150940.12734-1-amir73il@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP seek_sanity_test checks for one of several SEEK_DATA/HOLE behaviors and allows for the default behavior of filesystems, where SEEK_HOLE always returns EOF. This means that if filesystem has a regression in finding holes, the sanity test won't catch it. And indeed this regression happened in overlayfs on kernel v4.19 and went unnoticed. To improve test coverage, add a flag -f to seek_sanity_test to indicate that the default behavior is not acceptable. Whitelist all filesystem types that are expected to detect holes and use wrapper when invoking seek_sanity_test to add the -f flag to those filesystems. Overlayfs inherits expected behavior from base fs type. Signed-off-by: Amir Goldstein --- Eryu, After this change, the generic/seek group tests will start failing with overlayfs over base fs with true SEEK_HOLE support on upstream kernel. We had missing coverage of SEEK_HOLE, so we missed a regression in kernel v4.19 when overlayfs SEEK_HOLE stopped finding holes in sparse files. Thanks, Amir. Changes since v1: - Use whitelist of filesystems types that support true SEEK_HOLE instead of inferring SEEK_HOLE support from PUNCH_HOLE support - Split from patch of new PUNCH_HOLE+SEEK_HOLE test common/rc | 46 ++++++++++++++++++++++++++++++++++++++++++ src/seek_sanity_test.c | 14 +++++++++++-- tests/generic/285 | 2 +- tests/generic/436 | 2 +- tests/generic/445 | 2 +- tests/generic/448 | 2 +- tests/generic/490 | 2 +- 7 files changed, 63 insertions(+), 7 deletions(-) diff --git a/common/rc b/common/rc index c88c304c..d2482c20 100644 --- a/common/rc +++ b/common/rc @@ -2298,6 +2298,52 @@ _ext4_disable_extent_zeroout() echo 0 >/sys/fs/ext4/$sdev/extent_max_zeroout_kb } +# Is this filesystem type expected to support seeking and finding holes? +# filesystems without SEEK_HOLE support, accept the SEEK_HOLE argument, +# but always return EOF offset for SEEK_HOLE. +# We use this whitelist FSTYP, to set expectation and avoid silent +# regression of filesystem seek hole behavior. +# +# Return 0 for true +_fstyp_support_seek_data_hole() +{ + if [ -z $1 ]; then + local fstyp=$FSTYP + else + local fstyp=$1 + fi + + case "$fstyp" in + btrfs|ext4|xfs|ceph|cifs|f2fs|gfs2|nfs*|ocfs2|tmpfs) + return 0 + ;; + overlay) + if [ ! -z $OVL_BASE_FSTYP -a $OVL_BASE_FSTYP != "overlay" ]; then + _fstyp_support_seek_data_hole $OVL_BASE_FSTYP + return $? + else + # Do not assume that base fs supports SEEK_HOLE + return 1 + fi + ;; + *) + # by default fstyp does not support SEEK_HOLE; + # if your fs does support SEEK_HOLE, add it to whitelist above! + return 1 + ;; + esac +} + +# Run seek sanity test with predefined expectation for SEEK_DATA/HOLE behavior +_run_seek_sanity_test() +{ + local testseekargs + if _fstyp_support_seek_data_hole; then + testseekargs+="-f" + fi + $here/src/seek_sanity_test $testseekargs $* +} + # Check if the file system supports seek_data/hole _require_seek_data_hole() { diff --git a/src/seek_sanity_test.c b/src/seek_sanity_test.c index e9938d1b..1eefc74d 100644 --- a/src/seek_sanity_test.c +++ b/src/seek_sanity_test.c @@ -23,6 +23,7 @@ #endif static blksize_t alloc_size; +int allow_default_behavior = 1; int default_behavior = 0; int unwritten_extents = 0; char *base_file_path; @@ -1115,6 +1116,12 @@ static int test_basic_support(void) } if (pos == filsz) { + if (!allow_default_behavior) { + fprintf(stderr, "File syste does not support llseek(2) extension " + "SEEK_HOLE. Aborting.\n"); + ret = -1; + goto out; + } default_behavior = 1; fprintf(stderr, "File system supports the default behavior.\n"); } @@ -1148,7 +1155,7 @@ out: void usage(char *cmd) { - fprintf(stdout, "Usage: %s [-t] [-s ] [-e ] base_file_path\n", cmd); + fprintf(stdout, "Usage: %s [-tf] [-s ] [-e ] base_file_path\n", cmd); exit(1); } @@ -1169,11 +1176,14 @@ int main(int argc, char **argv) teststart = 1; testend = 12; - while ((opt = getopt(argc, argv, "ts:e:")) != -1) { + while ((opt = getopt(argc, argv, "tfs:e:")) != -1) { switch (opt) { case 't': check_support++; break; + case 'f': + allow_default_behavior = 0; + break; case 's': teststart = strtol(optarg, NULL, 10); if (teststart <= 0 || teststart > numtests) { diff --git a/tests/generic/285 b/tests/generic/285 index b53b3acc..20e89e5b 100755 --- a/tests/generic/285 +++ b/tests/generic/285 @@ -37,7 +37,7 @@ _cleanup() eval "rm -f $BASE_TEST_FILE.*" } -$here/src/seek_sanity_test $BASE_TEST_FILE > $seqres.full 2>&1 || +_run_seek_sanity_test $BASE_TEST_FILE > $seqres.full 2>&1 || _fail "seek sanity check failed!" # success, all done diff --git a/tests/generic/436 b/tests/generic/436 index a3ef70e5..ada60b2e 100755 --- a/tests/generic/436 +++ b/tests/generic/436 @@ -36,7 +36,7 @@ _cleanup() rm -f $tmp.* $BASE_TEST_FILE.* } -$here/src/seek_sanity_test -s 13 -e 16 $BASE_TEST_FILE > $seqres.full 2>&1 || +_run_seek_sanity_test -s 13 -e 16 $BASE_TEST_FILE > $seqres.full 2>&1 || _fail "seek sanity check failed!" # success, all done diff --git a/tests/generic/445 b/tests/generic/445 index 694913ae..248f321b 100755 --- a/tests/generic/445 +++ b/tests/generic/445 @@ -36,7 +36,7 @@ _cleanup() rm -f $tmp.* $BASE_TEST_FILE.* } -$here/src/seek_sanity_test -s 17 -e 17 $BASE_TEST_FILE > $seqres.full 2>&1 || +_run_seek_sanity_test -s 17 -e 17 $BASE_TEST_FILE > $seqres.full 2>&1 || _fail "seek sanity check failed!" # success, all done diff --git a/tests/generic/448 b/tests/generic/448 index d3ec5528..dada499b 100755 --- a/tests/generic/448 +++ b/tests/generic/448 @@ -34,7 +34,7 @@ BASE_TEST_FILE=$TEST_DIR/seek_sanity_testfile_$seq _require_test_program "seek_sanity_test" -$here/src/seek_sanity_test -s 18 -e 18 $BASE_TEST_FILE > $seqres.full 2>&1 || +_run_seek_sanity_test -s 18 -e 18 $BASE_TEST_FILE > $seqres.full 2>&1 || _fail "seek sanity check failed!" _check_dmesg diff --git a/tests/generic/490 b/tests/generic/490 index 330c2b60..07b08939 100755 --- a/tests/generic/490 +++ b/tests/generic/490 @@ -39,7 +39,7 @@ _cleanup() rm -f $base_test_file* } -$here/src/seek_sanity_test -s 19 -e 20 $base_test_file > $seqres.full 2>&1 || +_run_seek_sanity_test -s 19 -e 20 $base_test_file > $seqres.full 2>&1 || _fail "seek sanity check failed!" # success, all done From patchwork Sun Mar 3 15:09:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 10837063 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 485D817E9 for ; Sun, 3 Mar 2019 15:09:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3584A2A1D9 for ; Sun, 3 Mar 2019 15:09:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 29C692A1DB; Sun, 3 Mar 2019 15:09:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9355A2A1DA for ; Sun, 3 Mar 2019 15:09:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726240AbfCCPJu (ORCPT ); Sun, 3 Mar 2019 10:09:50 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34637 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726220AbfCCPJu (ORCPT ); Sun, 3 Mar 2019 10:09:50 -0500 Received: by mail-wr1-f68.google.com with SMTP id f14so2755659wrg.1; Sun, 03 Mar 2019 07:09:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iPfxPz21xqXBMsXwzQwmXsz6vgiqQskwpAizJGHCvW4=; b=ilelYmRtMAW3SvnJ6B2+Cks7r29xbkdy3+XrSzYJJyjX/yeELB/Vx+aiUKsH3FrrMF 33RnabmYJn8+BGRiqrlnAWznNV9L0k9ucTecFOs6gixo4JLc+nIBD3xRsdAig/Jh9EKD kRr+92hfRqwxRgNsYebtNzHL2D1CBGNF2mvxl+qqA3Ens4qC6FQYZuGH40BcuqpZ1ylQ qfLsDxqzzwHVw1JCIwwtKCRSPoNme7TNrTbNdtIuDT45iDCN4z4aA3WCvAns8DTBhEwU V2qv5YX0JyNlYiUae39B7v9fjnXWJZugVnOvvnMxXs9Wlo1h9LbgPCEtGdeLGiMmmkso QMhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iPfxPz21xqXBMsXwzQwmXsz6vgiqQskwpAizJGHCvW4=; b=L0KeQHD3izamCdlv9XqPdC5xXvRpjZ/K4Vgzzwl4C/81jheIFnXnwQ5E6BG9XU1kUy 1hu5aBWc86rxkLvT5UONQvhCes4HxnhCQLoqOVl5xt4h97aEXpNS66mzLEWju9EfOiTh WSilfbHx9sNdpAz7m4NmH15kx8xv0HOmbrPSievsKECHjCqbrq2q7U1JyQ15hQt8Y4t/ e7+U9m18JpY/BY2P2ukDrwF2veA0uT8lNqbiSyOtIYuK+medgl7nno09Xf9KoZGQZ49A jtQRxDXC43eTAnfhz7zABjU56rut7cdAsfFjYIsXP9H8MNY+ANtJKPao+lhECzgGwazH 5Syw== X-Gm-Message-State: APjAAAXG4/k8+zqTZM8dzcJv30Xd5n69CwwxEGhvsO6PP/X1TWFow1Eo p8gjKD39yXb5hV2TgbkF2A6EY0gX X-Google-Smtp-Source: APXvYqyEOTfgm0YYyYvtCy5wo7Tq4mWw4M2RCXX7VAIvPqw0ZjLYFPysZ+5kVxrkBVTqFixeBE8xSw== X-Received: by 2002:adf:a749:: with SMTP id e9mr9271362wrd.210.1551625787883; Sun, 03 Mar 2019 07:09:47 -0800 (PST) Received: from amir-VirtualBox.ctera.local (bzq-166-168-31-246.red.bezeqint.net. [31.168.166.246]) by smtp.gmail.com with ESMTPSA id b195sm3462111wmg.36.2019.03.03.07.09.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Mar 2019 07:09:47 -0800 (PST) From: Amir Goldstein To: Eryu Guan Cc: Miklos Szeredi , Eddie Horng , linux-unionfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH v2 2/2] generic: Test that SEEK_HOLE can find a punched hole Date: Sun, 3 Mar 2019 17:09:40 +0200 Message-Id: <20190303150940.12734-2-amir73il@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190303150940.12734-1-amir73il@gmail.com> References: <20190303150940.12734-1-amir73il@gmail.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Added a test case to seek_sanity_test and a test to run it. Signed-off-by: Amir Goldstein --- Changes since v1: - Punch hole requirement independent of SEEK_HOLE behavior. src/seek_sanity_test.c | 58 +++++++++++++++++++++++++++++++++++++++--- tests/generic/999 | 44 ++++++++++++++++++++++++++++++++ tests/generic/999.out | 1 + tests/generic/group | 1 + 4 files changed, 100 insertions(+), 4 deletions(-) create mode 100755 tests/generic/999 create mode 100644 tests/generic/999.out diff --git a/src/seek_sanity_test.c b/src/seek_sanity_test.c index 1eefc74d..7da4448f 100644 --- a/src/seek_sanity_test.c +++ b/src/seek_sanity_test.c @@ -16,6 +16,7 @@ #include #include #include +#include "global.h" #ifndef SEEK_DATA #define SEEK_DATA 3 @@ -26,6 +27,7 @@ static blksize_t alloc_size; int allow_default_behavior = 1; int default_behavior = 0; int unwritten_extents = 0; +int punch_hole = 0; char *base_file_path; static void get_file_system(int fd) @@ -118,8 +120,9 @@ static int do_fallocate(int fd, off_t offset, off_t length, int mode) ret = fallocate(fd, mode, offset, length); if (ret) - fprintf(stderr, " ERROR %d: Failed to preallocate " - "space to %ld bytes\n", errno, (long) length); + fprintf(stderr, " ERROR %d: Failed to %s of %ld bytes\n", + errno, (mode & FALLOC_FL_PUNCH_HOLE) ? "punch hole" : + "preallocate space", (long) length); return ret; } @@ -262,6 +265,47 @@ out: return ret; } +/* + * Make sure hole size is properly reported when punched in the middle of a file + */ +static int test21(int fd, int testnum) +{ + char *buf = NULL; + int bufsz, filsz; + int ret = 0; + + if (!punch_hole) { + fprintf(stdout, "Test skipped as fs doesn't support punch hole.\n"); + goto out; + } + + bufsz = alloc_size * 3; + buf = do_malloc(bufsz); + if (!buf) { + ret = -1; + goto out; + } + memset(buf, 'a', bufsz); + + ret = do_pwrite(fd, buf, bufsz, 0); + if (ret) + goto out; + + filsz = bufsz; + ret = do_fallocate(fd, alloc_size, alloc_size, + FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE); + if (ret < 0) + goto out; + + ret += do_lseek(testnum, 1, fd, filsz, SEEK_DATA, 0, 0); + ret += do_lseek(testnum, 2, fd, filsz, SEEK_HOLE, 0, alloc_size); + ret += do_lseek(testnum, 3, fd, filsz, SEEK_DATA, alloc_size, alloc_size * 2); +out: + if (buf) + free(buf); + return ret; +} + /* * Make sure hole size is properly reported when starting in the middle of a * hole in ext? doubly indirect tree @@ -1050,6 +1094,7 @@ struct testrec seek_tests[] = { { 18, test18, "Test file with negative SEEK_{HOLE,DATA} offsets" }, { 19, test19, "Test file SEEK_DATA from middle of a large hole" }, { 20, test20, "Test file SEEK_DATA from middle of a huge hole" }, + { 21, test21, "Test file SEEK_HOLE that was created by PUNCH_HOLE" }, }; static int run_test(struct testrec *tr) @@ -1127,15 +1172,20 @@ static int test_basic_support(void) } ftruncate(fd, 0); - if (fallocate(fd, 0, 0, alloc_size) == -1) { + if (fallocate(fd, 0, 0, alloc_size * 2) == -1) { if (errno == EOPNOTSUPP) - fprintf(stderr, "File system does not support fallocate."); + fprintf(stderr, "File system does not support fallocate.\n"); else { fprintf(stderr, "ERROR %d: Failed to preallocate " "space to %ld bytes. Aborting.\n", errno, (long) alloc_size); ret = -1; } goto out; + } else if (fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, + 0, alloc_size) == -1) { + fprintf(stderr, "File system does not support punch hole.\n"); + } else { + punch_hole = 1; } pos = lseek(fd, 0, SEEK_DATA); diff --git a/tests/generic/999 b/tests/generic/999 new file mode 100755 index 00000000..d8565041 --- /dev/null +++ b/tests/generic/999 @@ -0,0 +1,44 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2019, CTERA Networks. All Rights Reserved. +# +# FS QA Test No. 999 +# +# Check that SEEK_HOLE can find a punched hole. +# +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./common/rc + +_supported_fs generic +_supported_os Linux + +_require_test +_require_seek_data_hole +_require_xfs_io_command "fpunch" + +base_test_file=$TEST_DIR/seek_sanity_testfile.$seq + +_require_test_program "seek_sanity_test" + +_cleanup() +{ + cd / + rm -f $tmp.* + rm -f $base_test_file* +} + +_run_seek_sanity_test -s 21 -e 21 $base_test_file > $seqres.full 2>&1 || + _fail "seek sanity check failed!" + +# success, all done +status=0 +exit diff --git a/tests/generic/999.out b/tests/generic/999.out new file mode 100644 index 00000000..7fbc6768 --- /dev/null +++ b/tests/generic/999.out @@ -0,0 +1 @@ +QA output created by 999 diff --git a/tests/generic/group b/tests/generic/group index 15227b67..14ac9b2c 100644 --- a/tests/generic/group +++ b/tests/generic/group @@ -534,3 +534,4 @@ 529 auto quick attr 530 auto quick unlink 531 auto quick unlink +999 auto quick punch seek