From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Filipe Manana <fdmanana@kernel.org>, Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH v2] fstests: btrfs: a new test case to verify a use-after-free bug
Date: Tue, 27 Aug 2024 07:45:53 +0930 [thread overview]
Message-ID: <e8a39bc8-7efd-421e-8315-b4a5c977d942@gmx.com> (raw)
In-Reply-To: <CAL3q7H7Hmqr_bn7b7G6aSKK1vWq4EhW=tuWZRPWZGv-MJtbMTQ@mail.gmail.com>
在 2024/8/26 21:44, Filipe Manana 写道:
[...]
>> + # Manually check the dmesg for "BUG", and do not call _check_dmesg()
>> + # as it will clear 'check_dmesg' file and skips the final check after
>> + # the test.
>> + # For now just focus on the "BUG:" line from KASAN.
>> + if _check_dmesg_for "BUG" ; then
>> + _fail "Critical error(s) found in dmesg"
>> + fi
>
> Why do the check manually? The check script calls _check_dmesg when a
> test finishes and if it finds 'BUG:' there, it will make the test
> fail.
> So there's no need to do the unmount and call _check_dmesg_for.
The main reasons are:
1. Fail the test as soon as possible
Mostly to let the dmesg to contain only the failed iteration.
I found it especially useful to stop immediately to inspect the
dmesg, during the verification of my fix.
This doesn't make too much difference for routine QA runs, but in the
future if some regression happened and one (maybe myself) is going to
investigate the failure, this early exit will make life much easier.
2. To avoid too small dmesg buffer
Since each iteration will trigger some error message due to the
corrupted tree blocks, combined with the 32 runs, I'm not that
confident all dmesg buffer size can save all the dmesg.
Hopes this explains the reasons well.
Thanks,
Qu
>
> Thanks.
>
>> +done
>> +
>> +echo "Silence is golden"
>> +
>> +# success, all done
>> +status=0
>> +exit
>> diff --git a/tests/btrfs/319.out b/tests/btrfs/319.out
>> new file mode 100644
>> index 00000000..d40c929a
>> --- /dev/null
>> +++ b/tests/btrfs/319.out
>> @@ -0,0 +1,2 @@
>> +QA output created by 319
>> +Silence is golden
>> --
>> 2.46.0
>>
>>
>
next prev parent reply other threads:[~2024-08-26 22:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-24 10:30 [PATCH v2] fstests: btrfs: a new test case to verify a use-after-free bug Qu Wenruo
2024-08-26 12:14 ` Filipe Manana
2024-08-26 12:45 ` Filipe Manana
2024-08-26 22:15 ` Qu Wenruo [this message]
2024-08-26 13:55 ` 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=e8a39bc8-7efd-421e-8315-b4a5c977d942@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=fdmanana@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.com \
/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