Commit graph

12 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 7a17e41dcf test: drop whitespace after shell redirection operators
(The one case that is left unchanged is '< <(subcommand)'.)

This way, the style with no gap was already dominant. This way, the reader
immediately knows that ' < ' is a comparison operator and ' << ' is a shift.

In a few cases, replace custom EOF replacement by just EOF. There is no point
in using someting like "_EOL" unless "EOF" appears in the text.
2023-02-06 09:19:04 +01:00
Frantisek Sumsal 6b70d3cf81 test: store the key on a separate device 2022-05-26 15:06:41 +02:00
Frantisek Sumsal b22d90e594 test: generate a custom initrd for TEST-24 if $INITRD is unset
Co-Authored-By: Yu Watanabe <watanabe.yu+github@gmail.com>
2022-05-26 15:04:56 +02:00
Frantisek Sumsal 1fb7f8e15e test: cover initrd->sysroot transition in TEST-24
This should cover cases regarding devices with `OPTIONS+="db_persist"`
during initrd->sysroot transition.

See:
  * https://github.com/systemd/systemd/issues/23429
  * https://github.com/systemd/systemd/pull/23218
  * https://github.com/systemd/systemd/pull/23489
  * https://bugzilla.redhat.com/show_bug.cgi?id=2087225
2022-05-25 18:19:46 +02:00
Frantisek Sumsal 9bc10d3109 test: collect the coverage _before_ unmounting the rootfs
d'oh!
2021-10-21 18:12:06 +02:00
Frantisek Sumsal 0b5fe54ff5 test: collect coverage in a couple more codepaths
Otherwise we'd miss coverage from TEST-{02,24,61}, since they don't go
through the "standard" `check_result_common` hook.

Follow-up to 7bf20e48bd.
2021-10-20 16:46:58 +01:00
Zbigniew Jędrzejewski-Szmek 7b3cec95db tests: add spdx headers to scripts and Makefiles 2021-10-18 09:04:45 +02:00
Frantisek Sumsal c4cd6205e0 test: "detect" the test number automagically
Specifying the test number manually is tedious and prone to errors (as
recently proven). Since we have all the necessary data to work out the
test number, let's do it automagically.
2021-04-26 19:20:18 +02:00
Zbigniew Jędrzejewski-Szmek 7bf20e48bd test: move the logic to support /skipped into shared logic
The logic to query test state was rather complex. I don't quite grok the point
of ret=$((ret+1))… But afaics, the precise result was always ignored by the
caller anyway.
2021-04-23 15:12:35 +02:00
Frantisek Sumsal 3f161ba9bc test: make the test entrypoint scripts shellcheck-compliant 2021-04-20 10:26:43 +02:00
Luca Boccassi d9e606e89f tests: build the image once and then copy/extend it
Building custom images for each test takes a lot of time.
Build the default one, and if the test needs incompatible changes
just copy it and extend it instead.
2021-01-24 13:07:39 +00:00
Zbigniew Jędrzejewski-Szmek 9309a23b95 test: switch TEST-02-CRYPTSETUP and TEST-24-UNITTESTS
When tests are executed serially (the default), it seems better to launch
the fairly generic test that runs the unittests early in the sequence.
Right now the tests are ordered based on when they were written, but
this doesn't make much sense.
2020-09-24 17:02:20 +02:00