Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp826495ybx; Wed, 30 Oct 2019 05:46:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxvAAt7IBa92tPqy9ANBG1A5ZSYF88RoFJInCqc+ZhUlOuzcfA437pvcV9K0K4oa1EZ/0VQ X-Received: by 2002:a17:906:1c19:: with SMTP id k25mr8664745ejg.243.1572439608516; Wed, 30 Oct 2019 05:46:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572439608; cv=none; d=google.com; s=arc-20160816; b=WuhE6XEzks8ScfISA63zsx0673PUUp56eTqKS2sd0B4yvVGQKEhVpXpNsSBv+n3rbT pK7iLoxyQJWQf8zSLTmxo1YfgmGYxqvbX4si7z480ATFGRsL0qBR3lXaezQBw0IPZiIK y/qGpTJg+Ouqy+NATbACGodGcbA9a34GzHqUAPTAWG54+tZB0Z5vJKj5FS1HS9ggB4BQ Ah/+D0u7NSvCjStiGiQ4EuPLlrVmc66/wbBUXg/7rXolOitJcotILqny3OPgs5Zbkls/ CLc4MtQG/qggJ85eZ9EYuojhIFVn/aV+EwSandr+uPXb3naHl5BlCIqbgyvSK1Gs7xV9 zFlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Z/lBvgj2tEa3ewK9stecrJwWbqYMjUJzw11XHWG5FOU=; b=HbWs8+dw1Mv8+K5iBcowGI0wr3x2zfvPcSeOECdY4EASynY90Nci6KhjUEIvO9QQw8 2rpcV6Zzdfp8y0cLbeOFiJNoAC5smk9YTuKV48+K54lo6oylufL7ccT0ZckeoaBqf5oT r6cpDHrecUDwXGcfXGO3fqojGVyDTKvntRpClM7UceJ/jJhMnv9EcHG5Uc/+eagBNNf6 FX+BAgTpf8MD3PPnwJ+mqfQEAnuOFpat/QhxThWrJP0rLBtpXEknjY8xRrZv12iUDfJn +33i+Pcmxhz3ly0s4CSFdZEnKoUvTKWYIORggWKqcajCl/T6kUqEgVHLGx1fM1SLqwCt oOyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rTgsJpzW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si1419287edx.315.2019.10.30.05.46.24; Wed, 30 Oct 2019 05:46:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rTgsJpzW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726518AbfJ3Mph (ORCPT + 99 others); Wed, 30 Oct 2019 08:45:37 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:42610 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726175AbfJ3Mpg (ORCPT ); Wed, 30 Oct 2019 08:45:36 -0400 Received: by mail-lf1-f68.google.com with SMTP id z12so1439170lfj.9 for ; Wed, 30 Oct 2019 05:45:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Z/lBvgj2tEa3ewK9stecrJwWbqYMjUJzw11XHWG5FOU=; b=rTgsJpzWI5VRDYzYA8OK+NMiiwUWn+nXQxhEXl702L+YTP/w8CrLC81P0JJEIstmBR 1CwT5RWxJkiYre2CpQ3vgohfeSR+vd0HmESrAN+Pc8K3Pp+ldKsr2ITBANimBtbruOqp fUhw/5Pu/rRI1CsSEc/1avDvKOGppY2Pvel+6OsYVyIp4EpQ1rlJS3APYLqEY/MrQ4PJ gvOlJloA0E5eSPhtgMyesfaO9SmwcFsZxjHpurmfcKYl8F7mt4tS0gGLKD2vDi3aWhPZ zF8mfNYh1u7i3D+o/kdwc53E/0Fsr57dp+xD9DqF4w6uJlx8zqhDNoxTgpbYTFpqAQ+w x8cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Z/lBvgj2tEa3ewK9stecrJwWbqYMjUJzw11XHWG5FOU=; b=aLSGDQldPPvhHbF/DJW/kyHGb3ZH1eppOF5nEg5KXU/LerW5E3rryErZsca/0dadZO /Mkm3A2VGsxNNfL6b+q+k4BQahWDmo8blLPLLSEcnyin7PZKZ68S4JZNWzspmrZynimW a2JRDfZDyrEmqNfoV0sQJJT7XfJIz5FReW4zg0vvlI/8PdvFqwIi8abN7hzPrWaOk5qQ WIXOaqzo6K7KKuB3srHvCa9S+fljY8QOsqNl5KFx8vEo3NalOZY9p4q8XyhAencgt+cg 17BoNqnI1BAL+eF3IvTE/WVOuR+SxilGNhCCIx4qMb9tobNjSifmW6ispbI2T+ck47xf nfBw== X-Gm-Message-State: APjAAAVDUskRm6hd1RZE7ujtKEN0ja9WWcZFcNAAed+E8ZCTg7naHYyC zowIqqXDg2cWLlWiRd2SFksGzBpTQlF0Xo5FzgGiGg== X-Received: by 2002:a19:3f0a:: with SMTP id m10mr6181421lfa.67.1572439534595; Wed, 30 Oct 2019 05:45:34 -0700 (PDT) MIME-Version: 1.0 References: <20190405015859.32755-1-tobin@kernel.org> <20190405015859.32755-3-tobin@kernel.org> In-Reply-To: <20190405015859.32755-3-tobin@kernel.org> From: Naresh Kamboju Date: Wed, 30 Oct 2019 18:15:22 +0530 Message-ID: Subject: Re: [PATCH v4 2/6] kselftest: Add test runner creation script To: "Tobin C. Harding" Cc: Shuah Khan , Kees Cook , Jann Horn , Andy Shevchenko , Randy Dunlap , Rasmus Villemoes , Stephen Rothwell , Andy Lutomirski , Daniel Micay , Arnd Bergmann , Miguel Ojeda , "Gustavo A. R. Silva" , Greg Kroah-Hartman , Alexander Shishkin , kernel-hardening@lists.openwall.com, "open list:KERNEL SELFTEST FRAMEWORK" , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tobin, On Fri, 5 Apr 2019 at 07:30, Tobin C. Harding wrote: > > Currently if we wish to use kselftest to run tests within a kernel > module we write a small script to load/unload and do error reporting. > There are a bunch of these under tools/testing/selftests/lib/ that are > all identical except for the test name. We can reduce code duplication > and improve maintainability if we have one version of this. However > kselftest requires an executable for each test. We can move all the > script logic to a central script then have each individual test script > call the main script. > > Oneliner to call kselftest_module.sh courtesy of Kees, thanks! > > Add test runner creation script. Convert > tools/testing/selftests/lib/*.sh to use new test creation script. > > Testing > ------- > > Configure kselftests for lib/ then build and boot kernel. Then run > kselftests as follows: > > $ cd /path/to/kernel/tree > $ sudo make O=$output_path -C tools/testing/selftests TARGETS="lib" run_tests We are missing "kselftest_module.sh" file when we do "make install" and followed by generating a tar file "gen_kselftest_tar.sh" and copying that on to target device and running tests by using "run_kselftest.sh" script file on the target. Could you install the supporting script file "kselftest_module.sh" ? Error log, ------------- # selftests lib printf.sh lib: printf.sh_ # # ./printf.sh line 4 ./../kselftest_module.sh No such file or directory line: 4_./../kselftest_module.sh # [FAIL] 1 selftests lib printf.sh # exit=127 selftests: lib_printf.sh [FAIL] # selftests lib bitmap.sh lib: bitmap.sh_ # # ./bitmap.sh line 3 ./../kselftest_module.sh No such file or directory line: 3_./../kselftest_module.sh # [FAIL] 2 selftests lib bitmap.sh # exit=127 selftests: lib_bitmap.sh [FAIL] # selftests lib prime_numbers.sh lib: prime_numbers.sh_ # # ./prime_numbers.sh line 4 ./../kselftest_module.sh No such file or directory line: 4_./../kselftest_module.sh # [FAIL] 3 selftests lib prime_numbers.sh # exit=127 selftests: lib_prime_numbers.sh [FAIL] # selftests lib strscpy.sh lib: strscpy.sh_ # # ./strscpy.sh line 3 ./../kselftest_module.sh No such file or directory line: 3_./../kselftest_module.sh # [FAIL] 4 selftests lib strscpy.sh # exit=127 selftests: lib_strscpy.sh [FAIL] - Naresh