代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/coreutils 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From ddafdae21c574b1dcd5c56e403c82010e7ed3565 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Mon, 2 May 2022 14:27:34 +0100
Subject: [PATCH] tests: sort-NaN-infloop: augment testing for recent fix
* tests/misc/sort-NaN-infloop.sh: Add test case from
https://unix.stackexchange.com/a/700967/37127
* src/sort.c: Avoid syntax-check failure.
---
src/sort.c | 2 +-
tests/misc/sort-NaN-infloop.sh | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/sort.c b/src/sort.c
index b2a465cf5..8af356c66 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -2006,7 +2006,7 @@ numcompare (char const *a, char const *b)
static int
nan_compare (long double a, long double b)
{
- char buf[2][sizeof "-nan()" + CHAR_BIT * sizeof a];
+ char buf[2][sizeof "-nan""()" + CHAR_BIT * sizeof a];
snprintf (buf[0], sizeof buf[0], "%Lf", a);
snprintf (buf[1], sizeof buf[1], "%Lf", b);
return strcmp (buf[0], buf[1]);
diff --git a/tests/misc/sort-NaN-infloop.sh b/tests/misc/sort-NaN-infloop.sh
index 93cf9bd77..cc1c583cd 100755
--- a/tests/misc/sort-NaN-infloop.sh
+++ b/tests/misc/sort-NaN-infloop.sh
@@ -23,6 +23,9 @@ echo nan > F || framework_failure_
printf 'nan\nnan\n' > exp || framework_failure_
timeout 10 sort -g -m F F > out || fail=1
+# This was seen to infloop on some systems until coreutils v9.2 (bug 55212)
+yes nan | head -n128095 | timeout 60 sort -g > /dev/null || fail=1
+
compare exp out || fail=1
Exit $fail
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。