This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new ab105e659 testing/ostest: pass the stringified argument to _ASSERT
ab105e659 is described below

commit ab105e659c92161c0e529c63a1a99bf2ce70ee42
Author: ouyangxiangzhen <[email protected]>
AuthorDate: Thu Nov 12 15:19:04 2026 +0800

    testing/ostest: pass the stringified argument to _ASSERT
    
    wdtest_assert(x) forwarded x to _ASSERT(x, __FILE__, __LINE__), whose #f
    stringified the argument after the wdtest_assert -> _ASSERT chain had
    already macro-expanded it.  Pass the stringified argument (#x) from
    wdtest_assert itself so the assert message holds the literal expression
    text instead of an expanded macro tree.
    
    This matches the NuttX change "include/assert: stringify assert
    expressions at the first macro level", which makes _ASSERT() take the
    expression string as a 4th parameter.
    
    Assisted-By: mimo-v2.6-pro
    Signed-off-by: ouyangxiangzhen <[email protected]>
---
 testing/ostest/wdog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testing/ostest/wdog.c b/testing/ostest/wdog.c
index 69e4b1386..8fafa9d9e 100644
--- a/testing/ostest/wdog.c
+++ b/testing/ostest/wdog.c
@@ -43,7 +43,7 @@
 #define WDOGTEST_THREAD_NR           (CONFIG_SMP_NCPUS * 4)
 #define WDOGTEST_TOLERENT_TICK       10
 
-#define wdtest_assert(x)             _ASSERT(x, __FILE__, __LINE__)
+#define wdtest_assert(x)             _ASSERT(x, __FILE__, __LINE__, #x)
 
 #define wdtest_printf(...)           printf(__VA_ARGS__)
 

Reply via email to