From ae01fc907a49e6cf4ceb946b1f02b97a30989fd6 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 20 Feb 2023 12:00:42 -0800 Subject: [PATCH] tests: Fix ODR violations rather than ignoring them. --- tests/automake.mk | 6 +----- tests/libpspp/sparse-xarray-test.at | 4 ---- tests/libpspp/zip.at | 2 -- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/automake.mk b/tests/automake.mk index 41d8edba73..9d9bc8bcc8 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -169,7 +169,7 @@ check_PROGRAMS += tests/libpspp/sparse-xarray-test tests_libpspp_sparse_xarray_test_SOURCES = \ tests/libpspp/sparse-xarray-test.c tests_libpspp_sparse_xarray_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 -tests_libpspp_sparse_xarray_test_LDADD = src/libpspp/liblibpspp.la \ +tests_libpspp_sparse_xarray_test_LDADD = \ src/libpspp-core.la \ gl/libgl.la \ $(LIB_GETRANDOM) @@ -217,10 +217,8 @@ tests_language_lexer_segment_test_LDADD = \ check_PROGRAMS += tests/libpspp/zip-test tests_libpspp_zip_test_SOURCES = \ tests/libpspp/zip-test.c - tests_libpspp_zip_test_CFLAGS = $(AM_CFLAGS) tests_libpspp_zip_test_LDADD = \ - src/libpspp/liblibpspp.la \ src/libpspp-core.la \ gl/libgl.la \ $(LIB_GETRANDOM) @@ -230,7 +228,6 @@ tests_math_chart_get_scale_test_SOURCES = tests/math/chart-get-scale-test.c tests_math_chart_get_scale_test_LDADD = \ src/math/libpspp-math.la \ src/libpspp/liblibpspp.la \ - src/libpspp-core.la \ gl/libgl.la \ $(LIB_GETRANDOM) @@ -239,7 +236,6 @@ tests_math_chart_get_ticks_format_test_SOURCES = tests/math/chart-get-ticks-form tests_math_chart_get_ticks_format_test_LDADD = \ src/math/libpspp-math.la \ src/libpspp/liblibpspp.la \ - src/libpspp-core.la \ gl/libgl.la \ $(LIB_GETRANDOM) diff --git a/tests/libpspp/sparse-xarray-test.at b/tests/libpspp/sparse-xarray-test.at index 52990ba5a2..6f00251f28 100644 --- a/tests/libpspp/sparse-xarray-test.at +++ b/tests/libpspp/sparse-xarray-test.at @@ -58,7 +58,6 @@ m4_divert_pop([PREPARE_TESTS]) AT_SETUP([in-memory sparse_xarray]) AT_KEYWORDS([slow]) dnl --values=3 would be a slightly better test but takes much longer. -ASAN_OPTIONS=$ASAN_OPTIONS:detect_odr_violation=0; export ASAN_OPTIONS AT_CHECK([sparse-xarray-test \ --verbosity=0 --queue-limit=`sparse_xarray_queue_limit` \ --columns=3 --max-rows=3 --max-memory-rows=3 --values=2], @@ -68,7 +67,6 @@ AT_CLEANUP m4_define([SPARSE_XARRAY_ON_DISK], [AT_SETUP([on-disk sparse_xarray max-memory-rows=$1]) AT_KEYWORDS([slow]) - ASAN_OPTIONS=$ASAN_OPTIONS:detect_odr_violation=0; export ASAN_OPTIONS AT_CHECK([sparse-xarray-test \ --verbosity=0 --queue-limit=`sparse_xarray_queue_limit` \ --columns=2 --max-rows=3 --max-memory-rows=$1 --values=2], @@ -80,7 +78,6 @@ SPARSE_XARRAY_ON_DISK([2]) AT_SETUP([copying between in-memory sparse_xarrays]) AT_KEYWORDS([sparse_xarray slow]) -ASAN_OPTIONS=$ASAN_OPTIONS:detect_odr_violation=0; export ASAN_OPTIONS AT_CHECK([sparse-xarray-test \ --verbosity=0 --queue-limit=`sparse_xarray_queue_limit` \ --columns=2 --max-rows=2 --max-memory-rows=2 --values=2 \ @@ -92,7 +89,6 @@ m4_define([SPARSE_XARRAY_COPY_DISK], [AT_SETUP([copying between on-disk sparse_xarrays max-memory-rows=$1]) AT_KEYWORDS([sparse_xarray slow]) limit=`sparse_xarray_queue_limit` - ASAN_OPTIONS=$ASAN_OPTIONS:detect_odr_violation=0; export ASAN_OPTIONS AT_CHECK([sparse-xarray-test \ --verbosity=0 --queue-limit=`expr $limit / 2` \ --columns=1 --max-rows=2 --max-memory-rows=$max_memory_rows \ diff --git a/tests/libpspp/zip.at b/tests/libpspp/zip.at index 1ab57e50d8..5b21d50f58 100644 --- a/tests/libpspp/zip.at +++ b/tests/libpspp/zip.at @@ -35,7 +35,6 @@ while test $s -le 8192 ; do names="$names $bn"; done -ASAN_OPTIONS="$ASAN_OPTIONS:detect_odr_violation=0";export ASAN_OPTIONS AT_CHECK([cd "$dir1" && zip-test w foo.zip $names]) # If zipinfo is installed, make sure it can read the zipfile. @@ -78,7 +77,6 @@ while test $s -le 8192 ; do names="$names $bn"; done -ASAN_OPTIONS="$ASAN_OPTIONS:detect_odr_violation=0";export ASAN_OPTIONS # The pipe through "cat" below is essential because it makes the # output file un-seekable. AT_CHECK([cd "$dir1" && zip-test w - $names | cat > foo.zip]) -- 2.30.2