Commit Graph

97 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 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 2aa97ff299 fix(TEST ISCSI): shellcheck 2021-03-30 19:06:07 +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 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 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 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 a22ab24d53 test: use dd from /dev/zero, instead of creating files with a hole 2020-03-12 12:46:15 +01:00
Harald Hoyer 9ca53063ee test: use dd to write status to marker disk 2020-02-28 14:41:15 +01:00
Harald Hoyer a3f73298f2 testsuite: refactor qemu options
- refactor common qemu options
- fix the ens[0-9] interface shift
- add split network-[legacy|network] tests
2020-02-28 12:53:42 +01:00
Harald Hoyer 4b60a34715 Revert "test: run-qemu refactor common qemu parameters"
This reverts commit 77537bf2d7.

Sorry, for the noise!
2020-02-28 08:51:44 +01:00
Harald Hoyer 77537bf2d7 test: run-qemu refactor common qemu parameters 2020-02-28 08:39:31 +01:00
Harald Hoyer 4bd0ab61b2 test: remove "sudo" calls in test scripts 2020-02-27 15:27:30 +01:00
Harald Hoyer 53e299e6f4 TEST-20-NFS/test.sh TEST-30-ISCSI/test.sh reduce debug output 2020-02-27 15:27:30 +01:00
Harald Hoyer 2f78bafa4b tests: untabify, reformat 2020-02-27 15:27:30 +01:00
Harald Hoyer f7b9356c9e test: fix server init scripts for network 2020-02-27 15:27:30 +01:00
Harald Hoyer 3aae122c4b Add github workflow 2020-02-27 15:27:30 +01:00
Daniel Molkentin 8996d3dfcd test: use hosts randomness, not rngd 2019-11-13 09:07:45 +01:00
Lubomir Rintel 9a752007b3 TEST-30-ISCSI: test iBFT boot as well
Setting up the machinery to boot with the aid of real networked boot loader
(such as iPXE) would involve much hassle, including possibly serving the kernel
and initrd via TFTP, etc.

Let us generate the iBFT table ourselves, with a Perl script. Include the
pregenerated table as well so that the test run won't depend on Perl. In the
end it's just reproducibly built static data, totally independent of the host
system.
2019-11-12 13:27:59 +01:00
Lubomir Rintel e318ba30fb test/{10,12,13,14,17,30,31}: increase the disk sizes
On Fedora 30 the paritition sizes turn out to be too small again:

  + mkdir -p /sysroot
  + mount /dev/dracut/root /sysroot
  + cp -a -t /sysroot /source/bin /source/dev /source/etc /source/lib /source/lib64 /source/proc /source/root /source/sbin /source/sys /source/tmp /source/usr /source/var
  cp: error writing '/sysroot/usr/lib64/libkrb5.so.3.3': No space left on device
  cp: error writing '/sysroot/usr/lib64/libkrb5support.so.0.1': No space left on device

It turns out that there has been quite some size increase in some libraries,
notably glibc, though not all -- some even shrunk, ruling out a toolchain
problem. Here's are files over 1M we install on Fedora 30:

   f29    f30
  2.7M => 6.4M /usr/lib64/{libc-2.28.so => libc-2.29.so}
  3.1M => 6.0M /usr/lib64/libcrypto.so.1.1.1c
  2.0M => 3.5M /usr/lib64/{libm-2.28.so => libm-2.29.so}
  2.9M => 2.8M /usr/lib/systemd/{libsystemd-shared-239.so => libsystemd-shared-241.so}
  1.7M => 2.5M /usr/lib64/libunistring.so.2.1.0
  2.3M => 2.4M /usr/lib64/bind9-export/libdns-export.so.1105.0.0
  1.2M => 2.1M /usr/bin/bash
  1.1M => 1.4M /usr/lib64/libkrb5.so.3.3
  1.2M => 1.4M /usr/lib64/libgcrypt.so.20.2.4
  612K => 1.1M /usr/lib64/libssl.so.1.1.1c

This increases the image sizes to accomodate for this. There's probably
little else we can do.
2019-07-19 16:19:44 +02:00
Lubomir Rintel 7934c6f918 test: tell systemd to reboot on fatal errors
Otherwise systemd would freeze execution, causing the test to time out
instead of failing fast.
2019-07-19 16:10:54 +02:00
Harald Hoyer 9a9c67d61b TEST-30-ISCSI: readd multiple target test 2018-07-06 11:56:23 +02:00
Harald Hoyer 5a8efed021 TEST-3[01]-ISCSI*: increase disk size 2018-01-10 09:13:31 +01:00
Harald Hoyer 66a3d4053b testsuite: increase disk image size 2017-07-28 15:15:02 +02:00
Harald Hoyer 9388d99361 simplify TEST-30-ISCSI for CI 2017-07-21 16:01:04 +02:00
Harald Hoyer 9b8e6e40a9 increased qemu memory 2017-07-21 11:43:08 +02:00
Harald Hoyer b0d6254dad TEST: redirect server output to server.log if $SERIAL empty 2017-03-30 09:04:02 +02:00
Harald Hoyer bdd626059c test/run-qemu: make "-cpu host" the default 2017-01-18 16:26:30 +01:00
Harald Hoyer dfb3db3dad testsuite: add "-cpu host" to kvm call 2016-11-14 16:21:06 +01:00
Harald Hoyer 93d7b95ad4 TEST-30-ISCSI: give server more time for the head start 2016-11-07 17:22:08 +01:00
Harald Hoyer 86f0904004 TEST-30-ISCSI: fixed dhcpd.conf and disabled nowait 2016-11-07 13:23:39 +01:00
Harald Hoyer d7c9ad504e TEST-30-ISCSI: add message, that all tests passed 2016-09-02 07:51:55 +02:00
Harald Hoyer dba974844e test/TEST-30-ISCSI: depend on tgtd and tgtadm
the testsuite now needs tgtd and tgtadm and not iscsi-target
2016-09-02 07:51:55 +02:00
Harald Hoyer 36867f1abf test: handle kernel panic in testsuite
- reboot kernel on panic
- qemu don't reboot
2016-06-10 08:53:01 +02:00
Harald Hoyer 781f1971c3 cope with "rd.shell=0" in the testsuite
If emergency and shutdown-emergency hooks are called, the systemd should
poweroff the testsuite, therefore "rd.shell=0" is given on the test
suite kernel command lines.

"rd.shell=0" has to be parsed correctly by the test suite real root init
also.
2016-06-08 16:48:07 +02:00
Harald Hoyer 4e882b8090 use shutdown-emergency hook in testsuite to poweroff the machine 2016-06-07 14:27:03 +02:00
Harald Hoyer bb1b924792 TEST-30-ISCSI: some tests have unknown return code
by design
2016-01-19 14:43:43 +01:00
Harald Hoyer 24a78b2697 Fixed vlan, bonding, bridging, team logic
Call ifup for the slaves and assemble afterwards.
2016-01-19 11:35:23 +01:00
Harald Hoyer 0a10d7fc51 TEST-30-ISCSI: fix test to run with new iscsi
(cherry picked from commit 836ca3f47e)
2015-11-11 15:53:48 +01:00
Harald Hoyer 6251f82c6f TEST-30-ISCSI: add rd.scsi.firmware
(cherry picked from commit 310574f7ea)
2015-11-11 15:12:05 +01:00
Harald Hoyer 0a66b74b51 TEST-30-ISCSI: test more and set static initiator name 2015-08-13 11:54:24 +02:00
Harald Hoyer c22c43f81a TEST-30-ISCSI: switch to scsi-target-utils
netbsd-iscsi is not available on RHEL

Beef up the testsuite to use the two targets over different
interfaces.

Test the new iSCSI parameters rd.iscsi.waitnet and rd.iscsi.testroute.
2015-08-12 14:48:19 +02:00
Harald Hoyer 777f2db037 splitup dracut-init.sh from dracut-functions.sh
other tools want to source dracut-functions.sh without any mkdir side
effects.
2015-07-02 16:04:05 +02:00
Harald Hoyer 4358ace43c fixup test suite
- qemu wants to have "format=raw"
- "-kernel" is obsolete, because run-qemu picks the right path
2015-06-09 13:36:46 +02:00
Harald Hoyer 3c20ac5377 TEST-30-ISCSI/test.sh: add all dracut modules
add all dracut modules to catch netroot conflicts and side effects like

afcc697cb8
2015-03-20 16:13:30 +01:00
Harald Hoyer 296d013f1a TEST-30-ISCSI: turn off iscsi_firmware
Having iscsi_firmware on the kernel cmdline stalls until firmware is
found. qemu does not have this.
2015-01-31 12:22:45 +01:00
Harald Hoyer e3e1f406bb test: turn off hostonly-cmdline and hostonly 2015-01-21 09:33:39 +01:00
Harald Hoyer cfd51d2be2 TEST-30-ISCSI: udev does not export path_id for iscsi
therefore root=iscsi.... does not work anymore :-/

disabled for now
2014-10-24 13:17:30 +02:00
Harald Hoyer 068531232b test: make testsuite work with the new systemd minimal root req
systemd needs more directories to switch root
2014-08-08 13:34:04 +02:00