Skip to content

Commit

Permalink
KCM: Clean the pipe after the test has finished
Browse files Browse the repository at this point in the history
Tests where sometimes failing because they were opening the pipe
while KCM was shutting down. This was happening because tests were
successfully opening the pipe because it was left over by the
previous instance of KCM. So to avoid this we immediately remove
the pipe during teardown. With this, tests will fail to open it
and keep trying until it is re-created by the new instance of KCM.
  • Loading branch information
aplopez committed Oct 18, 2023
1 parent bef8df5 commit b14a773
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tests/intg/test_kcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ def kcm_teardown():
except OSError as osex:
if osex.errno == 2:
pass
try:
os.unlink(abs_sock_path)
except OSError as osex:
if osex.errno == 2:
pass

request.addfinalizer(kcm_teardown)
return kcm_pid
Expand Down

0 comments on commit b14a773

Please sign in to comment.