Commit Graph

545 Commits (master)

Author SHA1 Message Date
David Disseldorp 8104bf0e83 ci(TEST-63-DRACUT-CPIO): kernel extraction tests for dracut-cpio
dracut-cpio already carries a bunch of unit tests covering compression
and GNU cpio extraction. The purpose of these tests is to exercise the
dracut.sh --enhanced-cpio code-paths as well as kernel cpio archive
extraction.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2021-11-24 11:14:54 +01:00
David Disseldorp 3a0f423309 ci(TEST-62-SKIPCPIO): add simple skipcpio test
Signed-off-by: David Disseldorp <ddiss@suse.de>
2021-11-24 11:14:54 +01:00
David Disseldorp 86bba3d4d4 ci(test): export basedir and testdir as absolute paths
Individual test scripts may change working directory, so relative paths
should be avoided.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2021-11-24 11:14:54 +01:00
David Disseldorp 1c3f79fb0a ci(TEST-60-BONDBRIDGEVLANIFCFG): use toplevel Makefile
Signed-off-by: David Disseldorp <ddiss@suse.de>
2021-11-24 11:14:54 +01:00
Frantisek Sumsal 3f56d481e8 test: don't use `-cpu max` in GH Actions
There appears to be an issue with newer QEMU versions (spotted with Arch
Linux and C9S containers) which causes the respective GH Action to hang
when booting a QEMU VM in combination with the `-cpu max` parameter.

During (a particularly painful) debugging session I once managed to get
some output from such "frozen" machine (using `earlycon` and
`earlyprintk` kernel cmdline options), and in that particular case the
VM died with a trap caused by an invalid opcode.

I couldn't reproduce this locally, only in GH Actions environment with
Arch Linux and C9S containers. Also, so far I haven't found out which
specific CPUID flag causes this, but using the `IvyBridge-v2` feature
set seems to mitigate the issue.
2021-11-15 11:37:22 +00:00
Harald Hoyer fa63c9be13 ci: add shfmt to Fedora containers 2021-05-18 11:33:27 +02:00
Harald Hoyer c08bc8109d fix(base): split out `dracut-dev-lib.sh`
To share the `wait_for_dev` function and use it without side effects on
install time, split out the needed functions in an extra library.
2021-05-17 16:22:49 +02:00
Harald Hoyer b2cf61d97f ci: run the integration tests on more distributions
Add OpenSuse and Arch Linux to limited tests.

Only run the full tests against the latest stable Fedora version
to reduce the workload.

Also remove the `hung_task_panic=1` on the kernel command line, as qemu
tends to be really slow in non-kvm mode.
2021-05-14 13:08:07 +02:00
Harald Hoyer 12d0213885 ci: create a fedora rawhide container
Remove Fedora 34 for now, as it is fedora:latest
2021-05-14 12:39:40 +02:00
Harald Hoyer 8b2afb08ba fix: make testsuite pass on OpenSuse and Arch
This removes some hard assumptions about the file system layout.

It also hardens the tests with network interface renaming rules and
guards.
2021-05-14 08:34:38 +02:00
Harald Hoyer 805686930b ci: ensure pigz is installed in the CI containers
pigz speeds up things considerably. Although pigz is already installed
by default, explicitely adding it makes sure, it will not disappear
unnoticed.
2021-05-12 15:48:53 +02:00
Harald Hoyer e0c0791594 ci: add cpio and pigz to arch container 2021-05-12 15:26:07 +02:00
Harald Hoyer d24e67e24d ci: really, really cleanup the arch container 2021-05-12 14:59:42 +02:00
Harald Hoyer 886b04abfe ci: cleanup the arch container 2021-05-12 14:34:31 +02:00
Harald Hoyer c7d8334d26 ci: don't use `rpm` to determine the kernel version
for `/etc/profile.d/dracut-test.sh`
2021-05-12 14:21:00 +02:00
Harald Hoyer 3c67644fe6 ci: build container images and push to ghcr.io 2021-05-12 13:26:06 +02:00
Harald Hoyer 909961d048 fix: shellcheck 0.7.2
github action `luizm/action-sh-checker@v0.2.2` uses `shellcheck-0.7.2`,
which detects more non-posix shell code and complains accordingly.
2021-05-05 14:55:30 +02:00
Harald Hoyer 82e780af25 test(NFS): let it run in an Arch container
`dhclient` on Arch does not understand the `--timeout` parameter.

`/etc/virc` does not need to be installed in tests. This is a debugging
leftover.
2021-05-04 13:47:03 +02:00
Harald Hoyer ece67c7e2d test(FULL SYSTEMD): try pacman rather than rpm on Arch
If there is no `rpm`, try `pacman` to get a full list of systemd files
to install into the real test root.
2021-05-04 13:23:56 +02:00
Harald Hoyer 060e1f192e test: use `uname -m` to determine qemu-system
E.g. `uname -i` does not work in Arch Linux containers.
2021-05-04 10:14:08 +02:00
Jóhann B. Guðmundsson 69f4e7cdc3 fix(udev-rules): remove sourcing of network link files
Removing sourcing of network link files from the udev-rules module.
What always should be included should be placed in the systemd-network
module and other modules that provide/require spesific link files
should add them, themselves via their relevant include section.
2021-05-03 10:07:48 +02:00
Harald Hoyer 2c5bb67d83 test(ISCSI): fix the watchdog loop
Test for `pidof tgtd` and not the shell background jobs.
2021-04-26 14:13:41 +02:00
Harald Hoyer b92af86bd5 test: don't fail on modprobe btrfs in create-root.sh 2021-04-26 13:13:59 +02:00
Harald Hoyer b80ee08093 ci: use /dev/disk/by-id
Due to parallel probing of the linux kernel `/dev/sd*` can't be used to
reliably address a hard disk. This can be seen by the many spurious
failures of the dracut CI, where `mdadm` failed with error 524 or tests
failed due to the success marker message written to the wrong disk.

* don't rely on `/dev/sd*` but use disk ids and `/dev/disk/by-id/ata-disk_<name>`

* specify the exact qemu machine architecture `-M q35` needed for the
  disk ids. A later patch will move this to `run-qemu`, when all tests are converted

* due to `-M q35` the interface names have changed from
  `ens2` -> `enp0s1` and `ens3` -> `enp0s2`
2021-04-22 02:55:31 +02:00
Harald Hoyer 7790644362 fix(nbd): make nbd work again with systemd
* Correct the systemd generated sysroot.mount unit with the options
received by the DHCP request and do a `daemon-reload`.

* Inject the `nbd-client -check /dev/nbd0` in the finished initqueue.

* Reactivate the NBD tests and prepare them for NetworkManager tests.
2021-04-19 22:41:01 +02:00
Harald Hoyer 8cd50230d9 ci: use disk ids for TEST 35 ISCSI MULTI
Due to parallel probing of the linux kernel `/dev/sd*` can't be used to
reliably address a hard disk. This can be seen by the many spurious
failures of the dracut CI, where `mdadm` failed with error 524 or tests
failed due to the success marker message written to the wrong disk.

* don't rely on `/dev/sd*` but use disk ids and `/dev/disk/by-id/ata-disk_<name>`

* specify the exact qemu machine architecture `-M q35` needed for the
  disk ids. A later patch will move this to `run-qemu`, when all tests are converted

* due to `-M q35` the interface names have changed from
  `ens2` -> `enp0s1` and `ens3` -> `enp0s2`
2021-04-19 22:32:00 +02:00
Harald Hoyer 2cfd778a45 ci: add function to generate qemu disk arguments
`qemu_add_drive_args` can be used to generate arguments to specify disks
for a qemu machine (`-M q35`).

This is mostly useful to address those raw disks via `/dev/disk/by-id`,
because due to parallel probing in the kernel `/dev/sd*` can point to
anything.
2021-04-19 22:32:00 +02:00
Harald Hoyer 4baedd019b fix(TEST ISCSI): try to debug md error 524
While creating the striped md raid0 sometimes this error occures:

```
mdadm: Defaulting to version 1.2 metadata
mdadm: RUN_ARRAY failed: Unknown error 524
  Failed to clear hint file.
  Device /dev/md0 not found.
Powering off.
```

Add debug output with the size of the disks.

Also create disks with multiple of 4096.
2021-04-16 16:27:16 +02:00
Harald Hoyer 09356085b6 ci: enable shellcheck for everything 2021-03-31 11:31:17 +02:00
Harald Hoyer 007df5adc1 test: mark the whole test subdir as shellcheck'ed 2021-03-31 09:33:03 +02:00
Harald Hoyer c864f8938c fix(TEST MULTINIC): shellcheck 2021-03-30 22:59:46 +02:00
Harald Hoyer beb3e54ece fix(TEST BASIC): shellcheck 2021-03-30 21:09:06 +02:00
Harald Hoyer d174e18d2a fix(TEST SYSTEMD): shellcheck 2021-03-30 21:06:09 +02:00
Harald Hoyer 4c4cd24b7c fix(TEST USR-MOUNT): shellcheck 2021-03-30 20:57:04 +02:00
Harald Hoyer 7e140a407b fix(TEST FULL-SYSTEMD): shellcheck 2021-03-30 20:54:26 +02:00
Harald Hoyer 6e7db0467a fix(TEST RAID): shellcheck 2021-03-30 20:48:22 +02:00
Harald Hoyer 34600bbead fix(TEST LVM): shellcheck 2021-03-30 20:38:52 +02:00
Harald Hoyer cdebbcc684 fix(TEST RAID-DEG): shellcheck 2021-03-30 20:16:02 +02:00
Harald Hoyer 07c944b48c fix(TEST IMSM): shellcheck 2021-03-30 19:56:28 +02:00
Harald Hoyer 92798d7d1b fix(TEST DMSQUASH): shellcheck 2021-03-30 19:33:37 +02:00
Harald Hoyer d0c9fd6609 fix(TEST LVM-THIN): shellcheck 2021-03-30 19:24:10 +02:00
Harald Hoyer 1c6dd0ddfd fix(TEST NFS): shellcheck 2021-03-30 19:20:45 +02:00
Harald Hoyer 2aa97ff299 fix(TEST ISCSI): shellcheck 2021-03-30 19:06:07 +02:00
Harald Hoyer f7844c296a fix(TEST ENC-RAID-LVM): shellcheck 2021-03-30 16:34:17 +02:00
Harald Hoyer 79f9b17feb fix(TEST BTRFSRAID): shellcheck 2021-03-30 16:31:54 +02:00
Harald Hoyer f9f1314acb fix(TEST ISCSI-MULTI): shellcheck 2021-03-30 15:54:54 +02:00
Harald Hoyer 77854c6d2d fix(TEST NBD): shellcheck 2021-03-30 15:53:47 +02:00
Harald Hoyer 6e5878188b fix(TEST BONDBRIDGEVLANIFCFG): shellcheck 2021-03-30 15:53:21 +02:00
Harald Hoyer 90b9c00695 fix(TEST GETARG): shellcheck 2021-03-30 14:57:52 +02:00
Harald Hoyer 718ad799ac fix(TEST RPM): shellcheck 2021-03-30 14:55:29 +02:00