Page MenuHomeFreeBSD

Fix sys/kern/coredump_phnum_test in case of kern.compress_user_cores=1
ClosedPublic

Authored by olivier on Sep 24 2019, 7:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 28 2024, 8:47 AM
Unknown Object (File)
Jan 18 2024, 3:57 AM
Unknown Object (File)
Jan 13 2024, 11:37 PM
Unknown Object (File)
Jan 9 2024, 8:47 PM
Unknown Object (File)
Dec 23 2023, 3:04 PM
Unknown Object (File)
Dec 20 2023, 8:33 AM
Unknown Object (File)
Dec 18 2023, 10:45 AM
Unknown Object (File)
Nov 29 2023, 11:22 AM
Subscribers

Details

Summary

On systems configured with kern.compress_user_cores=1, this test will always fail

Test Plan

Before this patch:

# sysctl kern.compress_user_cores=1
kern.compress_user_cores: 0 -> 1
# kyua test -k /usr/tests/Kyuafile sys/kern/coredump_phnum_test
sys/kern/coredump_phnum_test:coredump_phnum  ->  failed: Helper program did not dump core  [3.014s]

Results file id is usr_tests.20190924-072623-834696
Results saved to /root/.kyua/store/results.usr_tests.20190924-072623-834696.db

0/1 passed (1 failed)

After this patch:

# sysctl kern.compress_user_cores=1
kern.compress_user_cores: 0 -> 1
# kyua test -k /usr/tests/Kyuafile sys/kern/coredump_phnum_test
sys/kern/coredump_phnum_test:coredump_phnum  ->  passed  [2.003s]

Results file id is usr_tests.20190924-072755-601239
Results saved to /root/.kyua/store/results.usr_tests.20190924-072755-601239.db

1/1 passed (0 failed)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Sep 24 2019, 2:35 PM

allow_sysctl_side_effects is set in the test already — LGTM!
Macro goforit:

Coincidentally, I have a different fix for this in a work-in-progress tree. My change keeps the current value of kern.compress_user_cores and decompresses the core file. It has the advantage of providing test coverage for kern.compress_user_cores (if the user enables it). I can't find any existing test coverage.

See D21820. What do you think?

Coincidentally, I have a different fix for this in a work-in-progress tree. My change keeps the current value of kern.compress_user_cores and decompresses the core file. It has the advantage of providing test coverage for kern.compress_user_cores (if the user enables it). I can't find any existing test coverage.

See D21820. What do you think?

That your fix is better than mine :-)
So feel free to overwrite my changes with yours.

See D21820. What do you think?

That your fix is better than mine :-)
So feel free to overwrite my changes with yours.

Thank you! If that counts as "Reviewed by", would you mind approving D21820?