RFC tests reorg

Aperta
#381 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
12/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
c
Ambito
testing

Direzione di ricerca

This is a proposal to reorganise the C test suite, not a ready change. Start by reading the test sources the issue names (test-blacklist.c, test-dependencies.c, test-loaded.c, test-modprobe, test-weakdep) and the results of running test-foo --list across the test binaries. Any work needs maintainer agreement on each item first, since the thread has no decision after 82 days. Done means the maintainers have chosen which items to adopt and a consolidated test layout is merged.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

While going through the earlier test PRs (https://github.com/kmod-project/kmod/pull/258 and https://github.com/kmod-project/kmod/pull/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.

Lingua principale
C
Stelle
116
Fork
70
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di kmod-project/kmod

Tutte le issue di kmod-project/kmod

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.