test_omit_all_processes_except_one is racy and fails sometimes

Bug #1989365 reported by Benjamin Drung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Apport
Fix Released
High
Unassigned
apport (Ubuntu)
Fix Released
High
Unassigned

Bug Description

The test case test_omit_all_processes_except_one is racy and fails sometimes:

```
test_omit_all_processes_except_one (tests.system.test_unkillable_shutdown.TestUnkillableShutdown)
unkillable_shutdown will write exactly one report. ... Running as unit: run-r0b0d3fe87473410c9eb61a5ae4635938.service
FAIL
======================================================================
FAIL: test_omit_all_processes_except_one (tests.system.test_unkillable_shutdown.TestUnkillableShutdown)
unkillable_shutdown will write exactly one report.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest.JJoBfX/autopkgtest_tmp/tests/system/test_unkillable_shutdown.py", line 96, in test_omit_all_processes_except_one
    pid = self._launch_process_with_different_session_id(existing_pids)
  File "/tmp/autopkgtest.JJoBfX/autopkgtest_tmp/tests/system/test_unkillable_shutdown.py", line 90, in _launch_process_with_different_session_id
    self.assertEqual(len(test_executable_pids), 1, test_executable_pids)
AssertionError: 0 != 1 : set()

----------------------------------------------------------------------
```

autopkgtest log: https://autopkgtest.ubuntu.com/results/autopkgtest-kinetic/kinetic/amd64/a/apport/20220912_055849_5f03e@/log.gz

Benjamin Drung (bdrung)
Changed in apport (Ubuntu):
importance: Undecided → High
Changed in apport:
importance: Undecided → High
milestone: none → 2.24.0
Changed in apport (Ubuntu):
status: New → Confirmed
Revision history for this message
Benjamin Drung (bdrung) wrote :
Revision history for this message
Benjamin Drung (bdrung) wrote :
Changed in apport:
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.23.0-0ubuntu2

---------------
apport (2.23.0-0ubuntu2) kinetic; urgency=medium

  * tests: Wait for test process to be started (LP: #1989365)
  * tests: Fix psutil.NoSuchProcess in wait_for_gdb_child_process
    (LP: #1989371)

 -- Benjamin Drung <email address hidden> Thu, 15 Sep 2022 14:04:42 +0200

Changed in apport (Ubuntu):
status: Confirmed → Fix Released
Benjamin Drung (bdrung)
Changed in apport:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.