All of lore.kernel.org
 help / color / mirror / Atom feed
From: keescook at chromium.org (Kees Cook)
Subject: [PATCH 0/6] selftests: Move test output to diagnostic lines
Date: Tue,  9 Apr 2019 16:55:50 -0700	[thread overview]
Message-ID: <20190409235556.3967-1-keescook@chromium.org> (raw)

This refactors the selftest Makefiles to extract the test running logic
to be reused between "run_tests" and "emit_tests", while also fixing
up the test output to be TAP version 13 compliant:
- added "plan" line
- fixed result line syntax
- moved all test output to be "# "-prefixed as TAP "diagnostic" lines

The prefixing code includes a fallback mode for limited execution
environments.

-Kees

Kees Cook (6):
  selftests: Extract single-test shell logic from lib.mk
  selftests: Use runner.sh for emit targets
  selftests: Extract logic for multiple test runs
  selftests/runner: Add plan line and fix result line syntax
  selftests/runner: Distinguish between missing and non-executable
  selftests: Move test output to diagnostic lines

 tools/testing/selftests/.gitignore          |  1 -
 tools/testing/selftests/Makefile            | 18 +++--
 tools/testing/selftests/kselftest/prefix.pl | 23 ++++++
 tools/testing/selftests/kselftest/runner.sh | 80 +++++++++++++++++++++
 tools/testing/selftests/lib.mk              | 61 +++-------------
 5 files changed, 119 insertions(+), 64 deletions(-)
 create mode 100755 tools/testing/selftests/kselftest/prefix.pl
 create mode 100644 tools/testing/selftests/kselftest/runner.sh

-- 
2.17.1

WARNING: multiple messages have this Message-ID (diff)
From: keescook@chromium.org (Kees Cook)
Subject: [PATCH 0/6] selftests: Move test output to diagnostic lines
Date: Tue,  9 Apr 2019 16:55:50 -0700	[thread overview]
Message-ID: <20190409235556.3967-1-keescook@chromium.org> (raw)
Message-ID: <20190409235550.Dkk6oHLWBQAwbmOeSACUxZSLjD0ByIGU47lhkeIUoj4@z> (raw)

This refactors the selftest Makefiles to extract the test running logic
to be reused between "run_tests" and "emit_tests", while also fixing
up the test output to be TAP version 13 compliant:
- added "plan" line
- fixed result line syntax
- moved all test output to be "# "-prefixed as TAP "diagnostic" lines

The prefixing code includes a fallback mode for limited execution
environments.

-Kees

Kees Cook (6):
  selftests: Extract single-test shell logic from lib.mk
  selftests: Use runner.sh for emit targets
  selftests: Extract logic for multiple test runs
  selftests/runner: Add plan line and fix result line syntax
  selftests/runner: Distinguish between missing and non-executable
  selftests: Move test output to diagnostic lines

 tools/testing/selftests/.gitignore          |  1 -
 tools/testing/selftests/Makefile            | 18 +++--
 tools/testing/selftests/kselftest/prefix.pl | 23 ++++++
 tools/testing/selftests/kselftest/runner.sh | 80 +++++++++++++++++++++
 tools/testing/selftests/lib.mk              | 61 +++-------------
 5 files changed, 119 insertions(+), 64 deletions(-)
 create mode 100755 tools/testing/selftests/kselftest/prefix.pl
 create mode 100644 tools/testing/selftests/kselftest/runner.sh

-- 
2.17.1

             reply	other threads:[~2019-04-09 23:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09 23:55 keescook [this message]
2019-04-09 23:55 ` [PATCH 0/6] selftests: Move test output to diagnostic lines Kees Cook
2019-04-09 23:55 ` [PATCH 1/6] selftests: Extract single-test shell logic from lib.mk keescook
2019-04-09 23:55   ` Kees Cook
2019-04-16 23:11   ` shuah
2019-04-16 23:11     ` shuah
2019-04-16 23:16     ` keescook
2019-04-16 23:16       ` Kees Cook
2019-04-16 23:21       ` shuah
2019-04-16 23:21         ` shuah
2019-04-23 22:31         ` keescook
2019-04-23 22:31           ` Kees Cook
2019-04-23 22:47           ` shuah
2019-04-23 22:47             ` shuah
2019-04-24  2:43             ` keescook
2019-04-24  2:43               ` Kees Cook
2019-04-24  2:46               ` shuah
2019-04-24  2:46                 ` shuah
2019-04-09 23:55 ` [PATCH 2/6] selftests: Use runner.sh for emit targets keescook
2019-04-09 23:55   ` Kees Cook
2019-04-09 23:55 ` [PATCH 3/6] selftests: Extract logic for multiple test runs keescook
2019-04-09 23:55   ` Kees Cook
2019-04-09 23:55 ` [PATCH 4/6] selftests/runner: Add plan line and fix result line syntax keescook
2019-04-09 23:55   ` Kees Cook
2019-04-09 23:55 ` [PATCH 5/6] selftests/runner: Distinguish between missing and non-executable keescook
2019-04-09 23:55   ` Kees Cook
2019-04-09 23:55 ` [PATCH 6/6] selftests: Move test output to diagnostic lines keescook
2019-04-09 23:55   ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190409235556.3967-1-keescook@chromium.org \
    --to=unknown@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.