From patchwork Thu Jan 24 08:33:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 10778591 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 EA2791390 for ; Thu, 24 Jan 2019 08:33:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC00F2E1D8 for ; Thu, 24 Jan 2019 08:33:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF8E82E204; Thu, 24 Jan 2019 08:33:20 +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 74E3E2E1D8 for ; Thu, 24 Jan 2019 08:33:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726516AbfAXIdU (ORCPT ); Thu, 24 Jan 2019 03:33:20 -0500 Received: from mail-wm1-f44.google.com ([209.85.128.44]:36433 "EHLO mail-wm1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725986AbfAXIdU (ORCPT ); Thu, 24 Jan 2019 03:33:20 -0500 Received: by mail-wm1-f44.google.com with SMTP id p6so2042936wmc.1; Thu, 24 Jan 2019 00:33:18 -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=Cg3nJzpF1SvPKlm9dlLFqa8IMi8Ju/lv5/W0r1ssDes=; b=hxQIW2Q2xuz+C8vIIIGOYbsPBlijxhJ+VTffRQhCZKT834AZKUenmfk9IGLi8WeDI8 nNoRrd5TJHcIN8g4t0RrrKi8bLulobv+VyvrkS4ii87rcTLCVyvWaevG8tc+zG32WKEW V2epmM5scrDvr83dEiGAXVoqOp49VRjMz1tgEHl82+QiGwd7764qJ2dIzhZkiFC9mT1Z m5ZtribU/++xmKZF6g1liU/wWCr1uSpVxQQkzIUAqq/0FanHibAwvsERe5JFelrUbfRV TUdQlObATl2qqLwgcqxWniWKXl8ZsnMKu7FLij+SP3kFjhDCK5HaxplF3RMtTJPFY0Mz UtNQ== 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=Cg3nJzpF1SvPKlm9dlLFqa8IMi8Ju/lv5/W0r1ssDes=; b=QujepNVTnycH2FTgMVMew5yRhdrwBZq1efUbb5TGzPR/YOrRVixAgXCUavHC7WmHzF P5jBEO+nWtKDi6KsDa7oeBr/0cBrlYswgeIbhXN1G4xTiv/44ta0hwTke9PzFjSyipUE GFb3kXk2HPHmBaffAA/dOw/qthxXjj/uHzyKh+hAP9P/qdgqZJyUkJf34zBUw2Poxw8S HfAo7pz+81Plje601YcvMl2g/NkQNRltiNNLTrB8Tf0du+YFHEUdS8Lh9PKqCISMU8Wo 6ICUVm8gVJD6TJhdxXc+HcC/gbIegonb94/nDu/SvNbTGT9nKLDQTuT/oH/oAUk95x6T wPgg== X-Gm-Message-State: AJcUukeYdZVoI9XFtSQC36fHg/6blgE7j1GMafFs+yasZzOlDKZ69dvH cGGfvNc+qr5avnM4SrpVdQmpOZSq X-Google-Smtp-Source: ALg8bN4JGx7ar2CMHR/puHmBcbloIoMzbcYhNek7EgNjpKRW9Ur0pTkRwNo05gLb6YC5e5sYulSWmg== X-Received: by 2002:a1c:ab87:: with SMTP id u129mr1616628wme.104.1548318797436; Thu, 24 Jan 2019 00:33:17 -0800 (PST) Received: from amir-VirtualBox.ctera.local ([188.120.129.201]) by smtp.gmail.com with ESMTPSA id p139sm119255107wmd.31.2019.01.24.00.33.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 00:33:16 -0800 (PST) From: Amir Goldstein To: Eryu Guan Cc: Dave Chinner , Zorro Lang , Eric Sandeen , "Darrick J . Wong" , fstests@vger.kernel.org, linux-xfs@vger.kernel.org Subject: [PATCH 1/2] common/dump: do not override test cleanup trap Date: Thu, 24 Jan 2019 10:33:09 +0200 Message-Id: <20190124083310.25928-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 Currently this doesn't matter for the two dump tests xfs/022 and xfs/068 because they do not have a _cleanup() routine and the override dump _cleanup() routine does the generic cleanup as well. Instead, call the _dump_cleanup explicitly from the trap in those tests. Signed-off-by: Amir Goldstein --- common/dump | 5 +---- tests/xfs/022 | 2 +- tests/xfs/068 | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/common/dump b/common/dump index 4d1a1607..47d14601 100644 --- a/common/dump +++ b/common/dump @@ -45,9 +45,6 @@ session_label="stress_$seq" nobody=4 # define this uid/gid as a number do_quota_check=true # do quota check if quotas enabled -# install our cleaner -trap "_cleanup; exit \$status" 0 1 2 3 15 - # start inventory from a known base - move it aside for test for dir in /var/xfsdump/inventory /var/lib/xfsdump/inventory; do if [ -d $dir ]; then @@ -227,7 +224,7 @@ _wipe_fs() # Cleanup created dirs and files # Called by trap # -_cleanup() +_dump_cleanup() { # Some tests include this before checking _supported_fs xfs # and the sleeps & checks here get annoying diff --git a/tests/xfs/022 b/tests/xfs/022 index e1162798..f091b7c5 100755 --- a/tests/xfs/022 +++ b/tests/xfs/022 @@ -17,7 +17,7 @@ echo "QA output created by $seq" here=`pwd` tmp=/tmp/$$ status=0 # success is the default! -trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15 +trap "_dump_cleanup; exit \$status" 0 1 2 3 15 . ./common/rc . ./common/dump diff --git a/tests/xfs/068 b/tests/xfs/068 index c755bc3e..95a8cd12 100755 --- a/tests/xfs/068 +++ b/tests/xfs/068 @@ -18,7 +18,7 @@ echo "QA output created by $seq" here=`pwd` tmp=/tmp/$$ status=0 # success is the default! -trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15 +trap "_dump_cleanup; exit \$status" 0 1 2 3 15 . ./common/rc . ./common/dump