Hi Linus,
Please pull the following fixes update for Linux 5.11-rc3.
This fixes update for 5.11-rc3 consists of two minor fixes to vDSO test
changes in 5.11-rc1 update.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62:
Linux 5.11-rc2 (2021-01-03 15:55:30 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
tags/linux-kselftest-next-5.11-rc3
for you to fetch changes up to df00d02989024d193a6efd1a85513a5658c6a10f:
selftests/vDSO: fix -Wformat warning in vdso_test_correctness
(2021-01-04 09:25:45 -0700)
----------------------------------------------------------------
linux-kselftest-next-5.11-rc3
This fixes update for 5.11-rc3 consists of two minor fixes to vDSO test
changes in 5.11-rc1 update.
----------------------------------------------------------------
Tobias Klauser (2):
selftests/vDSO: add additional binaries to .gitignore
selftests/vDSO: fix -Wformat warning in vdso_test_correctness
tools/testing/selftests/vDSO/.gitignore | 3 +++
tools/testing/selftests/vDSO/vdso_test_correctness.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------
Hi Linus,
Please pull the following KUnit fixes update for Linux 5.11-rc3.
This kunit update for Linux 5.11-rc3 consists one fix to force the use
of the 'tty' console for UML. Given that kunit tool requires the console
output, explicitly stating the dependency makes sense than relying on
it being the default.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62:
Linux 5.11-rc2 (2021-01-03 15:55:30 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
tags/linux-kselftest-kunit-fixes-5.11-rc3
for you to fetch changes up to 65a4e5299739abe0888cda0938d21f8ea3b5c606:
kunit: tool: Force the use of the 'tty' console for UML (2021-01-04
09:18:38 -0700)
----------------------------------------------------------------
linux-kselftest-kunit-fixes-5.11-rc3
This kunit update for Linux 5.11-rc3 consists one fix to force the use
of the 'tty' console for UML. Given that kunit tool requires the console
output, explicitly stating the dependency makes sense than relying on
it being the default.
----------------------------------------------------------------
David Gow (1):
kunit: tool: Force the use of the 'tty' console for UML
tools/testing/kunit/kunit_kernel.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------
kunit_tool relies on the UML console outputting printk() output to the
tty in order to get results. Since the default console driver could
change, pass 'console=tty' to the kernel.
This is triggered by a change[1] to use ttynull as a fallback console
driver which -- by chance or by design -- seems to have changed the
default console output on UML, breaking kunit_tool. While this may be
fixed, we should be less fragile to such changes in the default.
[1]:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
Signed-off-by: David Gow <davidgow(a)google.com>
Fixes: 757055ae8ded ("init/console: Use ttynull as a fallback when there is no console")
---
tools/testing/kunit/kunit_kernel.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py
index 57c1724b7e5d..698358c9c0d6 100644
--- a/tools/testing/kunit/kunit_kernel.py
+++ b/tools/testing/kunit/kunit_kernel.py
@@ -198,7 +198,7 @@ class LinuxSourceTree(object):
return self.validate_config(build_dir)
def run_kernel(self, args=[], build_dir='', timeout=None):
- args.extend(['mem=1G'])
+ args.extend(['mem=1G', 'console=tty'])
self._ops.linux_bin(args, timeout, build_dir)
outfile = get_outfile_path(build_dir)
subprocess.call(['stty', 'sane'])
--
2.29.2.729.g45daf8777d-goog
Hi!
For last few weeks KUnit stopped working. Any insight?
P.S. I guess no need to tell that my kernel on which I run tests has not been
changed as well as command line for wrapper:
tools/testing/kunit/kunit.py run --build_dir ~/$OUT_DIR
--
With Best Regards,
Andy Shevchenko
Initially I just wanted to port the selftests to the latest GPIO uAPI,
but on finding that, due to dependency issues, the selftests are not built
for the buildroot environments that I do most of my GPIO testing in, I
decided to take a closer look.
The first patch is essentially a rewrite of the exising test suite.
It uses a simplified abstraction of the uAPI interfaces to allow a common
test suite to test the gpio-mockup using either of the uAPI interfaces.
The simplified cdev interface is implemented in gpio-mockup.sh, with the
actual driving of the uAPI implemented in gpio-mockup-cdev.c.
The simplified sysfs interface replaces gpio-mockup-sysfs.sh and is
loaded over the cdev implementation when selected.
The new tests should also be simpler to extend to cover new mockup
interfaces, such as the one Bart has been working on.
I have dropped support for testing modules other than gpio-mockup from
the command line options, as the tests are very gpio-mockup specific so
I didn't see any calling for it.
I have also tried to emphasise in the test output that the tests are
covering the gpio-mockup itself. They do perform some implicit testing
of gpiolib and the uAPI interfaces, and so can be useful as smoke tests
for those, but their primary focus is the gpio-mockup.
Patches 2 through 5 do some cleaning up that is now possible with the
new implementation, including enabling building in buildroot environments.
Patch 4 doesn't strictly clean up all the old gpio references that it
could - the gpio was the only Level 1 test, so the Level 1 tests could
potentially be removed, but I was unsure if there may be other
implications to removing a whole test level, or that it may be useful
as a placeholder in case other static LDLIBS tests are added in
the future??
Patch 6 finally gets around to porting the tests to the latest GPIO uAPI.
And Patch 7 updates the config to set the CONFIG_GPIO_CDEV option that
was added in v5.10.
Cheers,
Kent.
Kent Gibson (7):
selftests: gpio: rework and simplify test implementation
selftests: gpio: remove obsolete gpio-mockup-chardev.c
selftests: remove obsolete build restriction for gpio
selftests: remove obsolete gpio references from kselftest_deps.sh
tools: gpio: remove uAPI v1 code no longer used by selftests
selftests: gpio: port to GPIO uAPI v2
selftests: gpio: add CONFIG_GPIO_CDEV to config
tools/gpio/gpio-utils.c | 89 ----
tools/gpio/gpio-utils.h | 6 -
tools/testing/selftests/Makefile | 9 -
tools/testing/selftests/gpio/Makefile | 26 +-
tools/testing/selftests/gpio/config | 1 +
.../testing/selftests/gpio/gpio-mockup-cdev.c | 198 ++++++++
.../selftests/gpio/gpio-mockup-chardev.c | 323 ------------
.../selftests/gpio/gpio-mockup-sysfs.sh | 168 ++-----
tools/testing/selftests/gpio/gpio-mockup.sh | 469 ++++++++++++------
tools/testing/selftests/kselftest_deps.sh | 4 +-
10 files changed, 573 insertions(+), 720 deletions(-)
create mode 100644 tools/testing/selftests/gpio/gpio-mockup-cdev.c
delete mode 100644 tools/testing/selftests/gpio/gpio-mockup-chardev.c
--
2.30.0
When running this xfrm_policy.sh test script, even with some cases
marked as FAIL, the overall test result will still be PASS:
$ sudo ./xfrm_policy.sh
PASS: policy before exception matches
FAIL: expected ping to .254 to fail (exceptions)
PASS: direct policy matches (exceptions)
PASS: policy matches (exceptions)
FAIL: expected ping to .254 to fail (exceptions and block policies)
PASS: direct policy matches (exceptions and block policies)
PASS: policy matches (exceptions and block policies)
FAIL: expected ping to .254 to fail (exceptions and block policies after hresh changes)
PASS: direct policy matches (exceptions and block policies after hresh changes)
PASS: policy matches (exceptions and block policies after hresh changes)
FAIL: expected ping to .254 to fail (exceptions and block policies after hthresh change in ns3)
PASS: direct policy matches (exceptions and block policies after hthresh change in ns3)
PASS: policy matches (exceptions and block policies after hthresh change in ns3)
FAIL: expected ping to .254 to fail (exceptions and block policies after htresh change to normal)
PASS: direct policy matches (exceptions and block policies after htresh change to normal)
PASS: policy matches (exceptions and block policies after htresh change to normal)
PASS: policies with repeated htresh change
$ echo $?
0
This is because the $lret in check_xfrm() is not a local variable.
Therefore when a test failed in check_exceptions(), the non-zero $lret
will later get reset to 0 when the next test calls check_xfrm().
With this fix, the final return value will be 1. Make it easier for
testers to spot this failure.
Fixes: 39aa6928d462d0 ("xfrm: policy: fix netlink/pf_key policy lookups")
Signed-off-by: Po-Hsu Lin <po-hsu.lin(a)canonical.com>
---
tools/testing/selftests/net/xfrm_policy.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/xfrm_policy.sh b/tools/testing/selftests/net/xfrm_policy.sh
index 7a1bf94..5922941 100755
--- a/tools/testing/selftests/net/xfrm_policy.sh
+++ b/tools/testing/selftests/net/xfrm_policy.sh
@@ -202,7 +202,7 @@ check_xfrm() {
# 1: iptables -m policy rule count != 0
rval=$1
ip=$2
- lret=0
+ local lret=0
ip netns exec ns1 ping -q -c 1 10.0.2.$ip > /dev/null
--
2.7.4