Commit Graph

536 Commits (8b2afb08baea7fc6e15ece94e287dcc4a008bcc4)

Author SHA1 Message Date
Harald Hoyer a2dc3a075e do not poweroff in TEST-30-ISCSI, if rdinitdebug is set 2009-06-19 09:29:16 +02:00
Harald Hoyer e58de60f3c uncomment hard-off for TEST-30-ISCSI 2009-06-19 09:29:16 +02:00
Harald Hoyer 1cd0c90eab moved test-init to TEST-10-RAID 2009-06-19 09:29:15 +02:00
Harald Hoyer 65bedc8320 add DEBUGFAIL to TEST-10-RAID 2009-06-18 15:06:32 +02:00
Harald Hoyer eeb721037b add iSCSI testsuite 2009-06-18 15:06:32 +02:00
Harald Hoyer 3af5866a26 use 128M for the test virtual machines instead of 512M 2009-06-18 15:06:31 +02:00
Harald Hoyer 9ca74ffef3 kill the server after the test_run 2009-06-18 15:06:26 +02:00
Harald Hoyer f0aae472e4 revert testsuite failures to handle old style dhcp root-path format 2009-06-17 20:55:59 +02:00
Harald Hoyer 1e885ccdfb support old style root=dhcp root-path=server-ip:/path 2009-06-17 20:25:23 +02:00
Philippe Seewer 1b31fc140b netroot: Add ip= cmdline checker
As with other netroot boot arguments ip= lines should be parsed and
checked. Having this has the advantage that other cmdline scripts
can tell the ip= parser if dhcp or ip=:srv:... is needed, like
parse-root.sh (renamed dhcp-fallback) or parse-nfsroot do.

The nfs test-suite has one check which uses static ip lines, but
the autoconf param is wrong. Fixed this as well.
2009-06-17 08:37:40 +02:00
Philippe Seewer 50e7ff76de netroot: Introduce detailed cmdline parsers
This introduces detailed cmdline parsing, warning or aborting if the
cmdline does not contain arguments according to the spec.

Makeing sure the parsers don't just call getarg for netroot et al,
allows their reuse inside netroot to analyse dhcp root-path as well.
Hence we can get rid of the current netroot hooks. The hook itself stays
in order to add further modules which should run before netroot handlers
are called.

This has one drawback: nfsroot needs some more logic to handle nfs
specific data inside dhcp root-path.

The parsers have been writting according to current discussions about
cmdline arguments. This lead to the "discovery" that some test-cases
violate the spec. These tests have not been removed, but change to
"must fail".
2009-06-17 08:37:40 +02:00
Philippe Seewer 45630db1a7 TEST: Add dhcpd support for debian based distros
Debian based distros use dhcpd3 instead of just dhcpd. Accordingly
paths to lease files etc are different as well. This patch ensures
that the test-suite can run with either dhcpd or dhcpd3.
2009-06-17 08:37:38 +02:00
Philippe Seewer 3da03a6036 NFS: Add support for debian based distros
This patch enhances nfsroot and the nfs test-suite with compatibility
for debian based distros. This is mainly the difference of using
portmap instead of rpcbind and the missing file /etc/netconfig
2009-06-17 08:37:38 +02:00
Philippe Seewer 5634fc9fef NBD Test: Server initramfs does not need modules crypt, lvm and mdraim 2009-06-17 08:37:38 +02:00
Philippe Seewer 11f90138cd NBD Test: Don't start a shell inside the server 2009-06-17 08:37:38 +02:00
Warren Togami 9f786a9d8f Simple changes to allow test suite to work with dash. 2009-06-15 16:26:11 -04:00
David Dillow 8bd5873ffc NBD root: add support for LVM/LUKS
With this change, we can now use LUKS and LVM over NBD. There are
some decisions to be made regarding where we should get the fstype
and fsoptions from (DHCP root vs rootfstype= etc), but the basic
functionality is there.
2009-06-11 01:47:11 -04:00
David Dillow aec48753c2 network: add support for netroot=...
This adds support for a command line option netroot=, which is currently
equivalent to root=. This will allow us to break out handling in NBD and
iSCSI to support constructs such as "root=LABEL=/ netroot=dhcp" to make
use of our block device handling with network attached devices.

iSCSI has not been changed in this patch as I don't currently have a way
to test it.
2009-06-11 01:47:11 -04:00
David Dillow a29f15a5b6 NBD test: add more option parsing tests 2009-06-11 01:46:05 -04:00
Harald Hoyer 169363e827 add ipv6 rpc.idmapd and various conf files for NFS
rpcbind on Fedora does not seem work for NFS4 without IPv6
2009-06-08 14:50:22 +02:00
Harald Hoyer 44ec5f7229 specify dhcpd.conf path for test server 2009-06-08 14:49:00 +02:00
Harald Hoyer b2c5f5dc72 s/NFS/NBD 2009-06-08 14:48:39 +02:00
Harald Hoyer d5e1e577ee specify dhcpd.conf path for test server 2009-06-08 10:34:50 +02:00
David Dillow 9ecbe2e4d4 NBD: add test suite
This is an initial test suite for the NBD root. It does the basics, and
needs to be extended to check more parts of the configuration.
2009-06-08 00:28:52 -04:00
David Dillow bed87ed998 NFS test: add test for nfs[4]:srv:/path syntax 2009-06-08 00:03:10 -04:00
David Dillow abe9ccc89a NFS root: add support for default root path and %s substitution
This implements a default path of /tftpboot/%s if no path is provided,
and adds host name substitution for %s, with a fall back to the IP address,
as provided by the kernel's nfsroot handling.

The test suite is updated to test this functionality.
2009-06-07 17:17:48 -04:00
David Dillow 6b6805b8af NFS test: separate NFSv3 and NFSv4 tests into their own functions
The full tests take over 6 minutes to run, and commenting out unneeded
ones is time consuming -- this change lets me comment out one line to
temporarily avoid an entire class of tests.
2009-06-07 15:48:07 -04:00
David Dillow 0000e1816c NFS test: add test cases for DHCP/nfsroot=[IP:]/path[,options] 2009-06-07 15:01:31 -04:00
David Dillow da2643fafb NFS test: renumber MAC addresses to ease adding new test cases 2009-06-06 23:08:12 -04:00
David Dillow 9f25b834b9 NFS test: add support for checking mount options used 2009-06-06 22:59:42 -04:00
David Dillow 574f2965e4 NFS test: verify that we used the right IP to get to the server 2009-06-06 21:55:53 -04:00
David Dillow ae227ca836 NFS test: additional option tests
Test additional combinations of command line and DHCP option formats. This
is by no means the complete list, but gets us started with some common ones.
2009-06-06 05:10:33 -04:00
David Dillow 08fb7d892c NFS test: allow emergency shell while debugging 2009-06-06 05:09:13 -04:00
David Dillow 35b709957f NFS test: rearrange the server tree so we can differentiate NFSv3 vs NFSv4 2009-06-06 01:22:54 -04:00
David Dillow d462f6dc65 NFS test: re-add the fix for the terminal
When debugging, this is still needed as we won't be redirecting out
output to /dev/null or a file. However, we need to guard against not
having a terminal.
2009-06-06 01:13:47 -04:00
David Dillow ba64a17ffd NFS test: switch the ISC dhcpd server
This will let us expand the number of client configs we can test
2009-06-06 01:13:16 -04:00
David Dillow cc75acdcab NFS test: rearrange code to test multiple client configurations
This also gets rid of BASENET, which was an unneeded idea in hindsight.
2009-06-06 00:25:07 -04:00
David Dillow a0e0d37270 NFS testing: add forgotten hard-off hook 2009-06-06 00:06:04 -04:00
David Dillow 261d029659 Have the test framework always run the cleanup script
Also remove some extra semicolons, and put the pointer to the test log
on its own line.
2009-06-06 00:05:33 -04:00
Harald Hoyer 3273c0a536 make test output more readable, log errors to test.log 2009-06-05 16:08:30 +02:00
David Dillow 528277f32c test suite: automate NFS testing
First cut at automating the NFS test suite.
2009-06-05 00:25:17 -04:00
David Dillow 58c13eeb4c test suite: allow a user-selected kernel
Sometimes it is desirable to allow the user to test with a different
kernel than the one they are currenting running.
2009-06-05 00:18:29 -04:00
Harald Hoyer af17f82ed9 moved away Makefile for TEST-30-ISCSI
until iSCSI target VM is built by the testcase
2009-06-02 14:26:48 +02:00
Harald Hoyer ac4ded9128 add iSCSI module 2009-06-02 13:22:29 +02:00
Victor Lowther 1a0c05b849 Make root on local block device test completly automated.
We no longer require any user intervention when testing dracut on
a local block device in qemu, assuming everything passes.  If things fail,
we still might need to manually kill things.
2009-05-30 21:23:55 -05:00
Victor Lowther e314863e67 Several updates to make dracut a bit more robust.
First, add a check script to 99base to ensure that it will load its
prerequisites.

Second, disable the udev magic dracut normally uses when generating
test images -- it was causing random failures when creating the test
root filesystem, presumably due to race conditions between the
rootfs creation scripts and udev.

Third, consolidate the rootfs creation scripts into one script.
2009-05-30 16:53:12 -05:00
Victor Lowther 333103217d Don't create fully generic initramfs'es in the test framework
There is no point loading every driver available when we are not testing
network functionality and qemu does not even support the stuff we were
loading.  It just wastes time and space.
2009-05-29 17:55:31 -05:00
Warren Togami e19d6bf603 Disambiguate modules and drivers. modules are dracutmodules. drivers are kernel modules. 2009-05-28 14:27:02 -04:00
Victor Lowther a0c2cee947 Get rid of dependency on e2mkdir
If we install copy-root as a mount hook, it will be run after the root fs
is mounted and it will make hte proc directory, allowing root filesystem
creation to finish without error.
2009-05-25 11:44:42 -05:00
Harald Hoyer c9f0e1f9a5 add "#!/bin/bash" to test.sh 2009-05-25 18:14:26 +02:00
Victor Lowther fe9143d9ca Move content of 00test module into the test subdir
The last changes made the 00test module really awkward anyways, so just
hack the test module into the initramfs in a slight more brutal fashion.
2009-05-25 17:49:56 +02:00
Harald Hoyer 02b47109cf add small test script to create a minimal root in /mnt/root 2009-05-25 16:51:10 +02:00
Harald Hoyer c00f04f57a introduce modular test suite 2009-05-25 15:32:26 +02:00
Harald Hoyer 2f692e8ff8 silently run qemu 2009-05-25 14:11:24 +02:00
Harald Hoyer 008bb4f22c /dev/kvm is a char device 2009-05-25 11:44:52 +02:00
Harald Hoyer 2281815799 set u+x for run-qemu 2009-05-25 11:36:32 +02:00
Andreas Thienemann 8a4b60d9b2 Support different virtualization technologies for run-qemu.
If the host supports kvm, use is. If this is not the case but the kqemu
module is loaded, run qemu with kqemu optimization. Otherwise fall-back to
pure usermode qemu.
2009-05-25 11:36:32 +02:00
Victor Lowther 4957ab92f2 Create test image on an md array and improve cryptroot handling
If we purport to test booting to an md raid, we may as well test it.

We do not need the plymouth module and the normal crypt module to include
duplicate functionality.
2009-05-25 11:36:32 +02:00
Victor Lowther 7f6643f9d9 Add comments to make-test-root to explain why it is written the way it is. 2009-05-25 11:36:32 +02:00
Victor Lowther 9335cb383a We create our test image with root as an LVM menber.
We purport to support booting off an encrypted LVM PV, may as well test it.
2009-05-25 11:36:27 +02:00
Victor Lowther ac6da96cc8 Make running qemu a little more generic
Also create the root filesystem from within the virtual env, this way there
will be no nasty suprises w.r.t interactions with the host machine.  This
is important when we test booting to LVM, LUKS, and mdraid.
2009-05-25 11:24:26 +02:00
Harald Hoyer 4b8b7c59cf quit plymouth in test root 2009-05-20 14:58:55 +02:00
Harald Hoyer 3745a7eb43 include all modules for the test besides of plymouth 2009-05-20 14:25:35 +02:00
Harald Hoyer d4244cb25b support normal nfs root definition syntax 2009-05-18 19:55:58 +02:00
Harald Hoyer 280117d934 add nfs testcase 2009-05-18 19:32:22 +02:00
Harald Hoyer cc5864aa4a better use bash for initramfs debugging 2009-05-18 16:09:16 +02:00
Harald Hoyer 02948d0905 add minimal dnsmasq dhcp/dns server 2009-05-18 15:33:37 +02:00
Harald Hoyer 2e0eaafa9b use multicast net for qemu 2009-05-18 15:32:09 +02:00
Harald Hoyer 6b852fde4b add dhclient to test root image 2009-05-18 14:09:21 +02:00
Harald Hoyer c395f1de24 add debug to test image 2009-05-18 14:06:47 +02:00
Harald Hoyer c354b54e55 removed kernel variable from test/test-initramfs 2009-05-15 14:09:55 +02:00
Harald Hoyer 9e551c9097 cleanup make-test-root 2009-05-15 13:24:08 +02:00
Harald Hoyer e2367e1948 add APPEND and DRACUTOPTS to make target "test"
call test with additional dracut options and kernel command line
parameter:

$ make APPEND="udevinfo quiet" DRACUTOPTS="-verbose" test
2009-05-15 13:16:15 +02:00
Harald Hoyer 7ea690569c no additional modules specified for test/dracut.conf.test 2009-05-12 15:46:20 +02:00
Harald Hoyer e4d48c451a install more binaries and directories in the test root 2009-05-12 15:35:57 +02:00
Harald Hoyer 2647059b7c boot with network 2009-05-12 15:35:22 +02:00
Harald Hoyer f5f52afdca fixed the root kernel command argument 2009-03-24 11:31:07 +01:00
Harald Hoyer 93fea990ec fixed the creation of the root filesystem 2009-03-24 11:30:30 +01:00
Harald Hoyer 309ed9668b add udev mount rule module to the test image 2009-03-24 11:29:53 +01:00
Victor Lowther 6ce3123192 Updated test-init to only create fstab symlink as needed. 2009-03-20 03:51:05 -05:00
Victor Lowther 9239133486 Minor updates to the testing framework 2009-03-20 03:34:30 -05:00
Victor Lowther 8faaa8f082 Change default install target for udev rules.
Also make sure that udev does not complain about a missing rules.d directory.
2009-03-20 03:08:40 -05:00
Victor Lowther 597bd00990 Load all our usual dracut modules 2009-03-20 03:08:40 -05:00
Victor Lowther 88ffd2df3f Update test framework to create and use LVM on cryptroot 2009-03-20 03:08:39 -05:00
Victor Lowther 32d6bc5d75 Modify Makefile to use new test harness 2009-03-08 11:51:21 -05:00
Victor Lowther c0b5f979a8 Add a very simple test harness
This creates a basic root filesystem, creates an initramfs, and tries
to boot to the basic filesystem.

The init code on the test filesystem prints how much memory is used vs. free
and then drops to a shell.  Exiting the shell will power off the VM.
2009-03-08 11:39:55 -05:00