mirror of
https://github.com/containers/podman.git
synced 2025-07-02 16:57:24 +08:00
Merge pull request #25735 from Luap99/cdi-compose
test/compose: use --cdi-spec-dir not /etc/cdi
This commit is contained in:
@ -1,9 +1 @@
|
|||||||
if is_rootless; then
|
cp device.json $WORKDIR/cdi
|
||||||
reason=" - can't write to /etc/cdi"
|
|
||||||
_show_ok skip "$testname # skip$reason"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p /etc/cdi
|
|
||||||
mount -t tmpfs tmpfs /etc/cdi
|
|
||||||
cp device.json /etc/cdi
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
if ! is_rootless; then
|
|
||||||
umount -l /etc/cdi
|
|
||||||
fi
|
|
@ -198,12 +198,12 @@ function start_service() {
|
|||||||
|
|
||||||
# FIXME: use ${testname} subdir but we can't: 50-char limit in runroot
|
# FIXME: use ${testname} subdir but we can't: 50-char limit in runroot
|
||||||
if ! is_rootless; then
|
if ! is_rootless; then
|
||||||
rm -rf $WORKDIR/{root,runroot,cni}
|
rm -rf $WORKDIR/{root,runroot,networks,cdi}
|
||||||
else
|
else
|
||||||
$PODMAN_BIN unshare rm -rf $WORKDIR/{root,runroot,cni}
|
$PODMAN_BIN unshare rm -rf $WORKDIR/{root,runroot,networks,cdi}
|
||||||
fi
|
fi
|
||||||
rm -f $DOCKER_SOCK
|
rm -f $DOCKER_SOCK
|
||||||
mkdir --mode 0755 $WORKDIR/{root,runroot,cni}
|
mkdir --mode 0755 $WORKDIR/{root,runroot,networks,cdi}
|
||||||
chcon --reference=/var/lib/containers $WORKDIR/root
|
chcon --reference=/var/lib/containers $WORKDIR/root
|
||||||
|
|
||||||
$PODMAN_BIN \
|
$PODMAN_BIN \
|
||||||
@ -212,7 +212,8 @@ function start_service() {
|
|||||||
--root $WORKDIR/root \
|
--root $WORKDIR/root \
|
||||||
--runroot $WORKDIR/runroot \
|
--runroot $WORKDIR/runroot \
|
||||||
--cgroup-manager=systemd \
|
--cgroup-manager=systemd \
|
||||||
--network-config-dir $WORKDIR/cni \
|
--network-config-dir $WORKDIR/networks \
|
||||||
|
--cdi-spec-dir $WORKDIR/cdi \
|
||||||
system service \
|
system service \
|
||||||
--time 0 unix://$DOCKER_SOCK \
|
--time 0 unix://$DOCKER_SOCK \
|
||||||
&> $WORKDIR/server.log &
|
&> $WORKDIR/server.log &
|
||||||
@ -236,10 +237,11 @@ function start_service() {
|
|||||||
function podman() {
|
function podman() {
|
||||||
echo "\$ podman $*" >>$WORKDIR/output.log
|
echo "\$ podman $*" >>$WORKDIR/output.log
|
||||||
output=$($PODMAN_BIN \
|
output=$($PODMAN_BIN \
|
||||||
--storage-driver=vfs \
|
--storage-driver=vfs \
|
||||||
--root $WORKDIR/root \
|
--root $WORKDIR/root \
|
||||||
--runroot $WORKDIR/runroot \
|
--runroot $WORKDIR/runroot \
|
||||||
--network-config-dir $WORKDIR/cni \
|
--network-config-dir $WORKDIR/networks \
|
||||||
|
--cdi-spec-dir $WORKDIR/cdi \
|
||||||
"$@")
|
"$@")
|
||||||
rc=$?
|
rc=$?
|
||||||
|
|
||||||
@ -401,7 +403,7 @@ for t in "${tests_to_run[@]}"; do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# FIXME: run 'podman ps'?
|
# FIXME: run 'podman ps'?
|
||||||
# rm -rf $WORKDIR/${testname}
|
# rm -rf $WORKDIR/${testname}
|
||||||
done
|
done
|
||||||
|
|
||||||
# END entry handler
|
# END entry handler
|
||||||
|
Reference in New Issue
Block a user