Commit Graph

144 Commits (master)

Author SHA1 Message Date
Harald Hoyer 967cc19ab1 remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
Harald Hoyer 4e1f8d0c5f TEST-20-NFS: add more commands and fix client root dirs 2014-08-01 13:15:44 +02:00
Harald Hoyer 28d03673f9 TEST-20-NFS:client-init.sh: add shell on rd.shell 2014-08-01 13:15:05 +02:00
Chapman Flack 9cf339ada3 Correct strstr/strglobin in test suite.
Previous commit included versions of strstr/strglobin in the test
suite files that did not match those in dracut-lib.sh.
2014-04-07 10:49:07 +02:00
Chapman Flack 2c19a5fa78 Specify strstr tightly, add strglob/strglobin.
By convention, strstr should be a literal string match. Previously, it
would match as a glob pattern. Some code used that, so add new
functions strglob and strglobin to do what that code expects, and
specify them tightly too. strglob tests whether the glob pattern
matches the entire string (the name strglob is also used in the yorick
language, and that's what it does there), while strglobin tests whether
the glob pattern matches anywhere in the string.

Also tightens str_starts, str_ends, and str_replace to deal with
literal strings only. In a quick grep I did not find code that depended
on these functions matching globs.

Changes the call sites where strstr was used with glob patterns to use
strglobin or strglob as the intention seemed to be (or, in one case,
strstr with the * removed as it did not affect the result anyway).
2014-04-07 10:49:07 +02:00
Harald Hoyer f52759131b test: include the same Makefile.testdir 2014-02-04 12:01:11 +01:00
Harald Hoyer 67b4a9ea17 testsuite: fixed network interface names 2013-08-15 10:25:19 +02:00
Harald Hoyer af11946054 dracut-functions.sh: inst_multiple == dracut_install 2013-08-07 10:33:15 +02:00
Harald Hoyer 32bd2fbb4c use "rm --" to guard against filenames beginning with "-" 2013-06-28 10:31:18 +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 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
Harald Hoyer 356333b331 test: add finished-false.sh for create-root.sh initqueue job 2013-03-02 13:20:59 +01:00
Harald Hoyer 14be3b16cd TEST-20-NFS/test.sh: reformat 2012-10-08 15:36:41 +02:00
Harald Hoyer 167a320e5f s/libnss*.so/libnss_*.so so that we don't install libnss3.so 2012-10-04 14:38:25 -04:00
Frederic Crozat ec8974914f ensure af_packet module is loaded (if not built-in) 2012-08-01 14:40:43 +02:00
Harald Hoyer 23d6dcd125 test: s/ib700wdt/i6300esbwdt/g 2012-08-01 12:53:39 +02:00
Harald Hoyer 5d833a9f5b add "af_packet" kernel module to network testsuite tests 2012-07-27 15:11:01 +02:00
Harald Hoyer 2723ebba9a test: silence "make all" 2012-07-11 15:23:21 +02:00
Harald Hoyer 3e1d48fd12 test: add support for: make V=1 TESTS="01 20 40" check
$ sudo make V=1 clean check
now runs the testsuite in verbose mode

$ sudo make TESTS="01 20 40" clean check
now only runs the 01, 20 and 40 tests.
2012-07-11 09:33:32 +02:00
Harald Hoyer 4dda0095a1 test/*/server-init.sh: redirect stdin,out,err to /dev/console 2012-07-11 08:40:45 +02:00
Harald Hoyer 27fa604418 test: export initdir 2012-07-09 15:30:15 +02:00
Harald Hoyer 67ab4f7718 testsuite: fixups 2012-06-29 12:51:13 +02:00
Harald Hoyer f71145d20d TEST-20-NFS: trigger watchdog more often 2012-06-29 12:51:13 +02:00
Harald Hoyer 9f88b0370d TEST-20-NFS: libnss cleanup 2012-06-18 20:05:25 +02:00
Harald Hoyer 483b1e3aa8 TEST-20-NFS: add watchdog 2012-06-18 20:05:25 +02:00
Harald Hoyer fc87119069 TEST-20-NFS: get shell in test root for rd.shell 2012-04-02 09:03:25 +02:00
Harald Hoyer 0635530dda TEST-20-NFS/test.sh: fsck with "-a" 2012-03-08 12:25:30 +01:00
Harald Hoyer b8a9dc2d3f TEST-20-NFS: use ext3 on server and fsck after kill 2012-03-08 11:00:29 +01:00
Harald Hoyer 8b6e099892 90kernel-modules/module-setup.sh: exclude nfs* lockd from standard
do not install nfs* lockd filesystems for the standard kernel modules
2012-02-22 16:14:38 +01:00
Harald Hoyer 552ecca6db Renamed all shell scripts to *.sh 2012-02-22 15:15:21 +01:00
Harald Hoyer 96d22bd7d6 test: fixed terminfo location 2012-02-13 21:15:22 +01:00
Harald Hoyer 0be1785aea test: introduce $TESTDIR tmpdir
to keep the git source tree clean, test files are now created in a
$TESTDIR created with mktemp.
2011-11-16 14:04:27 +01:00
Harald Hoyer 3b403b32fc removed trailing whitespaces 2011-05-10 11:56:09 +02:00
Harald Hoyer 0b53ca70b6 Move all hooks to "$hookdir"
hookdir=/lib/dracut/hooks for now, to keep the root directory clean
2011-03-25 16:10:46 +01:00
Harald Hoyer fa79f00803 test/*/test.sh: mv 01hard-off.sh 000-hard-off.sh
otherwise "die" will let the kernel panic
2011-03-07 16:22:42 +01:00
Harald Hoyer 51b28ba9c4 test/TEST-*/test.sh: set -serial to null for servers
-serial udp might have stalled
2010-10-28 17:11:35 +02:00
Harald Hoyer 387bf82e30 test/*/*-init: set PATH
/sbin and /usr/sbin are no longer in $PATH
2010-10-28 17:11:34 +02:00
Harald Hoyer fa7ada31d0 new parameter option names with "rd.*" namespace
Renamed Options
       Here is a list of options, which were used in dracut prior to
       version 008, and their new replacement.

       rdbreak
           rd.break

       rd_CCW
           rd.ccw

       rdcopystate
           rd.copystate

       rd_DASD_MOD
           rd.dasd_mod.dasd

       rd_DASD
           rd.dasd

       rdinitdebug rdnetdebug
           rd.debug

       rd_NO_DM
           rd.dm=0

       rd_DM_UUID
           rd.dm.uuid

       rdblacklist
           rd.driver.blacklist

       rdinsmodpost
           rd.driver.post

       rdloaddriver
           rd.driver.pre

       rd_NO_FSTAB
           rd.fstab=0

       rdinfo
           rd.info

       check
           rd.live.check

       rdlivedebug
           rd.live.debug

       live_dir
           rd.live.dir

       liveimg
           rd.live.image

       overlay
           rd.live.overlay

       readonly_overlay
           rd.live.overlay.readonly

       reset_overlay
           rd.live.overlay.reset

       live_ram
           rd.live.ram

       rd_NO_CRYPTTAB
           rd.luks.crypttab=0

       rd_LUKS_KEYDEV_UUID
           rd.luks.keydev.uuid

       rd_LUKS_KEYPATH
           rd.luks.keypath

       rd_NO_LUKS
           rd.luks=0

       rd_LUKS_UUID
           rd.luks.uuid

       rd_LUKS_UUID
           rd.luks.uuid

       rd_NO_LVMCONF
           rd.lvm.conf

       rd_LVM_LV
           rd.lvm.lv

       rd_NO_LVM
           rd.lvm=0

       rd_LVM_SNAPSHOT
           rd.lvm.snapshot

       rd_LVM_SNAPSIZE
           rd.lvm.snapsize

       rd_LVM_VG
           rd.lvm.vg

       rd_NO_MDADMCONF
           rd.md.conf=0

       rd_NO_MDIMSM
           rd.md.imsm=0

       rd_NO_MD
           rd.md=0

       rd_MD_UUID
           rd.md.uuid

       rd_NFS_DOMAIN
           rd.nfs.domain

       rd_NO_PLYMOUTH
           rd.plymouth=0

       rd_retry
           rd.retry

       rdshell
           rd.shell

       rd_NO_SPLASH
           rd.splash

       rdudevdebug
           rd.udev.debug

       rdudevinfo
           rd.udev.info

       rd_NO_ZFCPCONF
           rd.zfcp.conf=0

       rd_ZFCP
           rd.zfcp
2010-10-28 17:11:27 +02:00
Amadeusz Żołnowski f3af7bd66b use 'type' built-in instead of external cmd 'which' in every Bash script 2010-08-23 11:54:09 +02:00
Harald Hoyer 3de984ba7f test/nfs: correct return code and cleanup 2010-04-16 17:59:50 +02:00
Harald Hoyer 85fd75f91f add rd_retry kernel command line parameter
rd_retry=<seconds to retry in the main loop>

speeds up internal test suite
2010-04-16 17:59:50 +02:00
Harald Hoyer 0c88742669 test: change testsuite to local tcp rather than udp multicast
multicast needs an ethernet device and correct firewall rules
the loopback interface suites better as we only have 2 machines
2010-04-16 17:59:49 +02:00
Philippe Seewer 8a08012764 test: use ldconfig processing for roots as well 2010-03-05 11:42:04 +01:00
Philippe Seewer 778d2ba28b test: Add compatibility for different kernel configs
Some distros, including debian unstable with 2.6.30, still shop
style ide drivers and/or have important filesystems like ext3 as
modules.

This patch ensures that all test cases work on these configurations
by including the necessary modules and adding a simple udev rule
file that provides /dev/sd* symlinks for the case where old style
ide drivers are still in use.
2009-10-27 16:02:56 +01:00
Harald Hoyer 2cc8cbeaf4 test/TEST-20-NFS: kill server if pid file present on run() 2009-10-27 16:02:54 +01:00
Harald Hoyer ba54a4c747 test: add rdinfo 2009-10-09 13:57:35 +02:00
Harald Hoyer ffd0861b7c test/*/hard-off.sh: do not powerdown on rdshell 2009-10-09 13:18:05 +02:00
Harald Hoyer 40ef4325d9 test: run all tests with rdinitdebug by default 2009-10-06 19:09:22 +02:00
Harald Hoyer f12b432efd test: add "failme" parameter for failing tests 2009-10-06 19:09:17 +02:00
Harald Hoyer e71a5ca5f2 test/*/hard-off.sh: poweroff, if failme specified 2009-10-06 16:37:20 +02:00
Harald Hoyer 8eb16b0827 selinux: bail out if policy could not be loaded and selinux=0 not
specified
2009-09-21 17:44:14 +02:00
Warren Togami beb097d9f1 Bridged network boot
* SYNTAX
bridge=<bridgename>:<ethname>
If bridge without parameters, assume bridge=br0:eth0
* When <ethname> would be configured by network scripts, instead create a bridge named <bridgename> then add <ethname> to that bridge.
* Then $netif becomes <bridgename> instead of <ethname> and all existing scripts process netroot mount via this new $netif instead of <ethname>.
* Include a few test cases in NFS and NBD
2009-07-16 16:58:19 -04:00
Harald Hoyer a3a3448d8c rdshell 2009-07-03 18:28:09 +02:00
Harald Hoyer e2dbd86f09 add kernel-modules module to testsuite images 2009-07-03 12:06:11 +02:00
Harald Hoyer 5db734030d omit plymouth and add debug module for the testsuite clients 2009-07-02 11:47:27 +02:00
Harald Hoyer 5831685cdb use _all_ modules to run the test, in case another module fails
also run the tests with 256MB virtual machines
2009-07-01 19:28:51 +02:00
Harald Hoyer 950086e987 do not assume nfs for root=/dev/... but for /dev/nfs 2009-07-01 19:28:31 +02:00
Warren Togami 9d4c1799fe Fix legacy root=/dev/nfs nfsroot=IP:path case
TODO: root=/dev/nfs DHCP cases are still broken.
2009-06-30 18:22:44 -04:00
Warren Togami 297cb80bab Cleanup parse-nfsroot and NFS tests.
TODO: root=/dev/nfs is still broken.
2009-06-30 17:48:56 -04:00
Warren Togami 798d950651 Add test for Legacy root=IP:path NFSv3 syntax 2009-06-30 16:38:57 -04:00
Warren Togami 92798bf79b netroot= variant is not supported for NFS, you must use root=
TODO: This temporarily breaks Legacy root=/dev/nfs.
2009-06-30 16:27:45 -04:00
Warren Togami fb3d8cf7c2 Remove legacy nfsroot.txt derived shortcuts and accompanying tests.
(further cleanup is needed)
2009-06-23 17:08:39 -04:00
Warren Togami 5655a3ffbf Remove dracut invented variations of Legacy nfsroot.txt syntax and accompanying tests.
- Remove root=nfs nfsroot=...
- Remove root=nfs4 nfsroot=...
- Remove root=/dev/nfs4 nfsroot=...
- Legacy nfsroot= without root=/dev/nfs should be unsupported according to the nfsroot.txt.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/filesystems/nfsroot.txt
45 root=/dev/nfs
46
47   This is necessary to enable the pseudo-NFS-device. Note that it's not a
48   real device but just a synonym to tell the kernel to use NFS instead of
49   a real device.
2009-06-22 16:40:09 -04: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
Warren Togami 9f786a9d8f Simple changes to allow test suite to work with dash. 2009-06-15 16:26: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
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 d5e1e577ee specify dhcpd.conf path for test server 2009-06-08 10:34:50 +02: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
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
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