util-linux: fix FTBFS package in Ecne (12.0)

This commit is contained in:
Luis Guzmán 2024-09-09 05:12:12 +00:00
parent 43f1802f16
commit 9294cef9d3
3 changed files with 122 additions and 1 deletions

View file

@ -0,0 +1,93 @@
diff --git a/tests/ts/lsfd/option-inet b/tests/ts/lsfd/option-inet_
old mode 100755
new mode 100644
index 011a9b3a..b0910f23
--- a/tests/ts/lsfd/option-inet
+++ b/tests/ts/lsfd/option-inet_
@@ -25,23 +25,54 @@ ts_skip_docker
ts_check_test_command "$TS_CMD_LSFD"
ts_check_test_command "$TS_HELPER_MKFDS"
+ts_check_prog "mkfifo"
+
ts_cd "$TS_OUTDIR"
+FIFO=./test_mkfds-option-inet.fifo
{
- "$TS_HELPER_MKFDS" -q tcp 3 4 5 server-port=34567 client-port=23456 &
- PID0=$!
-
- "$TS_HELPER_MKFDS" -q tcp6 3 4 5 server-port=34567 client-port=23456 &
- PID1=$!
-
- "$TS_HELPER_MKFDS" -q ro-regular-file 3 file=/etc/passwd &
- PID2=$!
-
- "$TS_HELPER_MKFDS" -q udp 3 4 server-port=34567 client-port=23456 server-do-bind=1 client-do-bind=1 client-do-connect=1&
- PID3=$!
-
- "$TS_HELPER_MKFDS" -q udp6 3 4 lite=1 server-port=34567 client-port=23456 server-do-bind=1 client-do-bind=1 client-do-connect=1&
- PID4=$!
+ rm -f "${FIFO}"
+ if ! mkfifo "${FIFO}"; then
+ ts_finalize "failed in creating a fifo"
+ fi
+
+ "$TS_HELPER_MKFDS" tcp 3 4 5 server-port=34567 client-port=23456 > "${FIFO}" &
+ if ! read PID0 < "${FIFO}"; then
+ rm "${FIFO}"
+ ts_finalize "$TS_HELPER_MKFDS tcp...doesn't report its pid"
+ fi
+
+ "$TS_HELPER_MKFDS" tcp6 3 4 5 server-port=34567 client-port=23456 > "${FIFO}" &
+ if ! read PID1 < "${FIFO}"; then
+ kill -CONT "${PID0}"
+ wait "${PID0}"
+ rm "${FIFO}"
+ ts_finalize "$TS_HELPER_MKFDS tcp6...doesn't report its pid"
+ fi
+
+ "$TS_HELPER_MKFDS" ro-regular-file 3 file=/etc/passwd > "${FIFO}" &
+ if ! read PID2 < "${FIFO}"; then
+ kill -CONT "${PID0}" "${PID1}"
+ wait "${PID0}" "${PID1}"
+ rm "${FIFO}"
+ ts_finalize "$TS_HELPER_MKFDS ro-regular-file...doesn't report its pid"
+ fi
+
+ "$TS_HELPER_MKFDS" udp 3 4 server-port=34567 client-port=23456 server-do-bind=1 client-do-bind=1 client-do-connect=1 > "${FIFO}" &
+ if ! read PID3 < "${FIFO}"; then
+ kill -CONT "${PID0}" "${PID1}" "${PID2}"
+ wait "${PID0}" "${PID1}" "${PID2}"
+ rm "${FIFO}"
+ ts_finalize "$TS_HELPER_MKFDS udp...doesn't report its pid"
+ fi
+
+ "$TS_HELPER_MKFDS" udp6 3 4 lite=1 server-port=34567 client-port=23456 server-do-bind=1 client-do-bind=1 client-do-connect=1 > "${FIFO}" &
+ if ! read PID4 < "${FIFO}"; then
+ kill -CONT "${PID0}" "${PID1}" "${PID2}" "${PID3}"
+ wait "${PID0}" "${PID1}" "${PID2}" "${PID3}"
+ rm "${FIFO}"
+ ts_finalize "$TS_HELPER_MKFDS udp6 lite=1...doesn't report its pid"
+ fi
OPT='--inet'
echo "# $OPT"
@@ -85,14 +116,9 @@ ts_cd "$TS_OUTDIR"
-o ASSOC,TYPE,NAME \
-Q "(PID == $PID0) or (PID == $PID1) or (PID == $PID2) or (PID == $PID3) or (PID == $PID4)"
- kill -CONT "${PID0}"
- wait "${PID0}"
-
- kill -CONT "${PID1}"
- wait "${PID1}"
-
- kill -CONT "${PID2}"
- wait "${PID2}"
+ kill -CONT "${PID0}" "${PID1}" "${PID2}" "${PID3}" "${PID4}"
+ wait "${PID0}" "${PID1}" "${PID2}" "${PID3}" "${PID4}"
+ rm "${FIFO}"
} > "$TS_OUTPUT" 2>&1
ts_finalize

View file

@ -0,0 +1,23 @@
From: Chris Hofstaedtler <zeha@debian.org>
Date: Tue, 2 Apr 2024 21:52:47 +0200
Subject: tests: mark fadvise/drop as known failing on buildds
buildds build on a tmpfs, but this is not visible inside the build environment.
---
tests/ts/fadvise/drop | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop
index 45dcb91..c01e16c 100755
--- a/tests/ts/fadvise/drop
+++ b/tests/ts/fadvise/drop
@@ -6,6 +6,9 @@ TS_DESC="drop page caches related to a file"
. "$TS_TOPDIR"/functions.sh
ts_init "$*"
+# fails on Debian buildds, because the buildds use tmpfs hidden behind an unshare namespace.
+TS_KNOWN_FAIL="yes"
+
ts_check_test_command "$TS_CMD_FADVISE"
ts_check_test_command "$TS_CMD_FINCORE"
ts_check_test_command "$TS_CMD_FINDMNT"

View file

@ -25,10 +25,15 @@
#STAGE-4-UDEBS || #STAGE-1-DEBOOTSTRAP
VERSION=0
VERSION=1
NETINST=true
. ./config
# Fix FTBFS when rebuild at Ecne.
# - lsfd/option-inet
patch_p1 $DATA/lsfd--fix-2399-use-fifo-in-test-cases.patch
# - fadvise/drop
patch_p1 $DATA/tests-mark-fadvise-drop-as-known-failing-on-buildds.patch
changelog "Rebuild upstream to get udeb dependency for debian-installer."
package