Use a patched qemu for running the async-io tests.

This commit is contained in:
Dan Gohman
2022-02-22 12:44:37 -08:00
parent e6c3a799cb
commit 57dc9b5f07
2 changed files with 30 additions and 1 deletions
+2 -1
View File
@@ -256,7 +256,7 @@ jobs:
- uses: actions/cache@v2
with:
path: ${{ runner.tool_cache }}/qemu
key: qemu-${{ matrix.target }}-${{ env.QEMU_BUILD_VERSION }}
key: qemu-${{ matrix.target }}-${{ env.QEMU_BUILD_VERSION }}-patcherrno
if: matrix.target != '' && matrix.os == 'ubuntu-latest'
- name: Install cross-compilation tools
@@ -294,6 +294,7 @@ jobs:
cd
curl https://download.qemu.org/qemu-$QEMU_BUILD_VERSION.tar.xz | tar xJf -
cd qemu-$QEMU_BUILD_VERSION
patch -p1 < $GITHUB_WORKSPACE/ci/translate-errno.patch
./configure --target-list=${{ matrix.qemu_target }} --prefix=${{ runner.tool_cache }}/qemu --disable-tools --disable-slirp --disable-fdt --disable-capstone --disable-docs
ninja -C build install
if: matrix.qemu != '' && matrix.os == 'ubuntu-latest'
+28
View File
@@ -0,0 +1,28 @@
From: Dan Gohman <dev@sunfishcode.online>
Subject: [PATCH] Translate errno codes from host to target for `SO_ERROR`.
This issue is reported upstream [here].
[here]: https://gitlab.com/qemu-project/qemu/-/issues/872
---
linux-user/syscall.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index b9b18a7eaf..a8eae3c4ac 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2767,6 +2767,9 @@ get_timeout:
if (optname == SO_TYPE) {
val = host_to_target_sock_type(val);
}
+ if (level == SOL_SOCKET && optname == SO_ERROR) {
+ val = host_to_target_errno(val);
+ }
if (len > lv)
len = lv;
if (len == 4) {
--
2.32.0