Follow-up to https://reviews.freebsd.org/D7255 .
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 4548 Build 4600: arc lint + arc unit
Event Timeline
tests/sys/kern/coredump_phnum_test.sh | ||
---|---|---|
2 | Some other such tests don't have licensing. What's the suggested format for these? | |
7 | Ok. | |
17 | In head()? Ok. | |
34 | It doesn't have any real significance. It's just the correct result of running readelf against the output of the helper program. The helper program asks for 66535 mmap segments and ends up with 66169 kernel mappings. Well, ok, the significance is it's larger than 65535 (UINT16_MAX). The wrong (and previous) answer here is 633 (66169 mod 65536). |
tests/sys/kern/coredump_phnum_test.sh | ||
---|---|---|
34 | Please add a comment to this effect. |
Try to avoid violating ATF sandbox. Does it look okay now? Does the _cleanup
routine run in the same sandbox directory as the _body?
Added a comment about the magic numbers.
tests/sys/kern/Makefile | ||
---|---|---|
7 | I'd rather make this BINDIR.coredump_phnum_helper and move below with the test program definition. Otherwise it's not obvious why this is here. | |
tests/sys/kern/coredump_phnum_helper.c | ||
38 | Add comment to describe what this helper program is intended to do please. I find the fact that this never exits successfully surprising. | |
tests/sys/kern/coredump_phnum_test.sh | ||
14 | Remove indentation from generated script. | |
16 | Quote the $() expansion. | |
23 | Are all these system-wide changes guaranteed to succeed? I think you should make sure these calls all exit successfully, and error out otherwise. If there are legitimate cases for these calls to fail, then consider skipping the test case instead of failing it. | |
51 | Check for the existence of the script with "test -x" before running it. The script might not have been created before the cleanup runs if the test crashes early, and you don't want to double-error on cleanup. |
tests/sys/kern/Makefile | ||
---|---|---|
7 | I can move the line below. Does BINDIR.coredump_phnum_helper actually work? | |
tests/sys/kern/coredump_phnum_helper.c | ||
38 | I can add a comment. It does have "coredump" in the name… :-) | |
tests/sys/kern/coredump_phnum_test.sh | ||
14 | <<- does so. | |
16 | kern.coredump is an integer. | |
23 | They should all succeed (run by root). Is there a good way to set e in atf-sh tests? I suppose atf_check -s exit:0 would work. | |
51 | Ok. |
Move BINDIR near coredump_phnum_helper.
Add comment describing goals of coredump_phnum_helper.
Only run cleanup helper script if it exists and is executable.
tests/sys/kern/coredump_phnum_test.sh | ||
---|---|---|
23 | I don't think there's any reason for these to fail. |