coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

timeout: catch TERM signal

Open Luv-Ray opened this issue 5 months ago • 2 comments

fixes #8040 set a signal handler and terminate child process on receiving SIGTERM. I'm a bit confused about how to write tests for it, is it appropriate to use ps and kill in ci?

Luv-Ray avatar Jun 16 '25 02:06 Luv-Ray

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

github-actions[bot] avatar Jun 16 '25 04:06 github-actions[bot]

GNU testsuite comparison:

Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)

github-actions[bot] avatar Jun 17 '25 02:06 github-actions[bot]

I have added a very similar test for sleep and SIGSEGV. You can probably write a very similar test.

Ecordonnier avatar Jun 20 '25 19:06 Ecordonnier

@Luv-Ray : I tried to write a test. Feel free to integrate it to your pull request: https://github.com/martinkunkel2/coreutils/commit/e4591cdf8fec016f7589f921e3def88249ac131c

martinkunkel2 avatar Jun 22 '25 10:06 martinkunkel2

Looks like a good test too

sylvestre avatar Jun 22 '25 12:06 sylvestre

@Luv-Ray : I tried to write a test. Feel free to integrate it to your pull request: martinkunkel2@e4591cd

Thank you so much :heart:

Luv-Ray avatar Jun 22 '25 12:06 Luv-Ray

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)

github-actions[bot] avatar Jun 22 '25 13:06 github-actions[bot]

@sylvestre could you please retrigger the CICD / Build (macos-13, x86_64-apple-darwin, feat_os_macos, true) (pull_request)? Looks like a sporadic issue

martinkunkel2 avatar Jun 23 '25 17:06 martinkunkel2

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

github-actions[bot] avatar Jun 27 '25 09:06 github-actions[bot]

@sylvestre : could that one be integrated? I am running into issues with gnu test suite locally as the testsuite uses this feature (send SIGTERM to timeout) and a lot of processes remain active after gnu test suite has completed.

martinkunkel2 avatar Jul 04 '25 15:07 martinkunkel2

Thanks everyone!

cakebaker avatar Jul 05 '25 15:07 cakebaker