[compiler-rt] ed0c36c - [Fuzzer] make big-file-copy.test work with the internal shell (#168658)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 19 09:27:42 PST 2025
Author: Aiden Grossman
Date: 2025-11-19T09:27:38-08:00
New Revision: ed0c36ca2885f4b0d6b36d7645248e24c2e8573c
URL: https://github.com/llvm/llvm-project/commit/ed0c36ca2885f4b0d6b36d7645248e24c2e8573c
DIFF: https://github.com/llvm/llvm-project/commit/ed0c36ca2885f4b0d6b36d7645248e24c2e8573c.diff
LOG: [Fuzzer] make big-file-copy.test work with the internal shell (#168658)
This patch uses several shell features not supported by the internal
shell, such as $? to get the exit code of a command, and exit. This
patch adjusts the test to work with the internal shell by using bash to
run the actual command with a zero exit code to ensure the file is
deleted, and python to propagate the exit code up to lit.
Added:
Modified:
compiler-rt/test/fuzzer/big-file-copy.test
Removed:
################################################################################
diff --git a/compiler-rt/test/fuzzer/big-file-copy.test b/compiler-rt/test/fuzzer/big-file-copy.test
index 9565ed4e0bca2..b92379460ac3b 100644
--- a/compiler-rt/test/fuzzer/big-file-copy.test
+++ b/compiler-rt/test/fuzzer/big-file-copy.test
@@ -1,6 +1,5 @@
REQUIRES: darwin
UNSUPPORTED: ios
RUN: %cpp_compiler %S/BigFileCopy.cpp -o %t
-RUN: %run %t -runs=1 -rss_limit_mb=4096 2>big-file-out.txt; result=$?
-RUN: %run rm -f big-file.txt big-file-out.txt
-RUN: (exit $result)
+RUN: bash -c '%run %t -runs=1 -rss_limit_mb=4096 2>big-file-out.txt; result=$? \
+RUN: %run rm -f big-file.txt big-file-out.txt && exit $result'
More information about the llvm-commits
mailing list