diff options
| author | Jiri Olsa <Jiri Olsa jolsa@redhat.com> | 2011-06-15 23:20:25 +0200 |
|---|---|---|
| committer | Jiri Olsa <Jiri Olsa jolsa@redhat.com> | 2011-06-17 12:08:26 +0200 |
| commit | 73ae529a915c6445d5cf0a43f8cba140d7d79e83 (patch) | |
| tree | f9154c63353bd04e0a73f6d086f867525b1d349c /test/script | |
| parent | 23916445a712b64e34735a7d06bc69bfcfa4b3b6 (diff) | |
| download | latrace-73ae529a915c6445d5cf0a43f8cba140d7d79e83.tar.gz latrace-73ae529a915c6445d5cf0a43f8cba140d7d79e83.tar.xz latrace-73ae529a915c6445d5cf0a43f8cba140d7d79e83.zip | |
test: Add tests for LIBS*/SYM* options
Added automated tests for most of the LIBS*/SYM* options.
Missing tests for options:
LIBS_TO, LIBS_FROM, SYM_BELOW, SYM_NOEXIT
Diffstat (limited to 'test/script')
| -rw-r--r-- | test/script/test_libsym.sh | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/test/script/test_libsym.sh b/test/script/test_libsym.sh new file mode 100644 index 0000000..0e8ad8a --- /dev/null +++ b/test/script/test_libsym.sh @@ -0,0 +1,141 @@ +. $PWD/test/script/functions.sh + +function tls_cleanup +{ + rm -f /tmp/tls_latrace.conf +} + +function test_libsym_all +{ + LD_LIBRARY_PATH=$PWD ./latrace -qR $PWD/test-libsym all > /dev/null + CHECK_RET +} + +function test_libsym_lib1 +{ + cat > /tmp/tls_latrace.conf <<EOF +OPTIONS { + LIBS=*lib-test-libsym1 +} +EOF + LD_LIBRARY_PATH=$PWD ./latrace -qR -N /tmp/tls_latrace.conf $PWD/test-libsym lib1 > /dev/null + CHECK_RET +} + +function test_libsym_lib2 +{ + cat > /tmp/tls_latrace.conf <<EOF +OPTIONS { + LIBS=*lib-test-libsym2 +} +EOF + LD_LIBRARY_PATH=$PWD ./latrace -qR -N /tmp/tls_latrace.conf $PWD/test-libsym lib2 > /dev/null + CHECK_RET +} + +function test_libsym_lib3 +{ + cat > /tmp/tls_latrace.conf <<EOF +OPTIONS { + LIBS=*lib-test-libsym3 +} +EOF + LD_LIBRARY_PATH=$PWD ./latrace -qR -N /tmp/tls_latrace.conf $PWD/test-libsym lib3 > /dev/null + CHECK_RET +} + +function test_libsym_lib1lib2 +{ + cat > /tmp/tls_latrace.conf <<EOF +OPTIONS { + LIBS=*lib-test-libsym1,*lib-test-libsym2 +} +EOF + LD_LIBRARY_PATH=$PWD ./latrace -qR -N /tmp/tls_latrace.conf $PWD/test-libsym lib1lib2 > /dev/null + CHECK_RET +} + +function test_libsym_lib2lib3 +{ + cat > /tmp/tls_latrace.conf <<EOF +OPTIONS { + LIBS=*lib-test-libsym2,*lib-test-libsym3 +} +EOF + LD_LIBRARY_PATH=$PWD ./latrace -qR -N /tmp/tls_latrace.conf $PWD/test-libsym lib2lib3 > /dev/null + CHECK_RET +} + +function test_libsym_lib1lib2lib3 +{ + cat > /tmp/tls_latrace.conf <<EOF +OPTIONS { + LIBS=*lib-test-libsym1,*lib-test-libsym2,*lib-test-libsym3 +} +EOF + LD_LIBRARY_PATH=$PWD ./latrace -qR -N /tmp/tls_latrace.conf $PWD/test-libsym lib1lib2lib3 > /dev/null + CHECK_RET +} + +function test_libsym_sym1 +{ + cat > /tmp/tls_latrace.conf <<EOF +OPTIONS { + SYM=test_libsym1_1 +} +EOF + LD_LIBRARY_PATH=$PWD ./latrace -qR -N /tmp/tls_latrace.conf $PWD/test-libsym sym1 > /dev/null + CHECK_RET +} + +function test_libsym_sym2sym3 +{ + cat > /tmp/tls_latrace.conf <<EOF +OPTIONS { + SYM=test_libsym2_2,test_libsym3_3 +} +EOF + LD_LIBRARY_PATH=$PWD ./latrace -qR -N /tmp/tls_latrace.conf $PWD/test-libsym sym2sym3 > /dev/null + CHECK_RET +} + +function test_libsym_omit_sym1 +{ + cat > /tmp/tls_latrace.conf <<EOF +OPTIONS { + SYM_OMIT=test_libsym1_1 +} +EOF + LD_LIBRARY_PATH=$PWD ./latrace -qR -N /tmp/tls_latrace.conf $PWD/test-libsym omit_sym1 > /dev/null + CHECK_RET +} + +function test_libsym_omit_sym2sym3 +{ + cat > /tmp/tls_latrace.conf <<EOF +OPTIONS { + SYM_OMIT=test_libsym2_3,test_libsym3_2 +} +EOF + LD_LIBRARY_PATH=$PWD ./latrace -qR -N /tmp/tls_latrace.conf $PWD/test-libsym omit_sym2sym3 > /dev/null + CHECK_RET +} + +function test_libsym +{ + test_libsym_all + test_libsym_lib1 + test_libsym_lib2 + test_libsym_lib3 + test_libsym_lib1lib2 + test_libsym_lib2lib3 + test_libsym_lib1lib2lib3 + test_libsym_sym1 + test_libsym_sym2sym3 + test_libsym_omit_sym1 + test_libsym_omit_sym2sym3 + +# TODO tests for LIBS_TO, LIBS_FROM, SYM_BELOW, SYM_NOEXIT + + tls_cleanup +} |
