Commit Graph

536 Commits (8b2afb08baea7fc6e15ece94e287dcc4a008bcc4)

Author SHA1 Message Date
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
Harald Hoyer baa4acd402 fix(test/test-functions): shellcheck for test/test-functions 2021-03-30 12:30:41 +02:00
Harald Hoyer e010f45524 fix(test/run-qemu): shellcheck for test/run-qemu 2021-03-30 12:26:14 +02:00
Harald Hoyer ae9aa8f174 fix(TEST-30-ISCSI): add sync to client root creation 2021-03-30 04:05:34 +02:00
Harald Hoyer d97f88f28b test(FULL-SYSTEMD): add fuse kernel module in test root
systemd wants to use it
2021-03-29 16:16:09 +02:00
Harald Hoyer 75d758e8f1 style: shfmt -s reformat
reproducible with:

```
$ shfmt_version=3.0.1
$ wget "https://github.com/mvdan/sh/releases/download/v${shfmt_version}/shfmt_v${shfmt_version}_linux_amd64" -O shfmt
$ chmod u+x shfmt
$ ./shfmt -w -s .
```
2021-03-13 20:10:43 +01:00
Harald Hoyer 9a52c3fdb0 style: shfmt reformat
reproducible with:

```
$ shfmt_version=3.0.1
$ wget "https://github.com/mvdan/sh/releases/download/v${shfmt_version}/shfmt_v${shfmt_version}_linux_amd64" -O shfmt
$ chmod u+x shfmt
$ ./shfmt -w .
```
2021-03-13 20:10:43 +01:00
Harald Hoyer 560402c3dc style: shfmt pre correction 2021-03-13 20:10:43 +01:00
Harald Hoyer 5d99b4d0eb test: fix test 98 getarg
Fix a mis-replaced comparison.
2021-03-12 09:20:32 +01:00
Harald Hoyer 72cba8aecd test: sync and poweroff in create-root.sh 2021-03-10 19:31:19 +01:00