public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Filipe Manana <fdmanana@kernel.org>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org,
	Filipe Manana <fdmanana@suse.com>
Subject: Re: [PATCH 06/10] btrfs: add helper to kill background process running _btrfs_stress_remount_compress
Date: Thu, 28 Mar 2024 20:50:26 +0800	[thread overview]
Message-ID: <947c24f4-5271-414b-ae1c-a359fa7139db@oracle.com> (raw)
In-Reply-To: <CAL3q7H4GjntZwft1tixdOK-0Kj1HyFEmixMHopA+XMP6nS1aWA@mail.gmail.com>



On 3/28/24 20:03, Filipe Manana wrote:
> On Thu, Mar 28, 2024 at 11:46 AM Anand Jain <anand.jain@oracle.com> wrote:
>>
>>
>>>> diff --git a/tests/btrfs/071 b/tests/btrfs/071
>>>> index 6ebbd8cc..7ba15390 100755
>>>> --- a/tests/btrfs/071
>>>> +++ b/tests/btrfs/071
>>>> @@ -58,17 +58,15 @@ run_test()
>>>>        echo "$remount_pid" >>$seqres.full
>>
>>
>>
>>>>        echo "Wait for fsstress to exit and kill all background workers"
>>>>>> $seqres.full
>>>> -    wait $fsstress_pid
>>>> -    kill $replace_pid $remount_pid
>>>> -    wait
>>>> +    kill $replace_pid
>>>> +    wait $fsstress_pid $replace_pid
>>

>> The change first kills the replace and then wait for fsstress. Was this
>> intentional?
> 

> It wasn't.

Ok. Thanks for confirming. I will fix it.

-Anand


> But after all patches applied, everything's correct, we
> wait for fsstress to finish and then kill replace.
> Do you want me to fix that?
> 
> The sequence will have to be:
> 
> wait $fsstress_pid
> kill $replace_pid
> wait $replace_pid
> 
> Thanks.
> 
>>
>> This patch is causing a regression. The replace never gets killed, as
>> the echo-comment specifically states to wait for fsstress and then kill
>> the replace. Following it fixes the issue.
>>
>> Which the patch 7/10 reversed the order to fix. But why?
>>
>> Thanks, Anand
>>
>>
>>>> -    # wait for the remount and replace operations to finish
>>>> +    # wait for the replace operationss to finish
>>
>>
>>
>>
>>>>        while ps aux | grep "replace start" | grep -qv grep; do
>>>>            sleep 1
>>>>        done
>>>> -    while ps aux | grep "mount.*$SCRATCH_MNT" | grep -qv grep; do
>>>> -        sleep 1
>>>> -    done
>>>> +
>>>> +    _btrfs_kill_stress_remount_compress_pid $remount_pid $SCRATCH_MNT
>>>>        echo "Scrub the filesystem" >>$seqres.full
>>>>        $BTRFS_UTIL_PROG scrub start -B $SCRATCH_MNT >>$seqres.full 2>&1

  reply	other threads:[~2024-03-28 12:50 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 17:11 [PATCH 00/10] fstests/btrfs: fixes for tests btrfs/06[0-9] and btrfs/07[0-4] fdmanana
2024-03-27 17:11 ` [PATCH 01/10] btrfs: add helper to kill background process running _btrfs_stress_balance fdmanana
2024-03-28  8:16   ` Anand Jain
2024-03-28  9:21     ` Filipe Manana
2024-03-27 17:11 ` [PATCH 02/10] btrfs/028: use the helper _btrfs_kill_stress_balance_pid fdmanana
2024-03-28  8:41   ` Anand Jain
2024-03-28  9:25     ` Filipe Manana
2024-03-27 17:11 ` [PATCH 03/10] btrfs/028: removed redundant sync and scratch filesystem unmount fdmanana
2024-03-27 17:11 ` [PATCH 04/10] btrfs: add helper to kill background process running _btrfs_stress_scrub fdmanana
2024-03-28  8:41   ` Anand Jain
2024-03-28  9:27     ` Filipe Manana
2024-03-27 17:11 ` [PATCH 05/10] btrfs: add helper to kill background process running _btrfs_stress_defrag fdmanana
2024-03-28  9:18   ` Anand Jain
2024-03-28  9:32     ` Filipe Manana
2024-03-27 17:11 ` [PATCH 06/10] btrfs: add helper to kill background process running _btrfs_stress_remount_compress fdmanana
2024-03-28  9:24   ` Anand Jain
2024-03-28 11:46     ` Anand Jain
2024-03-28 12:03       ` Filipe Manana
2024-03-28 12:50         ` Anand Jain [this message]
2024-03-27 17:11 ` [PATCH 07/10] btrfs: add helper to kill background process running _btrfs_stress_replace fdmanana
2024-03-28  9:35   ` Anand Jain
2024-03-27 17:11 ` [PATCH 08/10] btrfs: add helper to stop background process running _btrfs_stress_subvolume fdmanana
2024-03-28  9:36   ` Anand Jain
2024-03-27 17:11 ` [PATCH 09/10] btrfs: remove stop file early at _btrfs_stress_subvolume fdmanana
2024-03-28  9:38   ` Anand Jain
2024-03-27 17:11 ` [PATCH 10/10] btrfs/06[0-9]..07[0-4]: kill all background tasks when test is killed/interrupted fdmanana
2024-03-28  9:48   ` Anand Jain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=947c24f4-5271-414b-ae1c-a359fa7139db@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=fdmanana@kernel.org \
    --cc=fdmanana@suse.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox