commit ce12e7973684ba582c9e0a61dde5f8bdd18fc946
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Tue Oct 15 14:12:14 2019 +0200

    Introduced a function to initialize aos_testresult_t objects: aosTestResultInit()

diff --git a/core/inc/aos_test.h b/core/inc/aos_test.h
index bf72354..c9cd9be 100644
--- a/core/inc/aos_test.h
+++ b/core/inc/aos_test.h
@@ -150,6 +150,7 @@ struct aos_test {
 #if defined(__cplusplus)
 extern "C" {
 #endif /* defined(__cplusplus) */
+  void aosTestResultInit(aos_testresult_t* result);
   aos_testresult_t aosTestResultAdd(aos_testresult_t a, aos_testresult_t b);
   uint32_t aosTestResultTotal(const aos_testresult_t* result);
   float aosTestResultRatio(const aos_testresult_t* result);
diff --git a/core/src/aos_test.c b/core/src/aos_test.c
index 3f3cfc0..c2f2f35 100644
--- a/core/src/aos_test.c
+++ b/core/src/aos_test.c
@@ -58,6 +58,19 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /******************************************************************************/
 
 /**
+ * @brief   Initialize a result object.
+ *
+ * @param[in] result  Pointer to the object to be nitialized.
+ */
+inline void aosTestResultInit(aos_testresult_t* result)
+{
+  result->passed = 0;
+  result->failed = 0;
+
+  return;
+}
+
+/**
  * @brief   Adds two result objects.
  *
  * @param[in] a   The first summand.
diff --git a/test/periphery-lld/A3906_v1/aos_test_A3906.c b/test/periphery-lld/A3906_v1/aos_test_A3906.c
index cdf6ddf..53a8305 100644
--- a/test/periphery-lld/A3906_v1/aos_test_A3906.c
+++ b/test/periphery-lld/A3906_v1/aos_test_A3906.c
@@ -215,13 +215,15 @@ aos_testresult_t aosTestA3906Func(BaseSequentialStream* stream, const aos_test_t
 
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   a3906_lld_power_t power_state;
   apalQEICount_t qei_count[2][2];
   uint32_t timeout_counter;
   uint32_t stable_counter;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "enable power...\n");
   power_state = A3906_LLD_POWER_ON;
   status = a3906_lld_set_power(((aos_test_a3906data_t*)test->data)->driver, power_state);
diff --git a/test/periphery-lld/AT24C01B_v1/aos_test_AT24C01B.c b/test/periphery-lld/AT24C01B_v1/aos_test_AT24C01B.c
index a113a2b..02c5772 100644
--- a/test/periphery-lld/AT24C01B_v1/aos_test_AT24C01B.c
+++ b/test/periphery-lld/AT24C01B_v1/aos_test_AT24C01B.c
@@ -83,12 +83,14 @@ aos_testresult_t aosTestAt24c01bFunc(BaseSequentialStream* stream, const aos_tes
   aosDbgCheck(test->data != NULL && ((aos_test_at24c01bdata_t*)(test->data))->driver != NULL);
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   uint8_t page_data[AT24C01B_LLD_PAGE_SIZE_BYTES];
   uint8_t original_data[AT24C01B_LLD_PAGE_SIZE_BYTES];
   uint8_t read_data[AT24C01B_LLD_PAGE_SIZE_BYTES];
   size_t errors = 0;
+
+  aosTestResultInit(&result);
   for (size_t dataIdx = 0; dataIdx < AT24C01B_LLD_PAGE_SIZE_BYTES; ++dataIdx) {
     page_data[dataIdx] = dataIdx;
   }
diff --git a/test/periphery-lld/AT42QT1050_v1/aos_test_AT42QT1050.c b/test/periphery-lld/AT42QT1050_v1/aos_test_AT42QT1050.c
index 7696038..b987453 100644
--- a/test/periphery-lld/AT42QT1050_v1/aos_test_AT42QT1050.c
+++ b/test/periphery-lld/AT42QT1050_v1/aos_test_AT42QT1050.c
@@ -191,11 +191,13 @@ aos_testresult_t aosTestAt42qt1050Func(BaseSequentialStream* stream, const aos_t
     aosDbgCheck(test->data != NULL && ((aos_test_at42qt1050data_t*)test->data)->at42qt1050d != NULL);
 
     // local variables
-    aos_testresult_t result = {0, 0};
+    aos_testresult_t result;
     int32_t status;
     uint8_t test_8;
     bool error;
 
+    aosTestResultInit(&result);
+
     chprintf(stream, "read register...\n");
     error = false;
     status = at42qt1050_lld_read_reg(((aos_test_at42qt1050data_t*)test->data)->at42qt1050d, AT42QT1050_LLD_REG_CHIPID, &test_8, ((aos_test_at42qt1050data_t*)test->data)->timeout);
diff --git a/test/periphery-lld/DW1000_v1/aos_test_DW1000.c b/test/periphery-lld/DW1000_v1/aos_test_DW1000.c
index 92af998..171b0ae 100644
--- a/test/periphery-lld/DW1000_v1/aos_test_DW1000.c
+++ b/test/periphery-lld/DW1000_v1/aos_test_DW1000.c
@@ -198,8 +198,10 @@ aos_testresult_t aosTestDw1000Func(BaseSequentialStream* stream, const aos_test_
       ((aos_test_dw1000data_t*)test->data)->driver != NULL &&
       ((aos_test_dw1000data_t*)test->data)->evtsource != NULL);
 
-  aos_testresult_t result = {0, 0};  
+  // local variables
+  aos_testresult_t result;
 
+  aosTestResultInit(&result);
 
 #if (BOARD_MIC9404x_CONNECTED == true)
   // Enable 3.3V and 1.8V supply voltages for powering up the DW1000 module in AMiRo Light Ring
diff --git a/test/periphery-lld/HMC5883L_v1/aos_test_HMC5883L.c b/test/periphery-lld/HMC5883L_v1/aos_test_HMC5883L.c
index a522748..d3b91ca 100644
--- a/test/periphery-lld/HMC5883L_v1/aos_test_HMC5883L.c
+++ b/test/periphery-lld/HMC5883L_v1/aos_test_HMC5883L.c
@@ -58,7 +58,7 @@ aos_testresult_t aosTestHmc5883lFunc(BaseSequentialStream* stream, const aos_tes
   aosDbgCheck(test->data != NULL && (((aos_test_hmc5883ldata_t*)(test->data))->drdyEvtSrc != NULL));
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   uint8_t rxbuffer[3];
   uint8_t data;
@@ -72,6 +72,8 @@ aos_testresult_t aosTestHmc5883lFunc(BaseSequentialStream* stream, const aos_tes
   aos_timestamp_t start;
   aos_timestamp_t t;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "check ID...\n");
   status = hmc5883l_lld_check(((aos_test_hmc5883ldata_t*)test->data)->driver, rxbuffer, 3, ((aos_test_hmc5883ldata_t*)test->data)->timeout);
   if (status == APAL_STATUS_SUCCESS && rxbuffer[0] == HMC5883L_LLD_IDENTIFICATION_A
diff --git a/test/periphery-lld/INA219_v1/aos_test_INA219.c b/test/periphery-lld/INA219_v1/aos_test_INA219.c
index c1db278..5d7de30 100644
--- a/test/periphery-lld/INA219_v1/aos_test_INA219.c
+++ b/test/periphery-lld/INA219_v1/aos_test_INA219.c
@@ -52,7 +52,7 @@ aos_testresult_t aosTestIna219Func(BaseSequentialStream* stream, const aos_test_
   aosDbgCheck(test->data != NULL && ((aos_test_ina219data_t*)(test->data))->inad != NULL);
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   uint16_t data[6];
   uint16_t write_data = 0x1011;
@@ -65,6 +65,8 @@ aos_testresult_t aosTestIna219Func(BaseSequentialStream* stream, const aos_test_
   int32_t shunt;
   uint32_t bus;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "read registers...\n");
   status = ina219_lld_read_register(((aos_test_ina219data_t*)test->data)->inad, INA219_LLD_REGISTER_CONFIGURATION, data, 6, ((aos_test_ina219data_t*)test->data)->timeout);
   if (status == APAL_STATUS_SUCCESS) {
diff --git a/test/periphery-lld/L3G4200D_v1/aos_test_L3G4200D.c b/test/periphery-lld/L3G4200D_v1/aos_test_L3G4200D.c
index 1b9495a..aca542f 100644
--- a/test/periphery-lld/L3G4200D_v1/aos_test_L3G4200D.c
+++ b/test/periphery-lld/L3G4200D_v1/aos_test_L3G4200D.c
@@ -58,7 +58,7 @@ aos_testresult_t aosTestL3g4200dFunc(BaseSequentialStream* stream, const aos_tes
   aosDbgCheck(test->data != NULL && ((aos_test_l3g4200ddata_t*)(test->data)) != NULL);
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   uint8_t data = 0;
   uint8_t write_data[5];
@@ -70,6 +70,7 @@ aos_testresult_t aosTestL3g4200dFunc(BaseSequentialStream* stream, const aos_tes
   uint8_t fifo = 0x5F;
   event_listener_t el;
 
+  aosTestResultInit(&result);
   for (uint8_t dataIdx = 0; dataIdx < 4; dataIdx++) {
     write_data[dataIdx] = (dataIdx+1)*11;
   }
diff --git a/test/periphery-lld/LED_v1/aos_test_LED.c b/test/periphery-lld/LED_v1/aos_test_LED.c
index aece3e3..41452ac 100644
--- a/test/periphery-lld/LED_v1/aos_test_LED.c
+++ b/test/periphery-lld/LED_v1/aos_test_LED.c
@@ -58,9 +58,11 @@ aos_testresult_t aosTestLedFunc(BaseSequentialStream* stream, const aos_test_t*
   aosDbgCheck(test->data != NULL && ((aos_test_leddata_t*)test->data)->led != NULL);
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "lighting up for two seconds...\n");
   led_lld_state_t state = LED_LLD_STATE_ON;
   status = led_lld_set(((aos_test_leddata_t*)test->data)->led, state);
diff --git a/test/periphery-lld/LIS331DLH_v1/aos_test_LIS331DLH.c b/test/periphery-lld/LIS331DLH_v1/aos_test_LIS331DLH.c
index c17560b..0db23cc 100644
--- a/test/periphery-lld/LIS331DLH_v1/aos_test_LIS331DLH.c
+++ b/test/periphery-lld/LIS331DLH_v1/aos_test_LIS331DLH.c
@@ -58,7 +58,7 @@ aos_testresult_t aosTestLis331dlhFunc(BaseSequentialStream* stream, const aos_te
   aosDbgCheck(test->data != NULL && ((aos_test_lis331dlhdata_t*)(test->data)) != NULL);
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   uint8_t data = 0;
   uint8_t write_data[5];
@@ -72,6 +72,7 @@ aos_testresult_t aosTestLis331dlhFunc(BaseSequentialStream* stream, const aos_te
   eventmask_t event_mask;
   uint8_t success = 0;
 
+  aosTestResultInit(&result);
   for (uint8_t dataIdx = 0; dataIdx < 4; dataIdx++) {
     write_data[dataIdx] = (dataIdx+1)*11;
   }
diff --git a/test/periphery-lld/LTC4412_v1/aos_test_LTC4412.c b/test/periphery-lld/LTC4412_v1/aos_test_LTC4412.c
index 2f5f5e1..09565a6 100644
--- a/test/periphery-lld/LTC4412_v1/aos_test_LTC4412.c
+++ b/test/periphery-lld/LTC4412_v1/aos_test_LTC4412.c
@@ -50,9 +50,11 @@ aos_testresult_t aosTestLtc4412Func(BaseSequentialStream* stream, const aos_test
   aosDbgCheck(test->data != NULL && ((aos_test_ltc4412data_t*)test->data)->driver != NULL);
 
   // local variables
-  aos_testresult_t result = {0,0};
+  aos_testresult_t result;
   int32_t status;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "read ctrl pin...\n");
   ltc4412_lld_ctrl_t ctrl;
   status = ltc4412_lld_get_ctrl(((aos_test_ltc4412data_t*)test->data)->driver, &ctrl);
diff --git a/test/periphery-lld/MIC9404x_v1/aos_test_MIC9404x.c b/test/periphery-lld/MIC9404x_v1/aos_test_MIC9404x.c
index 6db6f42..4fd7c92 100644
--- a/test/periphery-lld/MIC9404x_v1/aos_test_MIC9404x.c
+++ b/test/periphery-lld/MIC9404x_v1/aos_test_MIC9404x.c
@@ -60,9 +60,11 @@ aos_testresult_t aosTestMic9404xFunc(BaseSequentialStream* stream, const aos_tes
   // local variables
   mic9404x_lld_state_t state_orig;
   mic9404x_lld_state_t state;
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "reading current status...\n");
   status = mic9404x_lld_get(((aos_test_mic9404data_t*)test->data)->driver, &state_orig);
   if (status == APAL_STATUS_OK) {
diff --git a/test/periphery-lld/MPR121_v1/aos_test_MPR121.c b/test/periphery-lld/MPR121_v1/aos_test_MPR121.c
index 4fdb071..b1113f2 100644
--- a/test/periphery-lld/MPR121_v1/aos_test_MPR121.c
+++ b/test/periphery-lld/MPR121_v1/aos_test_MPR121.c
@@ -52,7 +52,7 @@ aos_testresult_t aosTestMpr121Func(BaseSequentialStream* stream, const aos_test_
   aosDbgCheck(test->data != NULL && ((aos_test_mpr121data_t*)test->data)->mprd != NULL);
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   mpr121_lld_config_t cfg;
   uint8_t data = 0;
@@ -63,6 +63,8 @@ aos_testresult_t aosTestMpr121Func(BaseSequentialStream* stream, const aos_test_
   event_listener_t event_listener;
   aos_timestamp_t tstart, tcurrent, tend;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "soft reset...\n");
   status = mpr121_lld_soft_reset(((aos_test_mpr121data_t*)test->data)->mprd, ((aos_test_mpr121data_t*)test->data)->timeout);
   status |= mpr121_lld_read_config(((aos_test_mpr121data_t*)test->data)->mprd, &cfg, ((aos_test_mpr121data_t*)test->data)->timeout);
diff --git a/test/periphery-lld/MPU6050_v1/aos_test_MPU6050.c b/test/periphery-lld/MPU6050_v1/aos_test_MPU6050.c
index de52cb6..98c3c00 100644
--- a/test/periphery-lld/MPU6050_v1/aos_test_MPU6050.c
+++ b/test/periphery-lld/MPU6050_v1/aos_test_MPU6050.c
@@ -47,11 +47,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 aos_testresult_t aosTestMpu6050Func(BaseSequentialStream* stream, const aos_test_t* test)
 {
-    aos_testresult_t result = {0, 0};
+    aos_testresult_t result;
 
     uint8_t data[1] = {0};
     int32_t status;
 
+  aosTestResultInit(&result);
+
     status = mpu6050_lld_read_register(((aos_test_mpu6050data_t*)test->data)->mpu, MPU6050_LLD_WHO_AM_I, data, 1, ((aos_test_mpu6050data_t*)test->data)->timeout);
     if (status == APAL_STATUS_OK && data[0] == MPU6050_I_AM) {
       aosTestPassed(stream, &result);
diff --git a/test/periphery-lld/PCA9544A_v1/aos_test_PCA9544A.c b/test/periphery-lld/PCA9544A_v1/aos_test_PCA9544A.c
index 6246621..835da77 100644
--- a/test/periphery-lld/PCA9544A_v1/aos_test_PCA9544A.c
+++ b/test/periphery-lld/PCA9544A_v1/aos_test_PCA9544A.c
@@ -50,13 +50,15 @@ aos_testresult_t aosTestPca9544aFunc(BaseSequentialStream* stream, const aos_tes
   aosDbgCheck(test->data != NULL && ((aos_test_pca9544adata_t*)test->data)->driver != NULL);
 
   // local variables
-  aos_testresult_t result = {0,0};
+  aos_testresult_t result;
   int32_t status;
   uint8_t ctrlreg;
   pca9544a_lld_intstatus_t interrupt;
   pca9544a_lld_chid_t channel;
   uint8_t test_mask = 0x00u;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "reading control register...\n");
   status = pca9544a_lld_read(((aos_test_pca9544adata_t*)test->data)->driver, &ctrlreg, ((aos_test_pca9544adata_t*)test->data)->timeout);
   if (status == APAL_STATUS_OK || status == APAL_STATUS_WARNING) {
diff --git a/test/periphery-lld/PCAL6524_v1/aos_test_PCAL6524.c b/test/periphery-lld/PCAL6524_v1/aos_test_PCAL6524.c
index 5acc63d..32b1d7e 100644
--- a/test/periphery-lld/PCAL6524_v1/aos_test_PCAL6524.c
+++ b/test/periphery-lld/PCAL6524_v1/aos_test_PCAL6524.c
@@ -52,11 +52,13 @@ aos_testresult_t aosTestPcal6524Func(BaseSequentialStream* stream, const aos_tes
   aosDbgCheck((test->data != NULL) && (((aos_test_pcal6524data_t*)test->data)->pcal6524d != NULL));
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   uint8_t buffer[24];
   memset(buffer, 0xAA, sizeof(buffer));
 
+  aosTestResultInit(&result);
+
 // This test is currently not supported. See PCAL6524 driver implementation for further information.
 //  chprintf(stream, "reading device ID...\n");
 //  status = pcal6524_lld_read_id(((aos_test_pcal6524data_t*)test->data)->pcal6524d, buffer, ((aos_test_pcal6524data_t*)test->data)->timeout);
diff --git a/test/periphery-lld/PKxxxExxx_v1/aos_test_PKxxxExxx.c b/test/periphery-lld/PKxxxExxx_v1/aos_test_PKxxxExxx.c
index 533a5f2..1fc1ac3 100644
--- a/test/periphery-lld/PKxxxExxx_v1/aos_test_PKxxxExxx.c
+++ b/test/periphery-lld/PKxxxExxx_v1/aos_test_PKxxxExxx.c
@@ -50,9 +50,11 @@ aos_testresult_t aosTestPkxxxexxxFunc(BaseSequentialStream* stream, const aos_te
   aosDbgCheck(test->data != NULL && ((aos_test_pkxxxexxxdata_t*)test->data)->driver != NULL);
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "checking PWM configuration...\n");
   status = pkxxxexxx_lld_checkPWMconfiguration(((aos_test_pkxxxexxxdata_t*)test->data)->driver);
   if (status == APAL_STATUS_OK) {
diff --git a/test/periphery-lld/TLC5947_v1/aos_test_TLC5947.c b/test/periphery-lld/TLC5947_v1/aos_test_TLC5947.c
index 3de6b27..4e8dd0d 100644
--- a/test/periphery-lld/TLC5947_v1/aos_test_TLC5947.c
+++ b/test/periphery-lld/TLC5947_v1/aos_test_TLC5947.c
@@ -60,11 +60,13 @@ aos_testresult_t aosTestTlc5947Func(BaseSequentialStream *stream, const aos_test
   aosDbgCheck(test->data != NULL && ((aos_test_tlc5947data_t*)test->data)->driver != NULL);
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   tlc5947_lld_blank_t blank;
   tlc5947_lld_buffer_t buffer;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "reading blank pin...\n");
   status = tlc5947_lld_getBlank(((aos_test_tlc5947data_t*)test->data)->driver, &blank);
   if (status == APAL_STATUS_OK) {
diff --git a/test/periphery-lld/TPS20xxB_v1/aos_test_TPS20xxB.c b/test/periphery-lld/TPS20xxB_v1/aos_test_TPS20xxB.c
index 749e107..bc7d53b 100644
--- a/test/periphery-lld/TPS20xxB_v1/aos_test_TPS20xxB.c
+++ b/test/periphery-lld/TPS20xxB_v1/aos_test_TPS20xxB.c
@@ -58,11 +58,13 @@ aos_testresult_t aosTestTps20xxbFunc(BaseSequentialStream* stream, const aos_tes
   aosDbgCheck(test->data != NULL && ((aos_test_tps20xxbdata_t*)test->data)->driver != NULL);
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   tps20xxb_lld_enable_t en;
   tps20xxb_lld_overcurrent_t oc;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "write laser enable...\n");
   status = tps20xxb_lld_set_enable(((aos_test_tps20xxbdata_t*)test->data)->driver, TPS20xxB_LLD_ENABLE);
   if (status == APAL_STATUS_SUCCESS) {
diff --git a/test/periphery-lld/TPS6211x_v1/aos_test_TPS6211x.c b/test/periphery-lld/TPS6211x_v1/aos_test_TPS6211x.c
index 0e74bbf..4b5b8e7 100644
--- a/test/periphery-lld/TPS6211x_v1/aos_test_TPS6211x.c
+++ b/test/periphery-lld/TPS6211x_v1/aos_test_TPS6211x.c
@@ -50,10 +50,12 @@ aos_testresult_t aosTestTps6211xFunc(BaseSequentialStream* stream, const aos_tes
   aosDbgCheck(test->data != NULL && ((aos_test_tps6211xbdata_t*)test->data)->driver != NULL);
 
   // local variables
-  aos_testresult_t result = {0,0};
+  aos_testresult_t result;
   int32_t status;
   tps6211x_lld_power_en_t power;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "read pin...\n");
   status = tps6211x_lld_get_power_en(((aos_test_tps6211xbdata_t*)test->data)->driver, &power);
   if(status == APAL_STATUS_SUCCESS){
diff --git a/test/periphery-lld/TPS6211x_v1_INA219_v1/aos_test_TPS6211x_INA219.c b/test/periphery-lld/TPS6211x_v1_INA219_v1/aos_test_TPS6211x_INA219.c
index 6726904..8f83618 100644
--- a/test/periphery-lld/TPS6211x_v1_INA219_v1/aos_test_TPS6211x_INA219.c
+++ b/test/periphery-lld/TPS6211x_v1_INA219_v1/aos_test_TPS6211x_INA219.c
@@ -50,11 +50,13 @@ aos_testresult_t aosTestTps6211xIna219Func(BaseSequentialStream *stream, const a
   aosDbgCheck(test->data != NULL && ((aos_test_tps6211xina219data_t*)test->data)->tps6211x != NULL && ((aos_test_tps6211xina219data_t*)test->data)->ina219 != NULL);
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   tps6211x_lld_power_en_t power;
   uint32_t v_buson, v_busoff;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "read pin...\n");
   status = tps6211x_lld_get_power_en(((aos_test_tps6211xina219data_t*)test->data)->tps6211x, &power);
   aosThdSSleep(1);
diff --git a/test/periphery-lld/VCNL4020_v1/aos_test_VCNL4020.c b/test/periphery-lld/VCNL4020_v1/aos_test_VCNL4020.c
index 0d6a1aa..5cc8f4f 100644
--- a/test/periphery-lld/VCNL4020_v1/aos_test_VCNL4020.c
+++ b/test/periphery-lld/VCNL4020_v1/aos_test_VCNL4020.c
@@ -56,7 +56,7 @@ aos_testresult_t aosTestVcnl4020Func(BaseSequentialStream* stream, const aos_tes
               (((aos_test_vcnl4020data_t*)(test->data))->evtsource != NULL));
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   uint8_t reg_buf[4] = {0};
   uint8_t* reg_8 = (uint8_t*)(reg_buf);
@@ -64,6 +64,8 @@ aos_testresult_t aosTestVcnl4020Func(BaseSequentialStream* stream, const aos_tes
   event_listener_t event_listener;
   aos_timestamp_t tcurrent, tend;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "reading register...\n");
   status = vcnl4020_lld_readreg(((aos_test_vcnl4020data_t*)(test->data))->vcnld, VCNL4020_LLD_REGADDR_IDREV, &reg_8[0], ((aos_test_vcnl4020data_t*)(test->data))->timeout);
   if ((status == APAL_STATUS_OK || status == APAL_STATUS_WARNING) && reg_8[0] == 0x21u) {
diff --git a/test/periphery-lld/bq241xx_v1/aos_test_bq241xx.c b/test/periphery-lld/bq241xx_v1/aos_test_bq241xx.c
index 3ceb21e..5de71f4 100644
--- a/test/periphery-lld/bq241xx_v1/aos_test_bq241xx.c
+++ b/test/periphery-lld/bq241xx_v1/aos_test_bq241xx.c
@@ -51,11 +51,13 @@ aos_testresult_t aosTestBq241xxFunc(BaseSequentialStream* stream, const aos_test
   aosDbgCheck(test->data != NULL);
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   bq241xx_lld_enable_t en[3];
   bq241xx_lld_charge_state_t charge;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "read enable pin...\n");
   status = bq241xx_lld_get_enabled(((aos_test_bq241xxdata_t*)test->data)->driver, &en[0]);
   chprintf(stream, "\t\tcurrently %s\n", (en[0] == BQ241xx_LLD_ENABLED) ? "enabled" : "disabled");
diff --git a/test/periphery-lld/bq27500_v1/aos_test_bq27500.c b/test/periphery-lld/bq27500_v1/aos_test_bq27500.c
index 980ddd0..afea611 100644
--- a/test/periphery-lld/bq27500_v1/aos_test_bq27500.c
+++ b/test/periphery-lld/bq27500_v1/aos_test_bq27500.c
@@ -280,7 +280,7 @@ aos_testresult_t aosTestBq27500Func(BaseSequentialStream* stream, const aos_test
   aosDbgCheck(test->data != NULL && ((aos_test_bq27500data_t*)(test->data))->driver != NULL);
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   bq27500_lld_batlow_t bl;
   bq27500_lld_batgood_t bg;
@@ -298,6 +298,8 @@ aos_testresult_t aosTestBq27500Func(BaseSequentialStream* stream, const aos_test
   bool success;
   bool success2;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "read battery low gpio...\n");
   status = bq27500_lld_read_batlow(((aos_test_bq27500data_t*)test->data)->driver, &bl);
   chprintf(stream, "\t\tbattery low: 0x%X\n", bl);
diff --git a/test/periphery-lld/bq27500_v1_bq241xx_v1/aos_test_bq27500_bq241xx.c b/test/periphery-lld/bq27500_v1_bq241xx_v1/aos_test_bq27500_bq241xx.c
index 96387b8..b4911fa 100644
--- a/test/periphery-lld/bq27500_v1_bq241xx_v1/aos_test_bq27500_bq241xx.c
+++ b/test/periphery-lld/bq27500_v1_bq241xx_v1/aos_test_bq27500_bq241xx.c
@@ -51,7 +51,7 @@ aos_testresult_t aosTestBq27500Bq241xxFunc(BaseSequentialStream *stream, const a
   aosDbgCheck(test->data != NULL && ((aos_test_bq27500bq241xxdata_t*)test->data)->bq27500 != NULL && ((aos_test_bq27500bq241xxdata_t*)test->data)->bq241xx != NULL);
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   uint16_t dst;
   bq27500_lld_flags_t flags;
@@ -60,6 +60,8 @@ aos_testresult_t aosTestBq27500Bq241xxFunc(BaseSequentialStream *stream, const a
   uint32_t sleeptime_s;
   bq241xx_lld_charge_state_t charge;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "check for battery...\n");
   status = bq27500_lld_std_command(((aos_test_bq27500bq241xxdata_t*)test->data)->bq27500, BQ27500_LLD_STD_CMD_Flags, &dst, ((aos_test_bq27500bq241xxdata_t*)test->data)->timeout);
   flags.value = dst;
diff --git a/test/periphery-lld/button_v1/aos_test_button.c b/test/periphery-lld/button_v1/aos_test_button.c
index 450b5a4..f3c0123 100644
--- a/test/periphery-lld/button_v1/aos_test_button.c
+++ b/test/periphery-lld/button_v1/aos_test_button.c
@@ -62,13 +62,15 @@ aos_testresult_t aosTestButtonFunc(BaseSequentialStream* stream, const aos_test_
       ((aos_test_buttondata_t*)test->data)->evtsource != NULL);
 
   // local variables
-  aos_testresult_t result = {0, 0};
+  aos_testresult_t result;
   int32_t status;
   unsigned int count = 0;
   button_lld_state_t bstate;
   event_listener_t evtlistener;
   aos_timestamp_t tcurrent, tend;
 
+  aosTestResultInit(&result);
+
   chprintf(stream, "test interrupts for ten seconds...\n");
   chEvtRegister(((aos_test_buttondata_t*)test->data)->evtsource, &evtlistener, INTERRUPT_EVENT_ID);
   status = APAL_STATUS_OK;
