[libcxx-commits] [libcxx] [libc++] tests with picolibc: handle stdin (PR #74712)

Dominik Wójt via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 7 03:20:07 PST 2023


https://github.com/domin144 created https://github.com/llvm/llvm-project/pull/74712

Add proper explanation for cin.sh.cpp fail.
The stdin-is-piped.sh.cpp used to fail with old qemu (4.2.0), but should pass now, as the qemu is updated now to 8.1.3 in CI.

>From 9579a4ce61bd5de36b965662b5661a0039adcf68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20W=C3=B3jt?= <dominik.wojt at arm.com>
Date: Mon, 23 Oct 2023 14:37:41 +0200
Subject: [PATCH] [libc++] tests with picolibc: handle stdin

Add proper explanation for cin.sh.cpp fail.
The stdin-is-piped.sh.cpp used to fail with old qemu (4.2.0),
but should pass now, as the qemu is updated now to 8.1.3 in CI.
---
 libcxx/test/libcxx/selftest/stdin-is-piped.sh.cpp           | 2 --
 .../iostream.objects/narrow.stream.objects/cin.sh.cpp       | 6 +++++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/libcxx/test/libcxx/selftest/stdin-is-piped.sh.cpp b/libcxx/test/libcxx/selftest/stdin-is-piped.sh.cpp
index 897e10e94783c..ffd10631c6a67 100644
--- a/libcxx/test/libcxx/selftest/stdin-is-piped.sh.cpp
+++ b/libcxx/test/libcxx/selftest/stdin-is-piped.sh.cpp
@@ -8,8 +8,6 @@
 
 // Make sure that the executor pipes standard input to the test-executable being run.
 
-// XFAIL: LIBCXX-PICOLIBC-FIXME
-
 // RUN: %{build}
 // RUN: echo "abc" | %{exec} %t.exe
 
diff --git a/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cin.sh.cpp b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cin.sh.cpp
index ad6cc192e2f48..ce6a7f37801e1 100644
--- a/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cin.sh.cpp
+++ b/libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cin.sh.cpp
@@ -8,7 +8,11 @@
 
 // TODO: Investigate
 // UNSUPPORTED: LIBCXX-AIX-FIXME
-// XFAIL: LIBCXX-PICOLIBC-FIXME
+
+// QEMU does not detect EOF, when reading from stdin
+// "echo -n" suppresses any characters after the output and so the test hangs.
+// https://gitlab.com/qemu-project/qemu/-/issues/1963
+// UNSUPPORTED: LIBCXX-PICOLIBC-FIXME
 
 // This test hangs on Android devices that lack shell_v2, which was added in
 // Android N (API 24).



More information about the libcxx-commits mailing list