Skip to content

Commit

Permalink
Test record and replay of an asan enabled binary, if libasan is avail…
Browse files Browse the repository at this point in the history
…able.

Related to rr-debugger#2892
  • Loading branch information
bernhardu committed Jun 18, 2021
1 parent b198c96 commit da835e8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,7 @@ set(TESTS_WITH_PROGRAM
#
# Alphabetical, please.
set(TESTS_WITHOUT_PROGRAM
asan_record_replay
async_signal_syscalls_100
async_signal_syscalls_1000
bad_breakpoint
Expand Down
17 changes: 17 additions & 0 deletions src/test/asan_record_replay.run
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
source `dirname $0`/util.sh

cat <<EOF > asan-test.c
#include <stdio.h>
void main() {
printf("EXIT-SUCCESS\n");
}
EOF

if [[ "$bitness" == "_32" ]]; then ARCHFLAG=-m32; fi
cc -fsanitize=address $ARCHFLAG -c -o asan-test.o asan-test.c && \
cc -fsanitize=address $ARCHFLAG -o asan-test asan-test.o
(($? != 0)) && { echo NOTE: Skipping "'$TESTNAME'" because build failed; exit 0; }

just_record ./asan-test
replay
check EXIT-SUCCESS

0 comments on commit da835e8

Please sign in to comment.