Frederik Schwan pushed to branch main at Arch Linux / Packaging / Packages / glibc
Commits: 4ffbe264 by Frederik Schwan at 2024-05-26T09:47:40+02:00 fix testsuite failures on 6.9.x kernels fixes #11 - - - - - 2 changed files: - + 0001-misc-Add-support-for-Linux-uio.h-RWF_NOAPPEND-flag.patch - PKGBUILD Changes: ===================================== 0001-misc-Add-support-for-Linux-uio.h-RWF_NOAPPEND-flag.patch ===================================== @@ -0,0 +1,74 @@ +From 3db9d208dd5f30b12900989c6d2214782b8e2011 Mon Sep 17 00:00:00 2001 +From: Stafford Horne <sho...@gmail.com> +Date: Wed, 3 Apr 2024 06:40:37 +0100 +Subject: [PATCH] misc: Add support for Linux uio.h RWF_NOAPPEND flag + +In Linux 6.9 a new flag is added to allow for Per-io operations to +disable append mode even if a file was opened with the flag O_APPEND. +This is done with the new RWF_NOAPPEND flag. + +This caused two test failures as these tests expected the flag 0x00000020 +to be unused. Adding the flag definition now fixes these tests on Linux +6.9 (v6.9-rc1). + + FAIL: misc/tst-preadvwritev2 + FAIL: misc/tst-preadvwritev64v2 + +This patch adds the flag, adjusts the test and adds details to +documentation. + +Link: https://lore.kernel.org/all/20200831153207.go3...@brightrain.aerifal.cx/ +Reviewed-by: Adhemerval Zanella <adhemerval.zane...@linaro.org> +--- + manual/llio.texi | 4 ++++ + misc/tst-preadvwritev2-common.c | 5 ++++- + sysdeps/unix/sysv/linux/bits/uio-ext.h | 1 + + 3 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/manual/llio.texi b/manual/llio.texi +index 0b61d491f5..fae49d1433 100644 +--- a/manual/llio.texi ++++ b/manual/llio.texi +@@ -1339,6 +1339,10 @@ will fail and set @code{errno} to @code{EAGAIN} if the operation would block. + + @item RWF_APPEND + Per-IO synchronization as if the file was opened with @code{O_APPEND} flag. ++ ++@item RWF_NOAPPEND ++This flag allows an offset to be honored, even if the file was opened with ++@code{O_APPEND} flag. + @end vtable + + When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the +diff --git a/misc/tst-preadvwritev2-common.c b/misc/tst-preadvwritev2-common.c +index b5f19f002c..8e04ff7282 100644 +--- a/misc/tst-preadvwritev2-common.c ++++ b/misc/tst-preadvwritev2-common.c +@@ -34,8 +34,11 @@ + #ifndef RWF_APPEND + # define RWF_APPEND 0 + #endif ++#ifndef RWF_NOAPPEND ++# define RWF_NOAPPEND 0 ++#endif + #define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT \ +- | RWF_APPEND) ++ | RWF_APPEND | RWF_NOAPPEND) + + /* Generic uio_lim.h does not define IOV_MAX. */ + #ifndef IOV_MAX +diff --git a/sysdeps/unix/sysv/linux/bits/uio-ext.h b/sysdeps/unix/sysv/linux/bits/uio-ext.h +index 7854cccef3..ead7a09156 100644 +--- a/sysdeps/unix/sysv/linux/bits/uio-ext.h ++++ b/sysdeps/unix/sysv/linux/bits/uio-ext.h +@@ -47,6 +47,7 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, + #define RWF_SYNC 0x00000004 /* per-IO O_SYNC. */ + #define RWF_NOWAIT 0x00000008 /* per-IO nonblocking mode. */ + #define RWF_APPEND 0x00000010 /* per-IO O_APPEND. */ ++#define RWF_NOAPPEND 0x00000020 /* per-IO negation of O_APPEND */ + + __END_DECLS + +-- +2.45.1 + ===================================== PKGBUILD ===================================== @@ -21,6 +21,7 @@ source=("git+https://sourceware.org/git/glibc.git#commit=${_commit}" locale-gen lib32-glibc.conf sdt.h sdt-config.h + 0001-misc-Add-support-for-Linux-uio.h-RWF_NOAPPEND-flag.patch ) validpgpkeys=(7273542B39962DF7B299931416792B4EA25340F8 # Carlos O'Donell BC7C7372637EC10C57D7AA6579C43DFBF1CF2187) # Siddhesh Poyarekar @@ -29,7 +30,8 @@ b2sums=('a37822e85d99b01b289950bbc3a6ba3c9f88cf2aafe6510a4e3aa9666c35ab4279377b8 '04fbb3b0b28705f41ccc6c15ed5532faf0105370f22133a2b49867e790df0491f5a1255220ff6ebab91a462f088d0cf299491b3eb8ea53534cb8638a213e46e3' '7c265e6d36a5c0dff127093580827d15519b6c7205c2e1300e82f0fb5b9dd00b6accb40c56581f18179c4fbbc95bd2bf1b900ace867a83accde0969f7b609f8a' 'a6a5e2f2a627cc0d13d11a82458cfd0aa75ec1c5a3c7647e5d5a3bb1d4c0770887a3909bfda1236803d5bc9801bfd6251e13483e9adf797e4725332cd0d91a0e' - '214e995e84b342fe7b2a7704ce011b7c7fc74c2971f98eeb3b4e677b99c860addc0a7d91b8dc0f0b8be7537782ee331999e02ba48f4ccc1c331b60f27d715678') + '214e995e84b342fe7b2a7704ce011b7c7fc74c2971f98eeb3b4e677b99c860addc0a7d91b8dc0f0b8be7537782ee331999e02ba48f4ccc1c331b60f27d715678' + '839e24780b6a5ac3a59db82fc975ac5eacdd77feb63cd8d26cce34348d0f4b819114069d59fa5a758b03582d626537da07a60e553af043c73f51da5586aa6027') pkgver() { cd glibc @@ -42,6 +44,9 @@ prepare() { [[ -d glibc-$pkgver ]] && ln -s glibc-$pkgver glibc cd glibc + # fix tests with kernel 6.9 + patch -Np1 < ../0001-misc-Add-support-for-Linux-uio.h-RWF_NOAPPEND-flag.patch + } build() { View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/glibc/-/commit/4ffbe26430f555930c63544c1b2d92374ea17e74 -- View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/glibc/-/commit/4ffbe26430f555930c63544c1b2d92374ea17e74 You're receiving this email because of your account on gitlab.archlinux.org.