Skip to content

Commit a3de335

Browse files
committed
test: workaround the failed error
Add workaround to fix error ``` content: error: Installing to filesystem: Gathering source info from container env: Subprocess failed: ExitStatus(unix_wait_status(256)) content: error: readdir: Too many open files ``` Signed-off-by: Huijing Hei <hhei@redhat.com>
1 parent 70c1df9 commit a3de335

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ jobs:
196196
test ${{ matrix.test_os }} = "${used_vid}"
197197
198198
- name: Unit and container integration tests
199-
run: just test-container
199+
run: |
200+
just test-container
201+
just clean-local-images
200202
201203
- name: Run TMT integration tests
202204
run: |
@@ -209,6 +211,7 @@ jobs:
209211
run: |
210212
# Only test fedora-43 on fedora-coreos:testing-devel
211213
if [ "${{ matrix.test_os }}" = "fedora-43" ] && [ "${{ matrix.variant }}" = "ostree" ]; then
214+
podman image prune -f
212215
just test-tmt-on-coreos plan-bootc-install-on-coreos
213216
else
214217
echo "skipped"

Justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ test-container: build-units build-integration-test-image
185185
clean-local-images:
186186
podman images --filter "label={{testimage_label}}"
187187
podman images --filter "label={{testimage_label}}" --format "{{{{.ID}}" | xargs -r podman rmi -f
188+
podman image prune -f
188189
podman rmi {{fedora-coreos}} -f
189190

190191
# Print the container image reference for a given short $ID-VERSION_ID for NAME

crates/xtask/src/tmt.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,13 @@ pub(crate) fn run_tmt(sh: &Shell, args: &RunTmtArgs) -> Result<()> {
442442
continue;
443443
}
444444

445+
// Remove coreos container image after launch
446+
if variant_id == "coreos" {
447+
cmd!(sh, "podman rmi {image} -f")
448+
.run()
449+
.with_context(|| format!("Clean image {image} after launch"))?;
450+
}
451+
445452
// Ensure VM cleanup happens even on error (unless --preserve-vm is set)
446453
let cleanup_vm = || {
447454
if preserve_vm {

tmt/tests/examples/test-on-ostree/test-install-on-ostree.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,16 @@ if [ "$TMT_REBOOT_COUNT" -eq 0 ]; then
3131
stateroot=$(bootc status --json | jq -r .status.booted.ostree.stateroot)
3232

3333
# Need bind mount for /run/host-container-storage
34-
podman run --rm --privileged \
34+
podman run \
35+
--rm --privileged \
3536
-v /dev:/dev \
37+
-v /var/lib/containers:/var/lib/containers \
3638
-v /run/host-container-storage:/run/host-container-storage:ro \
3739
-v /:/target \
3840
--pid=host \
3941
--security-opt label=type:unconfined_t \
4042
${BOOTC_target} \
41-
env BOOTC_BOOTLOADER_DEBUG=1 STORAGE_OPTS=additionalimagestore=/run/host-container-storage \
43+
env STORAGE_OPTS=additionalimagestore=/run/host-container-storage \
4244
bootc install to-existing-root \
4345
--stateroot=${stateroot} \
4446
--skip-fetch-check \

0 commit comments

Comments
 (0)