From patchwork Thu Dec 8 10:52:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 9466141 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5F157607D3 for ; Thu, 8 Dec 2016 10:52:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F32B283E1 for ; Thu, 8 Dec 2016 10:52:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4406B28536; Thu, 8 Dec 2016 10:52:46 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 E13CE283E1 for ; Thu, 8 Dec 2016 10:52:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751987AbcLHKwp (ORCPT ); Thu, 8 Dec 2016 05:52:45 -0500 Received: from mail-wj0-f195.google.com ([209.85.210.195]:35366 "EHLO mail-wj0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752088AbcLHKwo (ORCPT ); Thu, 8 Dec 2016 05:52:44 -0500 Received: by mail-wj0-f195.google.com with SMTP id he10so39689484wjc.2; Thu, 08 Dec 2016 02:52:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MumXIYiuxvD1rx59sjPukc9hffN24mGrP9KwLG1jZHs=; b=0j1nYYeH4I8YZSjLjChCDTYikKYIe9UhELZdp9wphCD4lgZEAdv2750aQ5pKFb34p+ MIqVrEJKJeJzTBPTipf+ORx9BrsZi4N+Hz05f1b9mldjCfr2hbySIujCofQ7maoxZE25 a6wG2El/OWxJ7trBUmG/VFuYwB3lR/KEQ0qUfoWyCJgZSuIrW0JnfdD3gGHuJSmt/2YF uC337flumQ2Q3fd2hsWmzYLaTtdNenjTcDoCnaRxLUDg37+PNODyV5u4MDJx4bcqiqGE Lvdt1Q+20tMOxWc6SaO51eyI/sg3EXu0wQKdoYSUqcRHWHPu7fb8lKTXwnMcpT81jsUy Ge4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MumXIYiuxvD1rx59sjPukc9hffN24mGrP9KwLG1jZHs=; b=O8F9Rkk1jiDQtspaO4WD6qykZ5VplAVanezhKIHJhl35N30XQhFRdc5tRan6UM+0Gw xV5b2LAhD3bI2GSuXm+m1IOM8LDZ9j3/YQF2BeDdLPbgi8J9F3XTJDmsWFoeKBI3gW0+ k2cMFvMwh+xOtpG45lP5u0X/aAdVI/MtYVECQFW14Vg3bQJlvKUJcc1t5lrk3MG8JzsX ufcQXZRZZz8DgEwehcqlMwAAHbwLkxC2X0L5L/TP/ghnDz9JCO6WhMeLVt2+nx+DuajF r9bnSad23OBHE1yE/caprRW8X2MfoMQ5e6kJGFvgbtMxVpHdW+R2PtEoFzkbbjgdZ238 VJDg== X-Gm-Message-State: AKaTC00m++SmdGFagZntc0gvVrh9VhkYlQeJ4YDTFLFrhSBQ2DVuQOcodOoiFuJuP8YPFw== X-Received: by 10.194.0.43 with SMTP id 11mr63812722wjb.218.1481194363034; Thu, 08 Dec 2016 02:52:43 -0800 (PST) Received: from amir-VirtualBox.ctera.local (bzq-82-81-193-202.cablep.bezeqint.net. [82.81.193.202]) by smtp.gmail.com with ESMTPSA id vr9sm36301406wjc.35.2016.12.08.02.52.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Dec 2016 02:52:42 -0800 (PST) From: Amir Goldstein To: Eryu Guan Cc: Dave Chinner , fstests@vger.kernel.org, linux-unionfs@vger.kernel.org Subject: [PATCH 2/2] overlay/016: use xfs_io -C for executing commands Date: Thu, 8 Dec 2016 12:52:21 +0200 Message-Id: <1481194341-3592-2-git-send-email-amir73il@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481194341-3592-1-git-send-email-amir73il@gmail.com> References: <1481194341-3592-1-git-send-email-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 This test requires a fix to xfs_io to support -C one shot commands and -c "open foo" command. Signed-off-by: Amir Goldstein --- tests/overlay/016 | 27 +++++++++++++-------------- tests/overlay/016.out | 11 +++++------ 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/tests/overlay/016 b/tests/overlay/016 index 6d3e339..041ab3d 100755 --- a/tests/overlay/016 +++ b/tests/overlay/016 @@ -50,6 +50,7 @@ _cleanup() _supported_fs overlay _supported_os Linux _require_scratch +_require_xfs_io_command "open" rm -f $seqres.full @@ -72,13 +73,12 @@ cd $SCRATCH_MNT # write to rwfd # read from rofd # -$XFS_IO_PROG << EOF | _filter_xfs_io -open -r foo -open foo -pwrite -S 0x61 0 16 -file 0 -pread -v 0 16 -EOF +$XFS_IO_PROG -r foo \ + -C "open foo" \ + -C "pwrite -S 0x61 0 16" \ + -C "file 0" \ + -C "pread -v 0 16" \ +| _filter_xfs_io # # case #2: @@ -86,13 +86,12 @@ EOF # write to rwfd # read from mapped memory # -$XFS_IO_PROG << EOF | _filter_xfs_io -open -r bar -mmap -r 0 16 -open bar -pwrite -S 0x61 0 16 -mread -v 0 16 -EOF +$XFS_IO_PROG -r bar \ + -C "mmap -r 0 16" \ + -C "open bar" \ + -C "pwrite -S 0x61 0 16" \ + -C "mread -v 0 16" \ +| _filter_xfs_io status=0 exit diff --git a/tests/overlay/016.out b/tests/overlay/016.out index 52b8cd7..c49f8dc 100644 --- a/tests/overlay/016.out +++ b/tests/overlay/016.out @@ -1,12 +1,11 @@ QA output created by 016 -xfs_io> xfs_io> xfs_io> wrote 16/16 bytes at offset 0 +wrote 16/16 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -xfs_io> [000] foo (foreign,non-sync,non-direct,read-only) +[000] foo (foreign,non-sync,non-direct,read-only) 001 foo (foreign,non-sync,non-direct,read-write) -xfs_io> 00000000: 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 aaaaaaaaaaaaaaaa +00000000: 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 aaaaaaaaaaaaaaaa read 16/16 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -xfs_io> xfs_io> xfs_io> xfs_io> xfs_io> wrote 16/16 bytes at offset 0 +wrote 16/16 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -xfs_io> 00000000: 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 aaaaaaaaaaaaaaaa -xfs_io> \ No newline at end of file +00000000: 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 aaaaaaaaaaaaaaaa