Skip to content

Conversation

@jnovy
Copy link
Collaborator

@jnovy jnovy commented Oct 1, 2025

Make busybox binary download architecture-aware to fix test failures on aarch64 and ppc64le. Previously, tests hardcoded an x86_64 binary URL which caused "Exec format error" on other architectures.

The fix detects the system architecture and selects the appropriate busybox binary from busybox.net, with support for x86_64, aarch64, ppc64le, i686, and a fallback for other architectures.

Fixes: #610

Make busybox binary download architecture-aware to fix test failures
on aarch64 and ppc64le. Previously, tests hardcoded an x86_64 binary
URL which caused "Exec format error" on other architectures.

The fix detects the system architecture and selects the appropriate
busybox binary from busybox.net, with support for x86_64, aarch64,
ppc64le, i686, and a fallback for other architectures.

Fixes: containers#610

Signed-off-by: Jindrich Novy <jnovy@redhat.com>
@ricardobranco777
Copy link

ricardobranco777 commented Oct 1, 2025

It does solve the busybox issue but we have other failures:

Note: We're backporting these patches to v2.1.13: 579, 597, 602, 603, 604, 605, 611

Given that busybox.net is sometimes down, we'll use this workaround instead:

sudo zypper in busybox-static
mkdir /tmp/conmon-test-images
cp /usr/bin/busybox-static /tmp/conmon-test-images/

@ricardobranco777
Copy link

Given that busybox.net is sometimes down, we'll use this workaround instead:

sudo zypper in busybox-static
mkdir /tmp/conmon-test-images
cp /usr/bin/busybox-static /tmp/conmon-test-images/

This workaround doesn't work. For some reason we need an older BusyBox. https://openqa.opensuse.org/tests/5355733

BUSYBOX_SOURCE="https://busybox.net/downloads/binaries/1.31.0-defconfig-multiarch-musl/busybox-armv8l"
;;
ppc64le)
BUSYBOX_SOURCE="https://busybox.net/downloads/binaries/1.31.0-defconfig-multiarch-musl/busybox-powerpc64"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Careful. I'm getting this on ppc64le:

# ./busybox-powerpc64 
-bash: ./busybox-powerpc64: cannot execute binary file: Exec format error

Also, downloads take an awful lot of time.

@jankaluza
Copy link
Member

This code is fragile in general. If you kill the tests while it's downloading, the broken busybox file can end up on fs and it never gets redownloaded until you remove that broken busybox binary. That was something I also wanted to fix one day in the future :-).

Maybe that might be the reason for broken binary @ricardobranco777 sees?

@ricardobranco777
Copy link

Maybe that might be the reason for broken binary @ricardobranco777 sees?

No. I tried this manually on a ppc64le host and it fails.

@jnovy
Copy link
Collaborator Author

jnovy commented Oct 2, 2025

Hmm, thinking more about all this - there doesn't seem any particular reason why we use busybox and it's been unreliable for some time. It's time to switch to something else. I'd propose UBI as the registry from which it's pulled from is rarely down and it's properly tested and functional.

@jnovy
Copy link
Collaborator Author

jnovy commented Oct 2, 2025

I will create a new PR, let's skip this one.

@jnovy jnovy closed this Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test don't run on architectures other than x86_64

3 participants