summary refs log tree commit diff stats
path: root/results/scraper/gitlab/issues_text/target_missing/host_missing/accel_missing/1557
blob: 94bfc80ee82ff9e01cc81e07b4a74219e5b3c681 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
qemu-binfmt-conf.sh handles errors inconsistently
Description of problem:
We are installing qemu via multiarch/qemu-user-static docker image. https://github.com/multiarch/qemu-user-static

What we have noticed is that because qemu-binfmt-conf.sh does not use `set -e`, its behavior with regards to failures is inconsistent. In short, registering the same thing into binfmt twice is an error (you get EEXIST). However, the exit code of qemu-binfmt-conf.sh itself seems to depend only on whether the last interpreter succeeded, leading to confusing and inconsistent results.
Steps to reproduce:
1. Register only qemu-arm-static interpreter with binfmt.
2. Run qemu-binfmt-conf.sh. Observe that the exit code is zero, and logs show the duplicate interpreter was rejected.
3. Remove all qemu interpreters.
3. Register only qemu-loongarch64-static interpreter (currently last in qemu_target_list) with binfmt.
3. Run qemu-binfmt-conf.sh. Observe that the exit code is non-zero, and logs show the duplicate interpreter was rejected.