[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1099085: apparmor: FTBFS on riscv64: subprocess.TimeoutExpired



Package: apparmor
Version: 4.1.0~beta5-2
Severity: serious
Tags: ftbfs patch
User: debian-riscv@lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: debian-riscv@lists.debian.org

Dear Maintainer,

Now apparmor has one FTBFS issue on riscv64 due to timeout on test case:

```
...
ERROR: test_allow_all (__main__.TestLogprof.test_allow_all)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
  "/build/reproducible-path/apparmor-4.1.0~beta5/utils.python3.13/test/test-logprof.py",
  line 129, in test_allow_all
      self.process.wait(timeout=0.3)
          ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
	    File "/usr/lib/python3.13/subprocess.py", line 1276, in wait
	        return self._wait(timeout=timeout)
		           ~~~~~~~~~~^^^^^^^^^^^^^^^^^
	   File "/usr/lib/python3.13/subprocess.py", line 2060, in _wait
		raise TimeoutExpired(self.args, timeout) 
		subprocess.TimeoutExpired: Command '['/usr/bin/python3.13', '../aa-logprof', '--allow-all', '--configdir', './', '-f', './logprof/ping.auditlog', '-d', '/tmp/aa-test-aj9tsnoi/profiles', '--no-check-mountpoint', '--output-dir', '/tmp/aa-test-aj9tsnoi']' timed out after 0.3 seconds
...

```

Full log please to see here:
https://buildd.debian.org/status/fetch.php?pkg=apparmor&arch=riscv64&ver=4.1.0%7Ebeta5-2&stamp=1740485392&raw=0

The fixing is very easy and it works on my local Unmatched board, but I
am not sure if it's appropriate to send this patch given there is one
beta hint on uploading. Unfortunately, it was failed to build again
during python3.13, this may block something. So could you have a look at
this? Please let me know if any issues.

-- 
Regards,
--
  Bo YU

diff -Nru apparmor-4.1.0~beta5/debian/changelog apparmor-4.1.0~beta5/debian/changelog
--- apparmor-4.1.0~beta5/debian/changelog	2025-02-20 20:41:37.000000000 +0000
+++ apparmor-4.1.0~beta5/debian/changelog	2025-02-27 02:23:26.000000000 +0000
@@ -1,3 +1,10 @@
+apparmor (4.1.0~beta5-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Increase the timeout on riscv64 to pass test cases. (Closes: #-1) 
+
+ -- Bo YU <vimer@debian.org>  Thu, 27 Feb 2025 02:23:26 +0000
+
 apparmor (4.1.0~beta5-2) unstable; urgency=medium
 
   * Revert "gbp.conf: set debian-branch to debian/experimental"
diff -Nru apparmor-4.1.0~beta5/debian/patches/increase-test-timeout-rv64.patch apparmor-4.1.0~beta5/debian/patches/increase-test-timeout-rv64.patch
--- apparmor-4.1.0~beta5/debian/patches/increase-test-timeout-rv64.patch	1970-01-01 00:00:00.000000000 +0000
+++ apparmor-4.1.0~beta5/debian/patches/increase-test-timeout-rv64.patch	2025-02-27 02:22:57.000000000 +0000
@@ -0,0 +1,22 @@
+--- a/utils/test/test-logprof.py
++++ b/utils/test/test-logprof.py
+@@ -14,6 +14,7 @@
+ import subprocess
+ import sys
+ import unittest
++import platform
+ 
+ # import apparmor.aa as aa  # see the setup_aa() call for details
+ from common_test import AATest, read_file, setup_all_loops  # , setup_aa
+@@ -126,7 +127,10 @@
+             output = self.process.stdout.readline().decode("utf-8").strip()
+             self.assertEqual(output, line)
+         # give logprof some time to write the updated profile and terminate
+-        self.process.wait(timeout=0.3)
++        if platform.machine() == 'riscv64':
++            self.process.wait(timeout=0.6)
++        else:
++            self.process.wait(timeout=0.3)
+         self.assertEqual(self.process.returncode, 0)
+ 
+ 
diff -Nru apparmor-4.1.0~beta5/debian/patches/series apparmor-4.1.0~beta5/debian/patches/series
--- apparmor-4.1.0~beta5/debian/patches/series	2025-02-20 20:41:37.000000000 +0000
+++ apparmor-4.1.0~beta5/debian/patches/series	2025-02-27 02:20:17.000000000 +0000
@@ -9,3 +9,4 @@
 # ubuntu/mimeinfo-snap-support.patch
 # ubuntu/profiles-grant-access-to-systemd-resolved.patch
 # ubuntu/enable-pinning-of-pre-AppArmor-3.x-poli.patch
+increase-test-timeout-rv64.patch

Attachment: signature.asc
Description: PGP signature


Reply to: