Skip to content

Conversation

kkwli
Copy link
Collaborator

@kkwli kkwli commented Sep 29, 2025

The change in 30402c7 breaks the tests on AIX. This patch is to change to use the sed from AIX Toolbox instead of the default one which does not support -r and -E.

cc @dbartol

@kkwli kkwli self-assigned this Sep 29, 2025
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:static analyzer labels Sep 29, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 29, 2025

@llvm/pr-subscribers-clang-static-analyzer-1

@llvm/pr-subscribers-clang

Author: Kelvin Li (kkwli)

Changes

The change in 30402c7 breaks the tests on AIX. This patch is to change to use the sed from AIX Toolbox instead of the default one which does not support -r and -E.

cc @dbartol


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

2 Files Affected:

  • (modified) clang/test/Analysis/diagnostics/Inputs/expected-sarif/sarif-multi-file-diagnostics.c.sarif (+1-1)
  • (modified) clang/test/Analysis/lit.local.cfg (+3-1)
diff --git a/clang/test/Analysis/diagnostics/Inputs/expected-sarif/sarif-multi-file-diagnostics.c.sarif b/clang/test/Analysis/diagnostics/Inputs/expected-sarif/sarif-multi-file-diagnostics.c.sarif
index 85e710fc7bac3..501d27ca22361 100644
--- a/clang/test/Analysis/diagnostics/Inputs/expected-sarif/sarif-multi-file-diagnostics.c.sarif
+++ b/clang/test/Analysis/diagnostics/Inputs/expected-sarif/sarif-multi-file-diagnostics.c.sarif
@@ -141,4 +141,4 @@
     }
   ],
   "version": "[SARIF version]"
-}
\ No newline at end of file
+}
diff --git a/clang/test/Analysis/lit.local.cfg b/clang/test/Analysis/lit.local.cfg
index 3d60a16405ea6..03ab418a5a4f7 100644
--- a/clang/test/Analysis/lit.local.cfg
+++ b/clang/test/Analysis/lit.local.cfg
@@ -17,11 +17,13 @@ config.substitutions.append(
     )
 )
 
+sed_cmd = "/opt/freeware/bin/sed" if "system-aix" in config.available_features else "sed"
+
 # Filtering command for testing SARIF output against reference output.
 config.substitutions.append(
     (
         "%normalize_sarif",
-        "sed -r '%s;%s;%s;%s'"
+        f"{sed_cmd} -r '%s;%s;%s;%s'"
         % (
             # Replace version strings that are likely to change.
             r's/"version": ".* version .*"/"version": "[clang version]"/',

Copy link
Contributor

@madanial0 madanial0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

Copy link
Member

@daltenty daltenty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@kkwli kkwli merged commit a8034d1 into llvm:main Sep 30, 2025
12 checks passed
@kkwli kkwli deleted the analysis-diag-test branch September 30, 2025 01:55
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Oct 3, 2025
The change in commit 30402c7 breaks the tests on AIX. This patch 
is to change to use the `sed` from AIX Toolbox instead of the default 
one which does not support `-r` and `-E`.
@dbartol
Copy link
Contributor

dbartol commented Oct 6, 2025

Thanks for finding and fixing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:static analyzer clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants