diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-05-17 19:10:55 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-05-17 23:22:54 +0200 |
commit | 5656759d0617594ee8e850a258a21d3e187bf02c (patch) | |
tree | 9358242b398e4a066c0f149d833559f17fbe2e61 /test/units/util.sh | |
parent | Merge pull request #27664 from mrc0mmand/test-merge (diff) | |
download | systemd-5656759d0617594ee8e850a258a21d3e187bf02c.tar.xz systemd-5656759d0617594ee8e850a258a21d3e187bf02c.zip |
test: get rid of the busybox stuff
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.
Diffstat (limited to '')
-rwxr-xr-x | test/units/util.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/units/util.sh b/test/units/util.sh index d151c39965..cd4ddcdb2c 100755 --- a/test/units/util.sh +++ b/test/units/util.sh @@ -80,3 +80,15 @@ runas() { shift XDG_RUNTIME_DIR=/run/user/"$(id -u "$userid")" setpriv --reuid="$userid" --init-groups "$@" } + +create_dummy_container() { + local root="${1:?}" + + if [[ ! -d /testsuite-13-container-template ]]; then + echo >&2 "Missing container template, probably not running in TEST-13-NSPAWN?" + exit 1 + fi + + mkdir -p "$root" + cp -a /testsuite-13-container-template/* "$root" +} |