* [PATCH] xfstests: btrfs/276 - stop all fsstress before exiting
@ 2013-04-26 5:29 Eric Sandeen
2013-04-26 8:35 ` Jan Schmidt
2013-05-03 15:03 ` Rich Johnston
0 siblings, 2 replies; 6+ messages in thread
From: Eric Sandeen @ 2013-04-26 5:29 UTC (permalink / raw)
To: xfs-oss, linux-btrfs
Tests after 276 were failing because the background fsstress
hadn't quit prior to exit, devices couldn't be unmounted, etc.
Just use the same trick as generic/068 does, and use
a tmpfile to control whether the background loop keeps
running.
Also, no need to umount scratch at cleanup time, the scripts
do that for us.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
(nobody else ran into this? really?)
diff --git a/tests/btrfs/276 b/tests/btrfs/276
index 0a5ce36..9d68b54 100755
--- a/tests/btrfs/276
+++ b/tests/btrfs/276
@@ -36,14 +36,8 @@ noise_pid=0
_cleanup()
{
- if [ $noise_pid -ne 0 ]; then
- echo "background noise kill $noise_pid" >>$seqres.full
- kill $noise_pid
- noise_pid=0
- wait
- fi
- echo "*** unmount"
- umount $SCRATCH_MNT 2>/dev/null
+ rm $tmp.running
+ wait
rm -f $tmp.*
}
trap "_cleanup; exit \$status" 0 1 2 3 15
@@ -210,7 +204,7 @@ workout()
if [ $do_bg_noise -ne 0 ]; then
# make background noise while backrefs are being walked
- while /bin/true; do
+ while [ -f "$tmp.running" ]; do
echo background fsstress >>$seqres.full
run_check $FSSTRESS_PROG -d $SCRATCH_MNT/bgnoise -n 999
echo background rm >>$seqres.full
@@ -263,6 +257,8 @@ nfiles=4
numprocs=1
do_bg_noise=1
+touch $tmp.running
+
workout $filesize $nfiles $numprocs $snap_name $do_bg_noise
echo "*** done"
diff --git a/tests/btrfs/276.out b/tests/btrfs/276.out
index 2032dea..5113164 100644
--- a/tests/btrfs/276.out
+++ b/tests/btrfs/276.out
@@ -1,4 +1,3 @@
QA output created by 276
*** test backref walking
*** done
-*** unmount
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] xfstests: btrfs/276 - stop all fsstress before exiting
2013-04-26 5:29 [PATCH] xfstests: btrfs/276 - stop all fsstress before exiting Eric Sandeen
@ 2013-04-26 8:35 ` Jan Schmidt
2013-04-26 13:10 ` Eric Sandeen
2013-05-03 15:03 ` Rich Johnston
1 sibling, 1 reply; 6+ messages in thread
From: Jan Schmidt @ 2013-04-26 8:35 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-btrfs, xfs-oss
On Fri, April 26, 2013 at 07:29 (+0200), Eric Sandeen wrote:
> Tests after 276 were failing because the background fsstress
> hadn't quit prior to exit, devices couldn't be unmounted, etc.
I don't see how that would happen. Any further insight?
> Just use the same trick as generic/068 does, and use
> a tmpfile to control whether the background loop keeps
> running.
I like that trick :-)
Thanks,
-Jan
> Also, no need to umount scratch at cleanup time, the scripts
> do that for us.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> (nobody else ran into this? really?)
>
> diff --git a/tests/btrfs/276 b/tests/btrfs/276
> index 0a5ce36..9d68b54 100755
> --- a/tests/btrfs/276
> +++ b/tests/btrfs/276
> @@ -36,14 +36,8 @@ noise_pid=0
>
> _cleanup()
> {
> - if [ $noise_pid -ne 0 ]; then
> - echo "background noise kill $noise_pid" >>$seqres.full
> - kill $noise_pid
> - noise_pid=0
> - wait
> - fi
> - echo "*** unmount"
> - umount $SCRATCH_MNT 2>/dev/null
> + rm $tmp.running
> + wait
> rm -f $tmp.*
> }
> trap "_cleanup; exit \$status" 0 1 2 3 15
> @@ -210,7 +204,7 @@ workout()
>
> if [ $do_bg_noise -ne 0 ]; then
> # make background noise while backrefs are being walked
> - while /bin/true; do
> + while [ -f "$tmp.running" ]; do
> echo background fsstress >>$seqres.full
> run_check $FSSTRESS_PROG -d $SCRATCH_MNT/bgnoise -n 999
> echo background rm >>$seqres.full
> @@ -263,6 +257,8 @@ nfiles=4
> numprocs=1
> do_bg_noise=1
>
> +touch $tmp.running
> +
> workout $filesize $nfiles $numprocs $snap_name $do_bg_noise
>
> echo "*** done"
> diff --git a/tests/btrfs/276.out b/tests/btrfs/276.out
> index 2032dea..5113164 100644
> --- a/tests/btrfs/276.out
> +++ b/tests/btrfs/276.out
> @@ -1,4 +1,3 @@
> QA output created by 276
> *** test backref walking
> *** done
> -*** unmount
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfstests: btrfs/276 - stop all fsstress before exiting
2013-04-26 8:35 ` Jan Schmidt
@ 2013-04-26 13:10 ` Eric Sandeen
2013-05-03 13:06 ` Rich Johnston
0 siblings, 1 reply; 6+ messages in thread
From: Eric Sandeen @ 2013-04-26 13:10 UTC (permalink / raw)
To: Jan Schmidt; +Cc: Eric Sandeen, linux-btrfs, xfs-oss
On Apr 26, 2013, at 3:35 AM, Jan Schmidt <list.btrfs@jan-o-sch.net> wrote:
> On Fri, April 26, 2013 at 07:29 (+0200), Eric Sandeen wrote:
>> Tests after 276 were failing because the background fsstress
>> hadn't quit prior to exit, devices couldn't be unmounted, etc.
>
> I don't see how that would happen. Any further insight?
>
Yes, sorry for not including it. The parent process was killed, but the fsstress processes just got reparented to init.
I tried for a while to use pkill to knock them of first but this seems simpler, actually.
Eric
>> Just use the same trick as generic/068 does, and use
>> a tmpfile to control whether the background loop keeps
>> running.
>
> I like that trick :-)
>
> Thanks,
> -Jan
>
>> Also, no need to umount scratch at cleanup time, the scripts
>> do that for us.
>>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> ---
>>
>> (nobody else ran into this? really?)
>>
>> diff --git a/tests/btrfs/276 b/tests/btrfs/276
>> index 0a5ce36..9d68b54 100755
>> --- a/tests/btrfs/276
>> +++ b/tests/btrfs/276
>> @@ -36,14 +36,8 @@ noise_pid=0
>>
>> _cleanup()
>> {
>> - if [ $noise_pid -ne 0 ]; then
>> - echo "background noise kill $noise_pid" >>$seqres.full
>> - kill $noise_pid
>> - noise_pid=0
>> - wait
>> - fi
>> - echo "*** unmount"
>> - umount $SCRATCH_MNT 2>/dev/null
>> + rm $tmp.running
>> + wait
>> rm -f $tmp.*
>> }
>> trap "_cleanup; exit \$status" 0 1 2 3 15
>> @@ -210,7 +204,7 @@ workout()
>>
>> if [ $do_bg_noise -ne 0 ]; then
>> # make background noise while backrefs are being walked
>> - while /bin/true; do
>> + while [ -f "$tmp.running" ]; do
>> echo background fsstress >>$seqres.full
>> run_check $FSSTRESS_PROG -d $SCRATCH_MNT/bgnoise -n 999
>> echo background rm >>$seqres.full
>> @@ -263,6 +257,8 @@ nfiles=4
>> numprocs=1
>> do_bg_noise=1
>>
>> +touch $tmp.running
>> +
>> workout $filesize $nfiles $numprocs $snap_name $do_bg_noise
>>
>> echo "*** done"
>> diff --git a/tests/btrfs/276.out b/tests/btrfs/276.out
>> index 2032dea..5113164 100644
>> --- a/tests/btrfs/276.out
>> +++ b/tests/btrfs/276.out
>> @@ -1,4 +1,3 @@
>> QA output created by 276
>> *** test backref walking
>> *** done
>> -*** unmount
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfstests: btrfs/276 - stop all fsstress before exiting
2013-04-26 13:10 ` Eric Sandeen
@ 2013-05-03 13:06 ` Rich Johnston
2013-05-03 14:41 ` Jan Schmidt
0 siblings, 1 reply; 6+ messages in thread
From: Rich Johnston @ 2013-05-03 13:06 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-btrfs, Jan Schmidt, xfs-oss
On 04/26/2013 08:10 AM, Eric Sandeen wrote:
> On Apr 26, 2013, at 3:35 AM, Jan Schmidt <list.btrfs@jan-o-sch.net> wrote:
>
>> On Fri, April 26, 2013 at 07:29 (+0200), Eric Sandeen wrote:
>>> Tests after 276 were failing because the background fsstress
>>> hadn't quit prior to exit, devices couldn't be unmounted, etc.
>>
>> I don't see how that would happen. Any further insight?
>>
> Yes, sorry for not including it. The parent process was killed, but the fsstress processes just got reparented to init.
>
> I tried for a while to use pkill to knock them of first but this seems simpler, actually.
>
> Eric
>
Jan, with Eric's explanation, may I put your Reviewed-by: on this patch?
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfstests: btrfs/276 - stop all fsstress before exiting
2013-05-03 13:06 ` Rich Johnston
@ 2013-05-03 14:41 ` Jan Schmidt
0 siblings, 0 replies; 6+ messages in thread
From: Jan Schmidt @ 2013-05-03 14:41 UTC (permalink / raw)
To: xfs
On Fri, May 03, 2013 at 15:06 (+0200), Rich Johnston wrote:
> On 04/26/2013 08:10 AM, Eric Sandeen wrote:
>> On Apr 26, 2013, at 3:35 AM, Jan Schmidt <list.btrfs@jan-o-sch.net> wrote:
>>
>>> On Fri, April 26, 2013 at 07:29 (+0200), Eric Sandeen wrote:
>>>> Tests after 276 were failing because the background fsstress
>>>> hadn't quit prior to exit, devices couldn't be unmounted, etc.
>>>
>>> I don't see how that would happen. Any further insight?
>>>
>> Yes, sorry for not including it. The parent process was killed, but the
>> fsstress processes just got reparented to init.
>>
>> I tried for a while to use pkill to knock them of first but this seems
>> simpler, actually.
>>
>> Eric
>>
>
> Jan, with Eric's explanation, may I put your Reviewed-by: on this patch?
Yes, you may :-)
-Jan
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfstests: btrfs/276 - stop all fsstress before exiting
2013-04-26 5:29 [PATCH] xfstests: btrfs/276 - stop all fsstress before exiting Eric Sandeen
2013-04-26 8:35 ` Jan Schmidt
@ 2013-05-03 15:03 ` Rich Johnston
1 sibling, 0 replies; 6+ messages in thread
From: Rich Johnston @ 2013-05-03 15:03 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-btrfs, xfs-oss
Thanks for the patch Eric and the review Jan, this has been committed.
--Rich
commit 0b5677123b5d8c0a29b45f55c7b981aeeca9b2c8
Author: Eric Sandeen <sandeen@redhat.com>
Date: Fri Apr 26 05:29:21 2013 +0000
xfstests: btrfs/276 - stop all fsstress before exiting
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-05-03 15:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-26 5:29 [PATCH] xfstests: btrfs/276 - stop all fsstress before exiting Eric Sandeen
2013-04-26 8:35 ` Jan Schmidt
2013-04-26 13:10 ` Eric Sandeen
2013-05-03 13:06 ` Rich Johnston
2013-05-03 14:41 ` Jan Schmidt
2013-05-03 15:03 ` Rich Johnston
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox