Assertion error in RootwrapTestCase.test_KillFilter within py39 / rhel9 OSP 18 job
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.rootwrap |
In Progress
|
Undecided
|
Unassigned |
Bug Description
we observe a failure in RPM job executed as part of Component CI for OSP 18
```
oslo_rootwrap.
-------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/home/
self.
File "/usr/lib64/
raise self.failureExc
AssertionError: False is not true
```
In the broken unit test described here, for the needs of the unit test, we launch the `cat` command in a python subprocess [1]. This subprocess allow us to retrieve the pid related to the `cat` command [2].
The match function of the KillFilter class is designed to see if the passed argument match the command to kill [3].
This test is based on the command related to the pid, however [4], in this case, the returned command for the pid of `cat` is `/usr/bin/
I think this is due to the way the rhel 9 containers are builts. As the call of the python os.readlink function [5] against `/proc/
From an oslo POV the code of oslo.rootwrap looks correct, and until now it never caused us issues.
I'll check if we can extend the test case to see if I can append coreutils at the list of tested values, but I wonder why this have suddently changed.
[1] https:/
[2] https:/
[3] https:/
[4] https:/
[5] https:/
Fix proposed to branch: master /review. opendev. org/c/openstack /oslo.rootwrap/ +/896492
Review: https:/