Merge pull request #261 from simonqhughes/master

Fix for GCC 5.0 which appears not to define _GNU_SOURCE, define _ANSI…_SOURCE and define _POSIX_SOURCE
Martin Kojtal 2016-06-09 12:58:22 +01:00
commit 8d454368bf
25 changed files with 329 additions and 356 deletions

View File

@ -20,20 +20,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -42,6 +37,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_add_del_test_00(const size_t call_count)
@ -77,21 +77,15 @@ int main()
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
//#include <flash-abstraction/Driver_Common.h>
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -101,6 +95,11 @@ int main()
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static char cfstore_add_del_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE];

View File

@ -21,20 +21,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -43,6 +38,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_close_test_00(const size_t call_count)
@ -78,18 +78,13 @@ int main()
#else
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
//#include <flash-abstraction/Driver_Common.h>
#include <Driver_Common.h>
#include <configuration-store/configuration_store.h>
#include "Driver_Common.h"
#include "configuration-store/configuration_store.h"
#include "cfstore_test.h"
#include "cfstore_debug.h"
#include "utest/utest.h"
@ -100,6 +95,10 @@ int main()
#include "uvisor-lib/uvisor-lib.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static char cfstore_close_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE];

View File

@ -20,20 +20,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -42,6 +37,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_create_test_00(const size_t call_count)
@ -78,21 +78,15 @@ int main()
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
//#include <flash-abstraction/Driver_Common.h>
#include <Driver_Common.h>
#include <configuration-store/configuration_store.h>
#include "Driver_Common.h"
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -101,6 +95,11 @@ int main()
#include "uvisor-lib/uvisor-lib.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
#ifdef CFSTORE_DEBUG

View File

@ -55,20 +55,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -77,6 +72,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_example1_test_00(const size_t call_count)
@ -109,17 +109,11 @@ int main()
}
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#ifndef YOTTA_CONFIGURATION_STORE_EXAMPLE1_VERSION_STRING
/* when built as Configuration-Store example, include greentea support otherwise omit */
@ -132,14 +126,17 @@ int main()
#define CaseNext
#endif // YOTTA_CONFIGURATION_STORE_EXAMPLE1_VERSION_STRING
#include <stdio.h>
#include <string.h>
#include "cfstore_config.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#ifdef YOTTA_CFG_CONFIG_UVISOR
#include "uvisor-lib/uvisor-lib.h"
#endif /* YOTTA_CFG_CONFIG_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifndef YOTTA_CONFIGURATION_STORE_EXAMPLE1_VERSION_STRING
using namespace utest::v1;

View File

@ -35,20 +35,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -57,6 +52,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_example2_test_00(const size_t call_count)
@ -93,22 +93,15 @@ int main()
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include "cfstore_test.h"
#include "cfstore_debug.h"
//#include <flash-abstraction/Driver_Common.h>
#include <Driver_Common.h>
#include <configuration-store/configuration_store.h>
#include "Driver_Common.h"
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -116,6 +109,11 @@ int main()
#include "uvisor-lib/uvisor-lib.h"
#endif /* YOTTA_CFG_CONFIG_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <inttypes.h>
using namespace utest::v1;

View File

@ -50,20 +50,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -72,6 +67,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_example3_test_00(const size_t call_count)
@ -108,12 +108,8 @@ int main()
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#ifndef YOTTA_CONFIGURATION_STORE_EXAMPLE3_VERSION_STRING
/* when built as Configuration-Store example, include greentea support otherwise omit */
@ -121,19 +117,21 @@ int main()
#include "unity/unity.h"
#include "greentea-client/test_env.h"
#else // YOTTA_CONFIGURATION_STORE_EXAMPLE3_VERSION_STRING
// map utest types for building as stand alone example
/* map utest types for building as stand alone example */
#define control_t void
#define CaseNext
#endif // YOTTA_CONFIGURATION_STORE_EXAMPLE3_VERSION_STRING
#include <stdio.h>
#include <string.h>
#include "cfstore_config.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#ifdef YOTTA_CFG_CONFIG_UVISOR
#include "uvisor-lib/uvisor-lib.h"
#endif /* YOTTA_CFG_CONFIG_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifndef YOTTA_CONFIGURATION_STORE_EXAMPLE3_VERSION_STRING
using namespace utest::v1;

View File

@ -20,20 +20,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -42,6 +37,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_example4_test_00(const size_t call_count)
@ -78,22 +78,15 @@ int main()
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include "cfstore_test.h"
#include "cfstore_debug.h"
//#include <flash-abstraction/Driver_Common.h>
#include <Driver_Common.h>
#include <configuration-store/configuration_store.h>
#include "Driver_Common.h"
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -101,6 +94,11 @@ int main()
#include "uvisor-lib/uvisor-lib.h"
#endif /* YOTTA_CFG_CONFIG_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <inttypes.h>
using namespace utest::v1;

View File

@ -49,20 +49,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -71,6 +66,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_example5_test_00(const size_t call_count)
@ -106,17 +106,11 @@ int main()
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
//#include <flash-abstraction/Driver_Common.h>
#include <Driver_Common.h>
#include "Driver_Common.h"
#ifndef YOTTA_CONFIGURATION_STORE_EXAMPLE5_VERSION_STRING
/* when built as Configuration-Store example, include greentea support otherwise omit */
@ -124,13 +118,18 @@ int main()
#include "unity/unity.h"
#include "greentea-client/test_env.h"
#else // YOTTA_CONFIGURATION_STORE_EXAMPLE5_VERSION_STRING
// map utest types for building as stand alone example
/* map utest types for building as stand alone example */
#define control_t void
#define CaseNext
#endif // YOTTA_CONFIGURATION_STORE_EXAMPLE5_VERSION_STRING
#include "cfstore_config.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#ifndef YOTTA_CONFIGURATION_STORE_EXAMPLE5_VERSION_STRING

View File

@ -20,20 +20,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -42,6 +37,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_find_test_00(const size_t call_count)
@ -78,22 +78,15 @@ int main()
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include "cfstore_test.h"
#include "cfstore_debug.h"
//#include <flash-abstraction/Driver_Common.h>
#include <Driver_Common.h>
#include <configuration-store/configuration_store.h>
#include "Driver_Common.h"
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -102,6 +95,12 @@ int main()
#include "uvisor-lib/uvisor-lib.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <inttypes.h>
using namespace utest::v1;
static char cfstore_find_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE];

View File

@ -20,20 +20,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -42,6 +37,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_find2_test_00(const size_t call_count)
@ -78,22 +78,15 @@ int main()
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include "cfstore_test.h"
#include "cfstore_debug.h"
//#include <flash-abstraction/Driver_Common.h>
#include <Driver_Common.h>
#include <configuration-store/configuration_store.h>
#include "Driver_Common.h"
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -101,6 +94,12 @@ int main()
#include "uvisor-lib/uvisor-lib.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <inttypes.h>
using namespace utest::v1;
static char cfstore_find2_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE];

View File

@ -20,20 +20,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -42,6 +37,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_flash_test_00(const size_t call_count)
@ -77,12 +77,6 @@ int main()
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#if defined CFSTORE_CONFIG_BACKEND_FLASH_ENABLED && CFSTORE_CONFIG_BACKEND_FLASH_ENABLED == 1
#include <flash-journal-strategy-sequential/flash_journal_strategy_sequential.h>
#include <flash-journal/flash_journal.h>
@ -90,9 +84,8 @@ int main()
#include "cfstore_config.h"
#include "cfstore_test.h"
#include "cfstore_debug.h"
//#include <flash-abstraction/Driver_Common.h>
#include <Driver_Common.h>
#include <configuration-store/configuration_store.h>
#include "Driver_Common.h"
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -100,6 +93,11 @@ int main()
#include "uvisor-lib/uvisor-lib.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
/* Configure secure box. */

View File

@ -20,20 +20,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -42,6 +37,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_flush_test_00(const size_t call_count)
@ -78,21 +78,15 @@ int main()
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include "cfstore_test.h"
#include "cfstore_debug.h"
//#include <flash-abstraction/Driver_Common.h>
#include <Driver_Common.h>
#include <configuration-store/configuration_store.h>
#include "Driver_Common.h"
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -100,6 +94,11 @@ int main()
#include "uvisor-lib/uvisor-lib.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
/*

View File

@ -20,20 +20,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -42,6 +37,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_flush2_test_00(const size_t call_count)
@ -78,20 +78,14 @@ int main()
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "utest/utest.h"
#include "unity/unity.h"
#include "cfstore_config.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "greentea-client/test_env.h"
#include "cfstore_test.h"
#include "cfstore_debug.h"
@ -100,6 +94,11 @@ int main()
#include "uvisor-lib/uvisor-lib.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
/*

View File

@ -18,20 +18,17 @@
* Test cases to test initialization/uninitialization code.
*/
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -40,6 +37,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_init_test_00(const size_t call_count)
@ -72,25 +74,18 @@ int main()
}
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
//#include <flash-abstraction/Driver_Common.h>
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_config.h"
#include "cfstore_test.h"
#include "cfstore_debug.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -98,6 +93,10 @@ int main()
#include "uvisor-lib/uvisor-lib.h"
#endif /* YOTTA_CFG_CONFIG_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;

View File

@ -21,20 +21,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -43,6 +38,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_misc_test_00(const size_t call_count)
@ -79,20 +79,16 @@ int main()
#else
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include "cfstore_test.h"
#include "cfstore_debug.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_config.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -102,6 +98,10 @@ int main()
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static char cfstore_misc_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE];
@ -117,7 +117,6 @@ UVISOR_SET_MODE_ACL(UVISOR_ENABLED, cfstore_acl_uvisor_box_misc_g);
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
/* report whether built/configured for flash sync or async mode */
static control_t cfstore_misc_test_00(const size_t call_count)
{

View File

@ -21,20 +21,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -43,6 +38,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_open_test_00(const size_t call_count)
@ -78,21 +78,15 @@ int main()
#else
#include <stdio.h>
#include <string.h>
#include <stdlib.h> /*rand()*/
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include "cfstore_test.h"
#include "cfstore_debug.h"
//#include <flash-abstraction/Driver_Common.h>
#include <Driver_Common.h>
#include <configuration-store/configuration_store.h>
#include "Driver_Common.h"
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -101,6 +95,11 @@ int main()
#include "uvisor-lib/uvisor-lib.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <string.h>
#include <stdlib.h> /*rand()*/
#include <inttypes.h>
using namespace utest::v1;
static char cfstore_open_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE];

View File

@ -20,20 +20,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -42,6 +37,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_read_test_00(const size_t call_count)
@ -78,20 +78,15 @@ int main()
#else
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include "cfstore_test.h"
#include "cfstore_debug.h"
//#include <flash-abstraction/Driver_Common.h>
#include <Driver_Common.h>
#include <configuration-store/configuration_store.h>
#include "Driver_Common.h"
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -100,6 +95,10 @@ int main()
#include "uvisor-lib/uvisor-lib.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static char cfstore_read_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE];

View File

@ -20,20 +20,15 @@
#if defined __MBED__ && ! defined TOOLCHAIN_GCC_ARM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include <Driver_Common.h>
#include "Driver_Common.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -42,6 +37,11 @@
#include "cfstore_uvisor.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static control_t cfstore_write_test_00(const size_t call_count)
@ -78,21 +78,15 @@ int main()
#else
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_LIKE_FRDM_K64F_GCC
#include <mbed-drivers/mbed.h>
#include "mbed-drivers/mbed.h"
#endif
#include "cfstore_config.h"
#include "cfstore_test.h"
#include "cfstore_debug.h"
//#include <flash-abstraction/Driver_Common.h>
#include <Driver_Common.h>
#include <configuration-store/configuration_store.h>
#include "Driver_Common.h"
#include "configuration-store/configuration_store.h"
#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
@ -101,6 +95,10 @@ int main()
#include "uvisor-lib/uvisor-lib.h"
#endif /* YOTTA_CFG_CFSTORE_UVISOR */
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
using namespace utest::v1;
static char cfstore_write_utest_msg_g[CFSTORE_UTEST_MSG_BUF_SIZE];

View File

@ -23,7 +23,7 @@
#define CFSTORE_CONFIG_BACKEND_UVISOR_ENABLED 0
#define CFSTORE_CONFIG_MBED_OS_VERSION 3
/* default build config overridden by package manager configuarion
/* default build config overridden by package manager configuration
*
* __MBED__
* Morpheus build system (mbed-classic) defines the __MBED__ symbol

View File

@ -46,12 +46,22 @@ static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94";
* Compares a filename or pathname to a pattern.
*/
#include "cfstore_fnmatch.h"
#include <ctype.h>
#include <cfstore_fnmatch.h>
#include <string.h>
#include <stdio.h>
#include <limits.h>
/* code copied from the original fnmatch.h */
#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
#define FNM_PERIOD 0x04 /* Period must be matched by period. */
#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */
#define FNM_CASEFOLD 0x10 /* Case insensitive search. */
#define EOS '\0'
#define RANGE_MATCH 1
@ -161,16 +171,16 @@ fnmatch(pattern, string, flags)
case EOS:
if ((flags & FNM_LEADING_DIR) && *string == '/')
return (0);
return (*string == EOS ? 0 : FNM_NOMATCH);
return (*string == EOS ? 0 : CFSTORE_FNM_NOMATCH);
case '?':
if (*string == EOS)
return (FNM_NOMATCH);
return (CFSTORE_FNM_NOMATCH);
if (*string == '/' && (flags & FNM_PATHNAME))
return (FNM_NOMATCH);
return (CFSTORE_FNM_NOMATCH);
if (*string == '.' && (flags & FNM_PERIOD) &&
(string == stringstart ||
((flags & FNM_PATHNAME) && *(string - 1) == '/')))
return (FNM_NOMATCH);
return (CFSTORE_FNM_NOMATCH);
++string;
break;
case '*':
@ -182,19 +192,19 @@ fnmatch(pattern, string, flags)
if (*string == '.' && (flags & FNM_PERIOD) &&
(string == stringstart ||
((flags & FNM_PATHNAME) && *(string - 1) == '/')))
return (FNM_NOMATCH);
return (CFSTORE_FNM_NOMATCH);
/* Optimize for pattern with * at end or before /. */
if (c == EOS)
if (flags & FNM_PATHNAME)
return ((flags & FNM_LEADING_DIR) ||
strchr(string, '/') == NULL ?
0 : FNM_NOMATCH);
0 : CFSTORE_FNM_NOMATCH);
else
return (0);
else if (c == '/' && flags & FNM_PATHNAME) {
if ((string = strchr(string, '/')) == NULL)
return (FNM_NOMATCH);
return (CFSTORE_FNM_NOMATCH);
break;
}
@ -206,16 +216,16 @@ fnmatch(pattern, string, flags)
break;
++string;
}
return (FNM_NOMATCH);
return (CFSTORE_FNM_NOMATCH);
case '[':
if (*string == EOS)
return (FNM_NOMATCH);
return (CFSTORE_FNM_NOMATCH);
if (*string == '/' && (flags & FNM_PATHNAME))
return (FNM_NOMATCH);
return (CFSTORE_FNM_NOMATCH);
if (*string == '.' && (flags & FNM_PERIOD) &&
(string == stringstart ||
((flags & FNM_PATHNAME) && *(string - 1) == '/')))
return (FNM_NOMATCH);
return (CFSTORE_FNM_NOMATCH);
switch (rangematch(pattern, *string, flags, &newp)) {
case RANGE_ERROR:
@ -224,7 +234,7 @@ fnmatch(pattern, string, flags)
pattern = newp;
break;
case RANGE_NOMATCH:
return (FNM_NOMATCH);
return (CFSTORE_FNM_NOMATCH);
}
++string;
break;
@ -245,7 +255,7 @@ fnmatch(pattern, string, flags)
tolower((unsigned char)*string)))
;
else
return (FNM_NOMATCH);
return (CFSTORE_FNM_NOMATCH);
string++;
break;
}

View File

@ -30,27 +30,11 @@
* @(#)fnmatch.h 8.1 (Berkeley) 6/2/93
*/
#ifndef _FNMATCH_H_
#define _FNMATCH_H_
#ifndef __CFSTORE_FNMATCH_H_
#define __CFSTORE_FNMATCH_H_
#define FNM_NOMATCH 1 /* Match failed. */
#define CFSTORE_FNM_NOMATCH 1 /* Match failed. */
#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
#define FNM_PERIOD 0x04 /* Period must be matched by period. */
int cfstore_fnmatch(const char *, const char *, int);
#if defined(_GNU_SOURCE) || !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */
#define FNM_CASEFOLD 0x10 /* Case insensitive search. */
#define FNM_IGNORECASE FNM_CASEFOLD
#define FNM_FILE_NAME FNM_PATHNAME
#endif
//todo: #include <sys/cdefs.h>
//#include <cdefs.h>
//__BEGIN_DECLS
int fnmatch(const char *, const char *, int);
//__END_DECLS
#endif /* !_FNMATCH_H_ */
#endif /* !__CFSTORE_FNMATCH_H_ */

View File

@ -18,6 +18,8 @@
#ifndef _CFSTORE_LIST_H_
#define _CFSTORE_LIST_H_
#include <stddef.h>
/*
* Doubly linked list implementation based on the following design
* and psuedo-code:

View File

@ -17,15 +17,15 @@
*
* test support code implementation file.
*/
#include "cfstore_config.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration_store.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <inttypes.h>
#include "cfstore_config.h"
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <configuration-store/configuration_store.h>
/* ruler for measuring text strings */

View File

@ -20,9 +20,9 @@
#ifndef __CFSTORE_UTEST_H
#define __CFSTORE_UTEST_H
#include <inttypes.h>
#include "cfstore_debug.h"
#include "cfstore_test.h"
#include <inttypes.h>
using namespace utest::v1;

View File

@ -16,11 +16,6 @@
* limitations under the License.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <inttypes.h>
#include <cfstore_fnmatch.h>
#if defined CFSTORE_CONFIG_MBED_OS_VERSION && CFSTORE_CONFIG_MBED_OS_VERSION == 3
@ -35,9 +30,16 @@
#include <flash-journal/flash_journal.h>
#include <Driver_Common.h>
#endif /* CFSTORE_CONFIG_BACKEND_FLASH_ENABLED */
#include <configuration-store/configuration_store.h>
#include "cfstore_debug.h"
#include "cfstore_list.h"
#include "configuration-store/configuration_store.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <inttypes.h>
#ifdef CFSTORE_DEBUG
@ -2974,11 +2976,11 @@ static int32_t cfstore_find_ex(const char* key_name_query, cfstore_area_hkvt_t *
CFSTORE_TP(CFSTORE_TP_FIND, "%s:Found matching key (key_name_query = \"%s\", next->key = \"%s\"),next_key_len=%d\n", __func__, key_name_query, key_name, (int) next_key_len);
cfstore_hkvt_dump(next, __func__);
return ARM_DRIVER_OK;
} else if(ret != FNM_NOMATCH){
} else if(ret != CFSTORE_FNM_NOMATCH){
CFSTORE_ERRLOG("%s:Error: fnmatch() error (ret=%" PRId32 ").\n", __func__, ret);
return ARM_DRIVER_ERROR;
}
/* FNM_NOMATCH => get the next hkvt if any */
/* CFSTORE_FNM_NOMATCH => get the next hkvt if any */
ret = cfstore_get_next_hkvt(next, next);
if(ret == ARM_CFSTORE_DRIVER_ERROR_KEY_NOT_FOUND) {
CFSTORE_TP(CFSTORE_TP_FIND, "%s:No more KVs found\n", __func__);