From: Anand Jain <anand.jain@oracle.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org,
david@fromorbit.com
Subject: Re: [PATCH v3 1/5] fstests: common/rc: set_fs_sysfs_attr: redirect errors to stdout
Date: Tue, 25 Feb 2025 08:20:11 +0800 [thread overview]
Message-ID: <b297a34f-4c09-48bb-86a3-fea50c364ba8@oracle.com> (raw)
In-Reply-To: <20250224181854.GB21799@frogsfrogsfrogs>
On 2/25/25 02:18, Darrick J. Wong wrote:
> On Mon, Feb 24, 2025 at 08:15:04PM +0800, Anand Jain wrote:
>> Redirect sysfs write errors to stdout as a preparatory patch to enable
>> testing of expected sysfs write failures. Also, log the executed
>> sysfs write command and its failure if any to seqres.full for better
>> debugging and traceability.
>>
>> Signed-off-by: Anand Jain <anand.jain@oracle.com>
>> ---
>> common/rc | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/common/rc b/common/rc
>> index cf6316a224ff..942e201649dd 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -5081,7 +5081,8 @@ _set_fs_sysfs_attr()
>>
>> local dname=$(_fs_sysfs_dname $dev)
>>
>> - echo "$content" > /sys/fs/${FSTYP}/${dname}/${attr}
>> + echo "echo "$content" 2>&1 > /sys/fs/${FSTYP}/${dname}/${attr}" >> $seqres.full
>
> Did you mean to ^ escape ^ these double-quotes? Without it,
> whitespace in $content might not be logged correctly.
>
Oh no! I remember fixing this. Looks like I messed it up during the rebase.
I’ve fixed it locally and will wait before sending.
Thx.
> --D
>
>> + echo "$content" 2>&1 > /sys/fs/${FSTYP}/${dname}/${attr} | tee -a $seqres.full
>> }
>>
>> # Print the content of /sys/fs/$FSTYP/$DEV/$ATTR
>> --
>> 2.43.5
>>
>>
next prev parent reply other threads:[~2025-02-25 0:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-24 12:15 [PATCH v3 0/5] fstests: btrfs: add test case to validate sysfs input arguments Anand Jain
2025-02-24 12:15 ` [PATCH v3 1/5] fstests: common/rc: set_fs_sysfs_attr: redirect errors to stdout Anand Jain
2025-02-24 18:18 ` Darrick J. Wong
2025-02-25 0:20 ` Anand Jain [this message]
2025-02-24 12:15 ` [PATCH v3 2/5] fstests: filter: helper for sysfs error filtering Anand Jain
2025-02-24 12:15 ` [PATCH v3 3/5] fstests: common/rc: add sysfs argument verification helpers Anand Jain
2025-02-24 12:15 ` [PATCH v3 4/5] fstests: btrfs: testcase for sysfs policy syntax verification Anand Jain
2025-02-24 12:15 ` [PATCH v3 5/5] fstests: btrfs: testcase for sysfs chunk_size attribute validation 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=b297a34f-4c09-48bb-86a3-fea50c364ba8@oracle.com \
--to=anand.jain@oracle.com \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--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