The basic test case was previously used to test if messages are correctly logged over UNIX, INET, and INET6 transport. This single case can be split up into three separate tests to decrease code complexity and offer more granular results. Both INET and INET6 cases will be skipped if the kernel does not support the corresponding transport.
Details
Details
- Reviewers
markj zlei - Commits
- rGb872bb720630: syslogd: Split up basic test case
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 60749 Build 57633: arc lint + arc unit
Event Timeline
usr.sbin/syslogd/tests/syslogd_test.sh | ||
---|---|---|
185–188 |
Or maybe it is better to have separate test cases, aka test_unix, test_inet and test_inet6 ? |
Comment Actions
- Use sysctl's -n flag to print value without variable name. Silly mistake on my part.
- Skip test if INET and INET6 are unsupported by kernel.
Comment Actions
Separate the "basic" test into three separate tests:
- unix
- inet
- inet6
Thanks to @zlei for the suggestion.
usr.sbin/syslogd/tests/syslogd_test.sh | ||
---|---|---|
148 | Unfortunately, the way this works is that the sysctl simply doesn't exist if the feature isn't there. So you have to write something like: if [ "$(sysctl -n kern.features.inet)" -ne 1 ]; then atf_skip fi You might also want to make sure that atf_skip can be used in the test case head. It might be fine, but it should be double-checked if you haven't already. |