[Bug 2073934] [NEW] tests/integration/test_hookutils.py::T::test_recent_syslog_overflow fails on ppc64el

Benjamin Drung 2073934 at bugs.launchpad.net
Tue Jul 23 22:10:11 UTC 2024


Public bug reported:

The Apport 2.29.0 test case
`tests/integration/test_hookutils.py::T::test_recent_syslog_overflow`
fails on ppc64el:

```
334s =================================== FAILURES ===================================
334s ________________________ T.test_recent_syslog_overflow _________________________
334s 
334s self = <tests.integration.test_hookutils.T testMethod=test_recent_syslog_overflow>
334s 
334s     def test_recent_syslog_overflow(self):
334s         """recent_syslog on a huge file"""
334s         log = os.path.join(self.workdir, "syslog")
334s         with open(log, "w", encoding="utf-8") as f:
334s             lines = 1000000
334s             while lines >= 0:
334s                 f.write("Apr 20 11:30:00 komputer kernel: bogus message\n")
334s                 lines -= 1
334s     
334s         mem_before = self._get_mem_usage()
334s         data = apport.hookutils.recent_syslog(re.compile("kernel"), path=log)
334s         mem_after = self._get_mem_usage()
334s         delta_kb = mem_after - mem_before
334s         sys.stderr.write(f"[Δ {delta_kb} kB] ")
334s         self.assertLess(delta_kb, 5000)
334s     
334s >       self.assertRegex(data, "^Apr 20 11:30:00 komputer kernel: bogus message\n")
334s E       AssertionError: Regex didn't match: '^Apr 20 11:30:00 komputer kernel: bogus message\n' not found in ''
334s 
334s tests/integration/test_hookutils.py:372: AssertionError
334s ----------------------------- Captured stderr call -----------------------------
334s [Δ 0 kB] 
```

Full log: https://autopkgtest.ubuntu.com/results/autopkgtest-
oracular/oracular/ppc64el/a/apport/20240619_111133_19d11@/log.gz

** Affects: apport (Ubuntu)
     Importance: Undecided
         Status: New

** Summary changed:

- tests/integration/test_hookutils.py::T::test_recent_syslog fails on ppc64el and s390x
+ tests/integration/test_hookutils.py::T::test_recent_syslog fails on ppc64el

** Summary changed:

- tests/integration/test_hookutils.py::T::test_recent_syslog fails on ppc64el
+ tests/integration/test_hookutils.py::T::test_recent_syslog_overflow fails on ppc64el

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/2073934

Title:
  tests/integration/test_hookutils.py::T::test_recent_syslog_overflow
  fails on ppc64el

Status in apport package in Ubuntu:
  New

Bug description:
  The Apport 2.29.0 test case
  `tests/integration/test_hookutils.py::T::test_recent_syslog_overflow`
  fails on ppc64el:

  ```
  334s =================================== FAILURES ===================================
  334s ________________________ T.test_recent_syslog_overflow _________________________
  334s 
  334s self = <tests.integration.test_hookutils.T testMethod=test_recent_syslog_overflow>
  334s 
  334s     def test_recent_syslog_overflow(self):
  334s         """recent_syslog on a huge file"""
  334s         log = os.path.join(self.workdir, "syslog")
  334s         with open(log, "w", encoding="utf-8") as f:
  334s             lines = 1000000
  334s             while lines >= 0:
  334s                 f.write("Apr 20 11:30:00 komputer kernel: bogus message\n")
  334s                 lines -= 1
  334s     
  334s         mem_before = self._get_mem_usage()
  334s         data = apport.hookutils.recent_syslog(re.compile("kernel"), path=log)
  334s         mem_after = self._get_mem_usage()
  334s         delta_kb = mem_after - mem_before
  334s         sys.stderr.write(f"[Δ {delta_kb} kB] ")
  334s         self.assertLess(delta_kb, 5000)
  334s     
  334s >       self.assertRegex(data, "^Apr 20 11:30:00 komputer kernel: bogus message\n")
  334s E       AssertionError: Regex didn't match: '^Apr 20 11:30:00 komputer kernel: bogus message\n' not found in ''
  334s 
  334s tests/integration/test_hookutils.py:372: AssertionError
  334s ----------------------------- Captured stderr call -----------------------------
  334s [Δ 0 kB] 
  ```

  Full log: https://autopkgtest.ubuntu.com/results/autopkgtest-
  oracular/oracular/ppc64el/a/apport/20240619_111133_19d11@/log.gz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/2073934/+subscriptions




More information about the foundations-bugs mailing list