@@ -313,6 +313,7 @@ AC_CONFIG_FILES([Makefile
test/validation/Makefile
test/validation/buffer/Makefile
test/validation/classification/Makefile
+ test/validation/config/Makefile
test/validation/cpumask/Makefile
test/validation/common/Makefile
test/validation/crypto/Makefile
@@ -1,5 +1,6 @@
ODP_MODULES = buffer \
classification \
+ config \
cpumask \
crypto \
errno \
new file mode 100644
@@ -0,0 +1 @@
+config_main
\ No newline at end of file
new file mode 100644
@@ -0,0 +1,10 @@
+include ../Makefile.inc
+
+noinst_LTLIBRARIES = libtestconfig.la
+libtestconfig_la_SOURCES = config.c
+
+bin_PROGRAMS = config_main$(EXEEXT)
+dist_config_main_SOURCES = config_main.c
+config_main_LDADD = libtestconfig.la $(LIBCUNIT_COMMON) $(LIBODP)
+
+EXTRA_DIST = config.h
new file mode 100644
@@ -0,0 +1,60 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp.h>
+#include "odp_cunit_common.h"
+#include "config.h"
+
+int config_suite_init(void)
+{
+ return 0;
+}
+
+int config_suite_term(void)
+{
+ return 0;
+}
+
+void config_test(void)
+{
+ CU_ASSERT(odp_config_pools() == ODP_CONFIG_POOLS);
+ CU_ASSERT(odp_config_queues() == ODP_CONFIG_QUEUES);
+ CU_ASSERT(odp_config_max_ordered_locks_per_queue() ==
+ ODP_CONFIG_MAX_ORDERED_LOCKS_PER_QUEUE);
+ CU_ASSERT(odp_config_sched_prios() == ODP_CONFIG_SCHED_PRIOS);
+ CU_ASSERT(odp_config_sched_grps() == ODP_CONFIG_SCHED_GRPS);
+ CU_ASSERT(odp_config_pktio_entries() == ODP_CONFIG_PKTIO_ENTRIES);
+ CU_ASSERT(odp_config_buffer_align_min() == ODP_CONFIG_BUFFER_ALIGN_MIN);
+ CU_ASSERT(odp_config_buffer_align_max() == ODP_CONFIG_BUFFER_ALIGN_MAX);
+ CU_ASSERT(odp_config_packet_headroom() == ODP_CONFIG_PACKET_HEADROOM);
+ CU_ASSERT(odp_config_packet_tailroom() == ODP_CONFIG_PACKET_TAILROOM);
+ CU_ASSERT(odp_config_packet_seg_len_min() ==
+ ODP_CONFIG_PACKET_SEG_LEN_MIN);
+ CU_ASSERT(odp_config_packet_seg_len_max() ==
+ ODP_CONFIG_PACKET_SEG_LEN_MAX);
+ CU_ASSERT(odp_config_packet_buf_len_max() ==
+ ODP_CONFIG_PACKET_BUF_LEN_MAX);
+ CU_ASSERT(odp_config_shm_blocks() == ODP_CONFIG_SHM_BLOCKS);
+}
+
+CU_TestInfo config_suite[] = {
+ _CU_TEST_INFO(config_test),
+ CU_TEST_INFO_NULL,
+};
+
+CU_SuiteInfo config_suites[] = {
+ { .pName = "config tests",
+ .pTests = config_suite,
+ .pInitFunc = config_suite_init,
+ .pCleanupFunc = config_suite_term,
+ },
+ CU_SUITE_INFO_NULL,
+};
+
+int config_main(void)
+{
+ return odp_cunit_run(config_suites);
+}
new file mode 100644
@@ -0,0 +1,28 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef _ODP_TEST_CONFIG_H_
+#define _ODP_TEST_CONFIG_H_
+
+#include <CUnit/Basic.h>
+
+/* test functions: */
+void config_test(void);
+
+/* test arrays: */
+extern CU_TestInfo config_suite[];
+
+/* test array init/term functions: */
+int config_suite_init(void);
+int config_suite_term(void);
+
+/* test registry: */
+extern CU_SuiteInfo config_suites[];
+
+/* main test program: */
+int config_main(void);
+
+#endif
new file mode 100644
@@ -0,0 +1,11 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+#include "config.h"
+
+int main(void)
+{
+ return config_main();
+}
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- configure.ac | 1 + test/validation/Makefile.am | 1 + test/validation/config/.gitignore | 1 + test/validation/config/Makefile.am | 10 ++++++ test/validation/config/config.c | 60 ++++++++++++++++++++++++++++++++++++ test/validation/config/config.h | 28 +++++++++++++++++ test/validation/config/config_main.c | 11 +++++++ 7 files changed, 112 insertions(+) create mode 100644 test/validation/config/.gitignore create mode 100644 test/validation/config/Makefile.am create mode 100644 test/validation/config/config.c create mode 100644 test/validation/config/config.h create mode 100644 test/validation/config/config_main.c