From 5c8610ec5e6fd54746b2934bcb0a4d63ef20b0bf Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Mon, 20 Mar 2023 17:50:30 +0000 Subject: Explicitly check if 32bit support is enabled for testing Ignore test in the first place, if no 32bit is enabled. --- test/Programs/pcregrep.c | 1 + test/lit.cfg | 4 ++++ test/lit.site.cfg.in | 1 + 3 files changed, 6 insertions(+) (limited to 'test') diff --git a/test/Programs/pcregrep.c b/test/Programs/pcregrep.c index ba5c79db..7bcef671 100644 --- a/test/Programs/pcregrep.c +++ b/test/Programs/pcregrep.c @@ -1,3 +1,4 @@ +// REQUIRES: 32bit-support // RUN: %clang -m32 %s -emit-llvm %O0opt -c -o %t1.bc // RUN: rm -rf %t.klee-out // RUN: %klee --output-dir=%t.klee-out --libc=klee --exit-on-error %t1.bc 2 2 diff --git a/test/lit.cfg b/test/lit.cfg index c935ab8e..ca7fe20f 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -224,6 +224,10 @@ if 'WSL_DISTRO_NAME' in os.environ and 'WSL_INTEROP' in os.environ: else: config.available_features.add('not-wsl-2') +# m32 support +config.available_features.add('{}32bit-support'.format('' if config.have_32bit_support else 'not-')) + + # Sanitizer config.available_features.add('{}asan'.format('' if config.have_asan else 'not-')) config.available_features.add('{}ubsan'.format('' if config.have_ubsan else 'not-')) diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in index 849062b1..c7063057 100644 --- a/test/lit.site.cfg.in +++ b/test/lit.site.cfg.in @@ -38,6 +38,7 @@ config.enable_zlib = True if @HAVE_ZLIB_H@ == 1 else False config.have_asan = True if @IS_ASAN_BUILD@ == 1 else False config.have_ubsan = True if @IS_UBSAN_BUILD@ == 1 else False config.have_msan = True if @IS_MSAN_BUILD@ == 1 else False +config.have_32bit_support = True if @M32_SUPPORTED@ == 1 else False # Add sanitizer list config.environment['LSAN_OPTIONS'] = "suppressions=@KLEE_UTILS_DIR@/sanitizers/lsan.txt" -- cgit 1.4.1