Skip to contentSkip to conversation

resending a few xfstests patches as a series

PATCH In review Eric Sandeen 2 participants 7 messages Feb 3, 2010 – Feb 5, 2010

lore
Share & tools
lore
#1 lore raw

PATCH 1/3 xfstests: routine to create scratch of certain size

This is needed for later enospc tests to be generic

We have to explicitly call the mkfs rather than
_scratch_mkfs since extN wants nr-of-blocks as
an argument -after- the device name.

---

common.rc +23 -0
index 1edea2f..0a02a2b 100644
@@ -305,6 +305,29 @@ _scratch_mkfs()
     esac
 }
 
+# Create fs of certain size on scratch device
+# _scratch_mkfs_sized <size in bytes> [optional blocksize]
+_scratch_mkfs_sized()
+{
+    fssize=$1
+    blocksize=$2
+    [ -z "$blocksize" ] && blocksize=4096
+    let blocks=$fssize/$blocksize
+
+    case $FSTYP in
+    xfs)
+	_scratch_mkfs_xfs -d size=$fssize -b size=$blocksize
+	;;
+    ext2|ext3|ext4)
+	/sbin/mkfs.$FSTYP -b $blocksize $SCRATCH_DEV $blocks
+	;;
+    *)
+	_notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized"
+	;;
+    esac
+    _scratch_mkfs
+}
+
 # Emulate an N-data-disk stripe w/ various stripe units
 # _scratch_mkfs_geom <sunit bytes> <swidth multiplier> [optional blocksize]
 _scratch_mkfs_geom()

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH 1/3] xfstests: routine to create scratch of certain size

Quoted 7 lines · Eric Sandeen

This is needed for later enospc tests to be generic

We have to explicitly call the mkfs rather than
_scratch_mkfs since extN wants nr-of-blocks as
an argument -after- the device name.

Looks good,

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#3 lore raw

PATCH 2/3 xfstests: make 053 and 077 generic

In reply to Eric Sandeen

053 and 077 can be generic w/ a little tweaking.

Also change 077's filler to something more likely
to be on a random system under test, and add it
to the enospc group.

---

053 +4 -5
index 98644a7..439cbe6 100755
@@ -38,18 +38,17 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.attr
 
 # real QA test starts here
-_supported_fs xfs
+_supported_fs generic
 _supported_os Linux
 
-[ ! -x /bin/chacl -a ! -x /usr/bin/chacl ] && _notrun "chacl command not found"
-
 _require_scratch
+_acl_requirements
 _acl_setup_ids
 _do_die_on_error=y
 test=$SCRATCH_MNT/test
 
 # make filesystem on scratch using the defaults
-_do 'make filesystem on $SCRATCH_DEV' '_scratch_mkfs_xfs'
+_do 'make filesystem on $SCRATCH_DEV' '_scratch_mkfs'
 _do 'mount filesytem' '_scratch_mount'
 
 # create test files and set acls
@@ -84,7 +83,7 @@ list_acls()
 echo "acls before repair:"
 list_acls
 _do 'unmount $SCRATCH_DEV' 'umount $SCRATCH_DEV'
-_do 'repair filesystem' '_scratch_xfs_repair'
+_do 'repair filesystem' '_check_scratch_fs'
 _do 'mount filesytem' '_scratch_mount'
 echo "acls after repair: "
 list_acls
077 +8 -5
index cdee8da..a3d9334 100755
@@ -30,8 +30,8 @@ echo "QA output created by $seq"
 here=`pwd`
 tmp=/tmp/$$
 status=1
-#filler=$here/../../linux
-filler=/home/fsgqa/isms/2.4.x-xfs
+# Something w/ enough data to fill 50M of fs...
+filler=/lib/modules/
 
 _cleanup()
 {
@@ -44,14 +44,16 @@ trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
+. ./common.attr
 
 # real QA test starts here
-_supported_fs xfs
+_supported_fs generic
 _supported_os Linux
 
-[ ! -d $filler ] && _notrun "No linux directory to source files from"
+[ ! -d $filler ] && _notrun "No directory to source files from"
 
 _require_scratch
+_acl_requirements
 
 echo "*** create filesystem"
 
@@ -59,7 +61,8 @@ rm -f $seq.full
 umount $SCRATCH_DEV >/dev/null 2>&1
 echo "*** MKFS ***"                         >>$seq.full
 echo ""                                     >>$seq.full
-_scratch_mkfs_xfs -dsize=50m                >>$seq.full 2>&1 \
+let SIZE=50*1024*1024
+_scratch_mkfs_sized $SIZE                   >>$seq.full 2>&1 \
 	|| _fail "mkfs failed"
 _scratch_mount                              >>$seq.full 2>&1 \
 	|| _fail "mount failed"
group +1 -1
index 6b8528f..c66d965 100644
@@ -187,7 +187,7 @@ deprecated
 074 rw udf auto
 075 rw udf auto quick
 076 metadata rw udf auto quick
-077 acl attr auto
+077 acl attr auto enospc
 078 growfs auto quick
 079 acl attr ioctl metadata auto quick
 080 rw ioctl

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 2/3
#4 lore raw

Re: [PATCH 2/3] xfstests: make 053 and 077 generic

Quoted 5 lines · Eric Sandeen

053 and 077 can be generic w/ a little tweaking.

Also change 077's filler to something more likely
to be on a random system under test, and add it
to the enospc group.

Looks good,

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#5 lore raw

PATCH 3/3 xfstests: rename _acl_requirements to _require_acls

In reply to Eric Sandeen

Most requirement tests are named _require_foo, so just make this more consistent.

Also remove a few redundant tests for /usr/bin/chacl since _require_acls covers that.

---

051 +1 -2
index 238abe9..12febd3 100755
@@ -73,7 +73,6 @@ _cleanup()
 _supported_fs xfs udf
 _supported_os Linux
 
-[ -x /usr/bin/chacl ] || _notrun "chacl executable not found"
 [ -x $runas ] || _notrun "$runas executable not found"
 
 rm -f $seq.full
@@ -82,7 +81,7 @@ _setup_testdir
 
 _need_to_be_root
 _acl_setup_ids
-_acl_requirements
+_require_acls
 
 # get dir
 cd $testdir
053 +1 -1
index 439cbe6..ac2162d 100755
@@ -42,7 +42,7 @@ _supported_fs generic
 _supported_os Linux
 
 _require_scratch
-_acl_requirements
+_require_acls
 _acl_setup_ids
 _do_die_on_error=y
 test=$SCRATCH_MNT/test
067 +1 -3
index 5ab743e..f1c211f 100755
@@ -41,10 +41,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 _supported_fs xfs
 _supported_os Linux
 
-[ -x /usr/bin/chacl ] || _notrun "chacl executable not found"
-
 _need_to_be_root
-_acl_requirements
+_require_acls
 _require_scratch
 
 # set up fs for 1K inodes
077 +1 -1
index a3d9334..ea81c07 100755
@@ -53,7 +53,7 @@ _supported_os Linux
 [ ! -d $filler ] && _notrun "No directory to source files from"
 
 _require_scratch
-_acl_requirements
+_require_acls
 
 echo "*** create filesystem"
 
099 +2 -1
index 90af18f..b68bfcd 100755
@@ -81,7 +81,8 @@ _supported_fs generic
 _supported_os IRIX
 
 _acl_setup_ids
-_acl_requirements
+_require_acls
+
 [ -x $runas ] || _notrun "$runas executable not found"
 
 # get dir
105 +1 -1
index 9544c66..aba1f6d 100755
@@ -56,7 +56,7 @@ rm -f $seq.full
 _require_scratch
 
 _acl_setup_ids
-_acl_requirements
+_require_acls
 
 umount $SCRATCH_DEV >/dev/null 2>&1
 echo "*** MKFS ***"                         >>$seq.full
common.attr +1 -1
index d12cc02..5019884 100644
@@ -112,7 +112,7 @@ _filter_aces_notypes()
 
 # test if acl code will work
 #
-_acl_requirements()
+_require_acls()
 {
     xfsdir=$TEST_DIR
     

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 3/3
#6 lore raw

Re: [PATCH 3/3] xfstests: rename _acl_requirements to _require_acls

Quoted 5 lines · Eric Sandeen

Most requirement tests are named _require_foo, so just make this more consistent.

Also remove a few redundant tests for /usr/bin/chacl since _require_acls covers that.

Looks good,

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs