From patchwork Wed Apr 17 23:34:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 10906397 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C0A2161F for ; Wed, 17 Apr 2019 23:34:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54CD628727 for ; Wed, 17 Apr 2019 23:34:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4844628BA0; Wed, 17 Apr 2019 23:34:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F1AC28727 for ; Wed, 17 Apr 2019 23:34:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387662AbfDQXeQ (ORCPT ); Wed, 17 Apr 2019 19:34:16 -0400 Received: from mail-it1-f174.google.com ([209.85.166.174]:33997 "EHLO mail-it1-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730285AbfDQXeQ (ORCPT ); Wed, 17 Apr 2019 19:34:16 -0400 Received: by mail-it1-f174.google.com with SMTP id z17so6583312itc.1 for ; Wed, 17 Apr 2019 16:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=R8SmQcSi/rBWqV5smuVUOWL/SDeQKjTiFEEbbX6rNPo=; b=bYDIlc7H3MtBMY0JRSIH45qLoxFjZZ+x+xjXTc9pp1PSGqKO4pJpOW79cfi+fpaJ6y Lyz2njPLQSYaKUvPecYXHOPcJ2AZiSn6kj/gKJ8wd94vIIG8vb6WgntgtZzM1+e86rP2 x5K2iqRoYLQo3cKOENzlEYB6jeWfd5khEu9TM= 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:mime-version :content-transfer-encoding; bh=R8SmQcSi/rBWqV5smuVUOWL/SDeQKjTiFEEbbX6rNPo=; b=j13Zb60eG59+DKMIdWCnsXnFqMrQ8TD0b0ymFUBYPxPBpB6fENpf/Q3B2rny+kcgwc svBjeL+ZeD/+Vu8l+zD9DoA9WBuFVd45MdjJXUvQ52EUU/eBPpkOn8LkuZ+Zse0wLLv3 hvIlRPA5RU4HheGmhhjT7SHM28jV/gugL1XlyqgO2mDtYtiqrvxJyzgrjqOPXonEhOW/ xU/QBQwC1cmgvEhg0RQ9KMImJwW+z5gUBVLN61aOKki/cAbUbrKzBBCK1smjC2EpOP7x Vx6WBF/OzXHHYspkxV94qnEgeWNmMrqikQWkACOOwl3FZ4l/3v3ai/xVfvA49Cej0vfq 6iiw== X-Gm-Message-State: APjAAAWCTB5KLQhdA+5DnFY5MmL9efHAE3BxtHNfdwE+zVlODGxrZeL2 q3xoi/KFFW2dUSa4QStXnHUr5foOKPg= X-Google-Smtp-Source: APXvYqykG/KV4M086pa6e7OCuMQg/kUfoJ+6zuyDojMsNrVEphgyTA2rz896BJ7Qed9PdMQjVTgO+w== X-Received: by 2002:a24:2808:: with SMTP id h8mr1076090ith.85.1555544055529; Wed, 17 Apr 2019 16:34:15 -0700 (PDT) Received: from shuah-t480s.internal (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id r191sm254306ita.0.2019.04.17.16.34.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 16:34:14 -0700 (PDT) From: Shuah Khan To: shuah@kernel.org, corbet@lwn.net Cc: Shuah Khan , linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] doc: kselftest: Fix KBUILD_OUTPUT usage instructions Date: Wed, 17 Apr 2019 17:34:03 -0600 Message-Id: <20190417233403.29854-1-skhan@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix KBUILD_OUTPUT usage instructions. The current documentation is incorrect. Update and fix outdated information about summary option. Add a reference to kselftest wiki for additional information on the framework and tips on writing new tests. Signed-off-by: Shuah Khan --- Changes since v1: -- Fixed the confusing language about output directory -- Updated outdated instructions on summary option. -- Regenerated patch with current email address. Documentation/dev-tools/kselftest.rst | 42 ++++++++++++++++++--------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst index c8c03388b9de..25604904fa6e 100644 --- a/Documentation/dev-tools/kselftest.rst +++ b/Documentation/dev-tools/kselftest.rst @@ -7,6 +7,11 @@ directory. These are intended to be small tests to exercise individual code paths in the kernel. Tests are intended to be run after building, installing and booting a kernel. +You can find additional information on Kselftest framework, how to +write new tests using the framework on Kselftest wiki: + +https://kselftest.wiki.kernel.org/ + On some systems, hot-plug tests could hang forever waiting for cpu and memory to be ready to be offlined. A special hot-plug target is created to run the full range of hot-plug tests. In default mode, hot-plug tests run @@ -35,17 +40,32 @@ To build and run the tests with a single command, use:: Note that some tests will require root privileges. -Build and run from user specific object directory (make O=dir):: +Kselftest supports saving output files in a separate directory and then +running tests. To locate output files in a separate directory two syntaxes +are supported. In both cases the working directory must be the root of the +kernel src. This is applicable to "Running a subset of selftests" section +below. + +To build, save output files in a separate directory with O= :: $ make O=/tmp/kselftest kselftest -Build and run KBUILD_OUTPUT directory (make KBUILD_OUTPUT=):: +To build, save output files in a separate directory with KBUILD_OUTPUT :: + + $ export KBUILD_OUTPUT=/tmp/kselftest; make kselftest - $ make KBUILD_OUTPUT=/tmp/kselftest kselftest +The O= assignment takes precedence over the KBUILD_OUTPUT environment +variable. -The above commands run the tests and print pass/fail summary to make it -easier to understand the test results. Please find the detailed individual -test results for each test in /tmp/testname file(s). +The above commands by default run the tests and print full pass/fail report. +Kselftest supports "summary" option to make it easier to understand the test +results. Please find the detailed individual test results for each test in +/tmp/testname file(s) when summary option is specified. This is applicable +to "Running a subset of selftests" section below. + +To run kselftest with summary option enabled :: + + $ make summary=1 kselftest Running a subset of selftests ============================= @@ -61,17 +81,13 @@ You can specify multiple tests to build and run:: $ make TARGETS="size timers" kselftest -Build and run from user specific object directory (make O=dir):: +To build, save output files in a separate directory with O= :: $ make O=/tmp/kselftest TARGETS="size timers" kselftest -Build and run KBUILD_OUTPUT directory (make KBUILD_OUTPUT=):: - - $ make KBUILD_OUTPUT=/tmp/kselftest TARGETS="size timers" kselftest +To build, save output files in a separate directory with KBUILD_OUTPUT :: -The above commands run the tests and print pass/fail summary to make it -easier to understand the test results. Please find the detailed individual -test results for each test in /tmp/testname file(s). + $ export KBUILD_OUTPUT=/tmp/kselftest; make TARGETS="size timers" kselftest See the top-level tools/testing/selftests/Makefile for the list of all possible targets.