lkml.org 
[lkml]   [2019]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH xfstests] generic/192: Move 'cd /' to the place where the program exits
Date
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 <chengzhihao1@huawei.com>
---
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
\
 
 \ /
  Last update: 2019-10-09 10:21    [W:0.036 / U:37.780 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site