test: fix CAP_KILL e2e test to be backwards-compatible with openjd-sessions versions #494
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



What was the problem/requirement? (What/Why)
The
mainlineLinux canaries were failing thetest_cap_kill_not_inherited_by_running_jobsE2E test with:The output formatting does not match the expected pattern. This is because the E2E test was developed and tested in #479 using an unreleased
openjd-sessionsversion.Specifically, there was a change to use
exechere which cause thekillcommand being ran in the test's job template here from using thekillbash built-in command to instead use thekillGNU program (docs). This causes a change in the error output captured in standard output.What was the solution? (How)
Broaden the expected output of the test to accept both the format produced by the bash built-in and the GNU program.
What is the impact of this change?
The tests will pass for existing
openjd-sessionsversions and for futureopenjd-sessionsversions.How was this change tested?
Ran the E2E test with both the
0.9.0release ofopenjd-sessionsand themainlineversion ofopenjd-sessionsusing theOPENJD_SESSIONS_WHL_PATHenv var (docs). Confirmed the E2E test passed in both test runs.Was this change documented?
Added code comments to the E2E test explaining why the expected output pattern has two variants.
Is this a breaking change?
No
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.