From 7fadf6947761cc5248aa4a376bb9517481dbaa52 Mon Sep 17 00:00:00 2001
From: Gyorgy Sarvari <skandigraun@gmail.com>
Date: Tue, 12 Aug 2025 20:02:31 +0200
Subject: [PATCH] tests: fix uio.test with musl-libc

musl-libc handles the pwrite calls differently than glibc, making
the uio test fail.  Using glibc, there are separated pwrite and pwritev
calls, however musl uses only pwritev2 for both pwrite and pwritev.

To account to this difference, modify the expected matching regexp
to also match the musl output (append it with an OR).

Upstream-Status: Backport [https://github.com/strace/strace/pull/347]
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 tests/uio.expected | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/uio.expected b/tests/uio.expected
index 98d5c06..2a712a1 100644
--- a/tests/uio.expected
+++ b/tests/uio.expected
@@ -1,4 +1,4 @@
 pread(64)?\(0, "\\0\\0\\0\\0", 4, 1004211379570065135\) += 4
 preadv\(0, \[\{iov_base="\\0\\0\\0\\0", iov_len=4\}\], 1, 1004211379570065135\) += 4
-pwrite(64)?\(0, "\\0\\0\\0\\0", 4, 1004211379570065135\) += 4
-pwritev\(0, \[\{iov_base="\\0\\0\\0\\0", iov_len=4\}\], 1, 1004211379570065135\) += 4
+pwrite(64)?\(0, "\\0\\0\\0\\0", 4, 1004211379570065135\) += 4|pwritev2\(0, \[\{iov_base="\\0\\0\\0\\0", iov_len=4}], 1, 1004211379570065135, RWF_NOAPPEND\) += 4
+pwritev\(0, \[\{iov_base="\\0\\0\\0\\0", iov_len=4\}\], 1, 1004211379570065135\) += 4|pwritev2\(0, \[\{iov_base="\\0\\0\\0\\0", iov_len=4}], 1, 1004211379570065135, RWF_NOAPPEND\) += 4
