ostest: smp_call only valid in FLAT BUILD

Signed-off-by: hujun5 <hujun5@xiaomi.com>
diff --git a/testing/ostest/ostest_main.c b/testing/ostest/ostest_main.c
index 7c2aca1..88a7de9 100644
--- a/testing/ostest/ostest_main.c
+++ b/testing/ostest/ostest_main.c
@@ -596,7 +596,7 @@
       vfork_test();
 #endif
 
-#ifdef CONFIG_SMP_CALL
+#if defined(CONFIG_SMP_CALL) && defined(CONFIG_BUILD_FLAT)
       printf("\nuser_main: smp call test\n");
       smp_call_test();
 #endif
diff --git a/testing/ostest/smp_call.c b/testing/ostest/smp_call.c
index 6a9c5f3..020d4a5 100644
--- a/testing/ostest/smp_call.c
+++ b/testing/ostest/smp_call.c
@@ -29,6 +29,7 @@
 
 #include <nuttx/sched.h>
 
+#if defined(CONFIG_SMP_CALL) && defined(CONFIG_BUILD_FLAT)
 /****************************************************************************
  * Private Functions
  ****************************************************************************/
@@ -116,3 +117,4 @@
 
   printf("smp_call_test: Test success\n");
 }
+#endif