Move libcasper tests from regression/capsicum/libcasper/ to the lib/libcasper/service/${service_name}/tests .
Change Makefiles to produce kyua tests.
Details
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
lib/libcasper/Makefile | ||
---|---|---|
6–7 | Agreed. This looks incorrect, potentially. If there's an issue with ordering of the subdirectories, it should be: SUBDIR_PARALLEL= SUBDIR_DEPEND_services=libcasper | |
lib/libcasper/services/cap_dns/Makefile | ||
18 | Make sure LIBDIR is correct though before doing that to avoid incorrectly installing it to /usr/lib . | |
lib/libcasper/services/cap_dns/tests/Makefile | ||
3 | Please use dns_test | |
lib/libcasper/services/cap_dns/tests/dns.c | ||
128–130 | errx(1, "..."); ? | |
228 | (Picking a random item) These hardcoded addresses/ports should really be #defines. | |
230 | What if this happens? Should the test exit? Also, what happens if the kernel was compiled with !INET? | |
260 | Uhhhhhhh... why 25 (smtp)? Some IT groups might specifically block port 25. Is there an alternate port that can be used? Also, this could use "getservbyname" for clarity. | |
298–300 | Bleh.. I don't like this assumption. | |
302 | Check the result of inet_pton? | |
314–315 | Same comments as above. | |
lib/libcasper/services/cap_grp/tests/Makefile | ||
3 | grp_test please. | |
lib/libcasper/services/cap_grp/tests/grp.c | ||
67–68 | Ew? Is there a better way we could be using than this? | |
144 | Why is the return value of this function being ignored? | |
168 | Same as above. | |
191–195 | Hardcoded group names... should be #defines. | |
266 | nitems(cmds) - 1 instead of 7? | |
267 | nitems(names) - 1 | |
294–296 | Use nitems(...) - 1 here? | |
lib/libcasper/services/cap_sysctl/tests/Makefile | ||
3 | sysctl_test ? | |
lib/libcasper/services/cap_sysctl/tests/sysctl.c | ||
186 | Can these subtests please be broken down a bit further (even if they're in separate functions)? It'll make converting them to ATF much easier.. |
Fix some issue pointed out by emaste@ and ngie@ with moving tests to different directory.
@ngie Thank you very much for all those comments. This patch suppose only to move tests to different directory.
You made a lot of good points about those tests, so I will fix them in next patch. Do you think I should first fix all problems you pointed out? Or can I commit moving patch and then do fixes?
I think it's fair to move the tests first, and follow up with improvements in subsequent commits.