Commit Graph

522 Commits (b80ee080937ce364f7324c297f23e40af6d88892)

Author SHA1 Message Date
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
Harald Hoyer 455329cf71 test: change the LABEL to include spaces
Test for root device with a LABEL, which includes spaces.
2021-03-10 19:31:19 +01:00
Harald Hoyer 501d82f796 fix: correctly handle kernel parameters
The kernel has an odd way to handle `"` surrounded parameters.
To handle the parameters as the kernel would do, no simple shell script
suffices, so a new utility `dracut-util` is introduced. Written in "C"
it handles `dracut-getarg` and `dracut-getargs` as the old shell script
functions `_dogetarg` and `_dogetargs` would.
2021-03-10 19:31:19 +01:00
Jóhann B. Guðmundsson 9cf7b1c529 fix: always use mkdir -p
Ensuring that directory creations dont trigger error if directory
previously existed as well as create parent directories if needed.
2021-03-03 13:06:02 +01:00
Harald Hoyer d85c71fb69 ci: force binary files for grep on disk images
Because some of the CI tests fail randomly while grepping for the
test success marker, let's be specific of the file format grep will
search to eleminate all failure sources.
2021-02-15 15:05:15 +01:00
Harald Hoyer dbb8a98b29 ci: wait for udev before doing sfdisk
might be responsible for some flakiness
2021-02-15 09:31:01 +01:00
Harald Hoyer 0f807f49cf ci: more disk space for test 30 iscsi
```
mke2fs 1.45.6 (20-Mar-2020)

Filesystem too small for a journal
Discarding device blocks:          done
Creating filesystem with 1024 1k blocks and 128 inodes

Allocating group tables: 0/1   done
Writing inode tables: 0/1   done
Writing superblocks and filesystem accounting information: 0/1   done

cp: error writing '/sysroot/usr/bin/bash': No space left on device
cp: error writing '/sysroot/usr/bin/grep': No space left on device
cp: error writing '/sysroot/usr/bin/ping': No space left on device
[…]
```
2021-02-15 09:30:29 +01:00
Harald Hoyer 0f62da0405 ci: get rid of "mount -o loop"
This finally allows running the test suite completely in a rootless container:
```
❯ podman run \
         --user 0 \
         -v /dev:/dev \
         -v ./:/dracut \
         -it \
         quay.io/haraldh/dracut-fedora:33 \
         bash -c 'cd /dracut; make DRACUT_NO_XATTR=1 check'
```
2021-02-08 16:07:37 +01:00
Harald Hoyer 1211d6a3fb ci: disable TEST 99
1. people got annoyed by merge conflicts
2. spec file can be update per release
3. uses "mount" preventing container testing
2021-02-08 16:07:37 +01:00
Harald Hoyer 1149ed2a3e test: incr. disk size for TEST 35 ISCSI-MULTI 2021-01-27 13:15:37 +01:00
Harald Hoyer 11474b808b TEST-99: exclude /etc/dnf/* from check
file /etc/dnf/modules.d/eclipse.module.rpmmoved is not owned by any package
2020-04-09 22:11:16 +02:00
Harald Hoyer 91418b13dc TEST-03-USR-MOUNT/test.sh: increase loglevel
to debug the spurious fails
2020-03-12 14:17:45 +01:00
Harald Hoyer 3b396a7d50 TEST-41-NBD-NM/Makefile: should be based on TEST-40-NBD not TEST-20-NFS 2020-03-12 13:30:24 +01:00
Harald Hoyer a22ab24d53 test: use dd from /dev/zero, instead of creating files with a hole 2020-03-12 12:46:15 +01:00
Harald Hoyer fc6f458c3b TEST-12-RAID-DEG/create-root.sh: more udevadm settle 2020-03-11 14:02:46 +01:00