Page MenuHomeFreeBSD

Fix coredump_phnum_test when kern.compress_user_cores != 0
ClosedPublic

Authored by vangyzen on Sep 27 2019, 3:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 29, 12:54 AM
Unknown Object (File)
Oct 6 2024, 9:35 AM
Unknown Object (File)
Oct 5 2024, 8:24 AM
Unknown Object (File)
Oct 3 2024, 8:12 AM
Unknown Object (File)
Oct 2 2024, 6:28 PM
Unknown Object (File)
Oct 1 2024, 8:39 AM
Unknown Object (File)
Sep 24 2024, 6:15 AM
Unknown Object (File)
Sep 20 2024, 1:25 AM

Details

Summary

If kern.compress_user_cores is non-zero, decompress the core file.

Use sysctl -f to restore previous values.

Don't bother restoring ulimit -c, since that's a per-process value.

Check more commands with atf_check.

Test Plan
# sysctl kern.compress_user_cores=0
kern.compress_user_cores: 0 -> 0
# kyua test coredump_phnum_test
coredump_phnum_test:coredump_phnum  ->  passed  [4.233s]

Results file id is usr_tests_sys_kern.20190917-225547-131047
Results saved to /root/.kyua/store/results.usr_tests_sys_kern.20190917-225547-131047.db

1/1 passed (0 failed)


# sysctl kern.compress_user_cores=1
kern.compress_user_cores: 0 -> 1
# kyua test coredump_phnum_test
coredump_phnum_test:coredump_phnum  ->  passed  [4.369s]

Results file id is usr_tests_sys_kern.20190917-225555-085154
Results saved to /root/.kyua/store/results.usr_tests_sys_kern.20190917-225555-085154.db

1/1 passed (0 failed)


# sysctl kern.compress_user_cores=2
kern.compress_user_cores: 1 -> 2
# kyua test coredump_phnum_test
coredump_phnum_test:coredump_phnum  ->  passed  [1.112s]

Results file id is usr_tests_sys_kern.20190917-225604-053209
Results saved to /root/.kyua/store/results.usr_tests_sys_kern.20190917-225604-053209.db

1/1 passed (0 failed)

Diff Detail

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