Skip to content

Commit 9247191

Browse files
authored
Update CI to QEMU 8.1.0. (#843)
* Update CI to QEMU 8.1.0. * Patch qemu to properly handle `O_LARGEFILE` on aarch64. * Remove a redundant ubuntu-1.63 from the CI. * Patch qemu to properly handle `TCGETS2` on powerpc. And in the libc backend, ensure that input_speed and output_speed are set after a `tcgetattr` call. And, work around the fact that even with the patches, QEMU is still not setting `input_speed`/`output_speed` in `TCGETS2`, so set them manually when we can.
1 parent e1226f1 commit 9247191

File tree

7 files changed

+441
-25
lines changed

7 files changed

+441
-25
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,12 @@ jobs:
225225
name: Test
226226
runs-on: ${{ matrix.os }}
227227
env:
228-
QEMU_BUILD_VERSION: 8.0.2
228+
QEMU_BUILD_VERSION: 8.1.0
229229
# Enabling testing of experimental features.
230230
RUSTFLAGS: --cfg rustix_use_experimental_features
231231
strategy:
232232
matrix:
233-
build: [ubuntu, ubuntu-20.04, i686-linux, aarch64-linux, powerpc64le-linux, riscv64-linux, s390x-linux, arm-linux, ubuntu-stable, ubuntu-1.63, i686-linux-stable, aarch64-linux-stable, riscv64-linux-stable, s390x-linux-stable, powerpc64le-linux-stable, arm-linux-stable, ubuntu-1.63, i686-linux-1.63, aarch64-linux-1.63, riscv64-linux-1.63, s390x-linux-1.63, powerpc64le-linux-1.63, arm-linux-1.63, macos-latest, macos-11, windows, windows-2019]
233+
build: [ubuntu, ubuntu-20.04, i686-linux, aarch64-linux, powerpc64le-linux, riscv64-linux, s390x-linux, arm-linux, ubuntu-stable, i686-linux-stable, aarch64-linux-stable, riscv64-linux-stable, s390x-linux-stable, powerpc64le-linux-stable, arm-linux-stable, ubuntu-1.63, i686-linux-1.63, aarch64-linux-1.63, riscv64-linux-1.63, s390x-linux-1.63, powerpc64le-linux-1.63, arm-linux-1.63, macos-latest, macos-11, windows, windows-2019]
234234
include:
235235
- build: ubuntu
236236
os: ubuntu-latest
@@ -470,6 +470,8 @@ jobs:
470470
patch -p1 < $GITHUB_WORKSPACE/ci/translate-errno.patch
471471
patch -p1 < $GITHUB_WORKSPACE/ci/getsockopt-timeouts.patch
472472
patch -p1 < $GITHUB_WORKSPACE/ci/s390x-stat-have-nsec.patch
473+
patch -p1 < $GITHUB_WORKSPACE/ci/aarch64-o-largefile.patch
474+
patch -p1 < $GITHUB_WORKSPACE/ci/tcgets2-tcsets2.patch
473475
./configure --target-list=${{ matrix.qemu_target }} --prefix=${{ runner.tool_cache }}/qemu --disable-tools --disable-slirp --disable-fdt --disable-capstone --disable-docs
474476
ninja -C build install
475477
if: matrix.qemu != '' && matrix.os == 'ubuntu-latest'
@@ -542,7 +544,7 @@ jobs:
542544
env:
543545
# -D warnings is commented out in our install-rust action; re-add it here.
544546
RUSTFLAGS: -D warnings -D elided-lifetimes-in-paths
545-
QEMU_BUILD_VERSION: 8.0.2
547+
QEMU_BUILD_VERSION: 8.1.0
546548
steps:
547549
- uses: actions/checkout@v3
548550
with:
@@ -601,6 +603,8 @@ jobs:
601603
patch -p1 < $GITHUB_WORKSPACE/ci/translate-errno.patch
602604
patch -p1 < $GITHUB_WORKSPACE/ci/getsockopt-timeouts.patch
603605
patch -p1 < $GITHUB_WORKSPACE/ci/s390x-stat-have-nsec.patch
606+
patch -p1 < $GITHUB_WORKSPACE/ci/aarch64-o-largefile.patch
607+
patch -p1 < $GITHUB_WORKSPACE/ci/tcgets2-tcsets2.patch
604608
./configure --target-list=${{ matrix.qemu_target }} --prefix=${{ runner.tool_cache }}/qemu --disable-tools --disable-slirp --disable-fdt --disable-capstone --disable-docs
605609
ninja -C build install
606610
if: matrix.qemu != '' && matrix.os == 'ubuntu-latest'
@@ -631,7 +635,7 @@ jobs:
631635
RUSTFLAGS: --cfg rustix_use_experimental_asm -D warnings -D elided-lifetimes-in-paths
632636
RUSTDOCFLAGS: --cfg rustix_use_experimental_asm
633637
CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_RUSTFLAGS: --cfg rustix_use_experimental_asm
634-
QEMU_BUILD_VERSION: 8.0.2
638+
QEMU_BUILD_VERSION: 8.1.0
635639
steps:
636640
- uses: actions/checkout@v3
637641
with:
@@ -690,6 +694,8 @@ jobs:
690694
patch -p1 < $GITHUB_WORKSPACE/ci/translate-errno.patch
691695
patch -p1 < $GITHUB_WORKSPACE/ci/getsockopt-timeouts.patch
692696
patch -p1 < $GITHUB_WORKSPACE/ci/s390x-stat-have-nsec.patch
697+
patch -p1 < $GITHUB_WORKSPACE/ci/aarch64-o-largefile.patch
698+
patch -p1 < $GITHUB_WORKSPACE/ci/tcgets2-tcsets2.patch
693699
./configure --target-list=${{ matrix.qemu_target }} --prefix=${{ runner.tool_cache }}/qemu --disable-tools --disable-slirp --disable-fdt --disable-capstone --disable-docs
694700
ninja -C build install
695701
if: matrix.qemu != '' && matrix.os == 'ubuntu-latest'

ci/aarch64-o-largefile.patch

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
From Dan Gohman <dev@sunfishcode.online>
2+
Subject: [PATCH] Correct the definition of `O_LARGEFILE` on aarch64
3+
4+
This fixes `fcntl` with `F_GETFL` from spuriously returning `O_NOFOLLOW`
5+
on hosts such as x86_64.
6+
7+
diff -ur a/linux-user/aarch64/target_fcntl.h b/linux-user/aarch64/target_fcntl.h
8+
--- a/linux-user/aarch64/target_fcntl.h
9+
+++ b/linux-user/aarch64/target_fcntl.h
10+
@@ -11,6 +11,7 @@
11+
#define TARGET_O_DIRECTORY 040000 /* must be a directory */
12+
#define TARGET_O_NOFOLLOW 0100000 /* don't follow links */
13+
#define TARGET_O_DIRECT 0200000 /* direct disk access hint */
14+
+#define TARGET_O_LARGEFILE 0400000
15+
16+
#include "../generic/fcntl.h"
17+
#endif

0 commit comments

Comments
 (0)