From fbe98af997299f9e384f97bea1dfa4dccc910f07 Mon Sep 17 00:00:00 2001
From: lnlan <lanleinan@163.com>
Date: Sat, 15 May 2021 16:29:50 +0800
Subject: [PATCH] fixed that LOSCFG_USER_TEST_SMP is unuseful

Change-Id: Ib6bd11fbeaac88e69de663a7a3f2d01ac1fe9042
---
 testsuites/unittest/BUILD.gn                  | 19 ++++++++++++++++---
 testsuites/unittest/IO/BUILD.gn               |  2 ++
 testsuites/unittest/IPC/BUILD.gn              |  2 ++
 testsuites/unittest/config.gni                |  7 ++++++-
 testsuites/unittest/drivers/hid/BUILD.gn      |  2 ++
 testsuites/unittest/drivers/storage/BUILD.gn  |  2 ++
 testsuites/unittest/dynload/BUILD.gn          |  2 ++
 testsuites/unittest/exc/BUILD.gn              |  2 ++
 testsuites/unittest/fs/BUILD.gn               |  2 ++
 testsuites/unittest/fs/proc/BUILD.gn          |  2 ++
 testsuites/unittest/fs/vfat2/BUILD.gn         |  2 ++
 testsuites/unittest/liteipc/BUILD.gn          |  2 ++
 testsuites/unittest/mem/shm/BUILD.gn          |  2 ++
 testsuites/unittest/mem/vm/BUILD.gn           |  2 ++
 testsuites/unittest/misc/BUILD.gn             |  2 ++
 testsuites/unittest/net/netdb/BUILD.gn        |  2 ++
 testsuites/unittest/net/resolv/BUILD.gn       |  2 ++
 testsuites/unittest/net/socket/BUILD.gn       |  2 ++
 testsuites/unittest/posix/mem/BUILD.gn        |  2 ++
 testsuites/unittest/posix/mqueue/BUILD.gn     |  2 ++
 testsuites/unittest/posix/pthread/BUILD.gn    |  2 ++
 testsuites/unittest/process/mutex/BUILD.gn    |  2 ++
 testsuites/unittest/process/process/BUILD.gn  |  2 ++
 testsuites/unittest/process/pthread/BUILD.gn  |  2 ++
 testsuites/unittest/process/rwlock/BUILD.gn   |  2 ++
 testsuites/unittest/process/spinlock/BUILD.gn |  2 ++
 .../unittest/security/capability/BUILD.gn     |  2 ++
 testsuites/unittest/security/reugid/BUILD.gn  |  2 ++
 testsuites/unittest/security/vid/BUILD.gn     |  2 ++
 testsuites/unittest/signal/BUILD.gn           |  2 ++
 testsuites/unittest/sys/BUILD.gn              |  2 ++
 testsuites/unittest/time/clock/BUILD.gn       |  2 ++
 testsuites/unittest/time/timer/BUILD.gn       |  2 ++
 testsuites/unittest/util/BUILD.gn             |  2 ++
 34 files changed, 86 insertions(+), 4 deletions(-)

diff --git a/testsuites/unittest/BUILD.gn b/testsuites/unittest/BUILD.gn
index 3768b79b..36718d8c 100644
--- a/testsuites/unittest/BUILD.gn
+++ b/testsuites/unittest/BUILD.gn
@@ -29,17 +29,28 @@
 
 import("config.gni")
 
+local_flags = []
 local_flags_smoke = []
 local_flags_full = []
-if (board_name == "hispark_taurus") {
-  local_flags_smoke += [ "-DLOSCFG_USER_TEST_SMP" ]
-  local_flags_full += [ "-DLOSCFG_USER_TEST_SMP" ]
+if (LOSCFG_USER_TEST_SMP == "enable" || (LOSCFG_USER_TEST_SMP == "default" && board_name == "hispark_taurus")) {
+  local_flags = [ "-DLOSCFG_USER_TEST_SMP" ]
 }
 local_flags_smoke += [ "-DLOSCFG_USER_TEST_SMOKE" ]
 local_flags_full += [ "-DLOSCFG_USER_TEST_SMOKE" ]
 local_flags_full += [ "-DLOSCFG_USER_TEST_FULL" ]
 #local_flags_full += [ "-DLOSCFG_USER_TEST_PRESSURE" ]
 
+config("local_public_config") {
+  cflags = [ "-fpermissive" ]
+  cflags += [
+    "-O2",
+    "-fbuiltin",
+    "-Wno-narrowing",
+  ]
+  cflags += local_flags
+  cflags_cc = cflags
+}
+
 config("public_config_smk") {
   cflags = [ "-fpermissive" ]
   cflags += [
@@ -48,6 +59,7 @@ config("public_config_smk") {
     "-Wno-narrowing",
   ]
   cflags += local_flags_smoke
+  cflags += local_flags
   cflags_cc = cflags
 }
 
@@ -59,6 +71,7 @@ config("public_config_full") {
     "-Wno-narrowing",
   ]
   cflags += local_flags_full
+  cflags += local_flags
   cflags_cc = cflags
 }
 
diff --git a/testsuites/unittest/IO/BUILD.gn b/testsuites/unittest/IO/BUILD.gn
index daf0b997..3836d24e 100644
--- a/testsuites/unittest/IO/BUILD.gn
+++ b/testsuites/unittest/IO/BUILD.gn
@@ -48,6 +48,7 @@ source_set("sources_smoke") {
     "smoke/IO_test_010.cpp",
     "smoke/IO_test_013.cpp",
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -89,6 +90,7 @@ source_set("sources_other") {
     "full/IO_test_strncasecmp_l_001.cpp",
     "full/IO_test_strncasecmp_l_002.cpp",
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/IPC/BUILD.gn b/testsuites/unittest/IPC/BUILD.gn
index 9152c359..ce22d5b4 100644
--- a/testsuites/unittest/IPC/BUILD.gn
+++ b/testsuites/unittest/IPC/BUILD.gn
@@ -44,6 +44,7 @@ sources_entry = [
 source_set("sources_smoke") {
   sources = [
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -53,6 +54,7 @@ source_set("sources_other") {
     "full/IPC_test_mkfifoat_001.cpp",
     "full/IPC_test_mkfifoat_002.cpp",
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/config.gni b/testsuites/unittest/config.gni
index 866bc5ba..e7a74e34 100644
--- a/testsuites/unittest/config.gni
+++ b/testsuites/unittest/config.gni
@@ -28,9 +28,14 @@
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 LOSCFG_USER_TEST_FOR_DOOR = true
-LOSCFG_USER_TEST_FOR_ALL = true
+LOSCFG_USER_TEST_FOR_ALL = false
 LOSCFG_USER_TEST_PRESSURE = false
 
+# "default": depend on board_name
+# "enable": those testsuites testing for SMP is enable
+# "disable" those testsuites is disable
+LOSCFG_USER_TEST_SMP = "default"
+
 LOSCFG_USER_TEST_MISC = true
 LOSCFG_USER_TEST_DRIVERS_HID = true
 LOSCFG_USER_TEST_DRIVERS_STORAGE = true
diff --git a/testsuites/unittest/drivers/hid/BUILD.gn b/testsuites/unittest/drivers/hid/BUILD.gn
index 72704e5f..797a5a47 100644
--- a/testsuites/unittest/drivers/hid/BUILD.gn
+++ b/testsuites/unittest/drivers/hid/BUILD.gn
@@ -45,6 +45,7 @@ source_set("sources_smoke") {
   sources = [
     "smoke/hid_test_001.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -52,6 +53,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/drivers/storage/BUILD.gn b/testsuites/unittest/drivers/storage/BUILD.gn
index c17f4608..a5c62fa8 100644
--- a/testsuites/unittest/drivers/storage/BUILD.gn
+++ b/testsuites/unittest/drivers/storage/BUILD.gn
@@ -45,6 +45,7 @@ source_set("sources_smoke") {
   sources = [
     "smoke/storage_test_001.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -52,6 +53,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/dynload/BUILD.gn b/testsuites/unittest/dynload/BUILD.gn
index 6cedc00a..e336a08d 100644
--- a/testsuites/unittest/dynload/BUILD.gn
+++ b/testsuites/unittest/dynload/BUILD.gn
@@ -46,6 +46,7 @@ source_set("sources_smoke") {
     "smoke/dynload_test_002.cpp",
     "smoke/dynload_test_004.cpp",
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -53,6 +54,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/exc/BUILD.gn b/testsuites/unittest/exc/BUILD.gn
index 7a24227f..6b68ae08 100644
--- a/testsuites/unittest/exc/BUILD.gn
+++ b/testsuites/unittest/exc/BUILD.gn
@@ -49,6 +49,7 @@ source_set("sources_smoke") {
     "smoke/it_test_exc_004.cpp",
     "smoke/it_test_exc_005.cpp",
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -57,6 +58,7 @@ source_set("sources_other") {
   sources = [
     "full/it_test_fexecve_001.cpp",
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/fs/BUILD.gn b/testsuites/unittest/fs/BUILD.gn
index 77dd1492..a0989e8d 100644
--- a/testsuites/unittest/fs/BUILD.gn
+++ b/testsuites/unittest/fs/BUILD.gn
@@ -60,6 +60,7 @@ source_set("sources_smoke") {
     "jffs/smoke/It_vfs_jffs_535.cpp",
     "jffs/smoke/It_vfs_jffs_Dac_001.cpp",
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -791,6 +792,7 @@ source_set("sources_other") {
     "jffs/full/It_vfs_jffs_807.cpp",
     "jffs/full/It_vfs_jffs_808.cpp",
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/fs/proc/BUILD.gn b/testsuites/unittest/fs/proc/BUILD.gn
index 32c6d9b2..19b10971 100644
--- a/testsuites/unittest/fs/proc/BUILD.gn
+++ b/testsuites/unittest/fs/proc/BUILD.gn
@@ -44,6 +44,7 @@ sources_entry = [
 source_set("sources_smoke") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -57,6 +58,7 @@ source_set("sources_other") {
     "full/It_vfs_proc_005.cpp",
     "full/It_vfs_proc_006.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/fs/vfat2/BUILD.gn b/testsuites/unittest/fs/vfat2/BUILD.gn
index 763ba1f7..dcff5eb1 100644
--- a/testsuites/unittest/fs/vfat2/BUILD.gn
+++ b/testsuites/unittest/fs/vfat2/BUILD.gn
@@ -46,6 +46,7 @@ source_set("sources_smoke") {
   sources = [
     "smoke/It_vfs_fat_026.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -193,6 +194,7 @@ source_set("sources_other") {
     "full/It_vfs_fat_904.cpp",
     "full/It_vfs_fat_909.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/liteipc/BUILD.gn b/testsuites/unittest/liteipc/BUILD.gn
index 07daaafd..942f38a0 100644
--- a/testsuites/unittest/liteipc/BUILD.gn
+++ b/testsuites/unittest/liteipc/BUILD.gn
@@ -47,6 +47,7 @@ source_set("sources_smoke") {
     "smoke/liteipc_test_001.cpp",
     "smoke/liteipc_test_002.cpp",
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -54,6 +55,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/mem/shm/BUILD.gn b/testsuites/unittest/mem/shm/BUILD.gn
index c54afa84..8f9c95b3 100644
--- a/testsuites/unittest/mem/shm/BUILD.gn
+++ b/testsuites/unittest/mem/shm/BUILD.gn
@@ -58,6 +58,7 @@ source_set("sources_smoke") {
       "smoke/shm_test_013.cpp",
       "smoke/shm_test_014.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -65,6 +66,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/mem/vm/BUILD.gn b/testsuites/unittest/mem/vm/BUILD.gn
index 1d15ab9c..3e69f057 100644
--- a/testsuites/unittest/mem/vm/BUILD.gn
+++ b/testsuites/unittest/mem/vm/BUILD.gn
@@ -59,6 +59,7 @@ source_set("sources_smoke") {
     "smoke/open_wmemstream_test_001.cpp",
     "smoke/user_copy_test_001.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -66,6 +67,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/misc/BUILD.gn b/testsuites/unittest/misc/BUILD.gn
index c0d85a52..db465f49 100644
--- a/testsuites/unittest/misc/BUILD.gn
+++ b/testsuites/unittest/misc/BUILD.gn
@@ -50,6 +50,7 @@ source_set("sources_other") {
     "full/misc_test_012.cpp",
     "full/misc_test_013.cpp",
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -65,6 +66,7 @@ source_set("sources_smoke") {
     "smoke/misc_test_009.cpp",
     "smoke/misc_test_014.cpp",
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/net/netdb/BUILD.gn b/testsuites/unittest/net/netdb/BUILD.gn
index f214a453..994652de 100644
--- a/testsuites/unittest/net/netdb/BUILD.gn
+++ b/testsuites/unittest/net/netdb/BUILD.gn
@@ -53,6 +53,7 @@ source_set("sources_smoke") {
     "smoke/net_netdb_test_001.cpp",
     "smoke/net_netdb_test_013.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -80,6 +81,7 @@ source_set("sources_other") {
     "full/net_netdb_test_021.cpp",
     "full/net_netdb_test_022.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/net/resolv/BUILD.gn b/testsuites/unittest/net/resolv/BUILD.gn
index 8d7a1d9e..ef29c648 100644
--- a/testsuites/unittest/net/resolv/BUILD.gn
+++ b/testsuites/unittest/net/resolv/BUILD.gn
@@ -56,6 +56,7 @@ source_set("sources_smoke") {
     "smoke/net_resolv_test_006.cpp",
     "smoke/net_resolv_test_007.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -66,6 +67,7 @@ source_set("sources_other") {
     "full/net_resolv_test_005.cpp",
     "full/net_resolv_test_008.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/net/socket/BUILD.gn b/testsuites/unittest/net/socket/BUILD.gn
index 5cb59553..e90c8bff 100644
--- a/testsuites/unittest/net/socket/BUILD.gn
+++ b/testsuites/unittest/net/socket/BUILD.gn
@@ -64,6 +64,7 @@ source_set("sources_smoke") {
     "smoke/net_socket_test_012.cpp",
     "smoke/net_socket_test_013.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -71,6 +72,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/posix/mem/BUILD.gn b/testsuites/unittest/posix/mem/BUILD.gn
index 6f3252b9..1c0a1c5d 100644
--- a/testsuites/unittest/posix/mem/BUILD.gn
+++ b/testsuites/unittest/posix/mem/BUILD.gn
@@ -46,6 +46,7 @@ source_set("sources_smoke") {
     "smoke/It_posix_mem_001.cpp",
     "smoke/It_posix_mem_003.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -53,6 +54,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/posix/mqueue/BUILD.gn b/testsuites/unittest/posix/mqueue/BUILD.gn
index ec5ab14c..9eb2886b 100644
--- a/testsuites/unittest/posix/mqueue/BUILD.gn
+++ b/testsuites/unittest/posix/mqueue/BUILD.gn
@@ -60,6 +60,7 @@ source_set("sources_smoke") {
     "smoke/It_posix_queue_208.cpp",
     "smoke/It_posix_queue_209.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -206,6 +207,7 @@ source_set("sources_other") {
     "full/It_posix_queue_203.cpp",
     "full/It_posix_queue_204.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/posix/pthread/BUILD.gn b/testsuites/unittest/posix/pthread/BUILD.gn
index 9e0dea9e..4bb68454 100644
--- a/testsuites/unittest/posix/pthread/BUILD.gn
+++ b/testsuites/unittest/posix/pthread/BUILD.gn
@@ -59,6 +59,7 @@ source_set("sources_smoke") {
     "smoke/It_posix_pthread_022.cpp",
     "smoke/It_posix_pthread_203.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -171,6 +172,7 @@ source_set("sources_other") {
     "full/It_posix_pthread_240.cpp",
     "full/It_posix_pthread_241.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/process/mutex/BUILD.gn b/testsuites/unittest/process/mutex/BUILD.gn
index 75ed44d0..24644cf8 100644
--- a/testsuites/unittest/process/mutex/BUILD.gn
+++ b/testsuites/unittest/process/mutex/BUILD.gn
@@ -69,6 +69,7 @@ source_set("sources_smoke") {
     "smoke/pthread_mutex_test_024.cpp",
     "smoke/pthread_mutex_test_025.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -76,6 +77,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/process/process/BUILD.gn b/testsuites/unittest/process/process/BUILD.gn
index 5a7391c1..4ac01305 100644
--- a/testsuites/unittest/process/process/BUILD.gn
+++ b/testsuites/unittest/process/process/BUILD.gn
@@ -118,6 +118,7 @@ source_set("sources_smoke") {
     "smp/process_test_smp_007.cpp",
     "smp/process_test_smp_008.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -125,6 +126,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/process/pthread/BUILD.gn b/testsuites/unittest/process/pthread/BUILD.gn
index 90fb5f75..1786f957 100644
--- a/testsuites/unittest/process/pthread/BUILD.gn
+++ b/testsuites/unittest/process/pthread/BUILD.gn
@@ -68,6 +68,7 @@ source_set("sources_smoke") {
     "smoke/pthread_test_018.cpp",
     "smoke/pthread_test_019.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -75,6 +76,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/process/rwlock/BUILD.gn b/testsuites/unittest/process/rwlock/BUILD.gn
index aa69d086..a72c79cc 100644
--- a/testsuites/unittest/process/rwlock/BUILD.gn
+++ b/testsuites/unittest/process/rwlock/BUILD.gn
@@ -46,6 +46,7 @@ source_set("sources_smoke") {
     "smoke/pthread_rwlock_test_001.cpp",
     "smoke/pthread_rwlock_test_002.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -53,6 +54,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/process/spinlock/BUILD.gn b/testsuites/unittest/process/spinlock/BUILD.gn
index 4d87c87c..2baca226 100644
--- a/testsuites/unittest/process/spinlock/BUILD.gn
+++ b/testsuites/unittest/process/spinlock/BUILD.gn
@@ -45,6 +45,7 @@ source_set("sources_smoke") {
   sources = [
     "smoke/pthread_spinlock_test_001.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -52,6 +53,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/security/capability/BUILD.gn b/testsuites/unittest/security/capability/BUILD.gn
index f1bfffb4..0ae9bd99 100644
--- a/testsuites/unittest/security/capability/BUILD.gn
+++ b/testsuites/unittest/security/capability/BUILD.gn
@@ -17,6 +17,7 @@ source_set("sources_smoke") {
   sources = [
     "smoke/cap_test_001.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -24,6 +25,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/security/reugid/BUILD.gn b/testsuites/unittest/security/reugid/BUILD.gn
index c5a76673..b15e5fe1 100644
--- a/testsuites/unittest/security/reugid/BUILD.gn
+++ b/testsuites/unittest/security/reugid/BUILD.gn
@@ -45,6 +45,7 @@ source_set("sources_smoke") {
   sources = [
     "smoke/reugid_test_001.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -52,6 +53,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/security/vid/BUILD.gn b/testsuites/unittest/security/vid/BUILD.gn
index f30f4767..88e86fb6 100644
--- a/testsuites/unittest/security/vid/BUILD.gn
+++ b/testsuites/unittest/security/vid/BUILD.gn
@@ -45,6 +45,7 @@ source_set("sources_smoke") {
   sources = [
     "smoke/vid_test_001.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -52,6 +53,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/signal/BUILD.gn b/testsuites/unittest/signal/BUILD.gn
index bb601ac3..3b17627d 100644
--- a/testsuites/unittest/signal/BUILD.gn
+++ b/testsuites/unittest/signal/BUILD.gn
@@ -107,6 +107,7 @@ source_set("sources_smoke") {
     "smoke/sigset_test_001.cpp",
     "smoke/sigset_test_002.cpp",
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -114,6 +115,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/sys/BUILD.gn b/testsuites/unittest/sys/BUILD.gn
index 60c9f87a..3bcfb9fd 100644
--- a/testsuites/unittest/sys/BUILD.gn
+++ b/testsuites/unittest/sys/BUILD.gn
@@ -72,6 +72,7 @@ source_set("sources_smoke") {
     "smoke/sys_test_030.cpp",
     "smoke/sys_test_031.cpp",
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -79,6 +80,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/time/clock/BUILD.gn b/testsuites/unittest/time/clock/BUILD.gn
index 5895738d..dcf57513 100644
--- a/testsuites/unittest/time/clock/BUILD.gn
+++ b/testsuites/unittest/time/clock/BUILD.gn
@@ -54,6 +54,7 @@ source_set("sources_smoke") {
     "smoke/clock_test_011.cpp",
     "smoke/clock_test_012.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -62,6 +63,7 @@ source_set("sources_other") {
   sources = [
     "full/clock_test_010.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/time/timer/BUILD.gn b/testsuites/unittest/time/timer/BUILD.gn
index 7bf06d32..8298988e 100644
--- a/testsuites/unittest/time/timer/BUILD.gn
+++ b/testsuites/unittest/time/timer/BUILD.gn
@@ -50,6 +50,7 @@ source_set("sources_smoke") {
     "smoke/timer_test_tzset_001.cpp",
     "smoke/timer_test_tzset_002.cpp",
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -57,6 +58,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "../..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
diff --git a/testsuites/unittest/util/BUILD.gn b/testsuites/unittest/util/BUILD.gn
index 964f0bb2..f4ec69a6 100644
--- a/testsuites/unittest/util/BUILD.gn
+++ b/testsuites/unittest/util/BUILD.gn
@@ -55,6 +55,7 @@ source_set("sources_smoke") {
       "smoke/util_test_006.cpp",
       "smoke/util_test_007.cpp",
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }
@@ -62,6 +63,7 @@ source_set("sources_smoke") {
 source_set("sources_other") {
   sources = [
   ]
+  configs += [ "..:local_public_config" ]
   include_dirs = common_include_dirs
   deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
 }