* [LTP] [PATCH v3 ltp 1/4] fs/ext4: check if the big block device is mounted at do_setup()
@ 2018-07-26 9:22 Yixin Zhang
2018-07-26 9:22 ` [LTP] [PATCH v3 ltp 2/4] fs/ext4: Replace umount with tst_umount Yixin Zhang
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Yixin Zhang @ 2018-07-26 9:22 UTC (permalink / raw)
To: ltp
The test requires the big block device is umounted before test, so check
at do_setup(), TBROK if it's mounted
Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
---
testcases/kernel/fs/ext4-new-features/ext4_funcs.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/testcases/kernel/fs/ext4-new-features/ext4_funcs.sh b/testcases/kernel/fs/ext4-new-features/ext4_funcs.sh
index a9eb54e8d..1514da5a2 100755
--- a/testcases/kernel/fs/ext4-new-features/ext4_funcs.sh
+++ b/testcases/kernel/fs/ext4-new-features/ext4_funcs.sh
@@ -45,6 +45,9 @@ ext4_setup()
tst_brkm TCONF "tests need a big block device(5G-10G)"
else
export EXT4_DEV=$LTP_BIG_DEV
+ if mount | cut -d' ' -f1 | grep -q ^$EXT4_DEV$ ; then
+ tst_brkm TBROK "$EXT4_DEV should be umounted before test"
+ fi
fi
tst_tmpdir
--
2.14.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [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 3/4] fs/ext4: bug fix - incorect argument ctime vs mtime
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 ` 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
nsec_ctime2 should call ext4_file_time with argument ctime, not mtime.
Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
---
.../ext4-new-features/ext4-nsec-timestamps/ext4_nsec_timestamps_test.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 fdf64fde8..e44b9f62e 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
@@ -139,7 +139,7 @@ ext4_test_nsec_timestamps()
nsec_atime2=`ext4_file_time mnt_point/tmp_file atime nsec`
nsec_mtime2=`ext4_file_time mnt_point/tmp_file mtime nsec`
- nsec_ctime2=`ext4_file_time mnt_point/tmp_file mtime nsec`
+ 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
--
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
* [LTP] [PATCH v3 ltp 4/4] fs/ext4: update format and fix typo
2018-07-26 9:22 ` [LTP] [PATCH v3 ltp 4/4] fs/ext4: update format and fix typo Yixin Zhang
@ 2018-08-15 14:01 ` Cyril Hrubis
0 siblings, 0 replies; 5+ messages in thread
From: Cyril Hrubis @ 2018-08-15 14:01 UTC (permalink / raw)
To: ltp
Hi!
> 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
I've remove this change from the patch, since it looks like a mistake
and pushed the whole patchset, thanks.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-08-15 14:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [LTP] [PATCH v3 ltp 4/4] fs/ext4: update format and fix typo Yixin Zhang
2018-08-15 14:01 ` Cyril Hrubis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.