summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #27126 from yuwata/journal-compressZbigniew Jędrzejewski-Szmek2023-04-071-0/+32
|\ | | | | sd-journal: allow to specify compression algorithm through env
| * test: add test case that journal file is created with the requested ↵Yu Watanabe2023-04-071-0/+32
| | | | | | | | compression algorithm
* | Merge pull request #27158 from mrc0mmand/more-testsYu Watanabe2023-04-079-0/+729
|\ \ | | | | | | test: introduce TEST-81-GENERATORS
| * | test: introduce TEST-81-GENERATORSFrantisek Sumsal2023-04-068-0/+641
| | | | | | | | | | | | | | | | | | | | | Add some explicit tests for various generators we ship, e.g.: - systemd-debug-generator - systemd-environment-d-generator - systemd-fstab-generator
| * | test: add a couple of tests for systemd-modules-loadFrantisek Sumsal2023-04-061-0/+88
| | |
* | | test: check if we skip the full setup on daemon-reexecFrantisek Sumsal2023-04-073-3/+48
| | | | | | | | | | | | | | | | | | A simple test case for issue #27106. Resolves: #27139
* | | confext: add tests for systemd-confextmaanyagoenka2023-04-051-0/+11
| | |
* | | test: use kbd-mode-map we ship in TEST-73-LOCALEFranck Bui2023-04-051-0/+5
| | | | | | | | | | | | | | | The rational is the same as the one described in commit be0cc2ce6c947aafadb3f42dba405269f670b31c.
* | | test/test-functions: fix typo in install_suse_systemd()Thomas Blume2023-04-041-1/+1
| |/ |/|
* | udev-rules: check tokens orderDmitry V. Levin2023-04-031-0/+4
| | | | | | | | | | When invoked by udevadm verify, warn about rules that have PROGRAM assignments specified after RESULT checks.
* | Merge pull request #27044 from bluca/sysext_recursive_dirLennart Poettering2023-04-031-0/+11
|\ \ | |/ |/| Ensure sysexts do not contain an os-release file, do not load sysexts from /usr[/local]/lib/extensions/
| * sysext: validate that they do not contain os-releaseLuca Boccassi2023-03-301-0/+11
| | | | | | | | | | sysexts are not supposed to ship os-release files, enforce this when loading them
* | Merge pull request #27087 from mrc0mmand/missing-coverageFrantisek Sumsal2023-04-018-225/+264
|\ \ | | | | | | test: set ReadWritePaths= for test-.services when built w/ coverage
| * | test: shed some light into the whole coverage situationFrantisek Sumsal2023-04-011-0/+36
| | |
| * | test: set ReadWritePaths= for test-.services when built w/ coverageFrantisek Sumsal2023-03-317-225/+228
| |/ | | | | | | | | | | | | | | | | | | | | | | Let's make the dropin, to make the build dir writable for gcov, a bit more generic, so it can be used by all units starting with prefix test-. This should help with a bunch of recent reports about missing coverage I got, as well as with existing test units using DynamicUser=true. This might feel a bit like a magic trick from behind the curtains, but I want to touch the actual tests as little as possible, since it makes them unnecessarily messy (see the various workarounds for sanitizers), and the coverage reports are generated only in a specific CI job anyway.
* | firstboot: Add --reset optionDaan De Meyer2023-04-011-0/+9
| | | | | | | | | | | | This can be used to prepare an image for firstboot by removing all files that systemd knows about that contain machine specific information.
* | treewide: fix unnecessary $ on arithmetic variablesDmitry V. Levin2023-04-013-5/+5
| | | | | | | | This should fix shellcheck warning SC2004.
* | test: fixed negative checks in TEST-70-TPM2.OMOJOLA JOSHUA DAMILOLA2023-03-311-39/+20
| | | | | | | | Use in-line error handling rather than redirections. Follow up on #27020
* | test: use setpriv instead of su for user switch from rootThomas Blume2023-03-314-8/+6
|/ | | | | | | | | | | | systemd-repart needs to find mkfs.ext4 for the test. This is located in the directory /usr/sbin on openSUSE Tumbleweed. But since the variable ALWAYS_SET_PATH in /etc/login.defs is set to yes, su re-initializes the $PATH variable and removes /usr/sbin. Hence, mkfs.ext4 is not found and the test fails. Using setpriv instead of su fixes this issue and is more appropriate to do the switch user task from root. [zjs: move setpriv to $BASICTOOLS and force-push to retrigger CI]
* test: add test case for fdstore dumping logic, and systemd-notify --fd=Lennart Poettering2023-03-291-0/+27
|
* Merge pull request #27049 from DaanDeMeyer/update-mkosiDaan De Meyer2023-03-295-112/+2
|\ | | | | mkosi: Update to latest
| * mkosi: Update to latestDaan De Meyer2023-03-293-111/+0
| | | | | | | | | | | | | | | | | | | | | | - Drop Netdev= as it was removed in mkosi - Always install python-psutil in the final image (required for networkd tests) - Always Install python-pytest in the final image (required for ukify tests) - Use the narrow glob for all centos python packages - Drop the networkd mkosi config files (the default image can be used instead) - Use ".conf" as the mkosi config file suffix everywhere - Copy src/ to /root/src in the final image and set gdb substitute path in .gdbinit to make gdb work properly
| * test: Install systemd-networkd-tests.py when install_tests is enabledDaan De Meyer2023-03-292-1/+2
| |
* | Merge pull request #27020 from 1awesomeJ/nitLuca Boccassi2023-03-291-0/+78
|\ \ | |/ |/| systemd-cryptenroll: adding integration test cases
| * added more test casesOMOJOLA JOSHUA DAMILOLA2023-03-281-0/+78
| |
* | udev_rules_parse_file: do not ignore ENOENT when invoked by udevadm verifyDmitry V. Levin2023-03-291-0/+2
| | | | | | | | | | | | Make sure the ENOENT exception reintroduced by commit 9db7081d83d56cd2523b03f9eb9d67ef1c93c55f is not applied when the parser is invoked by udevadm verify.
* | TEST-80: synchronize explicitly instead of by timeLennart Poettering2023-03-293-17/+73
| | | | | | | | | | | | | | | | | | | | This removes "sleep" invocations, and makes the notify access testcase a lot more robust to runtime jitter. We use a pair of fifos in the fs to sync instead. Also various other improvoements, including comments. (Also removes the unnecessary "no-qemu" restriction)
* | test: do not remove state directory on failureLuca Boccassi2023-03-291-2/+2
| | | | | | | | | | | | | | The test log is in the state directory, and we want to keep it around when a test fails. Follow-up for: 256a835f1c6c646a55039659aa2db186fbeb5c5d
* | Merge pull request #27046 from bluca/shellcheckYu Watanabe2023-03-291-57/+63
|\ \ | | | | | | Fix some shellcheck warnings
| * | test: fix shellcheck warnings in test-sysusers.shLuca Boccassi2023-03-291-57/+63
| | |
* | | Merge pull request #27042 from fbuihuu/fixes-for-testsuite-74-mountLuca Boccassi2023-03-291-2/+2
|\ \ \ | |/ / |/| | Fixes for testsuite 74 mount
| * | test: fix regexp in testsuite-74.mount.shFranck Bui2023-03-281-1/+1
| | | | | | | | | | | | Several whitespaces can separate "ext4" and "sd-mount-test" strings.
| * | test: drop extraneous bracket in testsuite-74.mount.shFranck Bui2023-03-281-1/+1
| | |
* | | portable: add PORTABLE_NAME_AND_VERSION= and other metadata to LogsExtraFields=Luca Boccassi2023-03-282-0/+26
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful to identify log messages with metadata from the images they run on. Look for ID/VERSION_ID/IMAGE_ID/IMAGE_VERSION/BUILD_ID, with a SYSEXT_ prefix if we are looking at an extension, and append via LogExtraFields= as respectively PORTABLE_NAME_AND_VERSION= in case of a single image. In case of extensions, append as PORTABLE_ROOT_NAME_AND_VERSION= for the base and one PORTABLE_EXTENSION_AND_VERSION= for each extension. Example with a base and two extensions, with the unit coming from the first extension: [Service] RootImage=/home/bluca/git/systemd/base.raw Environment=PORTABLE=app0.raw BindReadOnlyPaths=/etc/os-release:/run/host/os-release LogExtraFields=PORTABLE=app0.raw Environment=PORTABLE_ROOT=base.raw LogExtraFields=PORTABLE_ROOT=base.raw LogExtraFields=PORTABLE_ROOT_NAME_AND_VERSION=debian_10 ExtensionImages=/home/bluca/git/systemd/app0.raw LogExtraFields=PORTABLE_EXTENSION=app0.raw LogExtraFields=PORTABLE_EXTENSION_NAME_AND_VERSION=app_0 ExtensionImages=/home/bluca/git/systemd/app1.raw LogExtraFields=PORTABLE_EXTENSION=app1.raw LogExtraFields=PORTABLE_EXTENSION_NAME_AND_VERSION=app_1
* | Merge pull request #27013 from fbuihuu/test-fixletsYu Watanabe2023-03-281-4/+13
|\ \ | | | | | | Test fixlets
| * | test: don't export $TOOLS_DIRFranck Bui2023-03-271-2/+2
| | | | | | | | | | | | It's not (and shouldn't be) used by any test scripts.
| * | test: clean up $STATEDIR tooFranck Bui2023-03-271-0/+1
| | |
| * | test: $STATEDIR should not point to /usr/lib/systemd/tests when NO_BUILD=1Franck Bui2023-03-271-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | When testing the binaries from the host, make sure to not store the state data below /usr but use a dedicated directory in /var/tmp/ instead. The working directories of the tests, initially located in /var/tmp, are also moved in a dedicated directory /var/tmp/systemd-tests.
* | | Merge pull request #26993 from mrc0mmand/TEST-46-tweaksYu Watanabe2023-03-281-2/+2
|\ \ \ | | | | | | | | test: explicitly pull in systemd-userdbd.service
| * | | test: explicitly pull in systemd-userdbd.socketFrantisek Sumsal2023-03-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Since we don't run preset-all on the test image, the systemd-userdbd.socket remains disabled. Let's pull it in explicitly to give systemd-userdbd some coverage as well.
* | | | udev-rules: fix grammar in diagnostics about lines that have no effectDmitry V. Levin2023-03-271-11/+11
| | | | | | | | | | | | | | | | Fixes: 25de7aa7b90c ("udev: modernize udev-rules.c")
* | | | udev-rules: extend the check for conflicting expressionsDmitry V. Levin2023-03-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Log an error when a rule line contains the following kind of conflicting match expressions: KEY=="foo*", KEY=="bar*"
* | | | udev-rules: check token delimitersDmitry V. Levin2023-03-271-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When udev_rules_parse_file() is called by udevadm verify, issue warnings about the following conditions in udev rules: * the first token in the rule is preceded with a comma * the last token in the rule is followed by a comma * there is no comma between tokens * there is no whitespace between tokens * there is more than a single comma between tokens * there is whitespace between a token and a comma * there is no whitespace after comma
* | | | testsuite-17.11.sh: add commas between tokensDmitry V. Levin2023-03-271-13/+13
| |/ / |/| |
* | | Merge pull request #26870 from fbuihuu/move-unit-tests-in-a-dedicated-subdirLuca Boccassi2023-03-276-23/+24
|\ \ \ | | | | | | | | Move unit tests in a dedicated subdir
| * | | test: install symlinks with valid targets on SUSE and DebianFranck Bui2023-03-261-2/+2
| | | |
| * | | test: on openSUSE install the collection of unit test binaries in the target ↵Franck Bui2023-03-242-10/+8
| | | | | | | | | | | | | | | | only for TEST-02-UNITTESTS
| * | | meson: make sure the unit test scripts find testdata/ even if they are not ↵Franck Bui2023-03-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | installed in the same directory testdata/ is shared by both the unit tests and the integration tests. Hence it makes sense to place them right under /usr/lib/systemd/tests/ while the tests themself are located under dedicated sub-directories: /usr/lib/systemd/tests/ ├── integration-tests ├── testdata └── unit-tests ├── testdata -> ../testdata However the unit tests implemented as shell scripts (such as test-fstab-generator.sh) expect to find testdata/ where the scripts are installed, ie they do something like: src="$(dirname "$0")/testdata/test-fstab-generator" This patch installs a symlink in 'unitestsdir' named "testdata" and that points to whatever value 'testdata_dir' is set.
| * | | meson: define testdata_dir globallyFranck Bui2023-03-241-2/+0
| | | |
| * | | test: install unit tests in a dedicated subdirectory below '$testsdir'Franck Bui2023-03-245-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | /usr/lib/systemd/tests may contain more than the unit tests. For example on SUSE we also install the integration tests there. Putting the unit tests in a dedicated directory named 'unit-tests' makes the layout cleaner. Note that `run-unit-tests.py` has not been moved so we don't need to adjust (Fedora) packaging and users also don't need to descend into the subdirectory.