Skip to content

Conversation

@apostasie
Copy link
Contributor

@apostasie apostasie commented Feb 24, 2025

Fix #3908

Currently, tests involving signals have issues:

  • bash sig proxy code is duplicated
  • tests are flaky, as they may not wait for the container to start or the trap to be set - and/or use arbitrary sleep waits
  • a couple of these tests only test half of what they should (if the shell script exits when trapping the signal, we fail to test that the container should exit or restart on its own, and not through the script exiting its loop)

This PR does:

  • expose the ability to send a signal to the tested command (in test tooling)
  • rewrite the SigProxy helper with the new test framework and expanded abilities
  • rewrite the tests themselves, fixing the aforementioned shortcomings

Hopefully these tests should stop flaking out (assuming log will be reliable in these cases).

Note that this PR likely conflicts with other in-flight PR impacting test tooling (specifically #3889).
Depending on merge order, I will rebase of course.

Signed-off-by: apostasie <spam_blackhole@farcloser.world>
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
@apostasie
Copy link
Contributor Author

Rebased.

@apostasie apostasie closed this Feb 25, 2025
@apostasie apostasie reopened this Feb 25, 2025
@apostasie apostasie closed this Feb 25, 2025
@apostasie apostasie reopened this Feb 25, 2025
@AkihiroSuda AkihiroSuda added this to the v2.0.4 milestone Feb 25, 2025
@AkihiroSuda AkihiroSuda added the area/ci e.g., CI failure label Feb 25, 2025
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit fc25516 into containerd:main Feb 25, 2025
70 of 90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci e.g., CI failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: tests sending signals to be caught by in-container shell scripts are racy

2 participants