I run the test locally on a vm running linux-oracle-5.15-1029.
It seems `syscall(__NR__sysctl, NULL)` returns ENOSYS(38) -- Function not 
implemented.
Checking `/proc/kallsyms` it seems sysctl is not implemented indeed.

If I take a closer look at jammy-ubuntu tag in systemd source (test that is not 
failing currently)
I can see that it asserts for either EFAULT or ENOSYS:

assert_se(IN_SET(errno, EFAULT, ENOSYS));

This patch will solve the issue:

diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c
index 67900d85e..7ebcca4d3 100644
--- a/src/test/test-seccomp.c
+++ b/src/test/test-seccomp.c
@@ -307,7 +307,7 @@ static void test_protect_sysctl(void) {
         if (pid == 0) {
 #if defined __NR__sysctl && __NR__sysctl >= 0
                 assert_se(syscall(__NR__sysctl, NULL) < 0);
-                assert_se(errno == EFAULT);
+                assert_se(IN_SET(errno, EFAULT, ENOSYS));
 #endif

                 assert_se(seccomp_protect_sysctl() >= 0);

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1933090

Title:
  systemd/245.4-4ubuntu3.6 ADT test failure with linux-
  hwe-5.11/5.11.0-20.21~20.04.1

Status in linux-hwe-5.11 package in Ubuntu:
  Won't Fix
Status in linux-hwe-5.15 package in Ubuntu:
  New
Status in systemd package in Ubuntu:
  New
Status in linux-hwe-5.11 source package in Focal:
  Won't Fix
Status in linux-hwe-5.15 source package in Focal:
  New
Status in systemd source package in Focal:
  New

Bug description:
  This is a scripted bug report about ADT failures while running systemd
  tests for linux-hwe-5.11/5.11.0-20.21~20.04.1 on focal. Whether this
  is caused by the dep8 tests of the tested source or the kernel has yet
  to be determined.

  Testing failed on:
      amd64: 
https://autopkgtest.ubuntu.com/results/autopkgtest-focal/focal/amd64/s/systemd/20210611_220645_bf5b6@/log.gz
      armhf: 
https://autopkgtest.ubuntu.com/results/autopkgtest-focal/focal/armhf/s/systemd/20210617_124738_5b554@/log.gz
      ppc64el: 
https://autopkgtest.ubuntu.com/results/autopkgtest-focal/focal/ppc64el/s/systemd/20210611_235629_92856@/log.gz
      s390x: 
https://autopkgtest.ubuntu.com/results/autopkgtest-focal/focal/s390x/s/systemd/20210611_214456_6427f@/log.gz

  In arm64, ppc64el and s390x, 'root-unittests' fails with:

  /* test_protect_sysctl */
  Assertion 'errno == EFAULT' failed at src/test/test-seccomp.c:311, function 
test_protect_sysctl(). A
  borting.
  sysctlseccomp terminated by signal ABRT.
  Assertion 'wait_for_terminate_and_check("sysctlseccomp", pid, WAIT_LOG) == 
EXIT_SUCCESS' failed at s
  rc/test/test-seccomp.c:324, function test_protect_sysctl(). Aborting.
  FAIL: test-seccomp (code: 134)

  In amd64, 'upstream' also fails on 'TEST-24-UNIT-TESTS', which
  apparently is caused by the same 'test-seccomp.c:311' assertion
  failure.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-hwe-5.11/+bug/1933090/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to