summaryrefslogtreecommitdiffstats
path: root/test/TEST-01-BASIC (follow)
Commit message (Collapse)AuthorAgeFilesLines
* test: add create_empty_image_rootdir() to simplify testcase setupDan Streetman2019-07-171-6/+1
| | | | | | | | | Almost all tests were manually mounting/unmounting $TESTDIR/root from the loopback image; this moves all that into test-functions so the test setup functions are simplier. Also add test_setup_cleanup() function, to cleanup what is mounted by create_empty_image_rootdir()
* test: drop || return 1 expression which is incompatible with set -eFrantisek Sumsal2019-07-081-1/+1
| | | | | | The `set -e` option is incompatible with a subshell/compound command, which is followed by || <EXPR>. In such case, the -e option is ignored in all affected subshells/functions (see man bash(1) for command `set`).
* test: correctly fail when system is borkedFrantisek Sumsal2019-05-271-1/+1
| | | | | | | In certain situations, the systemctl commands may fail (e.g. due to missing shared libraries), but the 'script' continues and creates a /testok file, marking the test incorrectly as passed. Let's fix this and bail out immediately when a command exits with a non-zero exit code.
* scripts: use 4 space indentationZbigniew Jędrzejewski-Szmek2019-04-121-2/+0
| | | | | | | | | | | | | | | | | | We had all kinds of indentation: 2 sp, 3 sp, 4 sp, 8 sp, and mixed. 4 sp was the most common, in particular the majority of scripts under test/ used that. Let's standarize on 4 sp, because many commandlines are long and there's a lot of nesting, and with 8sp indentation less stuff fits. 4 sp also seems to be the default indentation, so this will make it less likely that people will mess up if they don't load the editor config. (I think people often use vi, and vi has no support to load project-wide configuration automatically. We distribute a .vimrc file, but it is not loaded by default, and even the instructions in it seem to discourage its use for security reasons.) Also remove the few vim config lines that were left. We should either have them on all files, or none. Also remove some strange stuff like '#!/bin/env bash', yikes.
* test: drop service masking in TEST-01-BASICFrantisek Sumsal2019-01-111-7/+0
| | | | | This test should ensure all systemd starts correctly, so masking them is counter-productive in this case.
* tests: reproduce https://github.com/systemd/systemd/issues/11251Evgeny Vereshchagin2018-12-291-1/+1
|
* test: don't run TEST-01-BASIC in unprivileged containers on Travis CIEvgeny Vereshchagin2018-12-241-1/+1
|
* tests: clean up again after running tests (#10446)Lennart Poettering2018-10-181-1/+6
| | | | | | | | | | | | | | | | | Currently, if I run the full "run-integration-tests.sh" script it will fail on my machine because it fills up /var/tmp whith just too much crap until the disk is full. Let's make sure that "run-integration-tests.sh" cleans up after every test. For that change the make targets to run from "clean setup run" to "clean setup run clean" — except that that doesn't work since make is smart enough to realize that the same target appears twice on the command line and will only execute it once. Let's fix that by defining another target "clean-again" which is just like "clean", but allows us to be added to the same command line a second time. Then, let's build with "clean setup run clean-again" and all is good. While we are at it, let's also add .PHONY where appropriate, after all these all are phony targets.
* tests: also run TEST-01-BASIC in an unprivileged container (#9957)Evgeny Vereshchagin2018-08-301-0/+1
| | | | | This should make it much easier to catch regressions like https://github.com/systemd/systemd/issues/9914 and https://github.com/systemd/systemd/issues/8535.
* test: make sure "make" in the test directories works againLennart Poettering2017-12-151-1/+1
| | | | Fixes: #7648
* tests: try to autodetect directory betterZbigniew Jędrzejewski-Szmek2017-12-061-1/+1
| | | | | | | | | | Ignore mkosi.builddir. In the future we can also add other patterns if necessary. run-intergration-tests.sh is updated to use the new script, and modified to work from arbitrary directory. Follow-up for #7494.
* test: Run qemu/nspawn tests with "set -e"Martin Pitt2017-08-101-0/+1
| | | | | | | | This catches errors like "ninja not found", missing programs etc. early, instead of silently ignoring them and trying to boot a broken VM. In install_config_files(), allow some distro specific files to be absent (such as /etc/sysconfig/init).
* test: Factorize common integration test functions (#6540)Martin Pitt2017-08-041-34/+0
| | | | | | | | | | | All test/TEST* but TEST-02-CRYPTSETUP share the same check_result_qemu() and test_cleanup(), so move them into test_functions and only override them in TEST-02-CRYPTSETUP. Also provide a common test_run() which by default assumes that both QEMU and nspawn tests are run. Particular tests which don't support either need to explicitly opt out by setting $TEST_NO_{QEMU,NSPAWN}. Do it this way around to avoid accidentally forgetting to opt in, and to encourage test authors to at least always support nspawn.
* test: try to guess the build directoryZbigniew Jędrzejewski-Szmek2017-07-181-1/+3
| | | | | This will work if $(TOP_SRC_DIR) has exactly one subdirectory with .ninja_deps. Otherwise, BUILD_DIR has to be specified.
* test: convert test/ to use meson installZbigniew Jędrzejewski-Szmek2017-07-181-10/+2
| | | | | | | | | | | | | Automatic rebuilding is removed: it doesn't play well with ninja, because ninja always writes logs, and even if nothing needs to be built, it will make the log file owned by root. So let's just remove this, and say that the user must always do the build first. I'm also keeping make for the tests, because ninja doesn't play well with sudo. Since the build directory is arbitrary, it needs to be specified, e.g. sudo make BUILD_DIR=/home/zbyszek/src/systemd/build1 -C test/TEST-01-BASIC/
* test: merge check_nspawn() into run_nspawn()Martin Pitt2016-06-241-2/+1
| | | | | This makes nspawn tests symmetric with run_qemu() which also exits with 1 if QEMU is not available.
* tree-wide: remove uses of --failedZbigniew Jędrzejewski-Szmek2016-05-091-1/+1
| | | | It has been replaced by --state=failed.
* tests: don't run tests on incomplete setupEvgeny Vereshchagin2015-11-251-1/+1
|
* Merge pull request #1957 from zonque/qemu-testLennart Poettering2015-11-241-0/+7
|\ | | | | test: make QEMU tests work on Semaphore
| * test: 01-basic: mask some services that currently don't run in qemuDaniel Mack2015-11-191-0/+7
| |
* | tests: fix ls: cannot access /var/tmp/systemd-test.*/journal/*/*.journalEvgeny Vereshchagin2015-11-191-1/+1
|/ | | | don't lose logs from the test machine too
* tests: various fixesEvgeny Vereshchagin2015-11-101-1/+1
| | | | | | * remove journal flushing (systemd-journal-flush.service runs journalctl --flush on boot) * use sh -c and PATH instead of @SYSTEMCTL@ expansion * remove unnecessary semicolons etc
* tests: do not use systemctl status --failedRonny Chevalier2014-06-101-1/+1
| | | | | since v212 calling systemctl status without arguments will show a overall system state
* test: rework run_qemuRonny Chevalier2013-12-101-6/+2
| | | | | | | | | | | | | | | It tries to find a suitable QEMU binary and will use KVM if present. We can now configure QEMU from outside with 4 variables : - $QEMU_BIN : path to QEMU's binary - $KERNEL_APPEND : arguments appended to kernel cmdline - $KERNEL_BIN : path to a kernel Default /boot/vmlinuz-$KERNEL_VER - $INITRD : path to an initramfs Default /boot/initramfs-${KERNEL_VER}.img - $QEMU_SMP : number of CPU simulated by QEMU. Default 1 (from Alexander Graf's script: http://www.spinics.net/lists/kvm/msg72389.html)
* test: remove duplicated codeRonny Chevalier2013-11-071-178/+12
|
* TEST-01-BASIC, TEST-02-CRYPTSETUP: fixed stripHarald Hoyer2013-09-171-3/+3
| | | | also output more status about failed jobs
* test: make it easier to override kernel versionZbigniew Jędrzejewski-Szmek2013-04-241-3/+1
|
* test: some trivial fixes to test scriptsZbigniew Jędrzejewski-Szmek2013-01-301-3/+3
| | | | | | | - fix typo - use compiled systemd-nspawn - drop --capability=... from systemd-nspawn invocation, is is the default now - simplify sudo make invocations
* test: factor out testsuite.target, end.serviceMichal Schmidt2013-01-251-10/+4
| | | | | | Tests can use the same testsuite.target. Add end.service to call poweroff instead of doing it from ExecStopPost where it may be skipped on failure of ExecStart.
* test: use non-blocking systemctl calls in testsuite.serviceMichal Schmidt2013-01-251-1/+1
| | | | | "systemctl poweroff" called from testsuite.service will cause this unit itself to stop. To avoid deadlock, the call must not be synchronous.
* test: split of cryptsetup into its own testLennart Poettering2012-09-131-35/+2
|
* nspawn: introduce new --capabilities= flag and make use of it in the nspawn ↵Lennart Poettering2012-06-281-1/+1
| | | | test case
* test: reenable nspawn, even if it fails for nowLennart Poettering2012-06-281-2/+1
|
* test/TEST-01-BASIC: add /var on cryptoluks and wait for the journalHarald Hoyer2012-05-291-25/+89
|
* test/TEST-01-BASIC: fail test, if qemu failedHarald Hoyer2012-05-291-1/+2
|
* test/TEST-01-BASIC: make DEBUGTOOLS an environment variableHarald Hoyer2012-05-291-4/+3
|
* test/TEST-01-BASIC: add missing "; then"Harald Hoyer2012-05-241-1/+1
|
* test/TEST-01-BASIC: only test systemd-nspawn, if the test system uses systemdHarald Hoyer2012-05-241-1/+3
|
* test/TEST-01-BASIC: add systemd-nspawn run with the root imageHarald Hoyer2012-05-241-2/+24
|
* test/TEST-01-BASIC: untabifiedHarald Hoyer2012-05-241-39/+39
|
* test/TEST-01-BASIC: add a defined rc.localHarald Hoyer2012-05-241-1/+6
|
* test/TEST-01-BASIC: add /etc/localtime to test imageHarald Hoyer2012-05-241-6/+6
|
* test: add touch to test machineLennart Poettering2012-05-241-1/+1
|
* test: check systemctl --failed in test VMLennart Poettering2012-05-241-2/+5
|
* test: introduce a basic testsuite frameworkHarald Hoyer2012-05-222-0/+200
$ cd test $ sudo make check will run all tests in the TEST-* subdirectories $ cd test/TEST-01-BASIC $ sudo make clean setup run will run the different stages of the test for debugging purposes