* [PATCH 0/4] xfstests: random regression tests
@ 2013-04-01 10:57 Eryu Guan
2013-04-01 10:57 ` [PATCH 2/4] xfstests generic 309: test write to the last block of max file size on ext4 Eryu Guan
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Eryu Guan @ 2013-04-01 10:57 UTC (permalink / raw)
To: xfs; +Cc: Eryu Guan
308 and 309 are actually at version 3, revised after the re-factor.
Posts for version 2 are:
http://oss.sgi.com/archives/xfs/2013-03/msg00746.html
http://oss.sgi.com/archives/xfs/2013-03/msg00747.html
310 and 311 are new test cases.
I keep the NNN test name and make the seq number unique across different
test types.
All comments are appreciated.
Thanks,
Eryu Guan
Eryu Guan (4):
xfstests generic 308: check ctime updates for setfacl
xfstests generic 309: test write to the last block of max file size on
ext4
xfstests ext4 310: test read /proc/fs/ext4/<dev>/mb_groups while the
fs is being unmounted
xfstests generic 311: test dir mtime and ctime are updated on rename
tests/ext4/310 | 74 +++++++++++++++++++++++++++++++++++++++++++++++
tests/ext4/310.out | 2 ++
tests/ext4/group | 2 +-
tests/generic/308 | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++
tests/generic/308.out | 2 ++
tests/generic/309 | 69 ++++++++++++++++++++++++++++++++++++++++++++
tests/generic/309.out | 2 ++
tests/generic/311 | 74 +++++++++++++++++++++++++++++++++++++++++++++++
tests/generic/311.out | 2 ++
tests/generic/group | 3 ++
10 files changed, 308 insertions(+), 1 deletion(-)
create mode 100644 tests/ext4/310
create mode 100644 tests/ext4/310.out
create mode 100644 tests/generic/308
create mode 100644 tests/generic/308.out
create mode 100644 tests/generic/309
create mode 100644 tests/generic/309.out
create mode 100644 tests/generic/311
create mode 100644 tests/generic/311.out
--
1.8.1.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/4] xfstests generic 309: test write to the last block of max file size on ext4
2013-04-01 10:57 [PATCH 0/4] xfstests: random regression tests Eryu Guan
@ 2013-04-01 10:57 ` Eryu Guan
2013-04-05 13:38 ` Rich Johnston
2013-04-01 10:57 ` [PATCH 3/4] xfstests ext4 310: test read /proc/fs/ext4/<dev>/mb_groups while the fs is being unmounted Eryu Guan
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Eryu Guan @ 2013-04-01 10:57 UTC (permalink / raw)
To: xfs; +Cc: Eryu Guan
On unpatched ext4 if an extent exists which includes the block right
before the maximum file offset, and the block for the maximum file
offset is written, the kernel panics.
On patched ext4, the write would get EFBIG since we lower s_maxbytes
by one fs block.
Regression test for commit:
f17722f ext4: Fix max file size and logical block counting of extent format file
Though it's an ext4 specific issue, it's no harm to run on all file
systems, so put it in generic.
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
tests/generic/309 | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++
tests/generic/309.out | 2 ++
tests/generic/group | 1 +
3 files changed, 72 insertions(+)
create mode 100644 tests/generic/309
create mode 100644 tests/generic/309.out
diff --git a/tests/generic/309 b/tests/generic/309
new file mode 100644
index 0000000..875c09f
--- /dev/null
+++ b/tests/generic/309
@@ -0,0 +1,69 @@
+#! /bin/bash
+# FS QA Test No. 309
+#
+# Regression test for commit:
+# f17722f ext4: Fix max file size and logical block counting of extent format file
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2013 Red Hat, Inc. All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+status=1 # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ cd /
+ rm -f $testfile
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+testfile=$TEST_DIR/testfile.$seq
+
+# real QA test starts here
+_supported_fs generic
+_supported_os Linux
+
+rm -f $seq.full
+echo "Silence is golden"
+
+block_size=`stat -f -c %s $TEST_DIR`
+
+# On unpatched ext4, if an extent exists which includes the block right
+# before the maximum file offset, and the block for the maximum file offset
+# is written, the kernel panics
+# On patched ext4, the write would get EFBIG since we lower s_maxbytes by
+# one fs block
+
+# Create a sparse file with an extent lays at one block before old s_maxbytes
+offset=$(((2**32 - 2) * $block_size))
+$XFS_IO_PROG -f -c "pwrite $offset $block_size" -c fsync $testfile >$seq.full 2>&1
+
+# Write to the block after the extent just created
+offset=$(((2**32 - 1) * $block_size))
+$XFS_IO_PROG -f -c "pwrite $offset $block_size" -c fsync $testfile >>$seq.full 2>&1
+
+# Got here without hitting BUG_ON(), test passed
+status=0
+exit
diff --git a/tests/generic/309.out b/tests/generic/309.out
new file mode 100644
index 0000000..56330d6
--- /dev/null
+++ b/tests/generic/309.out
@@ -0,0 +1,2 @@
+QA output created by 309
+Silence is golden
diff --git a/tests/generic/group b/tests/generic/group
index 6c74b63..9ff2ab1 100644
--- a/tests/generic/group
+++ b/tests/generic/group
@@ -110,3 +110,4 @@
300 auto aio enospc preallocrw stress
306 auto quick rw
308 auto quick
+309 auto quick
--
1.8.1.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/4] xfstests ext4 310: test read /proc/fs/ext4/<dev>/mb_groups while the fs is being unmounted
2013-04-01 10:57 [PATCH 0/4] xfstests: random regression tests Eryu Guan
2013-04-01 10:57 ` [PATCH 2/4] xfstests generic 309: test write to the last block of max file size on ext4 Eryu Guan
@ 2013-04-01 10:57 ` Eryu Guan
2013-04-05 13:38 ` Rich Johnston
2013-04-01 10:57 ` [PATCH 4/4] xfstests generic 311: test dir mtime and ctime are updated on rename Eryu Guan
2013-04-05 13:41 ` [PATCH 0/4] xfstests: random regression tests Rich Johnston
3 siblings, 1 reply; 8+ messages in thread
From: Eryu Guan @ 2013-04-01 10:57 UTC (permalink / raw)
To: xfs; +Cc: Eryu Guan
Regression test for commit:
9559996 ext4: remove mb_groups before tearing down the buddy_cache
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
tests/ext4/310 | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
tests/ext4/310.out | 2 ++
tests/ext4/group | 2 +-
3 files changed, 77 insertions(+), 1 deletion(-)
create mode 100644 tests/ext4/310
create mode 100644 tests/ext4/310.out
diff --git a/tests/ext4/310 b/tests/ext4/310
new file mode 100644
index 0000000..eb9320f
--- /dev/null
+++ b/tests/ext4/310
@@ -0,0 +1,74 @@
+#! /bin/bash
+# FS QA Test No. 310
+#
+# Regression test for commit:
+# 9559996 ext4: remove mb_groups before tearing down the buddy_cache
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2013 Red Hat, Inc. All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+PIDS=""
+status=1 # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ cd /
+ kill $PIDS >/dev/null 2>&1
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_fs ext4
+_supported_os Linux
+
+_require_scratch
+
+rm -f $seq.full
+echo "Silence is golden"
+
+DEV_BASENAME=$(basename $(readlink -f $SCRATCH_DEV))
+echo "Start test on device $SCRATCH_DEV, basename $DEV_BASENAME" >$seq.full
+_scratch_mkfs >>$seq.full 2>&1
+
+while true;do
+ mount $SCRATCH_DEV $SCRATCH_MNT
+ umount $SCRATCH_DEV
+done &
+PIDS=$!
+
+while true;do
+ cat /proc/fs/ext4/$DEV_BASENAME/mb_groups > /dev/null 2>&1
+done &
+PIDS="$PIDS $!"
+
+# sleep for 180s, in most cases a buggy kernel could hit BUG_ON within 3 minutes
+sleep 180
+
+# no BUG_ON, all done
+kill $PIDS >/dev/null 2>&1
+wait
+status=0
+exit
diff --git a/tests/ext4/310.out b/tests/ext4/310.out
new file mode 100644
index 0000000..7b9eaf7
--- /dev/null
+++ b/tests/ext4/310.out
@@ -0,0 +1,2 @@
+QA output created by 310
+Silence is golden
diff --git a/tests/ext4/group b/tests/ext4/group
index 6a44db3..a53cd87 100644
--- a/tests/ext4/group
+++ b/tests/ext4/group
@@ -8,4 +8,4 @@
302 aio dangerous ioctl rw stress
303 aio dangerous ioctl rw stress
304 aio dangerous ioctl rw stress
-
+310 auto
--
1.8.1.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/4] xfstests generic 311: test dir mtime and ctime are updated on rename
2013-04-01 10:57 [PATCH 0/4] xfstests: random regression tests Eryu Guan
2013-04-01 10:57 ` [PATCH 2/4] xfstests generic 309: test write to the last block of max file size on ext4 Eryu Guan
2013-04-01 10:57 ` [PATCH 3/4] xfstests ext4 310: test read /proc/fs/ext4/<dev>/mb_groups while the fs is being unmounted Eryu Guan
@ 2013-04-01 10:57 ` Eryu Guan
2013-04-05 13:38 ` Rich Johnston
2013-04-05 13:41 ` [PATCH 0/4] xfstests: random regression tests Rich Johnston
3 siblings, 1 reply; 8+ messages in thread
From: Eryu Guan @ 2013-04-01 10:57 UTC (permalink / raw)
To: xfs; +Cc: Eryu Guan
Test directory mtime and ctime are updated when moving a file onto an
existing file in the directory
Regression test for commit:
0b23076 ext3: fix update of mtime and ctime on rename
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
tests/generic/311 | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++
tests/generic/311.out | 2 ++
tests/generic/group | 1 +
3 files changed, 77 insertions(+)
create mode 100644 tests/generic/311
create mode 100644 tests/generic/311.out
diff --git a/tests/generic/311 b/tests/generic/311
new file mode 100644
index 0000000..46cc791
--- /dev/null
+++ b/tests/generic/311
@@ -0,0 +1,74 @@
+#! /bin/bash
+# FS QA Test No. 311
+#
+# Test directory mtime and ctime are updated when moving a file onto an
+# existing file in the directory
+#
+# Regression test for commit:
+# 0b23076 ext3: fix update of mtime and ctime on rename
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2013 Red Hat, Inc. All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+status=0 # success is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ cd /
+ rm -rf $TEST_DIR/testdir_$seq
+ rm -f $TEST_DIR/testfile.$seq
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_fs generic
+_supported_os IRIX Linux
+
+echo "Silence is golden"
+
+mkdir -p $TEST_DIR/testdir_$seq
+touch $TEST_DIR/testdir_$seq/testfile
+touch $TEST_DIR/testfile.$seq
+
+mtime1=`stat -c %Y $TEST_DIR/testdir_$seq`
+ctime1=`stat -c %Z $TEST_DIR/testdir_$seq`
+
+sleep 1
+mv $TEST_DIR/testfile.$seq $TEST_DIR/testdir_$seq/testfile
+
+mtime2=`stat -c %Y $TEST_DIR/testdir_$seq`
+ctime2=`stat -c %Z $TEST_DIR/testdir_$seq`
+
+if [ "$mtime1" == "$mtime2" ]; then
+ echo "mtime not updated"
+ let status=$status+1
+fi
+if [ "$ctime1" == "$ctime2" ]; then
+ echo "ctime not updated"
+ let status=$status+1
+fi
+
+exit
diff --git a/tests/generic/311.out b/tests/generic/311.out
new file mode 100644
index 0000000..62f2530
--- /dev/null
+++ b/tests/generic/311.out
@@ -0,0 +1,2 @@
+QA output created by 311
+Silence is golden
diff --git a/tests/generic/group b/tests/generic/group
index 9ff2ab1..1f4b62e 100644
--- a/tests/generic/group
+++ b/tests/generic/group
@@ -111,3 +111,4 @@
306 auto quick rw
308 auto quick
309 auto quick
+311 auto quick
--
1.8.1.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/4] xfstests generic 309: test write to the last block of max file size on ext4
2013-04-01 10:57 ` [PATCH 2/4] xfstests generic 309: test write to the last block of max file size on ext4 Eryu Guan
@ 2013-04-05 13:38 ` Rich Johnston
0 siblings, 0 replies; 8+ messages in thread
From: Rich Johnston @ 2013-04-05 13:38 UTC (permalink / raw)
To: Eryu Guan; +Cc: xfs
Looks good.
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/4] xfstests ext4 310: test read /proc/fs/ext4/<dev>/mb_groups while the fs is being unmounted
2013-04-01 10:57 ` [PATCH 3/4] xfstests ext4 310: test read /proc/fs/ext4/<dev>/mb_groups while the fs is being unmounted Eryu Guan
@ 2013-04-05 13:38 ` Rich Johnston
0 siblings, 0 replies; 8+ messages in thread
From: Rich Johnston @ 2013-04-05 13:38 UTC (permalink / raw)
To: Eryu Guan; +Cc: xfs
Looks good.
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] xfstests generic 311: test dir mtime and ctime are updated on rename
2013-04-01 10:57 ` [PATCH 4/4] xfstests generic 311: test dir mtime and ctime are updated on rename Eryu Guan
@ 2013-04-05 13:38 ` Rich Johnston
0 siblings, 0 replies; 8+ messages in thread
From: Rich Johnston @ 2013-04-05 13:38 UTC (permalink / raw)
To: Eryu Guan; +Cc: xfs
Looks good.
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/4] xfstests: random regression tests
2013-04-01 10:57 [PATCH 0/4] xfstests: random regression tests Eryu Guan
` (2 preceding siblings ...)
2013-04-01 10:57 ` [PATCH 4/4] xfstests generic 311: test dir mtime and ctime are updated on rename Eryu Guan
@ 2013-04-05 13:41 ` Rich Johnston
3 siblings, 0 replies; 8+ messages in thread
From: Rich Johnston @ 2013-04-05 13:41 UTC (permalink / raw)
To: Eryu Guan; +Cc: xfs
Thanks for submitting this patchset, it has been committed.
--Rich
commit 797c82f0e22528df369cf198c2a9d6109e085838
Author: Eryu Guan <eguan@redhat.com>
Date: Mon Apr 1 10:57:44 2013 +0000
xfstests generic 309: test dir mtime and ctime are updated on rename
Test directory mtime and ctime are updated when moving a file onto an
existing file in the directory
Regression test for commit:
0b23076 ext3: fix update of mtime and ctime on rename
Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
[rjohnston@sgi.com renumbered test to next in group sequence]
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
commit f7922730727844c6dee837bd1a64221342fef1d1
Author: Eryu Guan <eguan@redhat.com>
Date: Mon Apr 1 10:57:43 2013 +0000
xfstests ext4 305: test read /proc/fs/ext4/<dev>/mb_groups while
the fs is being unmounted
Regression test for commit:
9559996 ext4: remove mb_groups before tearing down the buddy_cache
Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
[rjohnston@sgi.com renumbered test to next in group sequence]
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
commit 94e1e7e53a89d9a3387bee7dea60091afaf79704
Author: Eryu Guan <eguan@redhat.com>
Date: Mon Apr 1 10:57:42 2013 +0000
xfstests generic 308: test write to the last block of max file size
on ext4
On unpatched ext4 if an extent exists which includes the block right
before the maximum file offset, and the block for the maximum file
offset is written, the kernel panics.
On patched ext4, the write would get EFBIG since we lower s_maxbytes
by one fs block.
Regression test for commit:
f17722f ext4: Fix max file size and logical block counting of
extent format file
Though it's an ext4 specific issue, it's no harm to run on all file
systems, so put it in generic.
Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
[rjohnston@sgi.com renumbered test to next in group sequence]
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
commit 6422b818388c652183b6b517be1feac554f5f004
Author: Eryu Guan <eguan@redhat.com>
Date: Mon Apr 1 10:57:41 2013 +0000
xfstests generic 307: check ctime updates for setfacl
Check if ctime is updated and written to disk after setfacl
Regression test for the following extN commits
c6ac12a ext4: update ctime when changing the file's permission by
setfacl
30e2bab ext3: update ctime when changing the file's permission by
setfacl
523825b ext2: update ctime when changing the file's permission by
setfacl
Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
[rjohnston@sgi.com renumbered test to next in group sequence]
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-04-05 13:41 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-01 10:57 [PATCH 0/4] xfstests: random regression tests Eryu Guan
2013-04-01 10:57 ` [PATCH 2/4] xfstests generic 309: test write to the last block of max file size on ext4 Eryu Guan
2013-04-05 13:38 ` Rich Johnston
2013-04-01 10:57 ` [PATCH 3/4] xfstests ext4 310: test read /proc/fs/ext4/<dev>/mb_groups while the fs is being unmounted Eryu Guan
2013-04-05 13:38 ` Rich Johnston
2013-04-01 10:57 ` [PATCH 4/4] xfstests generic 311: test dir mtime and ctime are updated on rename Eryu Guan
2013-04-05 13:38 ` Rich Johnston
2013-04-05 13:41 ` [PATCH 0/4] xfstests: random regression tests Rich Johnston
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox