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
c864f8938c
fix(TEST MULTINIC): shellcheck
2021-03-30 22:59:46 +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
72cba8aecd
test: sync and poweroff in create-root.sh
2021-03-10 19:31:19 +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
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
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
f3f081e542
TEST-{20,50,60,70): set MACAddressPolicy=keep
...
New systemd defaults to generating MAC addresses for software devices (whereas
previously they would inherit them from the first enslaved slave).
Sadly, among the things this breaks is our test fixture, where the dhcp servers
are configured to expect a particular MAC address. Disable this for the
affected tests, which are essentially the ones that use bridges and bonds.
2019-11-11 21:17:31 +01: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
9288d21b9f
TEST-50-MULTINIC: removed bogus qemu compat server call
2018-08-14 16:37:01 +02:00
Harald Hoyer
fba4d28433
TEST-50-MULTINIC: fixed server.log
2018-08-14 16:30:42 +02:00
Harald Hoyer
f9c8b3112a
TEST-50-MULTINIC/test.sh: fixed server startup
2018-08-14 14:12:54 +02:00
Harald Hoyer
ca8f1c1ba3
test: fixed KVERSION and qemu backwards compatiblity
2018-08-14 14:03:55 +02:00
Harald Hoyer
393da0c370
TEST-50-MULTINIC: s/--device/-device
2018-08-14 11:35:26 +02:00
Harald Hoyer
6058b06b86
test/{TEST-50-MULTINIC,TEST-70-BONDBRIDGETEAMVLAN}: use qemu-3.0 syntax
...
use qemu-3.0 syntax for network devices
2018-08-13 16:30:25 +02:00
Harald Hoyer
66a3d4053b
testsuite: increase disk image size
2017-07-28 15:15:02 +02:00
Harald Hoyer
29fd71b23d
TEST-50-MULTINIC: fix bridge test
...
Bridge with nics on a different vlan, otherwise we will see:
[ 117.750825] bridge0: received packet on ens5 with own address as source address
2017-04-26 09:39:20 +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
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
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
7ecb36aef4
TEST-50-MULTINIC/test.sh: correctly call ldconfig
2015-07-07 15:34:30 +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
e3e1f406bb
test: turn off hostonly-cmdline and hostonly
2015-01-21 09:33:39 +01:00
Harald Hoyer
eda73c0ad2
test: add "fs-lib" to dracut module list
2014-10-24 13:19:34 +02:00
Harald Hoyer
967cc19ab1
remove all vim and emacs code format comments
2014-08-29 13:38:47 +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
Harald Hoyer
84bc192946
TEST-50-MULTINIC: improve interface test
2013-09-10 10:51:04 +02:00
Harald Hoyer
ffc68f357e
use ${var:+val} rather than ${var+val}
...
${var:+val} also catches var=""
2013-08-22 11:24:01 +02:00
Harald Hoyer
af11946054
dracut-functions.sh: inst_multiple == dracut_install
2013-08-07 10:33:15 +02:00
Harald Hoyer
aa23dcd8ae
TEST-50-MULTINIC: change interface names to ens*
2013-07-31 10:59:25 +02:00
Harald Hoyer
b093aa2dc7
beautified shell code
...
checked with shellcheck http://www.shellcheck.net/about.html
2013-07-04 12:31:15 +02:00
Harald Hoyer
32bd2fbb4c
use "rm --" to guard against filenames beginning with "-"
2013-06-28 10:31:18 +02:00
Harald Hoyer
44d832c5ad
test/TEST-50-MULTINIC: fixed debug output
2013-06-13 14:44:47 +02:00
Harald Hoyer
021b2fddff
test: use grep option "-F" and install /etc/os-release
2013-04-30 18:54:33 +02:00
Harald Hoyer
a8986425a4
TEST-50-MULTINIC: fixup test suite
...
qemu of the day doesn't like multicast anymore
2013-04-05 11:07:40 +02:00
Harald Hoyer
44f870be42
test: change qemu param -nographic to -display none for -daemonize
...
qemu does not like -nographic in combination with -daemonize
2013-03-26 16:17:24 +01:00
Harald Hoyer
bb278147cf
fixed testsuite
2013-03-15 07:10:20 +01:00