From patchwork Thu Jul 26 09:22:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yixin Zhang X-Patchwork-Id: 949559 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41bmpd0Zzjz9ryl for ; Thu, 26 Jul 2018 19:22:48 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 4C5B83E6120 for ; Thu, 26 Jul 2018 11:22:46 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) by picard.linux.it (Postfix) with ESMTP id 39D293E6099 for ; Thu, 26 Jul 2018 11:22:37 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 588E2601CCA for ; Thu, 26 Jul 2018 11:22:36 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2018 02:22:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,404,1526367600"; d="scan'208";a="59958160" Received: from yixin-desktop.sh.intel.com ([10.239.161.27]) by orsmga008.jf.intel.com with ESMTP; 26 Jul 2018 02:22:33 -0700 From: Yixin Zhang To: ltp@lists.linux.it Date: Thu, 26 Jul 2018 17:22:17 +0800 Message-Id: <20180726092219.15667-2-yixin.zhang@intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180726092219.15667-1-yixin.zhang@intel.com> References: <20180726092219.15667-1-yixin.zhang@intel.com> X-Virus-Scanned: clamav-milter 0.99.2 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-2.smtp.seeweb.it Cc: Yixin Zhang Subject: [LTP] [PATCH v3 ltp 2/4] fs/ext4: Replace umount with tst_umount X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Replace umount with tst_umount in common lib to handle umount failed due to device busy Signed-off-by: Yixin Zhang --- .../ext4_nsec_timestamps_test.sh | 25 +++++++--------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/testcases/kernel/fs/ext4-new-features/ext4-nsec-timestamps/ext4_nsec_timestamps_test.sh b/testcases/kernel/fs/ext4-new-features/ext4-nsec-timestamps/ext4_nsec_timestamps_test.sh index c6ff7c2ba..fdf64fde8 100755 --- a/testcases/kernel/fs/ext4-new-features/ext4-nsec-timestamps/ext4_nsec_timestamps_test.sh +++ b/testcases/kernel/fs/ext4-new-features/ext4-nsec-timestamps/ext4_nsec_timestamps_test.sh @@ -56,15 +56,10 @@ ext4_test_sec_timestamps() if [ $atime -ne 0 -o $mtime -ne 0 -o $ctime -ne 0 ]; then tst_resm TFAIL "Timestamp is not second(atime: $atime, mtime: \ $mtime, ctime: $ctime)" - umount mnt_point - return - fi - - umount mnt_point - if [ $? -ne 0 ]; then - tst_resm TFAIL "failed to umount ext4 filesystem" + tst_umount mnt_point return fi + tst_umount mnt_point tst_resm TPASS "Ext4 nanosecond timestamps test with 128 inode size pass" } @@ -108,7 +103,7 @@ ext4_test_nsec_timestamps() if [ $nsec_atime -eq 0 -a $nsec_mtime -eq 0 -a $nsec_ctime -eq 0 ] then tst_resm TFAIL "The timestamp is not nanosecond(nsec_atime: $nsec_atime, nsec_mtime: $nsec_mtime, nsec_ctime: $nsec_ctime)" - umount mnt_point + tst_mount mnt_point return fi @@ -122,15 +117,11 @@ ext4_test_nsec_timestamps() than the current time we got.(sec_atime: $sec_atime, \ sec_mtime: $sec_mtime, sec_ctime: $sec_ctime, \ cur_time[s]: $sec)" - umount mnt_point + tst_umount mnt_point return fi - umount mnt_point - if [ $? -ne 0 ]; then - tst_resm TFAIL "failed to umount ext4 filesystem" - return - fi + tst_umount mnt_point # Test mount to ext3 and then mount back to ext4 mount -t ext3 $EXT4_DEV mnt_point @@ -138,7 +129,7 @@ ext4_test_nsec_timestamps() tst_resm TFAIL "failed to mount to ext3" return fi - umount mnt_point + tst_umount mnt_point mount -t ext4 $EXT4_DEV mnt_point if [ $? -ne 0 ]; then @@ -156,11 +147,11 @@ ext4_test_nsec_timestamps() unexpected. Before[atime mtime ctime]: $nsec_atime \ $nsec_mtime $nsec_ctime, After[atime mtime ctime]: \ $nsec_atime2 $nsec_mtime2 $nsec_ctime2)" - umount mnt_point + tst_umount mnt_point return fi - umount mnt_point + tst_umount mnt_point tst_resm TPASS "Ext4 nanosecond timestamps test with 256 inode size pass" }