FS/XFS testing framework
 help / color / mirror / Atom feed
From: Shiyang Ruan <ruansy.fnst@fujitsu.com>
To: Zorro Lang <zlang@redhat.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] tools/mvtest: ensure testcase is executable (755)
Date: Fri, 8 Sep 2023 10:13:01 +0800	[thread overview]
Message-ID: <7365bd90-6aaf-46d7-b09e-61ea1ad9ddb5@fujitsu.com> (raw)
In-Reply-To: <20230907135434.kj44w7mg6qvpzs4m@zlang-mailbox>



在 2023/9/7 21:54, Zorro Lang 写道:
> On Wed, Sep 06, 2023 at 03:13:49PM +0800, Shiyang Ruan wrote:
>> Some test cases lack executable permission ('x'). Before running each
>> test case, `./check` checks and grants them 'x' permission. However,
>> this always leads to a dirty git repo. And the absence of 'x' permission
>> in test cases is often overlooked during reviews.
>>
>> Since maintainers use mvtest to assign new case, add this change for
>> convenience of maintainers.
>>
>> Signed-off-by: Shiyang Ruan <ruansy.fnst@fujitsu.com>
>> ---
>>   tools/mvtest | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/tools/mvtest b/tools/mvtest
>> index 99b154142..e839f0256 100755
>> --- a/tools/mvtest
>> +++ b/tools/mvtest
>> @@ -28,6 +28,8 @@ append() {
>>   test "${src}" != "${dest}" || die "Test \"${src}\" is the same as dest."
>>   test -e "tests/${src}" || die "Test \"${src}\" does not exist."
>>   test ! -e "tests/${dest}" || die "Test \"${src}\" already exists."
>> +# make sure testcase is executable
>> +test `stat -c '%a' tests/${src}` == 755 || chmod 755 "tests/${src}"
> 
> (Weird, I thought I've replied this patch, but I can't find my reply anywhere.)
> 
> I said we can check and set the permission on the ${dest} file, after the
> move operation is done. Due to we actually want to get a 755 ${dest} file
> by running the mvtest.

It seems that maillist server was down at that time.  But I received 
your reply:

 > I think we can check and set the file permission on the target file
 > after the move operation done, not the source file.
 >
 > And we recommend using $() to replace ``, if both of them work.

Then I have sent v2[1] which is using $() instead of `` and doing the 
check-then-set tests/${dest} after `git mv`, as you suggested.

[1] 
https://lore.kernel.org/fstests/20230907113501.4119112-1-ruansy.fnst@fujitsu.com/


--
Thanks,
Ruan.

> 
> Thanks,
> Zorro
> 
>>   
>>   sid="$(basename "${src}")"
>>   did="$(basename "${dest}")"
>> -- 
>> 2.42.0
>>
> 

  reply	other threads:[~2023-09-08  2:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06  7:13 [PATCH] tools/mvtest: ensure testcase is executable (755) Shiyang Ruan
2023-09-07 10:25 ` Zorro Lang
2023-09-07 11:35 ` [PATCH v2] tools/mvtests: " Shiyang Ruan
2023-09-08  4:59   ` Zorro Lang
2023-09-07 13:54 ` [PATCH] tools/mvtest: " Zorro Lang
2023-09-08  2:13   ` Shiyang Ruan [this message]
2023-09-08  4:02     ` Zorro Lang
2023-09-08  5:43 ` [PATCH v3] " Shiyang Ruan
2023-09-08 23:36   ` Darrick J. Wong

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=7365bd90-6aaf-46d7-b09e-61ea1ad9ddb5@fujitsu.com \
    --to=ruansy.fnst@fujitsu.com \
    --cc=fstests@vger.kernel.org \
    --cc=zlang@redhat.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