From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04EC4C2D0A8 for ; Mon, 28 Sep 2020 20:06:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9505E2072E for ; Mon, 28 Sep 2020 20:06:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="OdImwqSK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726779AbgI1UGR (ORCPT ); Mon, 28 Sep 2020 16:06:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726325AbgI1UGR (ORCPT ); Mon, 28 Sep 2020 16:06:17 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3390EC061755 for ; Mon, 28 Sep 2020 13:06:17 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id h23so179208pjv.5 for ; Mon, 28 Sep 2020 13:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=GB2ojgWNqZXvqEdj/VV8371C+BmRndozba/z5/3tWGk=; b=OdImwqSK9MfonoLopWLPhPPwNfbz9gexbud4kQh5dYPi1aYXnLcNS7Fs0Q3VUr6DX9 BdxPS2tdTenGb/kWVbJUd1ffR67EUMaxyDwRwHKdqhSf7ppcYTPrh1NLn7aBTb2UhTq+ 9zy0WTzkdLpMaQzEfSiw/9c0XIPc62gte6O6I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=GB2ojgWNqZXvqEdj/VV8371C+BmRndozba/z5/3tWGk=; b=ATjPohAfE1D8b0OGHqwax1Ct2Z4A98bsZESQBBso0EO6UZXSlHL9/6XcrA7jLoBBqv aDz5V06dkp0f2a28Vk7TNstP0svzq+CUwAHbfx45jVrUBMifjSkvcMjM4gJ21pdeV+x1 XBQk9Qw83rG/xV7xR1toBAJawGBWWf2FqbdsXwU6nMQhKFFBI1dYapoKpgc3aC9/AedQ HbjdY/GRBshcU9kr6hXROIPcXWtTtQULtwgWL0PyOF+UPNJycm6co4BrbNNHw9MinKnl DlqMf6t4xfkk2N1litqv1jQpGNU1bvBV7HfaRhWMCH6ge4HYt/oRAugAoIFPFrfhe929 yjrg== X-Gm-Message-State: AOAM531s9iaER4oimPqPN3M5fr1FMLbLYqjd74d5gFhLrxTGPqQShHLg QSdB5on5NWIVpNqSXv3RS6124g== X-Google-Smtp-Source: ABdhPJxO+MI0WUHrgxRNZjH1ImCCvDkrrvTbzJHKtH0SHCAC/3OKSHmbyqvGL0KgC2NSJyvv4QR9pg== X-Received: by 2002:a17:90a:b88c:: with SMTP id o12mr768525pjr.43.1601323576799; Mon, 28 Sep 2020 13:06:16 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id a24sm2148981pju.25.2020.09.28.13.06.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 13:06:16 -0700 (PDT) Date: Mon, 28 Sep 2020 13:06:15 -0700 From: Kees Cook To: Hangbin Liu Cc: Shuah Khan , "open list:KERNEL SELFTEST FRAMEWORK" , Jonathan Corbet , Naresh Kamboju , linux-doc@vger.kernel.org, open list , Tim.Bird@sony.com, lkft-triage@lists.linaro.org, Anders Roxell , Justin Cook , Linux-Next Mailing List Subject: Re: [PATCHv5 kselftest next] selftests/run_kselftest.sh: make each test individually selectable Message-ID: <202009281305.E6F9595@keescook> References: <20200914021758.420874-1-liuhangbin@gmail.com/> <20200914022227.437143-1-liuhangbin@gmail.com> <202009251414.15274C0@keescook> <20200927015334.GC2531@dhcp-12-153.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200927015334.GC2531@dhcp-12-153.nay.redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 27, 2020 at 09:53:34AM +0800, Hangbin Liu wrote: > On Fri, Sep 25, 2020 at 02:16:14PM -0700, Kees Cook wrote: > > On Fri, Sep 25, 2020 at 01:51:53PM +0530, Naresh Kamboju wrote: > > > On Mon, 14 Sep 2020 at 07:53, Hangbin Liu wrote: > > > > > > > > Currently, after generating run_kselftest.sh, there is no way to choose > > > > which test we could run. All the tests are listed together and we have > > > > to run all every time. This patch enhanced the run_kselftest.sh to make > > > > the tests individually selectable. e.g. > > > > > > > > $ ./run_kselftest.sh -t "bpf size timers" > > > > > > My test run break on linux next > > > > > > ./run_kselftest.sh: line 1331: syntax error near unexpected token `)' > > > ./run_kselftest.sh: line 1331: `-e -s | --summary ) > > > logfile=$BASE_DIR/output.log; cat /dev/null > $logfile; shift ;;' > > > > Yes, please revert this patch. The resulting script is completely > > trashed: > > > > BASE_DIR=$(realpath $(dirname $0)) > > . ./kselftest/runner.sh > > TESTS="seccomp" > > > > run_seccomp() > > { > > -e [ -w /dev/kmsg ] && echo "kselftest: Running tests in seccomp" >> /dev/kmsg > > -e cd seccomp > > -en run_many > > \ > > -ne "seccomp_bpf" > > \ > > -ne "seccomp_benchmark" > > > > -e cd $ROOT > > } > > I'm really sorry to make this trouble. And I'm OK to revert the patch. > I just a little wondering how do you generate this script. This issue is with which shell is used. I suspect your /bin/sh is full /bin/bash, where as Naresh's, the CI's, and mine are /bin/dash (which lacks "-e" support for the built-in "echo"). -- Kees Cook