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

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 7 04:54:36 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Dominik Wójt (domin144)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/74712.diff


2 Files Affected:

- (modified) libcxx/test/libcxx/selftest/stdin-is-piped.sh.cpp (-2) 
- (modified) libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cin.sh.cpp (+5-1) 


``````````diff
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).

``````````

</details>


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


More information about the libcxx-commits mailing list