summaryrefslogtreecommitdiffstats
path: root/test/units/util.sh
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2023-05-17 19:10:55 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2023-05-17 23:22:54 +0200
commit5656759d0617594ee8e850a258a21d3e187bf02c (patch)
tree9358242b398e4a066c0f149d833559f17fbe2e61 /test/units/util.sh
parentMerge pull request #27664 from mrc0mmand/test-merge (diff)
downloadsystemd-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-xtest/units/util.sh12
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"
+}