From patchwork Tue Feb 5 19:42:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 10798227 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 C40026C2 for ; Tue, 5 Feb 2019 19:42:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5A5026E79 for ; Tue, 5 Feb 2019 19:42:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B419E2B09C; Tue, 5 Feb 2019 19:42:13 +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 4848D26E79 for ; Tue, 5 Feb 2019 19:42:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729596AbfBETmM (ORCPT ); Tue, 5 Feb 2019 14:42:12 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:42105 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727925AbfBETmM (ORCPT ); Tue, 5 Feb 2019 14:42:12 -0500 Received: by mail-wr1-f67.google.com with SMTP id q18so4975730wrx.9; Tue, 05 Feb 2019 11:42:11 -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=SDVIEp2uAOlhhsMLW4f/Oenshv1I9I1vAPBUEVLvg98=; b=W/zC27yJuupva5lrSgaCqPgGCwKGAtDEgzEIS3iSc/jFdhAdkTrm3F4bFV6Huy+v0E WTa94b+ZM1qBDgZ1CnHiuTGnRdBUbF1kYaMcojjcAbpDJpzOiP2FvgJXqzCvC8r/EQ5i TFWeuUzOF6Z57QembhtBi5ZIqZ891GedmkQqSkN9dORxV8ynAU/hiCapG0c3eDQVHGOE L6zhxF7uRgHxd/gDlUPP6bybZcU1iIlGj2AQdWJRZO5t1HIdshZ2iu477LSUerJ+mfew LxsrCvEoDvU3nCcrLVB5AC8yjXma0SFvg1wJHqw5OAlw9k5vDF0NXroXYM1/regpZTjm fg/w== 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=SDVIEp2uAOlhhsMLW4f/Oenshv1I9I1vAPBUEVLvg98=; b=oBZXDQ7RbkM/LjGJT3E9FePVmowwUQa3omwMdn5tp9H10wsCxCeEkayKQZhWffAgVW AYOSyj3LZODj5h5IzVmiOZ7lZUh64FhvoThajkWj2q9uHxWGJ8eTj5pwF1F8iPLR3m0A thABZo7/MefvgJmdBu7P4c2L/JFQJGwkm6xlKnTM4ZNaT3/K196138Fj9DbAMmwOp5yW NybjQToKl12PFwJUcfX2VYqAokAsQ1e/ch0LTToeZ08O+nHxqb/BR4lFRfDIxra7ft8G vPZeApKAItp8ZYHEo3OEWxWMg2yEmqCN7dZv4nlQGKZ6tdFD4LkoIv1lfvhOA8XFa984 YVQA== X-Gm-Message-State: AHQUAubGplebdp6ywDUok0f/odaaP0cdLFkLIl5eIog7ZDkOTmAGpoIY gz3DWqVWWWUfcP0hdDEIl4g= X-Google-Smtp-Source: AHgI3IYC5yXNK1GJ9N0PpxFk2tvXo6cEDiOt+647LnJ+bNefaXwrti+p48I2bfJvZiJMpuCqzTweGA== X-Received: by 2002:a5d:6aca:: with SMTP id u10mr4765110wrw.310.1549395730507; Tue, 05 Feb 2019 11:42:10 -0800 (PST) Received: from amir-VirtualBox.ctera.local ([141.226.11.31]) by smtp.gmail.com with ESMTPSA id h9sm7437352wrm.49.2019.02.05.11.42.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 11:42:09 -0800 (PST) From: Amir Goldstein To: Eryu Guan Cc: Miklos Szeredi , "Darrick J . Wong" , linux-unionfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH] fstests: Check that high-offset reads and writes work on non-blockdev fs Date: Tue, 5 Feb 2019 21:42:02 +0200 Message-Id: <20190205194202.31745-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 This is a variant of test generic/466 for filesystems that do not support mkfs_sized It is needed for testing high-offset reads and writes with overlayfs over a basefs that supports huge files. Signed-off-by: Amir Goldstein --- Eryu, This test found some issues with WIP implementation of overlayfs page cache. I though of extending generic/466 to test also with "default" block size, but turned out to be simpler and cleaner to fork the test. Thanks, Amir. tests/generic/999 | 63 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/999.out | 2 ++ tests/generic/group | 1 + 3 files changed, 66 insertions(+) create mode 100755 tests/generic/999 create mode 100644 tests/generic/999.out diff --git a/tests/generic/999 b/tests/generic/999 new file mode 100755 index 00000000..18788c30 --- /dev/null +++ b/tests/generic/999 @@ -0,0 +1,63 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2017, Oracle and/or its affiliates. +# Copyright (C) 2019, CTERA Networks. +# All Rights Reserved. +# +# FS QA Test No. 999 +# +# Check that high-offset reads and writes work. +# +# This is a variant of test generic/466 for filesystems that +# do not support mkfs_sized. +# +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 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter + +# real QA test starts here +_supported_os Linux +_supported_fs generic +_require_scratch + +rm -f $seqres.full + +_scratch_mkfs >>$seqres.full 2>&1 +_scratch_mount + +testdir=$SCRATCH_MNT + +echo "++ Create the original files" >> $seqres.full +bigoff=$(echo "2^63 - 2" | $BC_PROG) +len=$(echo "2^63 - 1" | $BC_PROG) +$XFS_IO_PROG -f -c "truncate $len" $testdir/file0 >> $seqres.full 2>&1 +if [ ! -s $testdir/file0 ]; then + # If we can't set a large file size then don't bother + # with read/write tests, because fs doesn't support it. + _notrun "filesystem does not support huge file size" +fi +_pwrite_byte 0x61 $bigoff 1 $testdir/file1 >> $seqres.full + +echo "++ Check file creation" >> $seqres.full +_scratch_cycle_mount + +$XFS_IO_PROG -c "pread -v -q $bigoff 1" $testdir/file1 + +# success, all done +status=0 +exit diff --git a/tests/generic/999.out b/tests/generic/999.out new file mode 100644 index 00000000..72b91e5d --- /dev/null +++ b/tests/generic/999.out @@ -0,0 +1,2 @@ +QA output created by 999 +7ffffffffffffffe: 61 a diff --git a/tests/generic/group b/tests/generic/group index 6f5f28d8..7fe44c2c 100644 --- a/tests/generic/group +++ b/tests/generic/group @@ -527,3 +527,4 @@ 522 soak long_rw 523 auto quick attr 524 auto quick +999 auto quick rw