summaryrefslogtreecommitdiffstats
path: root/test/test-lib.h
diff options
context:
space:
mode:
authorJiri Olsa <Jiri Olsa jolsa@redhat.com>2011-06-15 23:20:25 +0200
committerJiri Olsa <Jiri Olsa jolsa@redhat.com>2011-06-17 12:08:26 +0200
commit73ae529a915c6445d5cf0a43f8cba140d7d79e83 (patch)
treef9154c63353bd04e0a73f6d086f867525b1d349c /test/test-lib.h
parent23916445a712b64e34735a7d06bc69bfcfa4b3b6 (diff)
downloadlatrace-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/test-lib.h')
-rw-r--r--test/test-lib.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test-lib.h b/test/test-lib.h
index 54c1472..de9c10f 100644
--- a/test/test-lib.h
+++ b/test/test-lib.h
@@ -62,4 +62,19 @@ do { \
#define BUFSIZE 1000
+#define LOCAL_TEST(data, cnt, test) \
+do { \
+ char buf[BUFSIZE]; \
+ int ret; \
+ TEST_START(); \
+ test; \
+ TEST_STOP(); \
+ ret = fout_read(sh, buf, BUFSIZE); \
+ if (!ret) \
+ return -1; \
+ ret = re_test(buf, data, cnt); \
+ if (RE_TEST_OK != ret) \
+ FAILED("test %i, pattern '%s'\n", ret, data[ret].pat); \
+} while(0)
+
#endif