This series fixes the reported issues, and implements the suggested
improvements, for the version of the cpumask tests [1] that was merged
with commit c41e8866c28c ("lib/test: introduce cpumask KUnit test
suite").
These changes include fixes for the tests, and better alignment with the
KUnit style guidelines.
[1] https://lore.kernel.org/all/85217b5de6d62257313ad7fde3e1969421acad75.165907…
Changes since v2:
Link: https://lore.kernel.org/lkml/cover.1661007338.git.sander@svanheule.net/
- Update commit message of "lib/test_cpumask: drop cpu_possible_mask
full test"
- Use *_MSG() macros to only print mask contents on failure
Changes since v1:
Link: https://lore.kernel.org/lkml/cover.1660068429.git.sander@svanheule.net/
- Collect tags
- Rewrite commit message of "lib/test_cpumask: drop cpu_possible_mask
full test"
- Also CC KUnit mailing list
Sander Vanheule (5):
lib/test_cpumask: drop cpu_possible_mask full test
lib/test_cpumask: fix cpu_possible_mask last test
lib/test_cpumask: follow KUnit style guidelines
lib/cpumask_kunit: log mask contents
lib/cpumask_kunit: add tests file to MAINTAINERS
MAINTAINERS | 1 +
lib/Kconfig.debug | 7 +++-
lib/Makefile | 2 +-
lib/{test_cpumask.c => cpumask_kunit.c} | 52 +++++++++++++++----------
4 files changed, 38 insertions(+), 24 deletions(-)
rename lib/{test_cpumask.c => cpumask_kunit.c} (58%)
--
2.37.2
To set socket noblock, we need to use
> fcntl(fd, F_SETFL, O_NONBLOCK);
rather than:
> fcntl(fd, O_NONBLOCK);
Signed-off-by: Qiao Ma <mqaio(a)linux.alibaba.com>
---
tools/testing/selftests/bpf/test_sockmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_sockmap.c b/tools/testing/selftests/bpf/test_sockmap.c
index 0fbaccdc8861..b163b7cfd957 100644
--- a/tools/testing/selftests/bpf/test_sockmap.c
+++ b/tools/testing/selftests/bpf/test_sockmap.c
@@ -598,7 +598,7 @@ static int msg_loop(int fd, int iov_count, int iov_length, int cnt,
struct timeval timeout;
fd_set w;
- fcntl(fd, fd_flags);
+ fcntl(fd, F_SETFL, fd_flags);
/* Account for pop bytes noting each iteration of apply will
* call msg_pop_data helper so we need to account for this
* by calculating the number of apply iterations. Note user
--
1.8.3.1
From: Andrew Delgadillo <adelg(a)google.com>
When testing a kernel, one of the earliest signals one can get is if a
kernel has become tainted. For example, an organization might be
interested in mass testing commits on their hardware. An obvious first
step would be to make sure every commit boots, and a next step would be
to make sure there are no warnings/crashes/lockups, hence the utility of
a taint test.
Signed-off-by: Andrew Delgadillo <adelg(a)google.com>
---
tools/testing/selftests/core/Makefile | 1 +
tools/testing/selftests/core/taint.sh | 28 +++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
create mode 100755 tools/testing/selftests/core/taint.sh
diff --git a/tools/testing/selftests/core/Makefile b/tools/testing/selftests/core/Makefile
index f6f2d6f473c6a..695bdbfb02f90 100644
--- a/tools/testing/selftests/core/Makefile
+++ b/tools/testing/selftests/core/Makefile
@@ -2,6 +2,7 @@
CFLAGS += -g -I../../../../usr/include/
TEST_GEN_PROGS := close_range_test
+TEST_PROGS := taint.sh
include ../lib.mk
diff --git a/tools/testing/selftests/core/taint.sh b/tools/testing/selftests/core/taint.sh
new file mode 100755
index 0000000000000..661c2cb8cd9bf
--- /dev/null
+++ b/tools/testing/selftests/core/taint.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+set -oue pipefail
+
+# By default, we only want to check if our system has:
+# - seen an oops or bug
+# - a warning occurred
+# - a lockup occurred
+# The bit values for these, and more, can be found at
+# Documentation/admin-guide/tainted-kernels.html
+# This value can be overridden by passing a mask as the
+# first positional argument.
+taint_bitmask=$(( 128 + 512 + 16384 ))
+
+# If we have a positional argument, then override our
+# default bitmask.
+if [[ -n "${1-}" ]]; then
+ taint_bitmask=$1
+fi
+
+taint_bits=$(cat /proc/sys/kernel/tainted)
+
+result=$(( taint_bitmask & taint_bits ))
+if [[ "$result" -ne 0 ]]; then
+ exit 1
+fi
+
+exit 0
--
2.37.1.595.g718a3a8f04-goog
寄件人:JosephOpick <linux-kselftest(a)vger.kernel.org>
主旨:The Telegraph: Mude von Arbeit und Schulden? Raus aus dieser Scheie?
郵件內文:
Mude von niedrigen Lohnen und hohen Benzinpreisen? Es gibt eine Losung http://news-kc.cavemanorganics.com/news-bild-4196
--
This e-mail was sent from a contact form on Hearingaid (http://hearingaid.com.hk)
Hi Linus,
Please pull the following KUnit fixes update for Linux 6.0-rc3.
This KUnit fixes update for Linux 6.0-rc3 consists of fixes to mmc
test and fix to load .kunit_test_suites section when CONFIG_KUNIT=m,
and not just when KUnit is built-in.
Please note that this KUnit update touches mmc driver Kconfig and
kernel/module/main.c.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 568035b01cfb107af8d2e4bd2fb9aea22cf5b868:
Linux 6.0-rc1 (2022-08-14 15:50:18 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-kunit-fixes-6.0-rc3
for you to fetch changes up to 41a55567b9e31cb852670684404654ec4fd0d8d6:
module: kunit: Load .kunit_test_suites section when CONFIG_KUNIT=m (2022-08-15 13:51:07 -0600)
----------------------------------------------------------------
linux-kselftest-kunit-fixes-6.0-rc3
This KUnit fixes update for Linux 6.0-rc3 consists of fixes to mmc
test and fix to load .kunit_test_suites section when CONFIG_KUNIT=m,
and not just when KUnit is built-in.
----------------------------------------------------------------
David Gow (2):
mmc: sdhci-of-aspeed: test: Fix dependencies when KUNIT=m
module: kunit: Load .kunit_test_suites section when CONFIG_KUNIT=m
drivers/mmc/host/Kconfig | 1 +
kernel/module/main.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------
Hi Linus,
Please pull the following Kselftest update for Linux 6.0-rc3.
This Kselftest fixes update for Linux 6.0-rc3 consists of fixes
and warnings to vm and sgx test builds.
sgx test fails to build without this change on new distros.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 568035b01cfb107af8d2e4bd2fb9aea22cf5b868:
Linux 6.0-rc1 (2022-08-14 15:50:18 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-fixes-6.0-rc3
for you to fetch changes up to bdbf0617bbc3641af158d1aeffeebb1505f76263:
selftests/vm: fix inability to build any vm tests (2022-08-19 17:57:20 -0600)
----------------------------------------------------------------
linux-kselftest-fixes-6.0-rc3
This Kselftest fixes update for Linux 6.0-rc3 consists of fixes
and warnings to vm and sgx test builds.
----------------------------------------------------------------
Axel Rasmussen (1):
selftests/vm: fix inability to build any vm tests
Kristen Carlson Accardi (1):
selftests/sgx: Ignore OpenSSL 3.0 deprecated functions warning
tools/testing/selftests/lib.mk | 1 +
tools/testing/selftests/sgx/sigstruct.c | 6 ++++++
2 files changed, 7 insertions(+)
----------------------------------------------------------------