From 46f2fac6f30039146965e298b05bd8828b3ba9e6 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Wed, 9 Oct 2024 18:06:56 +0000 Subject: [PATCH] [test] env -u is not supported on AIX, use `unset` instead --- compiler-rt/test/profile/instrprof-tmpdir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler-rt/test/profile/instrprof-tmpdir.c b/compiler-rt/test/profile/instrprof-tmpdir.c index 6f323e7e6a01a..7206df3c2eb0c 100644 --- a/compiler-rt/test/profile/instrprof-tmpdir.c +++ b/compiler-rt/test/profile/instrprof-tmpdir.c @@ -12,7 +12,8 @@ // RUN: llvm-profdata show ./raw2.profraw | FileCheck %s -check-prefix TMPDIR // // Check that we fall back to the default path if TMPDIR is missing. -// RUN: env -u TMPDIR LLVM_PROFILE_FILE="%%t/raw3.profraw" %run %t/binary 2>&1 | FileCheck %s -check-prefix MISSING +// RUN: %if system-aix %{ unset TMPDIR %} +// RUN: env %if !system-aix %{ -u TMPDIR %} LLVM_PROFILE_FILE="%%t/raw3.profraw" %run %t/binary 2>&1 | FileCheck %s -check-prefix MISSING // RUN: llvm-profdata show ./default.profraw | FileCheck %s -check-prefix TMPDIR // TMPDIR: Maximum function count: 1