From fea3e11f646c2f5680fdc256ce94c3f43fe9eab4 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 27 Feb 2023 18:20:52 +0000 Subject: [PATCH] Add test for using 32-bit sanitizers on 64-bit host --- cross-compile-i686/main.fmf | 38 +++++++++++++++++++++++++++++++++++++ cross-compile-i686/test.c | 1 + cross-compile-i686/test.sh | 3 +++ 3 files changed, 42 insertions(+) create mode 100644 cross-compile-i686/main.fmf create mode 100644 cross-compile-i686/test.c create mode 100755 cross-compile-i686/test.sh diff --git a/cross-compile-i686/main.fmf b/cross-compile-i686/main.fmf new file mode 100644 index 0000000..c4ea9c7 --- /dev/null +++ b/cross-compile-i686/main.fmf @@ -0,0 +1,38 @@ +summary: compiler-rt test for rhbz#1678240 +test: "$WITH_SCL ./test.sh" +require: [] +framework: shell +tier: 1 +component: + - llvm-toolset + - compiler-rt + +adjust: + # Common requirements when LLVM is not SCL-ized + - enabled: false + because: "Test applicable only on x86_64 arch" + when: arch != x86_64 + + - require+: + - clang + - compiler-rt + - compiler-rt.i686 + - glibc-devel.i686 + when: collection is not defined + + # Requirements for SCL-ized LLVM + - require+: + - llvm-toolset-13.0-clang + - llvm-toolset-13.0-compiler-rt + - llvm-toolset-13.0-compiler-rt.i686 + when: collection == llvm-toolset-13.0 + - require+: + - llvm-toolset-14.0-clang + - llvm-toolset-14.0-compiler-rt + - llvm-toolset-14.0-compiler-rt.i686 + when: collection == llvm-toolset-14.0 + - require+: + - llvm-toolset-15.0-clang + - llvm-toolset-15.0-compiler-rt + - llvm-toolset-15.0-compiler-rt.i686 + when: collection == llvm-toolset-15.0 diff --git a/cross-compile-i686/test.c b/cross-compile-i686/test.c new file mode 100644 index 0000000..2c99a52 --- /dev/null +++ b/cross-compile-i686/test.c @@ -0,0 +1 @@ +int main(){return 0;} diff --git a/cross-compile-i686/test.sh b/cross-compile-i686/test.sh new file mode 100755 index 0000000..52a9e1f --- /dev/null +++ b/cross-compile-i686/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh -eux + +clang -m32 -fsanitize=address test.c