summaryrefslogtreecommitdiffstats
path: root/test/units/util.sh (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tests: fix access mode of root inode of throw-away container imagesLennart Poettering4 days1-0/+1
| | | | | | Otherwise the root inode will typically have what mkdtemp sets up, which is something like 0700, which is weird and somewhat broken when trying to look into containers from unpriv users.
* ci: add some basic testing of the new --pty and --pipe switchesLennart Poettering2024-10-251-0/+9
|
* TEST-19-CGROUP: add test cases for IPAddressAllow=/IPAddressDeny=Yu Watanabe2024-10-161-2/+13
|
* test: Rename testsuite-XX units to match test nameDaan De Meyer2024-05-141-2/+2
| | | | | | | Having these named differently than the test itself mostly creates unecessary confusion and makes writing logic against the tests harder so let's rename the testsuite-xx units and scripts to just use the test name itself.
* TEST-74-AUX-UTILS: Make sure at least two locales existDaan De Meyer2024-05-061-0/+33
|
* test: Drop /usr overlay workaroundDaan De Meyer2024-04-301-16/+0
| | | | | /usr is not erofs anymore in the mkosi images so let's drop the workaround where we mount a writable tmpfs on top of /usr.
* TEST-13-NSPAWN: move container template to /usr/shareRichard Maw2024-04-301-2/+2
| | | | Having directories in / causes problems for make-root-on-boot images
* mkosi: Build minimal images and enable related integration testsDaan De Meyer2024-04-251-0/+120
| | | | | | | | | | | | | | This commit adds definitions to build the minimal_0 and minimal_1 images with mkosi and includes them into the system image. We also move the building of the various app-xxx and similar images that are extremely minimal into the tests itself by moving the related logic from install_verity_minimal() into a new function install_extension_images() in util.sh. Because the mkosi /usr is read-only, we now place the extension images in /tmp instead of /usr/share. Co-authored-by: Richard Maw <richard.maw@codethink.co.uk> Co-authored-by: sam-leonard-ct <sam.leonard@codethink.co.uk>
* test: fix mixed indentFrantisek Sumsal2024-02-201-1/+1
|
* test: Add effective cgroup limits testingMichal Koutný2024-01-031-0/+9
|
* test: mount overlayfs over /usr in some testsRichard Maw2023-12-131-0/+16
| | | | | | | | | | | Most of the integration tests have been made to not write to /usr but some genuinely need to do so. Because mkosi creates images with a read-only /usr it is not normally writeable. By mounting an overlayfs with /usr as the lower dir and upper and working dirs in /var tests may write to /usr.
* test: add a couple of tests for RestrictFileSystems=Frantisek Sumsal2023-11-241-0/+19
|
* test: skip --tpm2-device-key= tests with older OpenSSLFrantisek Sumsal2023-11-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --tpm2-device-key= requires OpenSSL >= 3 with KDF-SS, so let's skip the test if we're running with older OpenSSL. + systemd-cryptenroll --tpm2-device-key=/tmp/srk.pub --tpm2-pcrs=12:sha256=F5A5FD42D16A20302798EF6ED309979B43003D2320D9F0E8EA9831A92759FB4B /tmp/systemd-cryptsetup-H8y.IMAGE Failed to find TPM2 pcrlock policy file 'pcrlock.json': No such file or directory Allocating context for crypt device /tmp/systemd-cryptsetup-H8y.IMAGE. Trying to open and read device /tmp/systemd-cryptsetup-H8y.IMAGE with direct-io. Trying to open device /tmp/systemd-cryptsetup-H8y.IMAGE without direct-io. Initialising device-mapper backend library. Trying to load LUKS2 crypt type from device /tmp/systemd-cryptsetup-H8y.IMAGE. Crypto backend (OpenSSL 1.1.1k FIPS 25 Mar 2021) initialized in cryptsetup library version 2.3.7. Detected kernel Linux 4.18.0-521.el8.ppc64le ppc64le. ... Failed to find TPM PCR public key file 'tpm2-pcr-public-key.pem': No such file or directory Failed to read TPM2 PCR public key, proceeding without: No such file or directory Can't find symbol Esys_TR_GetTpmHandle: /lib64/libtss2-esys.so.0: undefined symbol: Esys_TR_GetTpmHandle libtss2-esys too old, does not include Esys_TR_GetTpmHandle. Can't find symbol Esys_TR_GetTpmHandle: /lib64/libtss2-esys.so.0: undefined symbol: Esys_TR_GetTpmHandle libtss2-esys too old, does not include Esys_TR_GetTpmHandle. PolicyPCR calculated digest: 9a1f511fb94f030eb21d0332ef2739727bf0ead4ec26a204d15b09cdeb4b2555 Calculating sealed object. Calculating encrypted seed for sealed object. Calculating encrypted seed for ECC sealed object. Calculating KDFe(). KDF-SS requires openssl >= 3. Could not calculate KDFe: Operation not supported Could not calculate encrypted seed: Operation not supported Failed to seal to TPM2: Operation not supported
* test: split TEST-70-TPM2 into subtestsFrantisek Sumsal2023-10-251-0/+7
|
* test: unify checking for user xattrs support in cgroupfsFrantisek Sumsal2023-10-191-0/+11
| | | | | Also, run the coredump forwarding test only if user xattrs are supported.
* test: introduce TEST-09-REBOOTFrantisek Sumsal2023-09-271-1/+23
| | | | | To test stuff involving state preserved across (multiple) reboots, like journal boot IDs.
* test: add a couple of tests for nss-myhostnameFrantisek Sumsal2023-06-281-0/+39
|
* test: create nspawn config files when collecting coverageFrantisek Sumsal2023-05-181-0/+18
| | | | | | | Which bind-mounts the $BUILD_DIR into the container. This whole coverage thing is getting slightly ridiculous. Follow-up to 3b2823a749, but for non-machinectl containers.
* test: get rid of the busybox stuffFrantisek Sumsal2023-05-171-0/+12
| | | | | | It already required a lot of workarounds, since the busybox utilities often work differently than their "full" counterparts, and putting the container together using our "tools" is quite simple anyway.
* test: move runas() to the shared utility libraryFrantisek Sumsal2023-05-161-0/+6
|
* test: introduce get_cgroup_hierarchy()Frantisek Sumsal2023-05-161-0/+18
|
* test: rename assert.sh to util.shFrantisek Sumsal2023-05-161-0/+58
So we can extend it with additional utility functions without making it confusing. No functional change.