Skip to content

Commit 735ece3

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 08cb40f commit 735ece3

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,22 @@ jobs:
195195
used_vid=$(podman run --rm localhost/bootc-integration bash -c '. /usr/lib/os-release && echo ${ID}-${VERSION_ID}')
196196
test ${{ matrix.test_os }} = "${used_vid}"
197197
198+
- name: Run TMT test about bootc install on coreos
199+
run: |
200+
# Only test fedora-43 on fedora-coreos:testing-devel
201+
if [ "${{ matrix.test_os }}" = "fedora-43" ] && [ "${{ matrix.variant }}" = "ostree" ]; then
202+
# Prune images before running test
203+
podman image prune -f
204+
just test-tmt-on-coreos plan-bootc-install-on-coreos
205+
just clean-local-images
206+
else
207+
echo "skipped"
208+
fi
209+
198210
- name: Unit and container integration tests
199-
run: just test-container
211+
run: |
212+
just test-container
213+
just clean-local-images
200214
201215
- name: Run TMT integration tests
202216
run: |
@@ -205,14 +219,6 @@ jobs:
205219
else
206220
just test-tmt integration
207221
fi
208-
- name: Run TMT test about bootc install on coreos
209-
run: |
210-
# Only test fedora-43 on fedora-coreos:testing-devel
211-
if [ "${{ matrix.test_os }}" = "fedora-43" ] && [ "${{ matrix.variant }}" = "ostree" ]; then
212-
just test-tmt-on-coreos plan-bootc-install-on-coreos
213-
else
214-
echo "skipped"
215-
fi
216222
217223
- name: Archive TMT logs
218224
if: always()

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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@ 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 \
3637
-v /run/host-container-storage:/run/host-container-storage:ro \
3738
-v /:/target \
3839
--pid=host \
3940
--security-opt label=type:unconfined_t \
4041
${BOOTC_target} \
41-
env BOOTC_BOOTLOADER_DEBUG=1 STORAGE_OPTS=additionalimagestore=/run/host-container-storage \
42+
env STORAGE_OPTS=additionalimagestore=/run/host-container-storage \
4243
bootc install to-existing-root \
4344
--stateroot=${stateroot} \
4445
--skip-fetch-check \

0 commit comments

Comments
 (0)