Linux-kselftest Archive on
 help / color / Atom feed
From: Sasha Levin <>
Cc: Matthieu Baerts <>,
	Kees Cook <>,
	Shuah Khan <>,
	Sasha Levin <>,
Subject: [PATCH AUTOSEL 5.5 115/542] selftests: settings: tests can be in subsubdirs
Date: Fri, 14 Feb 2020 10:41:47 -0500
Message-ID: <> (raw)
In-Reply-To: <>

From: Matthieu Baerts <>

[ Upstream commit ac87813d4372f4c005264acbe3b7f00c1dee37c4 ]

Commit 852c8cbf34d3 ("selftests/kselftest/ Add 45 second
timeout per test") adds support for a new per-test-directory "settings"
file. But this only works for tests not in a sub-subdirectories, e.g.

 - tools/testing/selftests/rtc (rtc) is OK,
 - tools/testing/selftests/net/mptcp (net/mptcp) is not.

We have to increase the timeout for net/mptcp tests which are not
upstreamed yet but this fix is valid for other tests if they need to add
a "settings" file, see the full list with:


Note that this patch changes the text header message printed at the end
of the execution but this text is modified only for the tests that are
in sub-subdirectories, e.g.

  ok 1 selftests: net/mptcp:

Before we had:

  ok 1 selftests: mptcp:

But showing the full target name is probably better, just in case a
subsubdir has the same name as another one in another subdirectory.

Fixes: 852c8cbf34d3 (selftests/kselftest/ Add 45 second timeout per test)
Signed-off-by: Matthieu Baerts <>
Reviewed-by: Kees Cook <>
Signed-off-by: Shuah Khan <>
Signed-off-by: Sasha Levin <>
 tools/testing/selftests/kselftest/ | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/kselftest/ b/tools/testing/selftests/kselftest/
index a8d20cbb711cf..e84d901f85672 100644
--- a/tools/testing/selftests/kselftest/
+++ b/tools/testing/selftests/kselftest/
@@ -91,7 +91,7 @@ run_one()
 	echo "TAP version 13"
-	DIR=$(basename "$PWD")
+	DIR="${PWD#${BASE_DIR}/}"
 	total=$(echo "$@" | wc -w)
 	echo "1..$total"

  parent reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2020-02-14 15:41 ` [PATCH AUTOSEL 5.5 081/542] kselftest: Minimise dependency of get_size on C library interfaces Sasha Levin
2020-02-14 15:41 ` Sasha Levin [this message]
2020-02-14 15:43 ` [PATCH AUTOSEL 5.5 209/542] selftests/net: make so_txtime more robust to timer variance Sasha Levin
2020-02-14 15:45 ` [PATCH AUTOSEL 5.5 309/542] selftests: Uninitialized variable in test_cgcore_proc_migration() Sasha Levin
2020-02-14 15:45 ` [PATCH AUTOSEL 5.5 310/542] kunit: remove timeout dependence on sysctl_hung_task_timeout_seconds Sasha Levin
2020-02-14 15:47 ` [PATCH AUTOSEL 5.5 461/542] selftests: bpf: Reset global state between reuseport test runs Sasha Levin
2020-02-14 15:47 ` [PATCH AUTOSEL 5.5 465/542] selftests/eeh: Bump EEH wait time to 60s Sasha Levin
2020-02-14 15:48 ` [PATCH AUTOSEL 5.5 526/542] tc-testing: add missing 'nsPlugin' to basic.json Sasha Levin

Reply instructions:

You may reply publically 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:

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

  git send-email \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-kselftest Archive on

Archives are clonable:
	git clone --mirror linux-kselftest/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-kselftest linux-kselftest/ \
	public-inbox-index linux-kselftest

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone