* [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux
@ 2012-04-13 9:49 tmarek
2012-04-13 9:49 ` [PATCH 2/5] xfstests 233: fix user fsgqa access to fsstress tmarek
` (4 more replies)
0 siblings, 5 replies; 15+ messages in thread
From: tmarek @ 2012-04-13 9:49 UTC (permalink / raw)
To: xfs; +Cc: Tom Marek, lczerner, dchinner
From: Tom Marek <tmarek@redhat.com>
Tests number 062 was supposed to work with ext4 fs but there were some
problems in it - Tests haven't considered existence of lost+found directory in
ext4. Also when scratch was mounted with SELinux context test failed because
fgetattr returns SELinux extended attributes. And when fgetattr is run with
recursive flag it's output might change between file systems due to different
file ordering. Fix this by sorting the output manually. Also all lines
containing SELinux and lost+found were removed from output.
Signed-off-by: Tom Marek <tmarek@redhat.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
---
062 | 50 ++++++++++++++++++++++++++---------
062.out | 90 +++++++++++++++++++++++++++++++-------------------------------
2 files changed, 82 insertions(+), 58 deletions(-)
diff --git a/062 b/062
index f666e1b..116296b 100755
--- a/062
+++ b/062
@@ -46,6 +46,30 @@ _cleanup()
}
trap "_cleanup; exit \$status" 0 1 2 3 15
+# remove "security.selinux=..." because it is not installed on all systems
+# and it not relevant to this test
+_remove_selinux(){
+ egrep -v '^(selinux|security\.selinux)'
+}
+
+# sort getfattr output and remove entries containing only selinux attributes
+_sort_getfattr(){
+ awk '
+ BEGIN{
+ RS=""
+ }
+ {
+ a[FNR]=$0
+ }
+ END{
+ n = asort(a);
+ for(i = 1; i <= n; ++i){
+ if (a[i] ~ /# file: SCRATCH_MNT[^\n]*\nsecurity.selinux[^\n]*\n/)
+ print a[i] "\n"
+ }
+ }'
+}
+
getfattr()
{
$GETFATTR_PROG --absolute-names -dh $@ 2>&1 | _filter_scratch
@@ -67,7 +91,7 @@ _create_test_bed()
mknod $SCRATCH_MNT/dev/c c 0 0
mknod $SCRATCH_MNT/dev/p p
# sanity check
- find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch
+ find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch | grep -v "lost+found"
}
# real QA test starts here
@@ -102,7 +126,7 @@ for nsp in $ATTR_MODES; do
echo "*** set/get one initially empty attribute"
setfattr -h -n $nsp.name $SCRATCH_MNT/$inode
- getfattr -m $nsp $SCRATCH_MNT/$inode
+ getfattr -m $nsp $SCRATCH_MNT/$inode | _remove_selinux
echo "*** overwrite empty, set several new attributes"
setfattr -h -n $nsp.name -v 0xbabe $SCRATCH_MNT/$inode
@@ -110,33 +134,33 @@ for nsp in $ATTR_MODES; do
setfattr -h -n $nsp.name3 -v 0xdeface $SCRATCH_MNT/$inode
echo "*** fetch several attribute names and values (hex)"
- getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
+ getfattr -m $nsp -e hex $SCRATCH_MNT/$inode | _remove_selinux
echo "*** fetch several attribute names and values (base64)"
- getfattr -m $nsp -e base64 $SCRATCH_MNT/$inode
+ getfattr -m $nsp -e base64 $SCRATCH_MNT/$inode | _remove_selinux
echo "*** shrink value of an existing attribute"
setfattr -h -n $nsp.name2 -v 0xdeaf $SCRATCH_MNT/$inode
- getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
+ getfattr -m $nsp -e hex $SCRATCH_MNT/$inode | _remove_selinux
echo "*** grow value of existing attribute"
setfattr -h -n $nsp.name2 -v 0xdecade $SCRATCH_MNT/$inode
- getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
+ getfattr -m $nsp -e hex $SCRATCH_MNT/$inode | _remove_selinux
echo "*** set an empty value for second attribute"
setfattr -h -n $nsp.name2 $SCRATCH_MNT/$inode
- getfattr -m $nsp -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter
+ getfattr -m $nsp -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter | _remove_selinux
echo "*** overwrite empty value"
setfattr -h -n $nsp.name2 -v 0xcafe $SCRATCH_MNT/$inode
- getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter
+ getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter | _remove_selinux
echo "*** remove attribute"
setfattr -h -x $nsp.name2 $SCRATCH_MNT/$inode
- getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter
+ getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter | _remove_selinux
echo "*** final list (strings, type=$inode, nsp=$nsp)"
- getfattr -m '.' -e hex $SCRATCH_MNT/$inode
+ getfattr -m '.' -e hex $SCRATCH_MNT/$inode | _sort_getfattr | _remove_selinux
done
done
@@ -160,18 +184,18 @@ _extend_test_bed()
# whack a symlink in the middle, just to be difficult
ln -s $SCRATCH_MNT/here/up $SCRATCH_MNT/descend/and
# dump out our new starting point
- find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch
+ find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch | grep -v "lost+found"
}
_extend_test_bed
echo
echo "*** directory descent with us following symlinks"
-getfattr -h -L -R -m '.' -e hex $SCRATCH_MNT
+getfattr -h -L -R -m '.' -e hex $SCRATCH_MNT | _sort_getfattr | _remove_selinux
echo
echo "*** directory descent without following symlinks"
-getfattr -h -P -R -m '.' -e hex $SCRATCH_MNT
+getfattr -h -P -R -m '.' -e hex $SCRATCH_MNT | _sort_getfattr | _remove_selinux
#
diff --git a/062.out b/062.out
index 699254a..8cc3c65 100644
--- a/062.out
+++ b/062.out
@@ -508,21 +508,21 @@ SCRATCH_MNT/lnk
SCRATCH_MNT/reg
*** directory descent with us following symlinks
-# file: SCRATCH_MNT/reg
-trusted.name=0xbabe
-trusted.name3=0xdeface
-user.name=0xbabe
-user.name3=0xdeface
+# file: SCRATCH_MNT/descend
+user.1=0x3233
+user.x=0x797a
-# file: SCRATCH_MNT/dir
-trusted.name=0xbabe
-trusted.name3=0xdeface
-user.name=0xbabe
-user.name3=0xdeface
+# file: SCRATCH_MNT/descend/and/ascend
+trusted.9=0x3837
+trusted.a=0x6263
-# file: SCRATCH_MNT/lnk
-trusted.name=0xbabe
-trusted.name3=0xdeface
+# file: SCRATCH_MNT/descend/down
+user.1=0x3233
+user.x=0x797a
+
+# file: SCRATCH_MNT/descend/down/here
+user.1=0x3233
+user.x=0x797a
# file: SCRATCH_MNT/dev/b
trusted.name=0xbabe
@@ -536,6 +536,12 @@ trusted.name3=0xdeface
trusted.name=0xbabe
trusted.name3=0xdeface
+# file: SCRATCH_MNT/dir
+trusted.name=0xbabe
+trusted.name3=0xdeface
+user.name=0xbabe
+user.name3=0xdeface
+
# file: SCRATCH_MNT/here
trusted.9=0x3837
trusted.a=0x6263
@@ -548,6 +554,18 @@ trusted.a=0x6263
trusted.9=0x3837
trusted.a=0x6263
+# file: SCRATCH_MNT/lnk
+trusted.name=0xbabe
+trusted.name3=0xdeface
+
+# file: SCRATCH_MNT/reg
+trusted.name=0xbabe
+trusted.name3=0xdeface
+user.name=0xbabe
+user.name3=0xdeface
+
+
+*** directory descent without following symlinks
# file: SCRATCH_MNT/descend
user.1=0x3233
user.x=0x797a
@@ -560,28 +578,6 @@ user.x=0x797a
user.1=0x3233
user.x=0x797a
-# file: SCRATCH_MNT/descend/and/ascend
-trusted.9=0x3837
-trusted.a=0x6263
-
-
-*** directory descent without following symlinks
-# file: SCRATCH_MNT/reg
-trusted.name=0xbabe
-trusted.name3=0xdeface
-user.name=0xbabe
-user.name3=0xdeface
-
-# file: SCRATCH_MNT/dir
-trusted.name=0xbabe
-trusted.name3=0xdeface
-user.name=0xbabe
-user.name3=0xdeface
-
-# file: SCRATCH_MNT/lnk
-trusted.name=0xbabe
-trusted.name3=0xdeface
-
# file: SCRATCH_MNT/dev/b
trusted.name=0xbabe
trusted.name3=0xdeface
@@ -594,6 +590,12 @@ trusted.name3=0xdeface
trusted.name=0xbabe
trusted.name3=0xdeface
+# file: SCRATCH_MNT/dir
+trusted.name=0xbabe
+trusted.name3=0xdeface
+user.name=0xbabe
+user.name3=0xdeface
+
# file: SCRATCH_MNT/here
trusted.9=0x3837
trusted.a=0x6263
@@ -606,17 +608,15 @@ trusted.a=0x6263
trusted.9=0x3837
trusted.a=0x6263
-# file: SCRATCH_MNT/descend
-user.1=0x3233
-user.x=0x797a
-
-# file: SCRATCH_MNT/descend/down
-user.1=0x3233
-user.x=0x797a
+# file: SCRATCH_MNT/lnk
+trusted.name=0xbabe
+trusted.name3=0xdeface
-# file: SCRATCH_MNT/descend/down/here
-user.1=0x3233
-user.x=0x797a
+# file: SCRATCH_MNT/reg
+trusted.name=0xbabe
+trusted.name3=0xdeface
+user.name=0xbabe
+user.name3=0xdeface
--
1.7.7.6
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/5] xfstests 233: fix user fsgqa access to fsstress
2012-04-13 9:49 [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux tmarek
@ 2012-04-13 9:49 ` tmarek
2012-04-13 9:49 ` [PATCH 3/5] xfstests 198, 240: added check for aiodio-sparse2 tmarek
` (3 subsequent siblings)
4 siblings, 0 replies; 15+ messages in thread
From: tmarek @ 2012-04-13 9:49 UTC (permalink / raw)
To: xfs; +Cc: Tom Marek, lczerner, dchinner
From: Tom Marek <tmarek@redhat.com>
User fsgqa may sometimes be unable to run fsstress (when xfstests are owned by
root) because fsgqa doesn't have rights to list directory where the fsstress
utility is located.
This fix changes directory to fsstress location as root before running
fsstress so user fsgqa may run it without any problems.
Signed-off-by: Tom Marek <tmarek@redhat.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
---
233 | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/233 b/233
index 28e6ac7..e9eacae 100755
--- a/233
+++ b/233
@@ -62,14 +62,16 @@ _fsstress()
-f rmdir=20 -f link=10 -f creat=10 -f mkdir=10 -f unlink=20 -f symlink=10 \
-f rename=10 -f fsync=2 -f write=15 -f dwrite=15 \
-n $count -d $out -p 7"
-
echo "fsstress $args" | tee -a $here/$seq.full | sed -e "s#$out#outdir#"
- if ! su $qa_user -c "$FSSTRESS_PROG $args" | tee -a $here/$seq.full | _filter_num
+ fsstressdir=${FSSTRESS_PROG%/*}
+ cd $fsstressdir
+ if ! su $qa_user -c "./`basename $FSSTRESS_PROG` $args" | tee -a $here/$seq.full | _filter_num
then
echo " fsstress $args returned $?"
cat $tmp.out | tee -a $here/$seq.full
status=1
fi
+ cd $here
}
# real QA test starts here
--
1.7.7.6
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/5] xfstests 198, 240: added check for aiodio-sparse2
2012-04-13 9:49 [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux tmarek
2012-04-13 9:49 ` [PATCH 2/5] xfstests 233: fix user fsgqa access to fsstress tmarek
@ 2012-04-13 9:49 ` tmarek
2012-04-13 11:49 ` Dave Chinner
2012-04-13 9:49 ` [PATCH 4/5] xfstests: sync before umount to avoid device busy problems tmarek
` (2 subsequent siblings)
4 siblings, 1 reply; 15+ messages in thread
From: tmarek @ 2012-04-13 9:49 UTC (permalink / raw)
To: xfs; +Cc: Tom Marek, lczerner, dchinner
From: Tom Marek <tmarek@redhat.com>
Tests number 198 and 240 could fail when aiodio-sparse2 was not build.
Check whether aiodio-sparse is built was added to both tests.
Signed-off-by: Tom Marek <tmarek@redhat.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
---
198 | 2 ++
240 | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/198 b/198
index e46ec8d..b9b47b2 100755
--- a/198
+++ b/198
@@ -45,6 +45,8 @@ _cleanup()
_supported_fs generic
_supported_os Linux
+[-x $here/src/aio-dio-regress/aiodio_sparse2] || _notrun "src/aio-dio-regress/aiodio_sparse2 not built"
+
echo "Silence is golden."
# real QA test starts here
diff --git a/240 b/240
index 563449e..5a563ca 100755
--- a/240
+++ b/240
@@ -53,6 +53,8 @@ _supported_os Linux
_require_sparse_files
+[-x $here/src/aio-dio-regress/aiodio_sparse2] || _notrun "src/aio-dio-regress/aiodio_sparse2 not built"
+
echo "Silence is golden."
# real QA test starts here
--
1.7.7.6
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/5] xfstests: sync before umount to avoid device busy problems
2012-04-13 9:49 [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux tmarek
2012-04-13 9:49 ` [PATCH 2/5] xfstests 233: fix user fsgqa access to fsstress tmarek
2012-04-13 9:49 ` [PATCH 3/5] xfstests 198, 240: added check for aiodio-sparse2 tmarek
@ 2012-04-13 9:49 ` tmarek
2012-04-13 10:26 ` Stefan Behrens
2012-04-13 9:49 ` [PATCH 5/5] xfstests 273: fix of reading scratch size and removing lost+found tmarek
2012-04-16 2:46 ` [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux Eric Sandeen
4 siblings, 1 reply; 15+ messages in thread
From: tmarek @ 2012-04-13 9:49 UTC (permalink / raw)
To: xfs; +Cc: Tom Marek, lczerner, dchinner
From: Tom Marek <tmarek@redhat.com>
Some tests might fail because of 'device or resource busy' when unmounting
either the SCRATCH or the TEST device. The reason this happenes is that
some processes might not have time to finish properly, or they are still
waiting for IO. The sync command was added before unmount into
_scratch_unmount() and umount_or_remount_ro which should help processes to
finish before unmounting takes place and thus it solves the problem.
This fixes for example tests 226 and 247.
Test 226 uses plain umount command which suffers from exactly the same problem
as described above. Use fixed _scratch_unmount() instead of plain umount fixes
this problem.
Signed-off-by: Tom Marek <tmarek@redhat.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
---
226 | 4 ++--
common.rc | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/226 b/226
index 6f28ac9..f8847c6 100755
--- a/226
+++ b/226
@@ -61,7 +61,7 @@ for I in `seq 1 $loops`; do
done
echo
-umount $SCRATCH_DEV
+_scratch_unmount
_scratch_mount
echo "--> $loops direct 64m writes in a loop"
@@ -73,7 +73,7 @@ for I in `seq 1 $loops`; do
done
echo
-umount $SCRATCH_DEV
+_scratch_unmount
status=0
exit
diff --git a/common.rc b/common.rc
index cab0b64..e56e5bc 100644
--- a/common.rc
+++ b/common.rc
@@ -255,6 +255,8 @@ _scratch_mount()
_scratch_unmount()
{
+ # Run sync to give processes some time to finish before unmount
+ sync
$UMOUNT_PROG $SCRATCH_DEV
}
@@ -1051,6 +1053,9 @@ _umount_or_remount_ro()
device=$1
mountpoint=`_is_mounted $device`
+ # Run sync to give processes some time to finish before unmount
+ sync
+
if [ $USE_REMOUNT -eq 0 ]; then
$UMOUNT_PROG $device
else
--
1.7.7.6
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 5/5] xfstests 273: fix of reading scratch size and removing lost+found
2012-04-13 9:49 [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux tmarek
` (2 preceding siblings ...)
2012-04-13 9:49 ` [PATCH 4/5] xfstests: sync before umount to avoid device busy problems tmarek
@ 2012-04-13 9:49 ` tmarek
2012-04-16 2:46 ` [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux Eric Sandeen
4 siblings, 0 replies; 15+ messages in thread
From: tmarek @ 2012-04-13 9:49 UTC (permalink / raw)
To: xfs; +Cc: Tom Marek, lczerner, dchinner
From: Tom Marek <tmarek@redhat.com>
There were two reasons why test 273 was failing. Firstrly, it was removing
everything from SCRATCH_MNT directory at the beginning of tests including
the lost+found directory. This cauesd error while checking scratch fs after
finishing test. Secondly, obtaining of the partition size was not counting
with with behaviour of df utility which may split the line containg
informations about one partition when it is too long thus it may have returned
nothing.
First problem was solved with removing all unnecessary rm -rf commands and the
second one was fixed with alternative awk script which is able to deal with
any line splitting possible.
Signed-off-by: Tom Marek <tmarek@redhat.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
---
273 | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/273 b/273
index 2965132..86262d1 100755
--- a/273
+++ b/273
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
cd /
- rm -rf $SCRATCH_MNT/* $tmp.*
+ rm -rf $tmp.*
_scratch_unmount
}
@@ -66,9 +66,9 @@ _file_create()
exit
fi
- cd $SCRATCH_MNT/origin
+ cd $SCRATCH_MNT
- _disksize=`df --block-size=1 | grep $SCRATCH_DEV | awk '{print $2}'`
+ _disksize=`df --block-size=1 $SCRATCH_DEV | awk -v sd=$SCRATCH_DEV 'BEGIN{c=0}{for(i=1;i<=NF;++i){a[c]=$i;++c}}END{for(entry in a){if(a[entry] ~ sd){print a[entry + 3]; break}}}'`
_disksize=$(($_disksize / 3))
_num=$(($_disksize / $count / $threads / 4096))
_count=$count
@@ -105,8 +105,6 @@ _do_workload()
{
_pids=""
_pid=1
-
- rm -rf $SCRATCH_MNT/*
_threads_set
_file_create
@@ -134,7 +132,7 @@ echo "------------------------------"
rm -f $seq.full
-umount $SCRATCH_DEV 2>/dev/null
+_scratch_unmount 2>/dev/null
_scratch_mkfs_sized $((2 * 1024 * 1024 * 1024)) >>$seq.full 2>&1
_scratch_mount
--
1.7.7.6
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 4/5] xfstests: sync before umount to avoid device busy problems
2012-04-13 9:49 ` [PATCH 4/5] xfstests: sync before umount to avoid device busy problems tmarek
@ 2012-04-13 10:26 ` Stefan Behrens
2012-04-13 10:57 ` Lukas Czerner
2012-04-13 11:15 ` Tom Marek
0 siblings, 2 replies; 15+ messages in thread
From: Stefan Behrens @ 2012-04-13 10:26 UTC (permalink / raw)
To: xfs
On 4/13/2012 11:49 AM, tmarek@redhat.com wrote:
> From: Tom Marek <tmarek@redhat.com>
>
> Some tests might fail because of 'device or resource busy' when unmounting
> either the SCRATCH or the TEST device. The reason this happenes is that
> some processes might not have time to finish properly, or they are still
> waiting for IO. The sync command was added before unmount into
> _scratch_unmount() and umount_or_remount_ro which should help processes to
> finish before unmounting takes place and thus it solves the problem.
> This fixes for example tests 226 and 247.
>
> Test 226 uses plain umount command which suffers from exactly the same problem
> as described above. Use fixed _scratch_unmount() instead of plain umount fixes
> this problem.
>
> Signed-off-by: Tom Marek <tmarek@redhat.com>
>
> Reviewed-by: Lukas Czerner <lczerner@redhat.com>
> ---
> 226 | 4 ++--
> common.rc | 5 +++++
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/226 b/226
> index 6f28ac9..f8847c6 100755
> --- a/226
> +++ b/226
> @@ -61,7 +61,7 @@ for I in `seq 1 $loops`; do
> done
>
> echo
> -umount $SCRATCH_DEV
> +_scratch_unmount
> _scratch_mount
>
> echo "--> $loops direct 64m writes in a loop"
> @@ -73,7 +73,7 @@ for I in `seq 1 $loops`; do
> done
>
> echo
> -umount $SCRATCH_DEV
> +_scratch_unmount
>
> status=0
> exit
> diff --git a/common.rc b/common.rc
> index cab0b64..e56e5bc 100644
> --- a/common.rc
> +++ b/common.rc
> @@ -255,6 +255,8 @@ _scratch_mount()
>
> _scratch_unmount()
> {
> + # Run sync to give processes some time to finish before unmount
> + sync
> $UMOUNT_PROG $SCRATCH_DEV
> }
>
> @@ -1051,6 +1053,9 @@ _umount_or_remount_ro()
> device=$1
> mountpoint=`_is_mounted $device`
>
> + # Run sync to give processes some time to finish before unmount
> + sync
> +
> if [ $USE_REMOUNT -eq 0 ]; then
> $UMOUNT_PROG $device
> else
If a xfstest process is still running when _scratch_umount() is called,
that xfstest is wrong and needs to be fixed IMO.
If a system or filesystem thread is still running and umount fails to
handle it, the system or filesystem needs to be fixed IMO.
xfstests shall uncover issues, not hide them.
sync before umount should never be required.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 4/5] xfstests: sync before umount to avoid device busy problems
2012-04-13 10:26 ` Stefan Behrens
@ 2012-04-13 10:57 ` Lukas Czerner
2012-04-13 11:58 ` Dave Chinner
2012-04-13 11:15 ` Tom Marek
1 sibling, 1 reply; 15+ messages in thread
From: Lukas Czerner @ 2012-04-13 10:57 UTC (permalink / raw)
To: Stefan Behrens; +Cc: xfs
On Fri, 13 Apr 2012, Stefan Behrens wrote:
> On 4/13/2012 11:49 AM, tmarek@redhat.com wrote:
> > From: Tom Marek <tmarek@redhat.com>
> >
> > Some tests might fail because of 'device or resource busy' when unmounting
> > either the SCRATCH or the TEST device. The reason this happenes is that
> > some processes might not have time to finish properly, or they are still
> > waiting for IO. The sync command was added before unmount into
> > _scratch_unmount() and umount_or_remount_ro which should help processes to
> > finish before unmounting takes place and thus it solves the problem.
> > This fixes for example tests 226 and 247.
> >
> > Test 226 uses plain umount command which suffers from exactly the same problem
> > as described above. Use fixed _scratch_unmount() instead of plain umount fixes
> > this problem.
> >
> > Signed-off-by: Tom Marek <tmarek@redhat.com>
> >
> > Reviewed-by: Lukas Czerner <lczerner@redhat.com>
> > ---
> > 226 | 4 ++--
> > common.rc | 5 +++++
> > 2 files changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/226 b/226
> > index 6f28ac9..f8847c6 100755
> > --- a/226
> > +++ b/226
> > @@ -61,7 +61,7 @@ for I in `seq 1 $loops`; do
> > done
> >
> > echo
> > -umount $SCRATCH_DEV
> > +_scratch_unmount
> > _scratch_mount
> >
> > echo "--> $loops direct 64m writes in a loop"
> > @@ -73,7 +73,7 @@ for I in `seq 1 $loops`; do
> > done
> >
> > echo
> > -umount $SCRATCH_DEV
> > +_scratch_unmount
> >
> > status=0
> > exit
> > diff --git a/common.rc b/common.rc
> > index cab0b64..e56e5bc 100644
> > --- a/common.rc
> > +++ b/common.rc
> > @@ -255,6 +255,8 @@ _scratch_mount()
> >
> > _scratch_unmount()
> > {
> > + # Run sync to give processes some time to finish before unmount
> > + sync
> > $UMOUNT_PROG $SCRATCH_DEV
> > }
> >
> > @@ -1051,6 +1053,9 @@ _umount_or_remount_ro()
> > device=$1
> > mountpoint=`_is_mounted $device`
> >
> > + # Run sync to give processes some time to finish before unmount
> > + sync
> > +
> > if [ $USE_REMOUNT -eq 0 ]; then
> > $UMOUNT_PROG $device
> > else
>
> If a xfstest process is still running when _scratch_umount() is called,
> that xfstest is wrong and needs to be fixed IMO.
I agree, however some tests does not explicitly wait for all processes
to finish. It is kind of hard to see why 226 has this problem, since
there are no processes running on background, but sync certainly seems
to help. It seems to be just a matter of timing though.
> If a system or filesystem thread is still running and umount fails to
> handle it, the system or filesystem needs to be fixed IMO.
>
> xfstests shall uncover issues, not hide them.
I do not think this is fs issue at all.
Thanks
-Lukas
>
> sync before umount should never be required.
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 4/5] xfstests: sync before umount to avoid device busy problems
2012-04-13 10:26 ` Stefan Behrens
2012-04-13 10:57 ` Lukas Czerner
@ 2012-04-13 11:15 ` Tom Marek
1 sibling, 0 replies; 15+ messages in thread
From: Tom Marek @ 2012-04-13 11:15 UTC (permalink / raw)
To: xfs; +Cc: Lukas Czerner, Stefan Behrens, dchinner
On 04/13/2012 12:26 PM, Stefan Behrens wrote:
> On 4/13/2012 11:49 AM, tmarek@redhat.com wrote:
>> From: Tom Marek<tmarek@redhat.com>
>>
>> Some tests might fail because of 'device or resource busy' when unmounting
>> either the SCRATCH or the TEST device. The reason this happenes is that
>> some processes might not have time to finish properly, or they are still
>> waiting for IO. The sync command was added before unmount into
>> _scratch_unmount() and umount_or_remount_ro which should help processes to
>> finish before unmounting takes place and thus it solves the problem.
>> This fixes for example tests 226 and 247.
>>
>> Test 226 uses plain umount command which suffers from exactly the same problem
>> as described above. Use fixed _scratch_unmount() instead of plain umount fixes
>> this problem.
>>
>> Signed-off-by: Tom Marek<tmarek@redhat.com>
>>
>> Reviewed-by: Lukas Czerner<lczerner@redhat.com>
>> ---
>> 226 | 4 ++--
>> common.rc | 5 +++++
>> 2 files changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/226 b/226
>> index 6f28ac9..f8847c6 100755
>> --- a/226
>> +++ b/226
>> @@ -61,7 +61,7 @@ for I in `seq 1 $loops`; do
>> done
>>
>> echo
>> -umount $SCRATCH_DEV
>> +_scratch_unmount
>> _scratch_mount
>>
>> echo "--> $loops direct 64m writes in a loop"
>> @@ -73,7 +73,7 @@ for I in `seq 1 $loops`; do
>> done
>>
>> echo
>> -umount $SCRATCH_DEV
>> +_scratch_unmount
>>
>> status=0
>> exit
>> diff --git a/common.rc b/common.rc
>> index cab0b64..e56e5bc 100644
>> --- a/common.rc
>> +++ b/common.rc
>> @@ -255,6 +255,8 @@ _scratch_mount()
>>
>> _scratch_unmount()
>> {
>> + # Run sync to give processes some time to finish before unmount
>> + sync
>> $UMOUNT_PROG $SCRATCH_DEV
>> }
>>
>> @@ -1051,6 +1053,9 @@ _umount_or_remount_ro()
>> device=$1
>> mountpoint=`_is_mounted $device`
>>
>> + # Run sync to give processes some time to finish before unmount
>> + sync
>> +
>> if [ $USE_REMOUNT -eq 0 ]; then
>> $UMOUNT_PROG $device
>> else
> If a xfstest process is still running when _scratch_umount() is called,
> that xfstest is wrong and needs to be fixed IMO.
> If a system or filesystem thread is still running and umount fails to
> handle it, the system or filesystem needs to be fixed IMO.
>
> xfstests shall uncover issues, not hide them.
>
> sync before umount should never be required.
The reason i added sync before umount is that at the end of a lot of
tests the function
_umount_scratch is called. And sometimes there may be some delayed
operations when the umount is called and it fails -> test fails which is
not the problem of fs but only a matter of finishing everything.
Tom
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/5] xfstests 198, 240: added check for aiodio-sparse2
2012-04-13 9:49 ` [PATCH 3/5] xfstests 198, 240: added check for aiodio-sparse2 tmarek
@ 2012-04-13 11:49 ` Dave Chinner
0 siblings, 0 replies; 15+ messages in thread
From: Dave Chinner @ 2012-04-13 11:49 UTC (permalink / raw)
To: tmarek; +Cc: lczerner, dchinner, xfs
On Fri, Apr 13, 2012 at 11:49:44AM +0200, tmarek@redhat.com wrote:
> From: Tom Marek <tmarek@redhat.com>
>
> Tests number 198 and 240 could fail when aiodio-sparse2 was not build.
> Check whether aiodio-sparse is built was added to both tests.
>
> Signed-off-by: Tom Marek <tmarek@redhat.com>
>
> Reviewed-by: Lukas Czerner <lczerner@redhat.com>
> ---
> 198 | 2 ++
> 240 | 2 ++
> 2 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/198 b/198
> index e46ec8d..b9b47b2 100755
> --- a/198
> +++ b/198
> @@ -45,6 +45,8 @@ _cleanup()
> _supported_fs generic
> _supported_os Linux
>
> +[-x $here/src/aio-dio-regress/aiodio_sparse2] || _notrun "src/aio-dio-regress/aiodio_sparse2 not built"
> +
_require_aiodio
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 4/5] xfstests: sync before umount to avoid device busy problems
2012-04-13 10:57 ` Lukas Czerner
@ 2012-04-13 11:58 ` Dave Chinner
2012-04-16 6:57 ` Lukas Czerner
0 siblings, 1 reply; 15+ messages in thread
From: Dave Chinner @ 2012-04-13 11:58 UTC (permalink / raw)
To: Lukas Czerner; +Cc: Stefan Behrens, xfs
On Fri, Apr 13, 2012 at 12:57:20PM +0200, Lukas Czerner wrote:
> On Fri, 13 Apr 2012, Stefan Behrens wrote:
> > On 4/13/2012 11:49 AM, tmarek@redhat.com wrote:
> > > From: Tom Marek <tmarek@redhat.com>
> > >
> > > Some tests might fail because of 'device or resource busy' when unmounting
> > > either the SCRATCH or the TEST device. The reason this happenes is that
> > > some processes might not have time to finish properly, or they are still
> > > waiting for IO. The sync command was added before unmount into
> > > _scratch_unmount() and umount_or_remount_ro which should help processes to
> > > finish before unmounting takes place and thus it solves the problem.
> > > This fixes for example tests 226 and 247.
> > >
> > > Test 226 uses plain umount command which suffers from exactly the same problem
> > > as described above. Use fixed _scratch_unmount() instead of plain umount fixes
> > > this problem.
....
> >
> > If a xfstest process is still running when _scratch_umount() is called,
> > that xfstest is wrong and needs to be fixed IMO.
>
> I agree, however some tests does not explicitly wait for all processes
> to finish. It is kind of hard to see why 226 has this problem, since
> there are no processes running on background, but sync certainly seems
> to help. It seems to be just a matter of timing though.
Which indicates a problem that needs to be understood, not hidden.
> > If a system or filesystem thread is still running and umount fails to
> > handle it, the system or filesystem needs to be fixed IMO.
> >
> > xfstests shall uncover issues, not hide them.
>
> I do not think this is fs issue at all.
There are no background threads in 226, so if the unmount is failing
then there is something wrong with the unmount process. Indeed, 226
is doing direct Io writes prior to unmount, so the only dirty
objects should be the inode and free space indexing metadata. If
unmount is failing to handle this, we need to know why....
So I definitely agree with Stefan on this one - adding a sync before
unmount looks like hiding a problem rather than solving it...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux
2012-04-13 9:49 [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux tmarek
` (3 preceding siblings ...)
2012-04-13 9:49 ` [PATCH 5/5] xfstests 273: fix of reading scratch size and removing lost+found tmarek
@ 2012-04-16 2:46 ` Eric Sandeen
2012-04-16 2:56 ` Eric Sandeen
2012-04-16 7:03 ` Lukas Czerner
4 siblings, 2 replies; 15+ messages in thread
From: Eric Sandeen @ 2012-04-16 2:46 UTC (permalink / raw)
To: tmarek; +Cc: lczerner, dchinner, xfs
On 4/13/12 4:49 AM, tmarek@redhat.com wrote:
> From: Tom Marek <tmarek@redhat.com>
>
> Tests number 062 was supposed to work with ext4 fs but there were some
> problems in it - Tests haven't considered existence of lost+found directory in
> ext4. Also when scratch was mounted with SELinux context test failed because
> fgetattr returns SELinux extended attributes. And when fgetattr is run with
> recursive flag it's output might change between file systems due to different
> file ordering. Fix this by sorting the output manually. Also all lines
> containing SELinux and lost+found were removed from output.
>
> Signed-off-by: Tom Marek <tmarek@redhat.com>
Have you run the latest xfstests? This looks a lot like:
commit 2fb1c931a6090f646afa44e4ce3f1f9815af9067
Author: Eric Sandeen <sandeen@sandeen.net>
Date: Fri Jan 27 12:28:20 2012 -0600
062: Sort recursive getfattr output
Test 062 was made "generic" a while back, but it fails on any filesystem
which returns getfattr -R results (aka readdir results) in something
other than inode-order.
With a little awk-fu we can sort the records from getfattr -R so that
the output is the same for xfs as well as ext4, etc.
Also filter out lost+found which extN creates at mkfs time, but
some other filesystems do not.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
-Eric
> Reviewed-by: Lukas Czerner <lczerner@redhat.com>
> ---
> 062 | 50 ++++++++++++++++++++++++++---------
> 062.out | 90 +++++++++++++++++++++++++++++++-------------------------------
> 2 files changed, 82 insertions(+), 58 deletions(-)
>
> diff --git a/062 b/062
> index f666e1b..116296b 100755
> --- a/062
> +++ b/062
> @@ -46,6 +46,30 @@ _cleanup()
> }
> trap "_cleanup; exit \$status" 0 1 2 3 15
>
> +# remove "security.selinux=..." because it is not installed on all systems
> +# and it not relevant to this test
> +_remove_selinux(){
> + egrep -v '^(selinux|security\.selinux)'
> +}
> +
> +# sort getfattr output and remove entries containing only selinux attributes
> +_sort_getfattr(){
> + awk '
> + BEGIN{
> + RS=""
> + }
> + {
> + a[FNR]=$0
> + }
> + END{
> + n = asort(a);
> + for(i = 1; i <= n; ++i){
> + if (a[i] ~ /# file: SCRATCH_MNT[^\n]*\nsecurity.selinux[^\n]*\n/)
> + print a[i] "\n"
> + }
> + }'
> +}
> +
> getfattr()
> {
> $GETFATTR_PROG --absolute-names -dh $@ 2>&1 | _filter_scratch
> @@ -67,7 +91,7 @@ _create_test_bed()
> mknod $SCRATCH_MNT/dev/c c 0 0
> mknod $SCRATCH_MNT/dev/p p
> # sanity check
> - find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch
> + find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch | grep -v "lost+found"
> }
>
> # real QA test starts here
> @@ -102,7 +126,7 @@ for nsp in $ATTR_MODES; do
> echo "*** set/get one initially empty attribute"
>
> setfattr -h -n $nsp.name $SCRATCH_MNT/$inode
> - getfattr -m $nsp $SCRATCH_MNT/$inode
> + getfattr -m $nsp $SCRATCH_MNT/$inode | _remove_selinux
>
> echo "*** overwrite empty, set several new attributes"
> setfattr -h -n $nsp.name -v 0xbabe $SCRATCH_MNT/$inode
> @@ -110,33 +134,33 @@ for nsp in $ATTR_MODES; do
> setfattr -h -n $nsp.name3 -v 0xdeface $SCRATCH_MNT/$inode
>
> echo "*** fetch several attribute names and values (hex)"
> - getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
> + getfattr -m $nsp -e hex $SCRATCH_MNT/$inode | _remove_selinux
>
> echo "*** fetch several attribute names and values (base64)"
> - getfattr -m $nsp -e base64 $SCRATCH_MNT/$inode
> + getfattr -m $nsp -e base64 $SCRATCH_MNT/$inode | _remove_selinux
>
> echo "*** shrink value of an existing attribute"
> setfattr -h -n $nsp.name2 -v 0xdeaf $SCRATCH_MNT/$inode
> - getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
> + getfattr -m $nsp -e hex $SCRATCH_MNT/$inode | _remove_selinux
>
> echo "*** grow value of existing attribute"
> setfattr -h -n $nsp.name2 -v 0xdecade $SCRATCH_MNT/$inode
> - getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
> + getfattr -m $nsp -e hex $SCRATCH_MNT/$inode | _remove_selinux
>
> echo "*** set an empty value for second attribute"
> setfattr -h -n $nsp.name2 $SCRATCH_MNT/$inode
> - getfattr -m $nsp -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter
> + getfattr -m $nsp -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter | _remove_selinux
>
> echo "*** overwrite empty value"
> setfattr -h -n $nsp.name2 -v 0xcafe $SCRATCH_MNT/$inode
> - getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter
> + getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter | _remove_selinux
>
> echo "*** remove attribute"
> setfattr -h -x $nsp.name2 $SCRATCH_MNT/$inode
> - getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter
> + getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter | _remove_selinux
>
> echo "*** final list (strings, type=$inode, nsp=$nsp)"
> - getfattr -m '.' -e hex $SCRATCH_MNT/$inode
> + getfattr -m '.' -e hex $SCRATCH_MNT/$inode | _sort_getfattr | _remove_selinux
>
> done
> done
> @@ -160,18 +184,18 @@ _extend_test_bed()
> # whack a symlink in the middle, just to be difficult
> ln -s $SCRATCH_MNT/here/up $SCRATCH_MNT/descend/and
> # dump out our new starting point
> - find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch
> + find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch | grep -v "lost+found"
> }
>
> _extend_test_bed
>
> echo
> echo "*** directory descent with us following symlinks"
> -getfattr -h -L -R -m '.' -e hex $SCRATCH_MNT
> +getfattr -h -L -R -m '.' -e hex $SCRATCH_MNT | _sort_getfattr | _remove_selinux
>
> echo
> echo "*** directory descent without following symlinks"
> -getfattr -h -P -R -m '.' -e hex $SCRATCH_MNT
> +getfattr -h -P -R -m '.' -e hex $SCRATCH_MNT | _sort_getfattr | _remove_selinux
>
>
> #
> diff --git a/062.out b/062.out
> index 699254a..8cc3c65 100644
> --- a/062.out
> +++ b/062.out
> @@ -508,21 +508,21 @@ SCRATCH_MNT/lnk
> SCRATCH_MNT/reg
>
> *** directory descent with us following symlinks
> -# file: SCRATCH_MNT/reg
> -trusted.name=0xbabe
> -trusted.name3=0xdeface
> -user.name=0xbabe
> -user.name3=0xdeface
> +# file: SCRATCH_MNT/descend
> +user.1=0x3233
> +user.x=0x797a
>
> -# file: SCRATCH_MNT/dir
> -trusted.name=0xbabe
> -trusted.name3=0xdeface
> -user.name=0xbabe
> -user.name3=0xdeface
> +# file: SCRATCH_MNT/descend/and/ascend
> +trusted.9=0x3837
> +trusted.a=0x6263
>
> -# file: SCRATCH_MNT/lnk
> -trusted.name=0xbabe
> -trusted.name3=0xdeface
> +# file: SCRATCH_MNT/descend/down
> +user.1=0x3233
> +user.x=0x797a
> +
> +# file: SCRATCH_MNT/descend/down/here
> +user.1=0x3233
> +user.x=0x797a
>
> # file: SCRATCH_MNT/dev/b
> trusted.name=0xbabe
> @@ -536,6 +536,12 @@ trusted.name3=0xdeface
> trusted.name=0xbabe
> trusted.name3=0xdeface
>
> +# file: SCRATCH_MNT/dir
> +trusted.name=0xbabe
> +trusted.name3=0xdeface
> +user.name=0xbabe
> +user.name3=0xdeface
> +
> # file: SCRATCH_MNT/here
> trusted.9=0x3837
> trusted.a=0x6263
> @@ -548,6 +554,18 @@ trusted.a=0x6263
> trusted.9=0x3837
> trusted.a=0x6263
>
> +# file: SCRATCH_MNT/lnk
> +trusted.name=0xbabe
> +trusted.name3=0xdeface
> +
> +# file: SCRATCH_MNT/reg
> +trusted.name=0xbabe
> +trusted.name3=0xdeface
> +user.name=0xbabe
> +user.name3=0xdeface
> +
> +
> +*** directory descent without following symlinks
> # file: SCRATCH_MNT/descend
> user.1=0x3233
> user.x=0x797a
> @@ -560,28 +578,6 @@ user.x=0x797a
> user.1=0x3233
> user.x=0x797a
>
> -# file: SCRATCH_MNT/descend/and/ascend
> -trusted.9=0x3837
> -trusted.a=0x6263
> -
> -
> -*** directory descent without following symlinks
> -# file: SCRATCH_MNT/reg
> -trusted.name=0xbabe
> -trusted.name3=0xdeface
> -user.name=0xbabe
> -user.name3=0xdeface
> -
> -# file: SCRATCH_MNT/dir
> -trusted.name=0xbabe
> -trusted.name3=0xdeface
> -user.name=0xbabe
> -user.name3=0xdeface
> -
> -# file: SCRATCH_MNT/lnk
> -trusted.name=0xbabe
> -trusted.name3=0xdeface
> -
> # file: SCRATCH_MNT/dev/b
> trusted.name=0xbabe
> trusted.name3=0xdeface
> @@ -594,6 +590,12 @@ trusted.name3=0xdeface
> trusted.name=0xbabe
> trusted.name3=0xdeface
>
> +# file: SCRATCH_MNT/dir
> +trusted.name=0xbabe
> +trusted.name3=0xdeface
> +user.name=0xbabe
> +user.name3=0xdeface
> +
> # file: SCRATCH_MNT/here
> trusted.9=0x3837
> trusted.a=0x6263
> @@ -606,17 +608,15 @@ trusted.a=0x6263
> trusted.9=0x3837
> trusted.a=0x6263
>
> -# file: SCRATCH_MNT/descend
> -user.1=0x3233
> -user.x=0x797a
> -
> -# file: SCRATCH_MNT/descend/down
> -user.1=0x3233
> -user.x=0x797a
> +# file: SCRATCH_MNT/lnk
> +trusted.name=0xbabe
> +trusted.name3=0xdeface
>
> -# file: SCRATCH_MNT/descend/down/here
> -user.1=0x3233
> -user.x=0x797a
> +# file: SCRATCH_MNT/reg
> +trusted.name=0xbabe
> +trusted.name3=0xdeface
> +user.name=0xbabe
> +user.name3=0xdeface
>
>
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux
2012-04-16 2:46 ` [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux Eric Sandeen
@ 2012-04-16 2:56 ` Eric Sandeen
2012-04-16 7:03 ` Lukas Czerner
1 sibling, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2012-04-16 2:56 UTC (permalink / raw)
To: tmarek; +Cc: lczerner, xfs, dchinner
On 4/15/12 9:46 PM, Eric Sandeen wrote:
> On 4/13/12 4:49 AM, tmarek@redhat.com wrote:
>> From: Tom Marek <tmarek@redhat.com>
>>
>> Tests number 062 was supposed to work with ext4 fs but there were some
>> problems in it - Tests haven't considered existence of lost+found directory in
>> ext4. Also when scratch was mounted with SELinux context test failed because
>> fgetattr returns SELinux extended attributes. And when fgetattr is run with
>> recursive flag it's output might change between file systems due to different
>> file ordering. Fix this by sorting the output manually. Also all lines
>> containing SELinux and lost+found were removed from output.
>>
>> Signed-off-by: Tom Marek <tmarek@redhat.com>
>
> Have you run the latest xfstests? This looks a lot like:
>
> commit 2fb1c931a6090f646afa44e4ce3f1f9815af9067
> Author: Eric Sandeen <sandeen@sandeen.net>
> Date: Fri Jan 27 12:28:20 2012 -0600
>
> 062: Sort recursive getfattr output
>
> Test 062 was made "generic" a while back, but it fails on any filesystem
> which returns getfattr -R results (aka readdir results) in something
> other than inode-order.
>
> With a little awk-fu we can sort the records from getfattr -R so that
> the output is the same for xfs as well as ext4, etc.
>
> Also filter out lost+found which extN creates at mkfs time, but
> some other filesystems do not.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
Oh, and as for selinux, scratch should be getting mounted with an fs-wide selinux context mount option, I think?
-Eric
> -Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 4/5] xfstests: sync before umount to avoid device busy problems
2012-04-13 11:58 ` Dave Chinner
@ 2012-04-16 6:57 ` Lukas Czerner
0 siblings, 0 replies; 15+ messages in thread
From: Lukas Czerner @ 2012-04-16 6:57 UTC (permalink / raw)
To: Dave Chinner; +Cc: Lukas Czerner, Stefan Behrens, xfs
On Fri, 13 Apr 2012, Dave Chinner wrote:
> On Fri, Apr 13, 2012 at 12:57:20PM +0200, Lukas Czerner wrote:
> > On Fri, 13 Apr 2012, Stefan Behrens wrote:
> > > On 4/13/2012 11:49 AM, tmarek@redhat.com wrote:
> > > > From: Tom Marek <tmarek@redhat.com>
> > > >
> > > > Some tests might fail because of 'device or resource busy' when unmounting
> > > > either the SCRATCH or the TEST device. The reason this happenes is that
> > > > some processes might not have time to finish properly, or they are still
> > > > waiting for IO. The sync command was added before unmount into
> > > > _scratch_unmount() and umount_or_remount_ro which should help processes to
> > > > finish before unmounting takes place and thus it solves the problem.
> > > > This fixes for example tests 226 and 247.
> > > >
> > > > Test 226 uses plain umount command which suffers from exactly the same problem
> > > > as described above. Use fixed _scratch_unmount() instead of plain umount fixes
> > > > this problem.
> ....
> > >
> > > If a xfstest process is still running when _scratch_umount() is called,
> > > that xfstest is wrong and needs to be fixed IMO.
> >
> > I agree, however some tests does not explicitly wait for all processes
> > to finish. It is kind of hard to see why 226 has this problem, since
> > there are no processes running on background, but sync certainly seems
> > to help. It seems to be just a matter of timing though.
>
> Which indicates a problem that needs to be understood, not hidden.
>
> > > If a system or filesystem thread is still running and umount fails to
> > > handle it, the system or filesystem needs to be fixed IMO.
> > >
> > > xfstests shall uncover issues, not hide them.
> >
> > I do not think this is fs issue at all.
>
> There are no background threads in 226, so if the unmount is failing
> then there is something wrong with the unmount process. Indeed, 226
> is doing direct Io writes prior to unmount, so the only dirty
> objects should be the inode and free space indexing metadata. If
> unmount is failing to handle this, we need to know why....
>
> So I definitely agree with Stefan on this one - adding a sync before
> unmount looks like hiding a problem rather than solving it...
Hmm ok, you're right. Since there is no background process we have to see
what is actually holding back unmount from proceeding successfully. Tom,
will you look into this please ?
Thanks!
-Lukas
>
> Cheers,
>
> Dave.
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux
2012-04-16 2:46 ` [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux Eric Sandeen
2012-04-16 2:56 ` Eric Sandeen
@ 2012-04-16 7:03 ` Lukas Czerner
2012-04-16 14:06 ` Eric Sandeen
1 sibling, 1 reply; 15+ messages in thread
From: Lukas Czerner @ 2012-04-16 7:03 UTC (permalink / raw)
To: Eric Sandeen; +Cc: tmarek, lczerner, dchinner, xfs
On Sun, 15 Apr 2012, Eric Sandeen wrote:
> On 4/13/12 4:49 AM, tmarek@redhat.com wrote:
> > From: Tom Marek <tmarek@redhat.com>
> >
> > Tests number 062 was supposed to work with ext4 fs but there were some
> > problems in it - Tests haven't considered existence of lost+found directory in
> > ext4. Also when scratch was mounted with SELinux context test failed because
> > fgetattr returns SELinux extended attributes. And when fgetattr is run with
> > recursive flag it's output might change between file systems due to different
> > file ordering. Fix this by sorting the output manually. Also all lines
> > containing SELinux and lost+found were removed from output.
> >
> > Signed-off-by: Tom Marek <tmarek@redhat.com>
>
> Have you run the latest xfstests? This looks a lot like:
>
> commit 2fb1c931a6090f646afa44e4ce3f1f9815af9067
> Author: Eric Sandeen <sandeen@sandeen.net>
> Date: Fri Jan 27 12:28:20 2012 -0600
>
> 062: Sort recursive getfattr output
>
> Test 062 was made "generic" a while back, but it fails on any filesystem
> which returns getfattr -R results (aka readdir results) in something
> other than inode-order.
>
> With a little awk-fu we can sort the records from getfattr -R so that
> the output is the same for xfs as well as ext4, etc.
>
> Also filter out lost+found which extN creates at mkfs time, but
> some other filesystems do not.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> -Eric
Hi Eric,
I have latest xfstests from git://oss.sgi.com/xfs/cmds/xfstests which I
found here http://xfs.org/index.php/Getting_the_latest_source_code but
your commit is not there. I can see it on the list though, so this patch
can be dropped.
Thanks!
-Lukas
>
> > Reviewed-by: Lukas Czerner <lczerner@redhat.com>
> > ---
> > 062 | 50 ++++++++++++++++++++++++++---------
> > 062.out | 90 +++++++++++++++++++++++++++++++-------------------------------
> > 2 files changed, 82 insertions(+), 58 deletions(-)
> >
> > diff --git a/062 b/062
> > index f666e1b..116296b 100755
> > --- a/062
> > +++ b/062
> > @@ -46,6 +46,30 @@ _cleanup()
> > }
> > trap "_cleanup; exit \$status" 0 1 2 3 15
> >
> > +# remove "security.selinux=..." because it is not installed on all systems
> > +# and it not relevant to this test
> > +_remove_selinux(){
> > + egrep -v '^(selinux|security\.selinux)'
> > +}
> > +
> > +# sort getfattr output and remove entries containing only selinux attributes
> > +_sort_getfattr(){
> > + awk '
> > + BEGIN{
> > + RS=""
> > + }
> > + {
> > + a[FNR]=$0
> > + }
> > + END{
> > + n = asort(a);
> > + for(i = 1; i <= n; ++i){
> > + if (a[i] ~ /# file: SCRATCH_MNT[^\n]*\nsecurity.selinux[^\n]*\n/)
> > + print a[i] "\n"
> > + }
> > + }'
> > +}
> > +
> > getfattr()
> > {
> > $GETFATTR_PROG --absolute-names -dh $@ 2>&1 | _filter_scratch
> > @@ -67,7 +91,7 @@ _create_test_bed()
> > mknod $SCRATCH_MNT/dev/c c 0 0
> > mknod $SCRATCH_MNT/dev/p p
> > # sanity check
> > - find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch
> > + find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch | grep -v "lost+found"
> > }
> >
> > # real QA test starts here
> > @@ -102,7 +126,7 @@ for nsp in $ATTR_MODES; do
> > echo "*** set/get one initially empty attribute"
> >
> > setfattr -h -n $nsp.name $SCRATCH_MNT/$inode
> > - getfattr -m $nsp $SCRATCH_MNT/$inode
> > + getfattr -m $nsp $SCRATCH_MNT/$inode | _remove_selinux
> >
> > echo "*** overwrite empty, set several new attributes"
> > setfattr -h -n $nsp.name -v 0xbabe $SCRATCH_MNT/$inode
> > @@ -110,33 +134,33 @@ for nsp in $ATTR_MODES; do
> > setfattr -h -n $nsp.name3 -v 0xdeface $SCRATCH_MNT/$inode
> >
> > echo "*** fetch several attribute names and values (hex)"
> > - getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
> > + getfattr -m $nsp -e hex $SCRATCH_MNT/$inode | _remove_selinux
> >
> > echo "*** fetch several attribute names and values (base64)"
> > - getfattr -m $nsp -e base64 $SCRATCH_MNT/$inode
> > + getfattr -m $nsp -e base64 $SCRATCH_MNT/$inode | _remove_selinux
> >
> > echo "*** shrink value of an existing attribute"
> > setfattr -h -n $nsp.name2 -v 0xdeaf $SCRATCH_MNT/$inode
> > - getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
> > + getfattr -m $nsp -e hex $SCRATCH_MNT/$inode | _remove_selinux
> >
> > echo "*** grow value of existing attribute"
> > setfattr -h -n $nsp.name2 -v 0xdecade $SCRATCH_MNT/$inode
> > - getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
> > + getfattr -m $nsp -e hex $SCRATCH_MNT/$inode | _remove_selinux
> >
> > echo "*** set an empty value for second attribute"
> > setfattr -h -n $nsp.name2 $SCRATCH_MNT/$inode
> > - getfattr -m $nsp -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter
> > + getfattr -m $nsp -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter | _remove_selinux
> >
> > echo "*** overwrite empty value"
> > setfattr -h -n $nsp.name2 -v 0xcafe $SCRATCH_MNT/$inode
> > - getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter
> > + getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter | _remove_selinux
> >
> > echo "*** remove attribute"
> > setfattr -h -x $nsp.name2 $SCRATCH_MNT/$inode
> > - getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter
> > + getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter | _remove_selinux
> >
> > echo "*** final list (strings, type=$inode, nsp=$nsp)"
> > - getfattr -m '.' -e hex $SCRATCH_MNT/$inode
> > + getfattr -m '.' -e hex $SCRATCH_MNT/$inode | _sort_getfattr | _remove_selinux
> >
> > done
> > done
> > @@ -160,18 +184,18 @@ _extend_test_bed()
> > # whack a symlink in the middle, just to be difficult
> > ln -s $SCRATCH_MNT/here/up $SCRATCH_MNT/descend/and
> > # dump out our new starting point
> > - find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch
> > + find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch | grep -v "lost+found"
> > }
> >
> > _extend_test_bed
> >
> > echo
> > echo "*** directory descent with us following symlinks"
> > -getfattr -h -L -R -m '.' -e hex $SCRATCH_MNT
> > +getfattr -h -L -R -m '.' -e hex $SCRATCH_MNT | _sort_getfattr | _remove_selinux
> >
> > echo
> > echo "*** directory descent without following symlinks"
> > -getfattr -h -P -R -m '.' -e hex $SCRATCH_MNT
> > +getfattr -h -P -R -m '.' -e hex $SCRATCH_MNT | _sort_getfattr | _remove_selinux
> >
> >
> > #
> > diff --git a/062.out b/062.out
> > index 699254a..8cc3c65 100644
> > --- a/062.out
> > +++ b/062.out
> > @@ -508,21 +508,21 @@ SCRATCH_MNT/lnk
> > SCRATCH_MNT/reg
> >
> > *** directory descent with us following symlinks
> > -# file: SCRATCH_MNT/reg
> > -trusted.name=0xbabe
> > -trusted.name3=0xdeface
> > -user.name=0xbabe
> > -user.name3=0xdeface
> > +# file: SCRATCH_MNT/descend
> > +user.1=0x3233
> > +user.x=0x797a
> >
> > -# file: SCRATCH_MNT/dir
> > -trusted.name=0xbabe
> > -trusted.name3=0xdeface
> > -user.name=0xbabe
> > -user.name3=0xdeface
> > +# file: SCRATCH_MNT/descend/and/ascend
> > +trusted.9=0x3837
> > +trusted.a=0x6263
> >
> > -# file: SCRATCH_MNT/lnk
> > -trusted.name=0xbabe
> > -trusted.name3=0xdeface
> > +# file: SCRATCH_MNT/descend/down
> > +user.1=0x3233
> > +user.x=0x797a
> > +
> > +# file: SCRATCH_MNT/descend/down/here
> > +user.1=0x3233
> > +user.x=0x797a
> >
> > # file: SCRATCH_MNT/dev/b
> > trusted.name=0xbabe
> > @@ -536,6 +536,12 @@ trusted.name3=0xdeface
> > trusted.name=0xbabe
> > trusted.name3=0xdeface
> >
> > +# file: SCRATCH_MNT/dir
> > +trusted.name=0xbabe
> > +trusted.name3=0xdeface
> > +user.name=0xbabe
> > +user.name3=0xdeface
> > +
> > # file: SCRATCH_MNT/here
> > trusted.9=0x3837
> > trusted.a=0x6263
> > @@ -548,6 +554,18 @@ trusted.a=0x6263
> > trusted.9=0x3837
> > trusted.a=0x6263
> >
> > +# file: SCRATCH_MNT/lnk
> > +trusted.name=0xbabe
> > +trusted.name3=0xdeface
> > +
> > +# file: SCRATCH_MNT/reg
> > +trusted.name=0xbabe
> > +trusted.name3=0xdeface
> > +user.name=0xbabe
> > +user.name3=0xdeface
> > +
> > +
> > +*** directory descent without following symlinks
> > # file: SCRATCH_MNT/descend
> > user.1=0x3233
> > user.x=0x797a
> > @@ -560,28 +578,6 @@ user.x=0x797a
> > user.1=0x3233
> > user.x=0x797a
> >
> > -# file: SCRATCH_MNT/descend/and/ascend
> > -trusted.9=0x3837
> > -trusted.a=0x6263
> > -
> > -
> > -*** directory descent without following symlinks
> > -# file: SCRATCH_MNT/reg
> > -trusted.name=0xbabe
> > -trusted.name3=0xdeface
> > -user.name=0xbabe
> > -user.name3=0xdeface
> > -
> > -# file: SCRATCH_MNT/dir
> > -trusted.name=0xbabe
> > -trusted.name3=0xdeface
> > -user.name=0xbabe
> > -user.name3=0xdeface
> > -
> > -# file: SCRATCH_MNT/lnk
> > -trusted.name=0xbabe
> > -trusted.name3=0xdeface
> > -
> > # file: SCRATCH_MNT/dev/b
> > trusted.name=0xbabe
> > trusted.name3=0xdeface
> > @@ -594,6 +590,12 @@ trusted.name3=0xdeface
> > trusted.name=0xbabe
> > trusted.name3=0xdeface
> >
> > +# file: SCRATCH_MNT/dir
> > +trusted.name=0xbabe
> > +trusted.name3=0xdeface
> > +user.name=0xbabe
> > +user.name3=0xdeface
> > +
> > # file: SCRATCH_MNT/here
> > trusted.9=0x3837
> > trusted.a=0x6263
> > @@ -606,17 +608,15 @@ trusted.a=0x6263
> > trusted.9=0x3837
> > trusted.a=0x6263
> >
> > -# file: SCRATCH_MNT/descend
> > -user.1=0x3233
> > -user.x=0x797a
> > -
> > -# file: SCRATCH_MNT/descend/down
> > -user.1=0x3233
> > -user.x=0x797a
> > +# file: SCRATCH_MNT/lnk
> > +trusted.name=0xbabe
> > +trusted.name3=0xdeface
> >
> > -# file: SCRATCH_MNT/descend/down/here
> > -user.1=0x3233
> > -user.x=0x797a
> > +# file: SCRATCH_MNT/reg
> > +trusted.name=0xbabe
> > +trusted.name3=0xdeface
> > +user.name=0xbabe
> > +user.name3=0xdeface
> >
> >
> >
>
>
--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux
2012-04-16 7:03 ` Lukas Czerner
@ 2012-04-16 14:06 ` Eric Sandeen
0 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2012-04-16 14:06 UTC (permalink / raw)
To: Lukas Czerner; +Cc: tmarek, dchinner, xfs
On 4/16/12 2:03 AM, Lukas Czerner wrote:
> On Sun, 15 Apr 2012, Eric Sandeen wrote:
>
>> On 4/13/12 4:49 AM, tmarek@redhat.com wrote:
>>> From: Tom Marek <tmarek@redhat.com>
>>>
>>> Tests number 062 was supposed to work with ext4 fs but there were some
>>> problems in it - Tests haven't considered existence of lost+found directory in
>>> ext4. Also when scratch was mounted with SELinux context test failed because
>>> fgetattr returns SELinux extended attributes. And when fgetattr is run with
>>> recursive flag it's output might change between file systems due to different
>>> file ordering. Fix this by sorting the output manually. Also all lines
>>> containing SELinux and lost+found were removed from output.
>>>
>>> Signed-off-by: Tom Marek <tmarek@redhat.com>
>>
>> Have you run the latest xfstests? This looks a lot like:
>>
>> commit 2fb1c931a6090f646afa44e4ce3f1f9815af9067
>> Author: Eric Sandeen <sandeen@sandeen.net>
>> Date: Fri Jan 27 12:28:20 2012 -0600
...
> Hi Eric,
>
> I have latest xfstests from git://oss.sgi.com/xfs/cmds/xfstests which I
> found here http://xfs.org/index.php/Getting_the_latest_source_code but
> your commit is not there. I can see it on the list though, so this patch
> can be dropped.
git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git
usually contains the latest. Looks like SGI hasn't pulled from there since Thu, 10 Nov 2011.
Ben, can you get oss up to date?
-Eric
> Thanks!
> -Lukas
>
>>
>>> Reviewed-by: Lukas Czerner <lczerner@redhat.com>
>>> ---
>>> 062 | 50 ++++++++++++++++++++++++++---------
>>> 062.out | 90 +++++++++++++++++++++++++++++++-------------------------------
>>> 2 files changed, 82 insertions(+), 58 deletions(-)
>>>
>>> diff --git a/062 b/062
>>> index f666e1b..116296b 100755
>>> --- a/062
>>> +++ b/062
>>> @@ -46,6 +46,30 @@ _cleanup()
>>> }
>>> trap "_cleanup; exit \$status" 0 1 2 3 15
>>>
>>> +# remove "security.selinux=..." because it is not installed on all systems
>>> +# and it not relevant to this test
>>> +_remove_selinux(){
>>> + egrep -v '^(selinux|security\.selinux)'
>>> +}
>>> +
>>> +# sort getfattr output and remove entries containing only selinux attributes
>>> +_sort_getfattr(){
>>> + awk '
>>> + BEGIN{
>>> + RS=""
>>> + }
>>> + {
>>> + a[FNR]=$0
>>> + }
>>> + END{
>>> + n = asort(a);
>>> + for(i = 1; i <= n; ++i){
>>> + if (a[i] ~ /# file: SCRATCH_MNT[^\n]*\nsecurity.selinux[^\n]*\n/)
>>> + print a[i] "\n"
>>> + }
>>> + }'
>>> +}
>>> +
>>> getfattr()
>>> {
>>> $GETFATTR_PROG --absolute-names -dh $@ 2>&1 | _filter_scratch
>>> @@ -67,7 +91,7 @@ _create_test_bed()
>>> mknod $SCRATCH_MNT/dev/c c 0 0
>>> mknod $SCRATCH_MNT/dev/p p
>>> # sanity check
>>> - find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch
>>> + find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch | grep -v "lost+found"
>>> }
>>>
>>> # real QA test starts here
>>> @@ -102,7 +126,7 @@ for nsp in $ATTR_MODES; do
>>> echo "*** set/get one initially empty attribute"
>>>
>>> setfattr -h -n $nsp.name $SCRATCH_MNT/$inode
>>> - getfattr -m $nsp $SCRATCH_MNT/$inode
>>> + getfattr -m $nsp $SCRATCH_MNT/$inode | _remove_selinux
>>>
>>> echo "*** overwrite empty, set several new attributes"
>>> setfattr -h -n $nsp.name -v 0xbabe $SCRATCH_MNT/$inode
>>> @@ -110,33 +134,33 @@ for nsp in $ATTR_MODES; do
>>> setfattr -h -n $nsp.name3 -v 0xdeface $SCRATCH_MNT/$inode
>>>
>>> echo "*** fetch several attribute names and values (hex)"
>>> - getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
>>> + getfattr -m $nsp -e hex $SCRATCH_MNT/$inode | _remove_selinux
>>>
>>> echo "*** fetch several attribute names and values (base64)"
>>> - getfattr -m $nsp -e base64 $SCRATCH_MNT/$inode
>>> + getfattr -m $nsp -e base64 $SCRATCH_MNT/$inode | _remove_selinux
>>>
>>> echo "*** shrink value of an existing attribute"
>>> setfattr -h -n $nsp.name2 -v 0xdeaf $SCRATCH_MNT/$inode
>>> - getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
>>> + getfattr -m $nsp -e hex $SCRATCH_MNT/$inode | _remove_selinux
>>>
>>> echo "*** grow value of existing attribute"
>>> setfattr -h -n $nsp.name2 -v 0xdecade $SCRATCH_MNT/$inode
>>> - getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
>>> + getfattr -m $nsp -e hex $SCRATCH_MNT/$inode | _remove_selinux
>>>
>>> echo "*** set an empty value for second attribute"
>>> setfattr -h -n $nsp.name2 $SCRATCH_MNT/$inode
>>> - getfattr -m $nsp -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter
>>> + getfattr -m $nsp -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter | _remove_selinux
>>>
>>> echo "*** overwrite empty value"
>>> setfattr -h -n $nsp.name2 -v 0xcafe $SCRATCH_MNT/$inode
>>> - getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter
>>> + getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter | _remove_selinux
>>>
>>> echo "*** remove attribute"
>>> setfattr -h -x $nsp.name2 $SCRATCH_MNT/$inode
>>> - getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter
>>> + getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode 2>&1 | invalid_attribute_filter | _remove_selinux
>>>
>>> echo "*** final list (strings, type=$inode, nsp=$nsp)"
>>> - getfattr -m '.' -e hex $SCRATCH_MNT/$inode
>>> + getfattr -m '.' -e hex $SCRATCH_MNT/$inode | _sort_getfattr | _remove_selinux
>>>
>>> done
>>> done
>>> @@ -160,18 +184,18 @@ _extend_test_bed()
>>> # whack a symlink in the middle, just to be difficult
>>> ln -s $SCRATCH_MNT/here/up $SCRATCH_MNT/descend/and
>>> # dump out our new starting point
>>> - find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch
>>> + find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch | grep -v "lost+found"
>>> }
>>>
>>> _extend_test_bed
>>>
>>> echo
>>> echo "*** directory descent with us following symlinks"
>>> -getfattr -h -L -R -m '.' -e hex $SCRATCH_MNT
>>> +getfattr -h -L -R -m '.' -e hex $SCRATCH_MNT | _sort_getfattr | _remove_selinux
>>>
>>> echo
>>> echo "*** directory descent without following symlinks"
>>> -getfattr -h -P -R -m '.' -e hex $SCRATCH_MNT
>>> +getfattr -h -P -R -m '.' -e hex $SCRATCH_MNT | _sort_getfattr | _remove_selinux
>>>
>>>
>>> #
>>> diff --git a/062.out b/062.out
>>> index 699254a..8cc3c65 100644
>>> --- a/062.out
>>> +++ b/062.out
>>> @@ -508,21 +508,21 @@ SCRATCH_MNT/lnk
>>> SCRATCH_MNT/reg
>>>
>>> *** directory descent with us following symlinks
>>> -# file: SCRATCH_MNT/reg
>>> -trusted.name=0xbabe
>>> -trusted.name3=0xdeface
>>> -user.name=0xbabe
>>> -user.name3=0xdeface
>>> +# file: SCRATCH_MNT/descend
>>> +user.1=0x3233
>>> +user.x=0x797a
>>>
>>> -# file: SCRATCH_MNT/dir
>>> -trusted.name=0xbabe
>>> -trusted.name3=0xdeface
>>> -user.name=0xbabe
>>> -user.name3=0xdeface
>>> +# file: SCRATCH_MNT/descend/and/ascend
>>> +trusted.9=0x3837
>>> +trusted.a=0x6263
>>>
>>> -# file: SCRATCH_MNT/lnk
>>> -trusted.name=0xbabe
>>> -trusted.name3=0xdeface
>>> +# file: SCRATCH_MNT/descend/down
>>> +user.1=0x3233
>>> +user.x=0x797a
>>> +
>>> +# file: SCRATCH_MNT/descend/down/here
>>> +user.1=0x3233
>>> +user.x=0x797a
>>>
>>> # file: SCRATCH_MNT/dev/b
>>> trusted.name=0xbabe
>>> @@ -536,6 +536,12 @@ trusted.name3=0xdeface
>>> trusted.name=0xbabe
>>> trusted.name3=0xdeface
>>>
>>> +# file: SCRATCH_MNT/dir
>>> +trusted.name=0xbabe
>>> +trusted.name3=0xdeface
>>> +user.name=0xbabe
>>> +user.name3=0xdeface
>>> +
>>> # file: SCRATCH_MNT/here
>>> trusted.9=0x3837
>>> trusted.a=0x6263
>>> @@ -548,6 +554,18 @@ trusted.a=0x6263
>>> trusted.9=0x3837
>>> trusted.a=0x6263
>>>
>>> +# file: SCRATCH_MNT/lnk
>>> +trusted.name=0xbabe
>>> +trusted.name3=0xdeface
>>> +
>>> +# file: SCRATCH_MNT/reg
>>> +trusted.name=0xbabe
>>> +trusted.name3=0xdeface
>>> +user.name=0xbabe
>>> +user.name3=0xdeface
>>> +
>>> +
>>> +*** directory descent without following symlinks
>>> # file: SCRATCH_MNT/descend
>>> user.1=0x3233
>>> user.x=0x797a
>>> @@ -560,28 +578,6 @@ user.x=0x797a
>>> user.1=0x3233
>>> user.x=0x797a
>>>
>>> -# file: SCRATCH_MNT/descend/and/ascend
>>> -trusted.9=0x3837
>>> -trusted.a=0x6263
>>> -
>>> -
>>> -*** directory descent without following symlinks
>>> -# file: SCRATCH_MNT/reg
>>> -trusted.name=0xbabe
>>> -trusted.name3=0xdeface
>>> -user.name=0xbabe
>>> -user.name3=0xdeface
>>> -
>>> -# file: SCRATCH_MNT/dir
>>> -trusted.name=0xbabe
>>> -trusted.name3=0xdeface
>>> -user.name=0xbabe
>>> -user.name3=0xdeface
>>> -
>>> -# file: SCRATCH_MNT/lnk
>>> -trusted.name=0xbabe
>>> -trusted.name3=0xdeface
>>> -
>>> # file: SCRATCH_MNT/dev/b
>>> trusted.name=0xbabe
>>> trusted.name3=0xdeface
>>> @@ -594,6 +590,12 @@ trusted.name3=0xdeface
>>> trusted.name=0xbabe
>>> trusted.name3=0xdeface
>>>
>>> +# file: SCRATCH_MNT/dir
>>> +trusted.name=0xbabe
>>> +trusted.name3=0xdeface
>>> +user.name=0xbabe
>>> +user.name3=0xdeface
>>> +
>>> # file: SCRATCH_MNT/here
>>> trusted.9=0x3837
>>> trusted.a=0x6263
>>> @@ -606,17 +608,15 @@ trusted.a=0x6263
>>> trusted.9=0x3837
>>> trusted.a=0x6263
>>>
>>> -# file: SCRATCH_MNT/descend
>>> -user.1=0x3233
>>> -user.x=0x797a
>>> -
>>> -# file: SCRATCH_MNT/descend/down
>>> -user.1=0x3233
>>> -user.x=0x797a
>>> +# file: SCRATCH_MNT/lnk
>>> +trusted.name=0xbabe
>>> +trusted.name3=0xdeface
>>>
>>> -# file: SCRATCH_MNT/descend/down/here
>>> -user.1=0x3233
>>> -user.x=0x797a
>>> +# file: SCRATCH_MNT/reg
>>> +trusted.name=0xbabe
>>> +trusted.name3=0xdeface
>>> +user.name=0xbabe
>>> +user.name3=0xdeface
>>>
>>>
>>>
>>
>>
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2012-04-16 14:07 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13 9:49 [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux tmarek
2012-04-13 9:49 ` [PATCH 2/5] xfstests 233: fix user fsgqa access to fsstress tmarek
2012-04-13 9:49 ` [PATCH 3/5] xfstests 198, 240: added check for aiodio-sparse2 tmarek
2012-04-13 11:49 ` Dave Chinner
2012-04-13 9:49 ` [PATCH 4/5] xfstests: sync before umount to avoid device busy problems tmarek
2012-04-13 10:26 ` Stefan Behrens
2012-04-13 10:57 ` Lukas Czerner
2012-04-13 11:58 ` Dave Chinner
2012-04-16 6:57 ` Lukas Czerner
2012-04-13 11:15 ` Tom Marek
2012-04-13 9:49 ` [PATCH 5/5] xfstests 273: fix of reading scratch size and removing lost+found tmarek
2012-04-16 2:46 ` [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux Eric Sandeen
2012-04-16 2:56 ` Eric Sandeen
2012-04-16 7:03 ` Lukas Czerner
2012-04-16 14:06 ` Eric Sandeen
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.