From: Shuah Khan <shuah@kernel.org>
To: "Luis R. Rodriguez" <mcgrof@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Kees Cook <keescook@chromium.org>, Jessica Yu <jeyu@redhat.com>,
Rusty Russell <rusty@rustcorp.com.au>,
Michal Marek <mmarek@suse.com>, Petr Mladek <pmladek@suse.com>,
Miroslav Benes <mbenes@suse.cz>,
Josh Poimboeuf <jpoimboe@redhat.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Dan Carpenter <dan.carpenter@oracle.com>,
Colin Ian King <colin.king@canonical.com>,
dcb314@hotmail.com, linux-kselftest@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH 1/5] test_kmod: make selftest executable
Date: Wed, 2 Aug 2017 17:57:52 -0600 [thread overview]
Message-ID: <6d98d850-4a6a-195e-ecd7-794678f94b31@kernel.org> (raw)
In-Reply-To: <CAB=NE6XpAs3RMrRB7bXZa1ZzZu=NvpVHVkBCT4CmKBJSZpAtcw@mail.gmail.com>
Hi Luis,
On 08/02/2017 04:55 PM, Luis R. Rodriguez wrote:
> On Wed, Aug 2, 2017 at 3:43 PM, Andrew Morton <akpm@linux-foundation.org> wrote:
>> On Wed, 2 Aug 2017 14:14:46 -0700 "Luis R. Rodriguez" <mcgrof@kernel.org> wrote:
>>
>>> We had just forgotten to do this.
Could you please include the real reason you need this change.
My guess is, you are seeing this failure.
make -C kmod/ run_tests
make: Entering directory '/lkml/linux_4.13/tools/testing/selftests/kmod'
/bin/sh: 1: ./kmod.sh: Permission denied
selftests: kmod.sh [FAIL]
>>>
>>> Fixes: 39258f448d71 ("kmod: add test driver to stress test the module loader")
>>> Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
>>> ---
>>> tools/testing/selftests/kmod/kmod.sh | 0
>>> 1 file changed, 0 insertions(+), 0 deletions(-)
>>> mode change 100644 => 100755 tools/testing/selftests/kmod/kmod.sh
>>>
>>> diff --git a/tools/testing/selftests/kmod/kmod.sh b/tools/testing/selftests/kmod/kmod.sh
>>> old mode 100644
>>> new mode 100755
>>
>> This is pretty fragile - I'm not sure that patch/diff are capable of
>> communicating a bare chmod. If someone does a "patch -p1 < patch-4.14"
>> or whatever, this change is likely to get lost.
>
> True if using regular diff, if using git, it will catch it though.
>
>> It's more robust to not care about the x bit at all. Something like
>> this?
>>
>> --- a/tools/testing/selftests/lib.mk~a
>> +++ a/tools/testing/selftests/lib.mk
>> @@ -14,7 +14,7 @@ all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_
>> define RUN_TESTS
>> @for TEST in $(TEST_GEN_PROGS) $(TEST_PROGS); do \
>> BASENAME_TEST=`basename $$TEST`; \
>> - cd `dirname $$TEST`; (./$$BASENAME_TEST && echo "selftests: $$BASENAME_TEST [PASS]") || echo "selftests: $$BASENAME_TEST [FAIL]"; cd -;\
>> + cd `dirname $$TEST`; (/bin/sh ./$$BASENAME_TEST && echo "selftests: $$BASENAME_TEST [PASS]") || echo "selftests: $$BASENAME_TEST [FAIL]"; cd -;\
>> done;
>> endef
>>
>>
>> (probably incomplete, should presumably use $SHELL or something)
>
> Probably a good idea indeed, Shuah ?
I think this is a good idea. At the moment any script without +x fails.
It would be good change to make in the generic layer.
>
> Although I'll note I also do like to run selftest scripts on my own
> too, so the chmod is still desirable.
You will have to run it under bash kmod/kmod.sh - It can be painful.
This is one of the reasons a lot of the scripts are executable.
I am curious how you didn't catch this before.
I can take this one. Please fix the change log though. That will
explain why this change is made.
thanks,
-- Shuah
next prev parent reply other threads:[~2017-08-02 23:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 21:14 [PATCH 0/5] test_kmod: fixes for v4.13-final Luis R. Rodriguez
2017-08-02 21:14 ` [PATCH 1/5] test_kmod: make selftest executable Luis R. Rodriguez
2017-08-02 22:43 ` Andrew Morton
2017-08-02 22:55 ` Luis R. Rodriguez
2017-08-02 23:42 ` Andrew Morton
2017-08-02 23:46 ` Luis R. Rodriguez
2017-08-03 0:01 ` Shuah Khan
2017-08-02 23:57 ` Shuah Khan [this message]
2017-08-08 9:50 ` Michael Ellerman
2017-08-08 17:52 ` Luis R. Rodriguez
2017-08-02 21:14 ` [PATCH 2/5] test_kmod: fix spelling mistake: "EMTPY" -> "EMPTY" Luis R. Rodriguez
2017-08-02 21:14 ` [PATCH 3/5] test_kmod: fix bug which allows negative values on two config options Luis R. Rodriguez
2017-08-02 21:14 ` [PATCH 4/5] test_kmod: fix the lock in register_test_dev_kmod() Luis R. Rodriguez
2017-08-02 21:14 ` [PATCH 5/5] test_kmod: fix small memory leak on filesystem tests Luis R. Rodriguez
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=6d98d850-4a6a-195e-ecd7-794678f94b31@kernel.org \
--to=shuah@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=colin.king@canonical.com \
--cc=dan.carpenter@oracle.com \
--cc=dcb314@hotmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=ebiederm@xmission.com \
--cc=jeyu@redhat.com \
--cc=jpoimboe@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=mcgrof@kernel.org \
--cc=mmarek@suse.com \
--cc=pmladek@suse.com \
--cc=rusty@rustcorp.com.au \
/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;
as well as URLs for NNTP newsgroup(s).