While going through the earlier test PRs (#258 and #375), a few things of varying annoyance stood out. Each of these is mostly independent, so one can thumbs up/down individually or as a whole:
- inconsistent cleanups in error path - mostly addressed by latter PR, finish and merge
- custom checks vs
assert_return() - ditto
- test names (as per
test-foo --list) starting with test_ (61) vs not (55) - remove the prefix
- arbitrary/non-descriptive test names (
alias_1, from_alias, etc) - use util_alias, libkmod_new_from_alias, aka $top-level-dir_testname or $tool_testname
- ^^ for filenames (
test-blacklist.c, test-dependencies.c, test-loaded.c, etc) - use test-libkmod-foobar.c
- multiple-files-per-tool (
test-modprobe, test-weakdep, etc) - merge into one
- one-test-per-file (mostly likmod API) - merge, unless it causes problems
- dozen+ test binaries, non-unique testnames (practically identical/duplicated
test_remove), manually running tests (tab completion doesn't work in sh -c 'source ....) - fold into single binary
@lucasdemarchi @stoeckmann do let me know what you think. All of these are a net positive IMHO, with the* minus being the temporary churn. If you see any item as a potential deterrent from adding more test, please let me know.
While going through the earlier test PRs (#258 and #375), a few things of varying annoyance stood out. Each of these is mostly independent, so one can thumbs up/down individually or as a whole:
assert_return()- dittotest-foo --list) starting withtest_(61) vs not (55) - remove the prefixalias_1,from_alias, etc) - useutil_alias,libkmod_new_from_alias, aka$top-level-dir_testnameor$tool_testnametest-blacklist.c,test-dependencies.c,test-loaded.c, etc) - usetest-libkmod-foobar.ctest-modprobe,test-weakdep, etc) - merge into onetest_remove), manually running tests (tab completion doesn't work insh -c 'source ....) - fold into single binary@lucasdemarchi @stoeckmann do let me know what you think. All of these are a net positive IMHO, with the* minus being the temporary churn. If you see any item as a potential deterrent from adding more test, please let me know.