From 6014e3a198623b040969e4cf8776a6577959a710 Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Fri, 29 Jan 2021 15:06:18 +0800 Subject: [PATCH] esp32: move stack check test --- .../test/test_stack_check_cxx.cpp | 0 components/esp32c3/test/test_stack_check.c | 25 ------------------- .../esp32c3/test/test_stack_check_cxx.cpp | 25 ------------------- components/esp32s2/test/test_stack_check.c | 25 ------------------- .../esp32s2/test/test_stack_check_cxx.cpp | 25 ------------------- .../test/test_stack_check.c | 0 6 files changed, 100 deletions(-) rename components/{esp32 => cxx}/test/test_stack_check_cxx.cpp (100%) delete mode 100644 components/esp32c3/test/test_stack_check.c delete mode 100644 components/esp32c3/test/test_stack_check_cxx.cpp delete mode 100644 components/esp32s2/test/test_stack_check.c delete mode 100644 components/esp32s2/test/test_stack_check_cxx.cpp rename components/{esp32 => esp_system}/test/test_stack_check.c (100%) diff --git a/components/esp32/test/test_stack_check_cxx.cpp b/components/cxx/test/test_stack_check_cxx.cpp similarity index 100% rename from components/esp32/test/test_stack_check_cxx.cpp rename to components/cxx/test/test_stack_check_cxx.cpp diff --git a/components/esp32c3/test/test_stack_check.c b/components/esp32c3/test/test_stack_check.c deleted file mode 100644 index abc36047b9..0000000000 --- a/components/esp32c3/test/test_stack_check.c +++ /dev/null @@ -1,25 +0,0 @@ -#include "unity.h" - -#if CONFIG_COMPILER_STACK_CHECK - -static void recur_and_smash(void) -{ - static int cnt; - volatile uint8_t buf[50]; - volatile int num = sizeof(buf)+10; - - if (cnt++ < 1) { - recur_and_smash(); - } - for (int i = 0; i < num; i++) { - buf[i] = 0; - } -} - - -TEST_CASE("stack smashing protection", "[stack_check] [ignore]") -{ - recur_and_smash(); -} - -#endif diff --git a/components/esp32c3/test/test_stack_check_cxx.cpp b/components/esp32c3/test/test_stack_check_cxx.cpp deleted file mode 100644 index 83ca007d05..0000000000 --- a/components/esp32c3/test/test_stack_check_cxx.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "unity.h" - -#if CONFIG_COMPILER_STACK_CHECK - -static void recur_and_smash_cxx(void) -{ - static int cnt; - volatile uint8_t buf[50]; - volatile int num = sizeof(buf)+10; - - if (cnt++ < 1) { - recur_and_smash_cxx(); - } - for (int i = 0; i < num; i++) { - buf[i] = 0; - } -} - - -TEST_CASE("stack smashing protection CXX", "[stack_check] [ignore]") -{ - recur_and_smash_cxx(); -} - -#endif diff --git a/components/esp32s2/test/test_stack_check.c b/components/esp32s2/test/test_stack_check.c deleted file mode 100644 index abc36047b9..0000000000 --- a/components/esp32s2/test/test_stack_check.c +++ /dev/null @@ -1,25 +0,0 @@ -#include "unity.h" - -#if CONFIG_COMPILER_STACK_CHECK - -static void recur_and_smash(void) -{ - static int cnt; - volatile uint8_t buf[50]; - volatile int num = sizeof(buf)+10; - - if (cnt++ < 1) { - recur_and_smash(); - } - for (int i = 0; i < num; i++) { - buf[i] = 0; - } -} - - -TEST_CASE("stack smashing protection", "[stack_check] [ignore]") -{ - recur_and_smash(); -} - -#endif diff --git a/components/esp32s2/test/test_stack_check_cxx.cpp b/components/esp32s2/test/test_stack_check_cxx.cpp deleted file mode 100644 index 83ca007d05..0000000000 --- a/components/esp32s2/test/test_stack_check_cxx.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "unity.h" - -#if CONFIG_COMPILER_STACK_CHECK - -static void recur_and_smash_cxx(void) -{ - static int cnt; - volatile uint8_t buf[50]; - volatile int num = sizeof(buf)+10; - - if (cnt++ < 1) { - recur_and_smash_cxx(); - } - for (int i = 0; i < num; i++) { - buf[i] = 0; - } -} - - -TEST_CASE("stack smashing protection CXX", "[stack_check] [ignore]") -{ - recur_and_smash_cxx(); -} - -#endif diff --git a/components/esp32/test/test_stack_check.c b/components/esp_system/test/test_stack_check.c similarity index 100% rename from components/esp32/test/test_stack_check.c rename to components/esp_system/test/test_stack_check.c