[arch-commits] Commit in zig/trunk (PKGBUILD io_uring-timeout-remove-test.patch)

Evangelos Foutras foutrelis at gemini.archlinux.org
Sat Jun 25 07:44:04 UTC 2022


    Date: Saturday, June 25, 2022 @ 07:44:04
  Author: foutrelis
Revision: 1239401

upgpkg: zig 0.9.1-2: LLVM 14 rebuild

Added:
  zig/trunk/io_uring-timeout-remove-test.patch
Modified:
  zig/trunk/PKGBUILD

------------------------------------+
 PKGBUILD                           |   15 +++++++++++---
 io_uring-timeout-remove-test.patch |   36 +++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-06-25 00:15:10 UTC (rev 1239400)
+++ PKGBUILD	2022-06-25 07:44:04 UTC (rev 1239401)
@@ -3,18 +3,22 @@
 
 pkgname=zig
 pkgver=0.9.1
-pkgrel=1
+pkgrel=2
 pkgdesc='a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software'
 arch=('x86_64')
 url='https://ziglang.org/'
 license=('MIT')
 options=('debug')
-depends=('clang' 'llvm-libs' 'lld')
-makedepends=('cmake' 'llvm')
+depends=('clang13' 'llvm13-libs')
+makedepends=('cmake' 'llvm13' 'lld13')
 checkdepends=('lib32-glibc')
 source=("https://ziglang.org/download/$pkgver/zig-$pkgver.tar.xz"
+        "$pkgname-io_uring-cancel-test.patch::https://github.com/ziglang/zig/commit/52651ae7a0de.patch"
+        "io_uring-timeout-remove-test.patch"
         "resolve_DNS.patch")
 sha256sums=('38cf4e84481f5facc766ba72783e7462e08d6d29a5d47e3b75c8ee3142485210'
+            '7cabeeb678a9acf8aecc765adc78b328baafe2f1e928518f40d97d0afaae8535'
+            '9ed66bbef9420c0628c7054e4f192ad6faaaacfffcf28c4b3f08462d62769748'
             'c2b7e709dcc229f0e58e2529db900bcfb9a1cfb73da765c5c76ab1e6d0a333cc')
 
 prepare() {
@@ -21,6 +25,10 @@
     cd "$pkgname-$pkgver"
     # https://github.com/ziglang/zig/issues/6898
     patch -p1 < ../resolve_DNS.patch
+    # https://github.com/ziglang/zig/issues/11382
+    patch -p1 --no-backup-if-mismatch < ../$pkgname-io_uring-cancel-test.patch
+    # https://github.com/ziglang/zig/issues/11900
+    patch -p1 --no-backup-if-mismatch < ../io_uring-timeout-remove-test.patch
 }
 
 build() {
@@ -31,6 +39,7 @@
     cmake -B build \
         -DCMAKE_BUILD_TYPE=None \
         -DCMAKE_INSTALL_PREFIX=/usr \
+        -DCMAKE_PREFIX_PATH=/usr/lib/llvm13 \
         -DZIG_PREFER_CLANG_CPP_DYLIB=ON \
         .
     cmake --build build

Added: io_uring-timeout-remove-test.patch
===================================================================
--- io_uring-timeout-remove-test.patch	                        (rev 0)
+++ io_uring-timeout-remove-test.patch	2022-06-25 07:44:04 UTC (rev 1239401)
@@ -0,0 +1,36 @@
+diff -upr zig-0.9.1.orig/lib/std/os/linux/io_uring.zig zig-0.9.1/lib/std/os/linux/io_uring.zig
+--- zig-0.9.1.orig/lib/std/os/linux/io_uring.zig	2022-02-14 22:03:19.000000000 +0200
++++ zig-0.9.1/lib/std/os/linux/io_uring.zig	2022-06-25 02:02:53.701051414 +0300
+@@ -1994,7 +1994,7 @@ test "timeout_remove" {
+ 
+     try testing.expectEqual(@as(u32, 2), try ring.submit());
+ 
+-    const cqe_timeout = try ring.copy_cqe();
++    var cqe_timeout = try ring.copy_cqe();
+     // IORING_OP_TIMEOUT_REMOVE is not supported by this kernel version:
+     // Timeout remove operations set the fd to -1, which results in EBADF before EINVAL.
+     // We use IORING_FEAT_RW_CUR_POS as a safety check here to make sure we are at least pre-5.6.
+@@ -2005,13 +2005,22 @@ test "timeout_remove" {
+     {
+         return error.SkipZigTest;
+     }
++
++    var cqe_timeout_remove = try ring.copy_cqe();
++
++    if (cqe_timeout.user_data == 0x99999999 and cqe_timeout_remove.user_data == 0x88888888) {
++        const a = cqe_timeout;
++        const b = cqe_timeout_remove;
++        cqe_timeout = b;
++        cqe_timeout_remove = a;
++    }
++
+     try testing.expectEqual(linux.io_uring_cqe{
+         .user_data = 0x88888888,
+         .res = - at as(i32, @enumToInt(linux.E.CANCELED)),
+         .flags = 0,
+     }, cqe_timeout);
+ 
+-    const cqe_timeout_remove = try ring.copy_cqe();
+     try testing.expectEqual(linux.io_uring_cqe{
+         .user_data = 0x99999999,
+         .res = 0,



More information about the arch-commits mailing list