From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751870AbdHBW4O (ORCPT ); Wed, 2 Aug 2017 18:56:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:47666 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751161AbdHBW4M (ORCPT ); Wed, 2 Aug 2017 18:56:12 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DD3E822CA0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mcgrof@kernel.org MIME-Version: 1.0 In-Reply-To: <20170802154349.a4221b87ebb083a83353c270@linux-foundation.org> References: <20170802211450.27928-1-mcgrof@kernel.org> <20170802211450.27928-2-mcgrof@kernel.org> <20170802154349.a4221b87ebb083a83353c270@linux-foundation.org> From: "Luis R. Rodriguez" Date: Wed, 2 Aug 2017 15:55:50 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/5] test_kmod: make selftest executable To: Andrew Morton , shuah@kernel.org Cc: Dmitry Torokhov , Kees Cook , Jessica Yu , Rusty Russell , Michal Marek , Petr Mladek , Miroslav Benes , Josh Poimboeuf , "Eric W. Biederman" , Dan Carpenter , Colin Ian King , dcb314@hotmail.com, linux-kselftest@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 2, 2017 at 3:43 PM, Andrew Morton wrote: > On Wed, 2 Aug 2017 14:14:46 -0700 "Luis R. Rodriguez" wrote: > >> We had just forgotten to do this. >> >> Fixes: 39258f448d71 ("kmod: add test driver to stress test the module loader") >> Signed-off-by: Luis R. Rodriguez >> --- >> 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 ? Although I'll note I also do like to run selftest scripts on my own too, so the chmod is still desirable. Luis