Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp623885ybp; Wed, 9 Oct 2019 01:23:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwL1AF6KgaOrb6pBSIc74DGZNbm+0DeZGPgfz8zk9ty2lZWgwpovwyAqUU4J9cLxIGcigUB X-Received: by 2002:a17:906:9705:: with SMTP id k5mr1593251ejx.13.1570609410722; Wed, 09 Oct 2019 01:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570609410; cv=none; d=google.com; s=arc-20160816; b=h/fuWdd7FJrDz7fiAkvuV6OZHKWPWeR3ieG3oiVYiktbPapQc1kgTnt9bFuKJgVapN sZIXkYU+LgjJEAzQYOquljsRRaUBLt3YKhCXnryu4psk1ghi0GITukplu62VvBNH3eV3 nS1QdpcTYmeP0INQef/zemFY8OLRgV9Q+CAFac6DdJfjiLxmDFHEIaIalqwv7vJGdi2l KDzD6YN0siJ7JW4jbckX05ebnpMhYb37aJxxT6EUzMBOoBcVbMJenCoHZQU83A0sKiQw VAcKzbIe1ybcghBs05CR3PgLWABskVQDSDLDfIZ18ggSztpOclqKTrkD4qsu2pUYMzZ0 EdSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=s9URIskJr0SmrZnnbm/5M2Rk0m+IPPx/e4yBXbSBKlY=; b=EFjxT3oENaR26Ui36cABJ76YeWoXCq6g8wDRPWup8wN/8K2SI6XLWTSsy6HN6wVhVH HsjHcgRZMMGAjYWiUJw9uusefVQK/UlbhGJIKqmk/VwkS6pvp+GqVsOsetTp1a0yUfgL nKFHuZOWVcuqblJPezWRI2wtAllLIQIyjFRJNshKL9xtHJing91f3XHi5TiVy3XO0OqE 2tWD14ptFFi1w3W26+3TQ5S1SVEtRU2Ku7KT4CWDnQ/ANP3qWCKTQKxTXqRfVL7r6/jA GqNN47+yQCmdenTGjyuh3/+JnNrUYskdCQvCqIb6MVCRP9Bv5Q8h4vONmTY3BD35sVPI k/jg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p36si832074edc.373.2019.10.09.01.23.07; Wed, 09 Oct 2019 01:23:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729595AbfJIIVC (ORCPT + 99 others); Wed, 9 Oct 2019 04:21:02 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:51768 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725776AbfJIIVC (ORCPT ); Wed, 9 Oct 2019 04:21:02 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 2659932AA2271B9FDEC2; Wed, 9 Oct 2019 16:21:00 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Wed, 9 Oct 2019 16:20:49 +0800 From: Zhihao Cheng To: , , , CC: , , Subject: [PATCH xfstests] generic/192: Move 'cd /' to the place where the program exits Date: Wed, 9 Oct 2019 16:27:57 +0800 Message-ID: <1570609677-49586-1-git-send-email-chengzhihao1@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Running generic/192 with overlayfs(Let ubifs as base fs) yields the following output: generic/192 - output mismatch QA output created by 192 sleep for 5 seconds test +./common/rc: line 316: src/t_dir_type: No such file or directory delta1 is in range delta2 is in range ... When the use case fails, the call stack in generic/192 is: local unknowns=$(src/t_dir_type $dir u | wc -l) common/rc:316 _supports_filetype common/rc:299 _overlay_mount common/overlay:52 _overlay_test_mount common/overlay:93 _test_mount common/rc:407 _test_cycle_mount generic/192:50 Before _test_cycle_mount() being invoked, generic/192 executed 'cd /' to change work dir from 'xfstests-dev' to '/', so src/t_dir_type was not found. Signed-off-by: Zhihao Cheng --- tests/generic/192 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/generic/192 b/tests/generic/192 index 50b3d6fd..5550f39e 100755 --- a/tests/generic/192 +++ b/tests/generic/192 @@ -15,7 +15,12 @@ echo "QA output created by $seq" here=`pwd` tmp=/tmp/$$ status=1 # failure is the default! -trap "exit \$status" 0 1 2 3 15 +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / +} _access_time() { @@ -46,7 +51,6 @@ sleep $delay # sleep to allow time to move on for access cat $testfile time2=`_access_time $testfile | tee -a $seqres.full` -cd / _test_cycle_mount time3=`_access_time $testfile | tee -a $seqres.full` -- 2.13.6