fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Catherine Hoang <catherine.hoang@oracle.com>
To: Eryu Guan <guan@eryu.me>
Cc: "linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>,
	"fstests@vger.kernel.org" <fstests@vger.kernel.org>
Subject: Re: [External] : Re: [PATCH 3/3] xfstests: Move *_dump_log routines to common/xfs
Date: Mon, 13 Sep 2021 17:41:49 +0000	[thread overview]
Message-ID: <5C50E492-45A5-40D2-B315-EC1AA5136B2B@oracle.com> (raw)
In-Reply-To: <YT22rajMLkNyhKyr@desktop>


> On Sep 12, 2021, at 1:13 AM, Eryu Guan <guan@eryu.me> wrote:
> 
> On Thu, Sep 09, 2021 at 05:41:42PM +0000, Catherine Hoang wrote:
>> Move _scratch_remount_dump_log and _test_remount_dump_log from
>> common/inject to common/xfs. These routines do not inject errors and
>> should be placed with other xfs common functions.
>> 
>> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
>> ---
>> common/inject | 26 --------------------------
>> common/xfs    | 26 ++++++++++++++++++++++++++
>> 2 files changed, 26 insertions(+), 26 deletions(-)
>> 
>> diff --git a/common/inject b/common/inject
>> index b5334d4a..6b590804 100644
>> --- a/common/inject
>> +++ b/common/inject
>> @@ -111,29 +111,3 @@ _scratch_inject_error()
>> 		_fail "Cannot inject error ${type} value ${value}."
>> 	fi
>> }
>> -
>> -# Unmount and remount the scratch device, dumping the log
>> -_scratch_remount_dump_log()
>> -{
>> -	local opts="$1"
>> -
>> -	if test -n "$opts"; then
>> -		opts="-o $opts"
>> -	fi
>> -	_scratch_unmount
>> -	_scratch_dump_log
> 
> This function is a common function that could handle multiple
> filesystems, currently it supports xfs, ext4 and f2fs. So it's not a
> xfs-specific function, and moving it to common/xfs doesn't seem correct.
> Perhaps we should move it to common/log.
I see, I will move this to common/log on the next revision.
> 
>> -	_scratch_mount "$opts"
>> -}
>> -
>> -# Unmount and remount the test device, dumping the log
>> -_test_remount_dump_log()
>> -{
>> -	local opts="$1"
>> -
>> -	if test -n "$opts"; then
>> -		opts="-o $opts"
>> -	fi
>> -	_test_unmount
>> -	_test_dump_log
> 
> Same here.
> 
> Thanks,
> Eryu
Sure, will move this too. Thanks for the feedback!
Catherine
> 
>> -	_test_mount "$opts"
>> -}
>> diff --git a/common/xfs b/common/xfs
>> index bfb1bf1e..cda1f768 100644
>> --- a/common/xfs
>> +++ b/common/xfs
>> @@ -1263,3 +1263,29 @@ _require_scratch_xfs_bigtime()
>> 		_notrun "bigtime feature not advertised on mount?"
>> 	_scratch_unmount
>> }
>> +
>> +# Unmount and remount the scratch device, dumping the log
>> +_scratch_remount_dump_log()
>> +{
>> +	local opts="$1"
>> +
>> +	if test -n "$opts"; then
>> +		opts="-o $opts"
>> +	fi
>> +	_scratch_unmount
>> +	_scratch_dump_log
>> +	_scratch_mount "$opts"
>> +}
>> +
>> +# Unmount and remount the test device, dumping the log
>> +_test_remount_dump_log()
>> +{
>> +	local opts="$1"
>> +
>> +	if test -n "$opts"; then
>> +		opts="-o $opts"
>> +	fi
>> +	_test_unmount
>> +	_test_dump_log
>> +	_test_mount "$opts"
>> +}
>> -- 
>> 2.25.1


      parent reply	other threads:[~2021-09-13 17:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09 17:41 [PATCH 0/3] Dump log cleanups Catherine Hoang
2021-09-09 17:41 ` [PATCH 1/3] xfstests: Rename _scratch_inject_logprint to _scratch_remount_dump_log Catherine Hoang
2021-09-11 14:11   ` Allison Henderson
2021-09-09 17:41 ` [PATCH 2/3] xfstests: Rename _test_inject_logprint to _test_remount_dump_log Catherine Hoang
2021-09-11 14:11   ` Allison Henderson
2021-09-09 17:41 ` [PATCH 3/3] xfstests: Move *_dump_log routines to common/xfs Catherine Hoang
2021-09-11 14:11   ` Allison Henderson
2021-09-12  8:13   ` Eryu Guan
2021-09-13 17:08     ` Darrick J. Wong
2021-09-13 17:41     ` Catherine Hoang [this message]

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=5C50E492-45A5-40D2-B315-EC1AA5136B2B@oracle.com \
    --to=catherine.hoang@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=guan@eryu.me \
    --cc=linux-xfs@vger.kernel.org \
    --subject='Re: [External] : Re: [PATCH 3/3] xfstests: Move *_dump_log routines to common/xfs' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).