* [PATCH 1/3 V2] xfstests 233: fix user fsgqa access to fsstress
@ 2012-04-17 9:24 Tom Marek
2012-04-17 9:24 ` [PATCH 2/3 V2] xfstests 198, 240, common.rc: added check for aiodio-sparse2 Tom Marek
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Tom Marek @ 2012-04-17 9:24 UTC (permalink / raw)
To: xfs; +Cc: Tom Marek, lczerner, dchinner
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] 8+ messages in thread
* [PATCH 2/3 V2] xfstests 198, 240, common.rc: added check for aiodio-sparse2
2012-04-17 9:24 [PATCH 1/3 V2] xfstests 233: fix user fsgqa access to fsstress Tom Marek
@ 2012-04-17 9:24 ` Tom Marek
2012-04-18 23:51 ` Dave Chinner
2012-04-17 9:24 ` [PATCH 3/3 V2] xfstests 273: fix of reading scratch size and removing lost+found Tom Marek
2012-04-19 0:01 ` [PATCH 1/3 V2] xfstests 233: fix user fsgqa access to fsstress Dave Chinner
2 siblings, 1 reply; 8+ messages in thread
From: Tom Marek @ 2012-04-17 9:24 UTC (permalink / raw)
To: xfs; +Cc: Tom Marek, lczerner, dchinner
Tests number 198 and 240 could fail when aiodio-sparse2 was not build.
_require_aiodio helper was added to common.rc file to fix this.
Cc: david@fromorbit.com
Signed-off-by: Tom Marek <tmarek@redhat.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
---
V2: check for aiodio-sparse2 was moved to helper function located in
common.rc file. _require_aiodio was added to tests 198 and 240.
198 | 2 ++
240 | 1 +
common.rc | 8 ++++++++
3 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/198 b/198
index e46ec8d..210b7bb 100755
--- a/198
+++ b/198
@@ -45,6 +45,8 @@ _cleanup()
_supported_fs generic
_supported_os Linux
+_require_aiodio
+
echo "Silence is golden."
# real QA test starts here
diff --git a/240 b/240
index 563449e..5b37bdc 100755
--- a/240
+++ b/240
@@ -52,6 +52,7 @@ _supported_fs generic
_supported_os Linux
_require_sparse_files
+_require_aiodio
echo "Silence is golden."
diff --git a/common.rc b/common.rc
index cab0b64..7745df1 100644
--- a/common.rc
+++ b/common.rc
@@ -770,6 +770,14 @@ _require_scratch()
fi
}
+# this test needs aio-dio-regress to be built
+#
+_require_aiodio()
+{
+ [ -x $here/src/aio-dio-regress/aiodio_sparse2 ] || \
+ _notrun "This tests requires src/aio-dio-regress/ to be built"
+}
+
# this test needs a logdev
#
_require_logdev()
--
1.7.7.6
_______________________________________________
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/3 V2] xfstests 273: fix of reading scratch size and removing lost+found
2012-04-17 9:24 [PATCH 1/3 V2] xfstests 233: fix user fsgqa access to fsstress Tom Marek
2012-04-17 9:24 ` [PATCH 2/3 V2] xfstests 198, 240, common.rc: added check for aiodio-sparse2 Tom Marek
@ 2012-04-17 9:24 ` Tom Marek
2012-04-19 0:01 ` [PATCH 1/3 V2] xfstests 233: fix user fsgqa access to fsstress Dave Chinner
2 siblings, 0 replies; 8+ messages in thread
From: Tom Marek @ 2012-04-17 9:24 UTC (permalink / raw)
To: xfs; +Cc: Tom Marek, lczerner, dchinner
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] 8+ messages in thread
* Re: [PATCH 2/3 V2] xfstests 198, 240, common.rc: added check for aiodio-sparse2
2012-04-17 9:24 ` [PATCH 2/3 V2] xfstests 198, 240, common.rc: added check for aiodio-sparse2 Tom Marek
@ 2012-04-18 23:51 ` Dave Chinner
2012-04-19 8:32 ` Lukas Czerner
0 siblings, 1 reply; 8+ messages in thread
From: Dave Chinner @ 2012-04-18 23:51 UTC (permalink / raw)
To: Tom Marek; +Cc: lczerner, dchinner, xfs
On Tue, Apr 17, 2012 at 11:24:46AM +0200, Tom Marek wrote:
> Tests number 198 and 240 could fail when aiodio-sparse2 was not build.
> _require_aiodio helper was added to common.rc file to fix this.
>
> Cc: david@fromorbit.com
> Signed-off-by: Tom Marek <tmarek@redhat.com>
> Reviewed-by: Lukas Czerner <lczerner@redhat.com>
.....
> @@ -770,6 +770,14 @@ _require_scratch()
> fi
> }
>
> +# this test needs aio-dio-regress to be built
> +#
> +_require_aiodio()
> +{
> + [ -x $here/src/aio-dio-regress/aiodio_sparse2 ] || \
> + _notrun "This tests requires src/aio-dio-regress/ to be built"
> +}
This function already exists in common.rc, which is why I pointed it
out for use.
# this test requires that a (specified) aio-dio executable exists
# $1 - command (optional)
#
_require_aiodio()
{
if [ -z "$1" ]
then
AIO_TEST=src/aio-dio-regress/aiodio_sparse2
[ -x $AIO_TEST ] || _notrun "aio-dio utilities required"
else
AIO_TEST=src/aio-dio-regress/$1
[ -x $AIO_TEST ] || _notrun "$AIO_TEST not built"
fi
}
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] 8+ messages in thread
* Re: [PATCH 1/3 V2] xfstests 233: fix user fsgqa access to fsstress
2012-04-17 9:24 [PATCH 1/3 V2] xfstests 233: fix user fsgqa access to fsstress Tom Marek
2012-04-17 9:24 ` [PATCH 2/3 V2] xfstests 198, 240, common.rc: added check for aiodio-sparse2 Tom Marek
2012-04-17 9:24 ` [PATCH 3/3 V2] xfstests 273: fix of reading scratch size and removing lost+found Tom Marek
@ 2012-04-19 0:01 ` Dave Chinner
2012-04-19 8:37 ` Lukas Czerner
2 siblings, 1 reply; 8+ messages in thread
From: Dave Chinner @ 2012-04-19 0:01 UTC (permalink / raw)
To: Tom Marek; +Cc: lczerner, dchinner, xfs
On Tue, Apr 17, 2012 at 11:24:45AM +0200, Tom Marek wrote:
> 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.
That sounds like an installation problem, not something that needs
to be worked around in the tests. Indeed, this problem woul dmean
that the fsgqa user woul dnot be able to execute anything in the
src/, ltp/ or tools/ subdirectories, and I don't think we want to
work around all those sorts of problems in tests like this.
Indeed, if you look at the make install rules, the install rule for
the ltp/ subdir does:
....
TARGETS = doio fsstress fsx growfiles iogen
SCRIPTS = rwtest.sh
.....
install: default
$(INSTALL) -m 755 -d $(PKG_LIB_DIR)/ltp
$(INSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/ltp
$(INSTALL) -m 755 $(SCRIPTS) $(PKG_LIB_DIR)/ltp
It changes the permissions on the ltp/ directory to rwxr-xr-x, as
well as for the binaries in the ltp/ subdir. This means the fsgqa
user should be able to run the ltp/fsstress binary without any
changes to the test scripts.
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] 8+ messages in thread
* Re: [PATCH 2/3 V2] xfstests 198, 240, common.rc: added check for aiodio-sparse2
2012-04-18 23:51 ` Dave Chinner
@ 2012-04-19 8:32 ` Lukas Czerner
2012-04-19 13:53 ` Tom Marek
0 siblings, 1 reply; 8+ messages in thread
From: Lukas Czerner @ 2012-04-19 8:32 UTC (permalink / raw)
To: Dave Chinner; +Cc: Tom Marek, lczerner, dchinner, xfs
On Thu, 19 Apr 2012, Dave Chinner wrote:
> On Tue, Apr 17, 2012 at 11:24:46AM +0200, Tom Marek wrote:
> > Tests number 198 and 240 could fail when aiodio-sparse2 was not build.
> > _require_aiodio helper was added to common.rc file to fix this.
> >
> > Cc: david@fromorbit.com
> > Signed-off-by: Tom Marek <tmarek@redhat.com>
> > Reviewed-by: Lukas Czerner <lczerner@redhat.com>
> .....
> > @@ -770,6 +770,14 @@ _require_scratch()
> > fi
> > }
> >
> > +# this test needs aio-dio-regress to be built
> > +#
> > +_require_aiodio()
> > +{
> > + [ -x $here/src/aio-dio-regress/aiodio_sparse2 ] || \
> > + _notrun "This tests requires src/aio-dio-regress/ to be built"
> > +}
>
> This function already exists in common.rc, which is why I pointed it
> out for use.
>
> # this test requires that a (specified) aio-dio executable exists
> # $1 - command (optional)
> #
> _require_aiodio()
> {
> if [ -z "$1" ]
> then
> AIO_TEST=src/aio-dio-regress/aiodio_sparse2
> [ -x $AIO_TEST ] || _notrun "aio-dio utilities required"
> else
> AIO_TEST=src/aio-dio-regress/$1
> [ -x $AIO_TEST ] || _notrun "$AIO_TEST not built"
> fi
> }
>
> Cheers,
>
> Dave.
Hi Tom,
did you use the git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git
repository for the xfstests ? The one I've been using (from
oss.sgi.com) is terribly out of date so it does not have
_require_aiodio() yet.
Thanks!
-Lukas
_______________________________________________
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 1/3 V2] xfstests 233: fix user fsgqa access to fsstress
2012-04-19 0:01 ` [PATCH 1/3 V2] xfstests 233: fix user fsgqa access to fsstress Dave Chinner
@ 2012-04-19 8:37 ` Lukas Czerner
0 siblings, 0 replies; 8+ messages in thread
From: Lukas Czerner @ 2012-04-19 8:37 UTC (permalink / raw)
To: Dave Chinner; +Cc: Tom Marek, lczerner, dchinner, xfs
On Thu, 19 Apr 2012, Dave Chinner wrote:
> On Tue, Apr 17, 2012 at 11:24:45AM +0200, Tom Marek wrote:
> > 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.
>
> That sounds like an installation problem, not something that needs
> to be worked around in the tests. Indeed, this problem woul dmean
> that the fsgqa user woul dnot be able to execute anything in the
> src/, ltp/ or tools/ subdirectories, and I don't think we want to
> work around all those sorts of problems in tests like this.
>
> Indeed, if you look at the make install rules, the install rule for
> the ltp/ subdir does:
>
> ....
> TARGETS = doio fsstress fsx growfiles iogen
> SCRIPTS = rwtest.sh
> .....
> install: default
> $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/ltp
> $(INSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/ltp
> $(INSTALL) -m 755 $(SCRIPTS) $(PKG_LIB_DIR)/ltp
>
> It changes the permissions on the ltp/ directory to rwxr-xr-x, as
> well as for the binaries in the ltp/ subdir. This means the fsgqa
> user should be able to run the ltp/fsstress binary without any
> changes to the test scripts.
>
> Cheers,
>
> Dave.
>
Hm, good to know. I did not knew that, there is not a word about this in
README, but I could have just read the Makefile I guess. Tom could you
rather fix the README ?
Thanks!
-Lukas
_______________________________________________
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 2/3 V2] xfstests 198, 240, common.rc: added check for aiodio-sparse2
2012-04-19 8:32 ` Lukas Czerner
@ 2012-04-19 13:53 ` Tom Marek
0 siblings, 0 replies; 8+ messages in thread
From: Tom Marek @ 2012-04-19 13:53 UTC (permalink / raw)
To: Lukas Czerner; +Cc: dchinner, xfs
On 04/19/2012 10:32 AM, Lukas Czerner wrote:
> On Thu, 19 Apr 2012, Dave Chinner wrote:
>
>> On Tue, Apr 17, 2012 at 11:24:46AM +0200, Tom Marek wrote:
>>> Tests number 198 and 240 could fail when aiodio-sparse2 was not build.
>>> _require_aiodio helper was added to common.rc file to fix this.
>>>
>>> Cc: david@fromorbit.com
>>> Signed-off-by: Tom Marek<tmarek@redhat.com>
>>> Reviewed-by: Lukas Czerner<lczerner@redhat.com>
>> .....
>>> @@ -770,6 +770,14 @@ _require_scratch()
>>> fi
>>> }
>>>
>>> +# this test needs aio-dio-regress to be built
>>> +#
>>> +_require_aiodio()
>>> +{
>>> + [ -x $here/src/aio-dio-regress/aiodio_sparse2 ] || \
>>> + _notrun "This tests requires src/aio-dio-regress/ to be built"
>>> +}
>> This function already exists in common.rc, which is why I pointed it
>> out for use.
>>
>> # this test requires that a (specified) aio-dio executable exists
>> # $1 - command (optional)
>> #
>> _require_aiodio()
>> {
>> if [ -z "$1" ]
>> then
>> AIO_TEST=src/aio-dio-regress/aiodio_sparse2
>> [ -x $AIO_TEST ] || _notrun "aio-dio utilities required"
>> else
>> AIO_TEST=src/aio-dio-regress/$1
>> [ -x $AIO_TEST ] || _notrun "$AIO_TEST not built"
>> fi
>> }
>>
>> Cheers,
>>
>> Dave.
> Hi Tom,
>
> did you use the git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git
> repository for the xfstests ? The one I've been using (from
> oss.sgi.com) is terribly out of date so it does not have
> _require_aiodio() yet.
>
> Thanks!
> -Lukas
Hi Lukas,
unfortunately I was using that old repository on oos.sgi.com.
Thanks!
T.
_______________________________________________
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:[~2012-04-19 13:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-17 9:24 [PATCH 1/3 V2] xfstests 233: fix user fsgqa access to fsstress Tom Marek
2012-04-17 9:24 ` [PATCH 2/3 V2] xfstests 198, 240, common.rc: added check for aiodio-sparse2 Tom Marek
2012-04-18 23:51 ` Dave Chinner
2012-04-19 8:32 ` Lukas Czerner
2012-04-19 13:53 ` Tom Marek
2012-04-17 9:24 ` [PATCH 3/3 V2] xfstests 273: fix of reading scratch size and removing lost+found Tom Marek
2012-04-19 0:01 ` [PATCH 1/3 V2] xfstests 233: fix user fsgqa access to fsstress Dave Chinner
2012-04-19 8:37 ` Lukas Czerner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox