* [LTP] [PATCH v3 ltp 2/4] fs/ext4: Replace umount with tst_umount
2018-07-26 9:22 [LTP] [PATCH v3 ltp 1/4] fs/ext4: check if the big block device is mounted at do_setup() Yixin Zhang
@ 2018-07-26 9:22 ` Yixin Zhang
2018-07-26 9:22 ` [LTP] [PATCH v3 ltp 3/4] fs/ext4: bug fix - incorect argument ctime vs mtime Yixin Zhang
2018-07-26 9:22 ` [LTP] [PATCH v3 ltp 4/4] fs/ext4: update format and fix typo Yixin Zhang
2 siblings, 0 replies; 5+ messages in thread
From: Yixin Zhang @ 2018-07-26 9:22 UTC (permalink / raw)
To: ltp
Replace umount with tst_umount in common lib to handle umount failed due
to device busy
Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
---
.../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"
}
--
2.14.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH v3 ltp 4/4] fs/ext4: update format and fix typo
2018-07-26 9:22 [LTP] [PATCH v3 ltp 1/4] fs/ext4: check if the big block device is mounted at do_setup() Yixin Zhang
2018-07-26 9:22 ` [LTP] [PATCH v3 ltp 2/4] fs/ext4: Replace umount with tst_umount Yixin Zhang
2018-07-26 9:22 ` [LTP] [PATCH v3 ltp 3/4] fs/ext4: bug fix - incorect argument ctime vs mtime Yixin Zhang
@ 2018-07-26 9:22 ` Yixin Zhang
2018-08-15 14:01 ` Cyril Hrubis
2 siblings, 1 reply; 5+ messages in thread
From: Yixin Zhang @ 2018-07-26 9:22 UTC (permalink / raw)
To: ltp
Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
---
.../ext4-nsec-timestamps/ext4_nsec_timestamps_test.sh | 7 +++----
1 file changed, 3 insertions(+), 4 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 e44b9f62e..06b4a31ed 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
@@ -71,7 +71,7 @@ ext4_test_nsec_timestamps()
mkfs.ext3 -I 256 $EXT4_DEV >/dev/null 2>&1
if [ $? -ne 0 ]; then
- tst_resm TFAIL "failed to create ext4 filesystem"
+ tst_resm TFAIL "failed to create ext3 filesystem"
return
fi
@@ -100,8 +100,7 @@ ext4_test_nsec_timestamps()
nsec_ctime=`ext4_file_time mnt_point/tmp_file ctime nsec`
# Test nanosecond
- if [ $nsec_atime -eq 0 -a $nsec_mtime -eq 0 -a $nsec_ctime -eq 0 ]
- then
+ 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)"
tst_mount mnt_point
return
@@ -142,7 +141,7 @@ ext4_test_nsec_timestamps()
nsec_ctime2=`ext4_file_time mnt_point/tmp_file ctime nsec`
if [ $nsec_atime -ne $nsec_atime2 -o $nsec_ctime -ne $nsec_ctime2 -o \
- $nsec_mtime -ne $nsec_mtime2 ]; then
+ $nsec_mtime -ne $nsec_mtime2 ]; then
tst_resm TFAIL "File nanosecond timestamp has changed \
unexpected. Before[atime mtime ctime]: $nsec_atime \
$nsec_mtime $nsec_ctime, After[atime mtime ctime]: \
--
2.14.1
^ permalink raw reply related [flat|nested] 5+ messages in thread