============================================================================
Testsuite summary for OpenDataPlane 0.3.0
============================================================================
# TOTAL: 2
# PASS: 2
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
And when I run the binary standalone I get a seg fault.
$ ./test/cunit/crypto/odp_crypto
odp_buffer_pool.c:137:odp_buffer_pool_init_global():
Buffer pool init global
odp_buffer_pool.c:138:odp_buffer_pool_init_global(): pool_entry_s size 192
odp_buffer_pool.c:139:odp_buffer_pool_init_global(): pool_entry_t size 192
odp_buffer_pool.c:140:odp_buffer_pool_init_global(): odp_buffer_hdr_t size 120
odp_buffer_pool.c:141:odp_buffer_pool_init_global():
odp_queue.c:99:odp_queue_init_global():Queue init ... odp_queue.c:119:odp_queue_init_global():done
odp_queue.c:120:odp_queue_init_global():Queue init global
odp_queue.c:122:odp_queue_init_global(): struct queue_entry_s size 192
odp_queue.c:124:odp_queue_init_global(): queue_entry_t size 192
odp_queue.c:125:odp_queue_init_global():
odp_schedule.c:89:odp_schedule_init_global():Schedule init ... odp_schedule.c:149:odp_schedule_init_global():done
odp_timer.c:219:odp_timer_init_global():Timer init ...odp_timer.c:225:odp_timer_init_global():done
ODP version: 0.3.0
CUnit - A unit testing framework for C - Version 2.1-3
http://cunit.sourceforge.net/
Suite: odp_crypto_sync_inp
Test: ENC_ALG_3DES_CBC ...passed
Test: DEC_ALG_3DES_CBC ...passed
Test: ENC_ALG_3DES_CBC_OVR_IV ...zsh: segmentation fault (core dumped) ./test/cunit/crypto/odp_crypto
Any Idea why?
For 1.0 "make check" must work and the solution should would be to move
odp_crypto up a level, and that means that you can remove the makefile
structure.
When I tried this with the patch pasted below I got the same seg fault.
@@ -173,7 +173,6 @@ AC_CONFIG_FILES([Makefile
test/Makefile
test/api_test/Makefile
test/cunit/Makefile
- test/cunit/crypto/Makefile
pkgconfig/libodp.pc])
AC_SEARCH_LIBS([timer_create],[rt posix4])
@@ -3,15 +3,18 @@ include $(top_srcdir)/test/Makefile.inc
AM_CFLAGS += -I$(CUNIT_PATH)/include
AM_LDFLAGS += -L$(CUNIT_PATH)/lib -static -lcunit
-SUBDIRS = crypto
-
if ODP_CUNIT_ENABLED
TESTS = ${bin_PROGRAMS}
check_PROGRAMS = ${bin_PROGRAMS}
-bin_PROGRAMS = odp_init odp_queue
+bin_PROGRAMS = odp_init odp_queue odp_crypto
+odp_crypto_CFLAGS = $(AM_CFLAGS) -I./crypto
+odp_crypto_LDFLAGS = $(AM_LDFLAGS)
odp_init_LDFLAGS = $(AM_LDFLAGS)
odp_queue_LDFLAGS = $(AM_LDFLAGS)
endif
+dist_odp_crypto_SOURCES = crypto/odp_crypto_test_async_inp.c \
+ crypto/odp_crypto_test_sync_inp.c \
+ odp_crypto.c
dist_odp_init_SOURCES = odp_init.c
dist_odp_queue_SOURCES = odp_queue.c
similarity index 96%
rename from test/cunit/crypto/odp_crypto_test.c
rename to test/cunit/odp_crypto.c
@@ -7,8 +7,8 @@
#include <odp.h>
#include "CUnit/Basic.h"
#include "CUnit/TestDB.h"
-#include "odp_crypto_test_async_inp.h"
-#include "odp_crypto_test_sync_inp.h"
+#include "crypto/odp_crypto_test_async_inp.h"
+#include "crypto/odp_crypto_test_sync_inp.h"
#define SHM_PKT_POOL_SIZE (512*2048*2)
#define SHM_PKT_POOL_BUF_SIZE (1024 * 32)