https://github.com/hapeeeeee updated 
https://github.com/llvm/llvm-project/pull/139278

>From 30318b28b158950b0f8d6c2732831eceb7cefc41 Mon Sep 17 00:00:00 2001
From: hapeeeeee <623151...@qq.com>
Date: Fri, 9 May 2025 22:53:03 +0800
Subject: [PATCH] [lldb][test] Fix beginning/end of file test failed on Windows

---
 lldb/test/Shell/Commands/Inputs/cross_platform.c  | 15 +++++++++++++++
 .../command-list-reach-beginning-of-file.test     | 15 ++++-----------
 .../Commands/command-list-reach-end-of-file.test  | 10 +---------
 3 files changed, 20 insertions(+), 20 deletions(-)
 create mode 100644 lldb/test/Shell/Commands/Inputs/cross_platform.c

diff --git a/lldb/test/Shell/Commands/Inputs/cross_platform.c 
b/lldb/test/Shell/Commands/Inputs/cross_platform.c
new file mode 100644
index 0000000000000..9349a94e0257f
--- /dev/null
+++ b/lldb/test/Shell/Commands/Inputs/cross_platform.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+void doNothing() { printf("doNothing\n"); }
+
+void doSomethiing() {
+  doNothing();
+  doNothing();
+  doNothing();
+}
+
+int main() {
+  doSomethiing();
+  doNothing();
+  doSomethiing();
+  return 0;
+}
diff --git a/lldb/test/Shell/Commands/command-list-reach-beginning-of-file.test 
b/lldb/test/Shell/Commands/command-list-reach-beginning-of-file.test
index fa4a93e5904aa..aa27813bbc056 100644
--- a/lldb/test/Shell/Commands/command-list-reach-beginning-of-file.test
+++ b/lldb/test/Shell/Commands/command-list-reach-beginning-of-file.test
@@ -1,6 +1,4 @@
-# Source uses unistd.h.
-# UNSUPPORTED: system-windows
-# RUN: %clang_host -g -O0 %S/Inputs/sigchld.c -o %t.out
+# RUN: %clang_host -g -O0 %S/Inputs/cross_platform.c -o %t.out
 # RUN: %lldb %t.out -b -s %s 2>&1 | FileCheck %s
 
 list
@@ -9,17 +7,12 @@ list
 b main
 # CHECK: Breakpoint 1:
 
+
 r
 # CHECK: int main()
 
-list
-# CHECK: if (child_pid == 0)
-
 list -
-# CHECK: int main()
-
-list -10
-# CHECK: #include <assert.h>
+# CHECK: #include <stdio.h>
 
 list -
 # CHECK: note: Reached beginning of the file, no more to page
@@ -28,4 +21,4 @@ list -
 # CHECK: note: Reached beginning of the file, no more to page
 
 list
-# CHECK: int main()
+# CHECK: doNothing();
diff --git a/lldb/test/Shell/Commands/command-list-reach-end-of-file.test 
b/lldb/test/Shell/Commands/command-list-reach-end-of-file.test
index edf4c521a9e76..3b6b144640921 100644
--- a/lldb/test/Shell/Commands/command-list-reach-end-of-file.test
+++ b/lldb/test/Shell/Commands/command-list-reach-end-of-file.test
@@ -1,6 +1,4 @@
-# Source uses unistd.h.
-# UNSUPPORTED: system-windows
-# RUN: %clang_host -g -O0 %S/Inputs/sigchld.c -o %t.out
+# RUN: %clang_host -g -O0 %S/Inputs/cross_platform.c -o %t.out
 # RUN: %lldb %t.out -b -s %s 2>&1 | FileCheck %s
 
 list
@@ -12,12 +10,6 @@ b main
 r
 # CHECK: int main()
 
-list
-# CHECK: if (child_pid == 0)
-
-list
-# CHECK: printf("signo = %d\n", SIGCHLD);
-
 list
 # CHECK: return 0;
 

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to