[Lldb-commits] [lldb] [LLDB] Fix tests that fail when using internal shell. (PR #156931)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 4 10:24:03 PDT 2025
https://github.com/cmtice updated https://github.com/llvm/llvm-project/pull/156931
>From f1418f873ce40963ca09e39490c202da503535ce Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Thu, 4 Sep 2025 10:14:20 -0700
Subject: [PATCH 1/2] [LLDB] Fix tests that fail when using internal shell.
These tests were failing on darwin, because the internal shell
needs environment var definitions to start with 'env'. This PR
(hopefully) fixes that problem.
---
lldb/test/Shell/Host/TestCustomShell.test | 2 +-
lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp | 2 +-
lldb/test/Shell/SymbolFile/add-dsym.test | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lldb/test/Shell/Host/TestCustomShell.test b/lldb/test/Shell/Host/TestCustomShell.test
index 0e948a1b1f7f3..5d3e90162fb28 100644
--- a/lldb/test/Shell/Host/TestCustomShell.test
+++ b/lldb/test/Shell/Host/TestCustomShell.test
@@ -6,7 +6,7 @@
# XFAIL: system-openbsd
# RUN: %clang_host %S/Inputs/simple.c -g -o %t.out
-# RUN: SHELL=bogus not %lldb %t.out -b -o 'process launch -X 1 --' 2>&1 | FileCheck %s --check-prefix ERROR
+# RUN: env SHELL=bogus not %lldb %t.out -b -o 'process launch -X 1 --' 2>&1 | FileCheck %s --check-prefix ERROR
# RUN: env -i ASAN_OPTIONS='detect_container_overflow=0' %lldb %t.out -b -o 'process launch -X 1 --' 2>&1 | FileCheck %s
# ERROR: error: shell expansion failed
diff --git a/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp b/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp
index 9e79f23db2b74..a45f794c73a43 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp
+++ b/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp
@@ -3,7 +3,7 @@
// requires the ld64 linker, which clang invokes by default.
// REQUIRES: system-darwin
// RUN: %clang_host %s -g -c -o %t.o
-// RUN: ZERO_AR_DATE=1 %clang_host %t.o -g -o %t
+// RUN: env ZERO_AR_DATE=1 %clang_host %t.o -g -o %t
// RUN: %lldb %t -o "breakpoint set -f %s -l 11" -o run -o exit | FileCheck %s
// CHECK: stop reason = breakpoint
diff --git a/lldb/test/Shell/SymbolFile/add-dsym.test b/lldb/test/Shell/SymbolFile/add-dsym.test
index 52d1a1363feef..9695ddc297aa9 100644
--- a/lldb/test/Shell/SymbolFile/add-dsym.test
+++ b/lldb/test/Shell/SymbolFile/add-dsym.test
@@ -4,5 +4,5 @@
# HELP: Syntax: add-dsym <cmd-options> <filename>
# RUN: yaml2obj %S/Inputs/a.yaml -o %t.out
-# RUN: LLDB_APPLE_DSYMFORUUID_EXECUTABLE=%S/Inputs/dsymforuuid.sh %lldb %t.out -o 'add-dsym -u 41945CA4-5D9D-3CDE-82B4-37E4C09750B5' 2>&1 | FileCheck %s
+# RUN: env LLDB_APPLE_DSYMFORUUID_EXECUTABLE=%S/Inputs/dsymforuuid.sh %lldb %t.out -o 'add-dsym -u 41945CA4-5D9D-3CDE-82B4-37E4C09750B5' 2>&1 | FileCheck %s
# CHECK: UUID information was not found
>From ca2e305d6b7c588ef754202a35201bf2f87c3b94 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Thu, 4 Sep 2025 10:23:29 -0700
Subject: [PATCH 2/2] Fix clang format issue.
---
lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp b/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp
index a45f794c73a43..13fe3898e50aa 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp
+++ b/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp
@@ -7,5 +7,4 @@
// RUN: %lldb %t -o "breakpoint set -f %s -l 11" -o run -o exit | FileCheck %s
// CHECK: stop reason = breakpoint
-
int main() { return 0; }
More information about the lldb-commits
mailing list