From patchwork Tue Apr 9 02:48:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: XiaoLi Feng X-Patchwork-Id: 10890393 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 12678922 for ; Tue, 9 Apr 2019 02:48:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3CF728632 for ; Tue, 9 Apr 2019 02:48:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D40AC28680; Tue, 9 Apr 2019 02:48:40 +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=-7.9 required=2.0 tests=BAYES_00,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 5E0A528632 for ; Tue, 9 Apr 2019 02:48:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726371AbfDICsk (ORCPT ); Mon, 8 Apr 2019 22:48:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51598 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726133AbfDICsk (ORCPT ); Mon, 8 Apr 2019 22:48:40 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DC6AD3082E53; Tue, 9 Apr 2019 02:48:39 +0000 (UTC) Received: from dhcp-12-126.nay.redhat.com (dhcp-12-126.nay.redhat.com [10.66.12.126]) by smtp.corp.redhat.com (Postfix) with ESMTP id 30AE961988; Tue, 9 Apr 2019 02:48:37 +0000 (UTC) From: XiaoLi Feng To: fstests@vger.kernel.org Cc: guaneryu@gmail.com, smfrench@gmail.com, Xiaoli Feng Subject: [PATCH v3] common/rc: use _try_scratch_mount for scratch_remount Date: Tue, 9 Apr 2019 10:48:33 +0800 Message-Id: <20190409024833.764-1-xifeng@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 09 Apr 2019 02:48:39 +0000 (UTC) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Xiaoli Feng When call _scratch_remount for cifs , it always requires to input password. This will make generic/306 generic/452 failed because cifs remount failed. Signed-off-by: Xiaoli Feng --- Re-send this mail. Because the last mail missed Signed-off-by tag. Thanks Eryu for the review and suggestions. common/rc | 2 +- tests/overlay/035 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index 1c42515f..6c262e32 100644 --- a/common/rc +++ b/common/rc @@ -357,7 +357,7 @@ _scratch_remount() local opts="$1" if test -n "$opts"; then - mount -o "remount,$opts" $SCRATCH_MNT + _try_scratch_mount "-o remount,$opts" fi } diff --git a/tests/overlay/035 b/tests/overlay/035 index f36c1e10..c0aae935 100755 --- a/tests/overlay/035 +++ b/tests/overlay/035 @@ -55,7 +55,7 @@ mkdir -p $lowerdir1 $lowerdir2 $upperdir $workdir $MOUNT_PROG -t overlay -o"lowerdir=$lowerdir2:$lowerdir1" \ $OVL_BASE_SCRATCH_MNT $SCRATCH_MNT touch $SCRATCH_MNT/foo 2>&1 | _filter_scratch -_scratch_remount rw 2>&1 | _filter_ro_mount +$MOUNT_PROG -o remount,rw $SCRATCH_MNT 2>&1 | _filter_ro_mount $UMOUNT_PROG $SCRATCH_MNT # Make workdir immutable to prevent workdir re-create on mount