Skip to content

RFC tests reorg #381

@evelikov

Description

@evelikov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions