tests: Fix ODR violations rather than ignoring them.
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 20 Feb 2023 20:00:42 +0000 (12:00 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 20 Feb 2023 20:00:42 +0000 (12:00 -0800)
tests/automake.mk
tests/libpspp/sparse-xarray-test.at
tests/libpspp/zip.at

index 41d8edba737da7cb3ad1ccaf384430d921e14858..9d9bc8bcc8013cc963eb861d1ee8a8e7bae658c1 100644 (file)
@@ -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)
 
index 52990ba5a23b6ad737d312f938db5d8bfe1d01fa..6f00251f281ee6c9bb3f9b1d6f2615ab068f42e8 100644 (file)
@@ -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 \
index 1ab57e50d8a85ec9a44f0821993662862e1b7396..5b21d50f5854791e06b60a6424c069a170da3ddc 100644 (file)
@@ -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])