From patchwork Fri Aug 29 19:42:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 4812321 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 45454C0338 for ; Fri, 29 Aug 2014 19:42:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 507142011B for ; Fri, 29 Aug 2014 19:42:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 87A9720117 for ; Fri, 29 Aug 2014 19:42:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753104AbaH2Tmg (ORCPT ); Fri, 29 Aug 2014 15:42:36 -0400 Received: from mail-la0-f44.google.com ([209.85.215.44]:46891 "EHLO mail-la0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753383AbaH2Tmf (ORCPT ); Fri, 29 Aug 2014 15:42:35 -0400 Received: by mail-la0-f44.google.com with SMTP id hz20so3302078lab.17 for ; Fri, 29 Aug 2014 12:42:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=9GHryYsidsa+CrsSp17ex1kpEHXIMG7Z+xy+6V+46rE=; b=mfgC/x4hdUtYyjWDrv/NRI/RDWn+7of9OFqhWSIAjLcjjgy8Dexh0zYCIK4bifeCE/ mapyLKyZF+ZOwcmvNKfHPcxMuSZRAHo3eCEFyVo2Sm5jsv5a6hwXeyCTVKBQxaVC+/x5 uDiG8lmTeYQMjj0rRqa1bVxDrBC4xDavBCC4KnrCVxrblHRJA6hG5hGlM7iW0213+MUm /CfcYeS0V8fTLev46AMXnjgeatbb154kh3fARseOAWDTx5nT9ICx48g3sia4lWnXwfcp I+RlO2q2N16MQTZsZOKVNSpWoYIwjBOgl0TqLulryUNH+y9Mwz68sw8thAqfRiI7oahn g/7w== X-Received: by 10.152.20.168 with SMTP id o8mr13556661lae.4.1409341353137; Fri, 29 Aug 2014 12:42:33 -0700 (PDT) Received: from localhost.localdomain ([92.43.3.28]) by mx.google.com with ESMTPSA id os7sm1301670lbb.42.2014.08.29.12.42.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Aug 2014 12:42:31 -0700 (PDT) From: Pavel Shilovsky To: fstests@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@samba.org, David Disseldorp , Steve French Subject: [PATCH v3 1/3] generic/013: encapsulate remount during cleanup Date: Fri, 29 Aug 2014 23:42:18 +0400 Message-Id: <1409341340-27031-2-git-send-email-pshilovsky@samba.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1409341340-27031-1-git-send-email-pshilovsky@samba.org> References: <1409341340-27031-1-git-send-email-pshilovsky@samba.org> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The existing code calls remount for $TEST_DEV with constantly defined mount options. This can fail if a user specifies different mount options. Fix this by using new _test_remount() call that remounts $TEST_DEV. Reviewed-by: Steve French Signed-off-by: Pavel Shilovsky --- common/rc | 6 ++++++ tests/generic/013 | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/common/rc b/common/rc index 16da898..d9c9995 100644 --- a/common/rc +++ b/common/rc @@ -218,6 +218,12 @@ _test_mount() _mount -t $FSTYP $TEST_OPTIONS $TEST_FS_MOUNT_OPTS $SELINUX_MOUNT_OPTIONS $* $TEST_DEV $TEST_DIR } +_test_remount() +{ + $UMOUNT_PROG $TEST_DEV + _test_mount +} + _scratch_mkfs_options() { _scratch_options mkfs diff --git a/tests/generic/013 b/tests/generic/013 index 93d9904..534c9f0 100755 --- a/tests/generic/013 +++ b/tests/generic/013 @@ -35,7 +35,7 @@ _cleanup() { cd / # we might get here with a RO FS - mount -o remount,rw $TEST_DEV >/dev/null 2>&1 + _test_remount # now remove fsstress directory. # N.B. rm(1) on IRIX can find problems when building up a long pathname # such that what it has is greater the 1024 chars and will