This message generated a parse failure. Raw output follows here. Please use 'back' to navigate. From devnull@lkml.org Fri Apr 26 05:00:10 2024 >From mailfetcher Tue Aug 8 19:52:32 2017 Envelope-to: lkml@grols.ch Delivery-date: Tue, 08 Aug 2017 19:52:27 +0200 Received: from srv.grols.ch [5.172.41.101] by e326d15dcf49 with IMAP (fetchmail-6.3.26) for (single-drop); Tue, 08 Aug 2017 19:52:32 +0200 (CEST) Received: from vger.kernel.org ([209.132.180.67]) by home.grols.ch with esmtp (Exim 4.89) (envelope-from ) id 1df8fx-0004cD-3A for lkml@grols.ch; Tue, 08 Aug 2017 19:52:24 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752122AbdHHRwH convert rfc822-to-8bit (ORCPT ); Tue, 8 Aug 2017 13:52:07 -0400 Received: from mx2.suse.de ([195.135.220.15]:51321 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752092AbdHHRwG (ORCPT ); Tue, 8 Aug 2017 13:52:06 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E8580AE9D; Tue, 8 Aug 2017 17:52:04 +0000 (UTC) Date: Tue, 8 Aug 2017 19:52:03 +0200 From: "Luis R. Rodriguez" To: Michael Ellerman Cc: Andrew Morton , "Luis R. Rodriguez" , dmitry.torokhov@gmail.com, keescook@chromium.org, jeyu@redhat.com, rusty@rustcorp.com.au, mmarek@suse.com, pmladek@suse.com, mbenes@suse.cz, Subject: Re: [PATCH 1/5] test_kmod: make selftest executable Message-Id: <20170808175203.GQ27873@wotan.suse.de> References: <20170802211450.27928-1-mcgrof@kernel.org> <20170802211450.27928-2-mcgrof@kernel.org> <20170802154349.a4221b87ebb083a83353c270@linux-foundation.org> <87efsmo0c3.fsf@concordia.ellerman.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <87efsmo0c3.fsf@concordia.ellerman.id.au> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-Id: X-Mailing-List: linux-kernel@vger.kernel.org Received-SPF: none client-ip=209.132.180.67; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org X-Spam-Score: 7.1 X-Spam-Score-Bar: +++++++ X-Spam-Action: add header X-Spam-Report: Action: add header Symbol: AUTH_NA(1.00) Symbol: RCPT_COUNT_TWELVE(0.00) Symbol: R_SPF_NA(0.00) Symbol: RCVD_IN_DNSWL_HI(0.00) Symbol: R_DKIM_NA(0.00) Symbol: FORGED_SENDER(0.30) Symbol: TO_DN_SOME(0.00) Symbol: FORGED_RECIPIENTS(2.00) Symbol: PRECEDENCE On Tue, Aug 08, 2017 at 07:50:04PM +1000, Michael Ellerman wrote: > Andrew Morton writes: > > 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. > > > > 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 > > Most (many?) of the tests aren't shell scripts, so that doesn't work, eg: > > $ make -C tools/testing/selftests/ TARGETS=kcmp run_tests > ... > make[1]: Entering directory '/home/michael/linus/tools/testing/selftests/kcmp' > ./kcmp_test: 1: ./kcmp_test: ELF...0.@�.@@..@@.@.�.�..........����.��.�.�...�.�..�.�.�.....DD.Q�td.R�td.����.��../lib64/ld64.so.2..GNU...GNUC{: not found > ./kcmp_test: 13: ./kcmp_test: Syntax error: Unterminated quoted string > selftests: kcmp_test [FAIL] > > > Also some of the ones which are shell scripts require bash, and /bin/sh > may not be bash, eg: > > $ make -C tools/testing/selftests/ TARGETS=cpu-hotplug run_tests > ... > make[1]: Entering directory '/home/michael/linus/tools/testing/selftests/cpu-hotplug' > ./cpu-on-off-test.sh: 9: [: !=: unexpected operator Which is precisely why I decided to just issue a warning instead: https://lkml.kernel.org/r/20170803202436.6877-1-mcgrof@kernel.org Luis