Skip to content

Commit

Permalink
fix(ASAN): avoid report 'odr-violation' issues
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Sep 17, 2023
1 parent 5f300b1 commit e7beb96
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/failure_detector/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ while read -r -a line; do
output_xml="${REPORT_DIR}/dsn.failure_detector.tests_${test_case/.ini/.xml}"
echo "============ run dsn.failure_detector.tests ${test_case} with gtest_filter ${gtest_filter} ============"
./clear.sh
GTEST_OUTPUT="xml:${output_xml}" GTEST_FILTER=${gtest_filter} ./dsn.failure_detector.tests ${test_case}
GTEST_OUTPUT="xml:${output_xml}" GTEST_FILTER=${gtest_filter} ASAN_OPTIONS=detect_odr_violation=0 ./dsn.failure_detector.tests ${test_case}

if [ $? -ne 0 ]; then
echo "run dsn.failure_detector.tests $test_case failed"
Expand Down
2 changes: 1 addition & 1 deletion src/geo/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ exit_if_fail() {
fi
}

./pegasus_geo_test
ASAN_OPTIONS=detect_odr_violation=0 ./pegasus_geo_test

exit_if_fail $? "run pegasus_geo_test failed"
2 changes: 1 addition & 1 deletion src/http/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ if [ -z "${REPORT_DIR}" ]; then
fi

output_xml="${REPORT_DIR}/dsn_http_test.xml"
GTEST_OUTPUT="xml:${output_xml}" ./dsn_http_test
GTEST_OUTPUT="xml:${output_xml}" ASAN_OPTIONS=detect_odr_violation=0 ./dsn_http_test
2 changes: 1 addition & 1 deletion src/meta/test/meta_state/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ while read -r -a line; do
output_xml="${REPORT_DIR}/dsn_meta_state_tests_${test_case/.ini/.xml}"
echo "============ run dsn_meta_state_tests ${test_case} with gtest_filter ${gtest_filter} ============"
./clear.sh
GTEST_OUTPUT="xml:${output_xml}" GTEST_FILTER=${gtest_filter} ./dsn_meta_state_tests ${test_case}
GTEST_OUTPUT="xml:${output_xml}" GTEST_FILTER=${gtest_filter} ASAN_OPTIONS=detect_odr_violation=0 ./dsn_meta_state_tests ${test_case}

if [ $? -ne 0 ]; then
echo "run dsn_meta_state_tests $test_case failed"
Expand Down
2 changes: 1 addition & 1 deletion src/meta/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fi

./clear.sh
output_xml="${REPORT_DIR}/dsn.meta.test.1.xml"
GTEST_OUTPUT="xml:${output_xml}" ./dsn.meta.test
GTEST_OUTPUT="xml:${output_xml}" ASAN_OPTIONS=detect_odr_violation=0 ./dsn.meta.test
if [ $? -ne 0 ]; then
echo "run dsn.meta.test failed"
echo "---- ls ----"
Expand Down
2 changes: 1 addition & 1 deletion src/redis_protocol/proxy_ut/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ if [ -z $REPORT_DIR ]; then
fi

test_case=pegasus_rproxy_test
GTEST_OUTPUT="xml:$REPORT_DIR/$test_case.xml" ./$test_case
GTEST_OUTPUT="xml:$REPORT_DIR/$test_case.xml" ASAN_OPTIONS=detect_odr_violation=0 ./$test_case
2 changes: 1 addition & 1 deletion src/replica/backup/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if [ -n ${TEST_OPTS} ]; then
done
fi

./dsn_replica_backup_test
ASAN_OPTIONS=detect_odr_violation=0 ./dsn_replica_backup_test

if [ $? -ne 0 ]; then
tail -n 100 data/log/log.1.txt
Expand Down
2 changes: 1 addition & 1 deletion src/replica/bulk_load/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if [ -n ${TEST_OPTS} ]; then
done
fi

./dsn_replica_bulk_load_test
ASAN_OPTIONS=detect_odr_violation=0 ./dsn_replica_bulk_load_test

if [ $? -ne 0 ]; then
tail -n 100 data/log/log.1.txt
Expand Down
2 changes: 1 addition & 1 deletion src/replica/duplication/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if [ -n ${TEST_OPTS} ]; then
done
fi

./dsn_replica_dup_test
ASAN_OPTIONS=detect_odr_violation=0 ./dsn_replica_dup_test

if [ $? -ne 0 ]; then
tail -n 100 data/log/log.1.txt
Expand Down
2 changes: 1 addition & 1 deletion src/replica/split/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if [ -n ${TEST_OPTS} ]; then
done
fi

./dsn_replica_split_test
ASAN_OPTIONS=detect_odr_violation=0 ./dsn_replica_split_test

if [ $? -ne 0 ]; then
tail -n 100 data/log/log.1.txt
Expand Down
2 changes: 1 addition & 1 deletion src/replica/storage/simple_kv/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fi
./clear.sh

echo "running dsn.replication.simple_kv for 20 seconds ..."
./dsn.replication.simple_kv config.ini &>out &
ASAN_OPTIONS=detect_odr_violation=0 ./dsn.replication.simple_kv config.ini &>out &
PID=$!
sleep 20
kill $PID
Expand Down
2 changes: 1 addition & 1 deletion src/replica/storage/simple_kv/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function run_single()
fi

echo "${bin} ${prefix}.ini ${prefix}.act"
${bin} ${prefix}.ini ${prefix}.act
ASAN_OPTIONS=detect_odr_violation=0 ${bin} ${prefix}.ini ${prefix}.act
ret=$?
if find . -name log.1.txt &>/dev/null; then
log=`find . -name log.1.txt`
Expand Down
2 changes: 1 addition & 1 deletion src/replica/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ fi

./clear.sh
output_xml="${REPORT_DIR}/dsn.replica.test.1.xml"
GTEST_OUTPUT="xml:${output_xml}" ./dsn.replica.test
GTEST_OUTPUT="xml:${output_xml}" ASAN_OPTIONS=detect_odr_violation=0 ./dsn.replica.test
2 changes: 1 addition & 1 deletion src/runtime/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ while read -r -a line; do
output_xml="${REPORT_DIR}/dsn_runtime_tests_${test_case/.ini/.xml}"
echo "============ run dsn_runtime_tests ${test_case} with gtest_filter ${gtest_filter} ============"
./clear.sh
GTEST_OUTPUT="xml:${output_xml}" GTEST_FILTER=${gtest_filter} ./dsn_runtime_tests ${test_case} < command.txt
GTEST_OUTPUT="xml:${output_xml}" GTEST_FILTER=${gtest_filter} ASAN_OPTIONS=detect_odr_violation=0 ./dsn_runtime_tests ${test_case} < command.txt

if [ $? -ne 0 ]; then
echo "run dsn_runtime_tests $test_case failed"
Expand Down
2 changes: 1 addition & 1 deletion src/server/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if [ -n ${TEST_OPTS} ]; then
done
fi

./pegasus_unit_test
ASAN_OPTIONS=detect_odr_violation=0 ./pegasus_unit_test

exit_if_fail $? "run unit test failed"

2 changes: 1 addition & 1 deletion src/test/function_test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ loop_count=0
last_ret=0
while [ $loop_count -le 5 ]
do
GTEST_OUTPUT="xml:${REPORT_DIR}/${TEST_BIN}.xml" ./${TEST_BIN}
GTEST_OUTPUT="xml:${REPORT_DIR}/${TEST_BIN}.xml" ASAN_OPTIONS=detect_odr_violation=0 ./${TEST_BIN}
last_ret=$?
if [ $last_ret -eq 0 ]; then
break
Expand Down
2 changes: 1 addition & 1 deletion src/utils/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fi

./clear.sh
output_xml="${REPORT_DIR}/dsn_utils_tests.xml"
GTEST_OUTPUT="xml:${output_xml}" ./dsn_utils_tests
GTEST_OUTPUT="xml:${output_xml}" ASAN_OPTIONS=detect_odr_violation=0 ./dsn_utils_tests

if [ $? -ne 0 ]; then
echo "run dsn_utils_tests failed"
Expand Down

0 comments on commit e7beb96

Please sign in to comment.