From patchwork Fri May 18 11:10:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: XiaoLi Feng X-Patchwork-Id: 10409563 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 AC2C1602CB for ; Fri, 18 May 2018 11:10:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99F0A288B5 for ; Fri, 18 May 2018 11:10:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D1CF288F8; Fri, 18 May 2018 11:10:34 +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 EBC21288B5 for ; Fri, 18 May 2018 11:10:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752326AbeERLKd (ORCPT ); Fri, 18 May 2018 07:10:33 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57594 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752073AbeERLKc (ORCPT ); Fri, 18 May 2018 07:10:32 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 68551BB405 for ; Fri, 18 May 2018 11:10:32 +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 7FB2E63F37; Fri, 18 May 2018 11:10:31 +0000 (UTC) From: XiaoLi Feng To: fstests@vger.kernel.org Cc: xiaoli feng Subject: [PATCH] common/rc: add the function _require_noatime Date: Fri, 18 May 2018 19:10:29 +0800 Message-Id: <1526641829-9893-1-git-send-email-xifeng@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 18 May 2018 11:10:32 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 18 May 2018 11:10:32 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'xifeng@redhat.com' RCPT:'' 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 In the generic/120, it will make the test not-pass if the filesystem mounts failed with noatime. Now change this result to norun. The filesystem cifs doesn't support noatime. Just make the test norun until it supports noatime. Signed-off-by: xiaoli feng --- common/rc | 8 +++++++- tests/generic/120 | 7 +------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/common/rc b/common/rc index ffe5323..9c45f1b 100644 --- a/common/rc +++ b/common/rc @@ -3244,7 +3244,13 @@ _require_atime() _exclude_scratch_mount_option "noatime" if [ "$FSTYP" == "nfs" ]; then _notrun "atime related mount options have no effect on NFS" - fi +} + +_require_noatime() +{ + _exclude_scratch_mount_option "atime" + _try_scratch_mount -o noatime || \ + _notrun "noatime not supported by the current tested filesystem" } _require_relatime() diff --git a/tests/generic/120 b/tests/generic/120 index 1180c10..ddd61b3 100755 --- a/tests/generic/120 +++ b/tests/generic/120 @@ -60,12 +60,7 @@ _compare_access_times() } -if ! _try_scratch_mount "-o noatime" >$tmp.out 2>&1 -then - cat $tmp.out - echo "!!! mount failed" - exit -fi +_require_noatime #executable file echo "*** copying file ***"