Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3292775pxk; Mon, 28 Sep 2020 13:28:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypgZYSD+DFr/t9G2H5PTTDoJnvgNgYqhlYP6as/B0Rh2I/IZ+E7Paz5ab6jlKCyqcfu5QH X-Received: by 2002:a17:907:377:: with SMTP id rs23mr498738ejb.415.1601324901901; Mon, 28 Sep 2020 13:28:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601324901; cv=none; d=google.com; s=arc-20160816; b=nd97XkiVsL4Df+8V21y+WjcN97bQOZQyj/upZESlYLGBHt531suGXDf3K6uy3SGJr/ VB0Kpsg9GFGcXGuBzZ3xC0IQV3pSki7h9JYExKMfLW1qFmjbv1FNrtoyu2W+unqMI1ga KSK4KL2twh8kZygLQnxAPJ5S9v4a0faNtNAIdA6xpCLUpLbrQNRQ/PHaGf/CINDBV7dF xBjn1FgsMM6SfEY5VSx0qMUHUkvA0wDRqrtak2kAQmN2Pwy24GGH1c/DcXSYISDyfk69 HF3iT/rYcd79+tVtMm+ubDvOsCYTdMS4JWgV1cNQtO9GPN4d8z1kIZkNmi6fyJNSqkr4 zgvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=84Wkm7II+zR8a1S1XbEc0SAaLAitSu9by2LK3K8LLZY=; b=hlwYMrjw1SkEkBaWC4sw0fnBbUOaCyJkfCq462GAaNshJ4AkSwEd+bfzxmqCAwHHbB 08x5WlZPkDsDiMK5ZkNzn4P0I/11iUy+MU1aIFdBweWi5Wg0Tvu057xZtrM1ZvY5aDuw onKvgp424uiDk+A2OS0YqIFhY+Ec6XmHE4Qkemw7PKe4lsV0bktFNPSDQOF/CyhaOdQG 58aautfCo4SrJZFw5Wg2gFhVpt2183VYo0ObwIw6XNPV4HyLJHl1ir/+qVoL7TAbGgdb 4BI+ZgvryKtL7VH47irq92aYgn/kOXjnWQLGeRctbNVoAcFFhF0eefoRYFth5GLN4OOH CHrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jzjFbeQC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q24si1475791edi.78.2020.09.28.13.27.59; Mon, 28 Sep 2020 13:28:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jzjFbeQC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbgI1U1A (ORCPT + 99 others); Mon, 28 Sep 2020 16:27:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726742AbgI1U05 (ORCPT ); Mon, 28 Sep 2020 16:26:57 -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 2D299C0613D6 for ; Mon, 28 Sep 2020 13:26:56 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id fa1so1382281pjb.0 for ; Mon, 28 Sep 2020 13:26:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=84Wkm7II+zR8a1S1XbEc0SAaLAitSu9by2LK3K8LLZY=; b=jzjFbeQC0BOwC59BlIVN2ZD9Bjg+kpxXoCamP3rbFMeNXlT5A44rhrBi1/hP2VR/2N Yz4xMvTvF/IVCMTawSARPCrWJFAyxjqHWONLjXci0pBwHhpp+qK7flV9anmFW0vYRW97 kRVlk0d7tppB+g7b5R7BN30fkEEi2ATsg6ztU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=84Wkm7II+zR8a1S1XbEc0SAaLAitSu9by2LK3K8LLZY=; b=jtgW2dmVZNTBA8qhpkaq2Y3oIy1SuV2F4oLTABZ3nu/RU274u89sJdtFl3wxeeku68 bf78IR8ZTC2o5E7Zc5L7vzc2o6mLKgcw1hEWrdxs3BCJIOUSMrNYQyz+RRTHaFJk0SjE BU3UX+uWrTUQSCDrvuGmk/ScJ4Tm3XN6YR67hA4ICyRemjCyUgYK43Vgpz2iHh2O6ZpK ug28QO4zGBrAUQmI6KjkrCpe0a20cD40JxRiqjKBkd98sNVcuCsWuSQTwappZ7M2UilB sGnfmXBaflSJrPtfSTH3lBob69lfCxnIuSavIDNlfW6BAKOeYEHiE8ibZIUSTqFHkCYu B0Qg== X-Gm-Message-State: AOAM530YA6ifUmVUPZaBPWZV0xj2HPDplj8ZvtZeYWdJLI2al69Bs4OC f/hyXkQNIp+n3y9ESNnTXptsKBbw7AZN5yb6 X-Received: by 2002:a17:90a:e38a:: with SMTP id b10mr817027pjz.17.1601324815742; Mon, 28 Sep 2020 13:26:55 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id s16sm2107828pgl.78.2020.09.28.13.26.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 13:26:53 -0700 (PDT) From: Kees Cook To: Shuah Khan Cc: Kees Cook , Naresh Kamboju , Hangbin Liu , Jonathan Corbet , linux-doc@vger.kernel.org, Tim.Bird@sony.com, lkft-triage@lists.linaro.org, Anders Roxell , Justin Cook , Linux-Next Mailing List , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v2 3/3] doc: dev-tools: kselftest.rst: Update examples and paths Date: Mon, 28 Sep 2020 13:26:50 -0700 Message-Id: <20200928202650.2530280-4-keescook@chromium.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200928202650.2530280-1-keescook@chromium.org> References: <20200928202650.2530280-1-keescook@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update the installation commands and path details, detail the new options available in the run_kselftests.sh script. Signed-off-by: Kees Cook --- Documentation/dev-tools/kselftest.rst | 35 +++++++++++++++++---------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst index 469d115a95f1..a901def730d9 100644 --- a/Documentation/dev-tools/kselftest.rst +++ b/Documentation/dev-tools/kselftest.rst @@ -125,32 +125,41 @@ Note that some tests will require root privileges. Install selftests ================= -You can use the kselftest_install.sh tool to install selftests in the -default location, which is tools/testing/selftests/kselftest, or in a -user specified location. +You can use the "install" target of "make" (which calls the `kselftest_install.sh` +tool) to install selftests in the default location (`tools/testing/selftests/kselftest_install`), +or in a user specified location via the `INSTALL_PATH` "make" variable. To install selftests in default location:: - $ cd tools/testing/selftests - $ ./kselftest_install.sh + $ make -C tools/testing/selftests install To install selftests in a user specified location:: - $ cd tools/testing/selftests - $ ./kselftest_install.sh install_dir + $ make -C tools/testing/selftests install INSTALL_PATH=/some/other/path Running installed selftests =========================== -Kselftest install as well as the Kselftest tarball provide a script -named "run_kselftest.sh" to run the tests. +Found in the install directory, as well as in the Kselftest tarball, +is a script named `run_kselftest.sh` to run the tests. You can simply do the following to run the installed Kselftests. Please note some tests will require root privileges:: - $ cd kselftest + $ cd kselftest_install $ ./run_kselftest.sh +To see the list of available tests, the `-l` option can be used:: + + $ ./run_kselftest.sh -l + +The `-c` option can be used to run all the tests from a test collection, or +the `-t` option for specific single tests. Either can be used multiple times:: + + $ ./run_kselftest.sh -c bpf -c seccomp -t timers:posix_timers -t timer:nanosleep + +For other features see the script usage output, seen with the `-h` option. + Packaging selftests =================== @@ -160,9 +169,9 @@ different system. To package selftests, run:: $ make -C tools/testing/selftests gen_tar This generates a tarball in the `INSTALL_PATH/kselftest-packages` directory. By -default, `.gz` format is used. The tar format can be overridden by specifying -a `FORMAT` make variable. Any value recognized by `tar's auto-compress`_ option -is supported, such as:: +default, `.gz` format is used. The tar compression format can be overridden by +specifying a `FORMAT` make variable. Any value recognized by `tar's auto-compress`_ +option is supported, such as:: $ make -C tools/testing/selftests gen_tar FORMAT=.xz -- 2.25.1