-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test case will execute sysctl inside nested container running on top of QM Jira-URL: https://issues.redhat.com/browse/VROOM-19309 Signed-off-by: weiwang <[email protected]>
- Loading branch information
1 parent
d5a4668
commit 2c85b31
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
summary: Executing sysctl inside nested container running on top of QM | ||
test: /bin/bash ./test.sh | ||
duration: 20m | ||
tag: ffi | ||
framework: shell | ||
id: f615d356-9bf9-4de2-a007-7a99eca2bc48 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash -euvx | ||
|
||
# shellcheck disable=SC1091 | ||
|
||
. ../common/prepare.sh | ||
|
||
export QM_HOST_REGISTRY_DIR="/var/qm/lib/containers/registry" | ||
export QM_REGISTRY_DIR="/var/lib/containers/registry" | ||
|
||
disk_cleanup | ||
prepare_test | ||
reload_config | ||
|
||
exec_cmd "podman run -d --rm --replace -d --name ffi-asil \ | ||
quay.io/centos-sig-automotive/ffi-tools:latest > /dev/null" | ||
|
||
image_id=$(podman images | grep quay.io/centos-sig-automotive/ffi-tools | awk -F " " '{print $3}') | ||
if [ ! -d "${QM_HOST_REGISTRY_DIR}" ]; then | ||
exec_cmd "mkdir -p ${QM_HOST_REGISTRY_DIR}" | ||
exec_cmd "podman push ${image_id} dir:${QM_HOST_REGISTRY_DIR}/ffi-tools:latest" | ||
fi | ||
|
||
podman exec -it qm /bin/bash -c \ | ||
"podman run --replace --name ffi-qm dir:${QM_REGISTRY_DIR}/ffi-tools:latest \ | ||
./setsysctl > /dev/null" | ||
|
||
if [ $? -eq 137 ]; then | ||
echo ffi-qm was killed by SIGKILL | ||
fi |