casaroli commented on code in PR #3673: URL: https://github.com/apache/nuttx-apps/pull/3673#discussion_r3690511894
########## testing/ostest/ostest.h: ########## @@ -282,12 +282,58 @@ void priority_inheritance(void); void sched_lock_test(void); +/* The fork family **********************************************************/ + +/* Until nuttx has the three separate primitives, ARCH_HAVE_FORK stands in + * for task_fork(): today's fork() *is* task_fork(), so the test that has + * always covered that primitive keeps running under its own name. A nuttx + * without ARCH_HAVE_TASK_FORK is the pre-split one, and only there does the + * substitution apply -- once the split has landed, TASK_FORK says whether + * task_fork() was built, and nothing stands in for it. + * + * vfork_test() and fork_test() deliberately have no such mapping. They + * check semantics a pre-split nuttx does not describe -- the parent + * suspension and the private copy -- and ARCH_HAVE_VFORK is the evidence + * that the split has landed. + * + * This block comes out with the split. + */ + +#if defined(CONFIG_TASK_FORK) || \ + (defined(CONFIG_ARCH_HAVE_FORK) && !defined(CONFIG_ARCH_HAVE_TASK_FORK)) +# define OSTEST_HAVE_TASK_FORK 1 +#endif + +#ifdef CONFIG_ARCH_HAVE_VFORK +# define OSTEST_HAVE_VFORK 1 +#endif + +#if defined(CONFIG_ARCH_HAVE_FORK) && defined(CONFIG_ARCH_HAVE_VFORK) +# define OSTEST_HAVE_FORK 1 +#endif + +#if defined(OSTEST_HAVE_TASK_FORK) && !defined(CONFIG_TASK_FORK) Review Comment: This is required for this to merge before the nuttx PR. We can remove this with a follow up pr after the companion pr in nuttx gets merged ########## testing/ostest/ostest.h: ########## @@ -282,12 +282,58 @@ void priority_inheritance(void); void sched_lock_test(void); +/* The fork family **********************************************************/ + +/* Until nuttx has the three separate primitives, ARCH_HAVE_FORK stands in + * for task_fork(): today's fork() *is* task_fork(), so the test that has + * always covered that primitive keeps running under its own name. A nuttx + * without ARCH_HAVE_TASK_FORK is the pre-split one, and only there does the + * substitution apply -- once the split has landed, TASK_FORK says whether + * task_fork() was built, and nothing stands in for it. + * + * vfork_test() and fork_test() deliberately have no such mapping. They + * check semantics a pre-split nuttx does not describe -- the parent + * suspension and the private copy -- and ARCH_HAVE_VFORK is the evidence + * that the split has landed. + * + * This block comes out with the split. + */ + +#if defined(CONFIG_TASK_FORK) || \ + (defined(CONFIG_ARCH_HAVE_FORK) && !defined(CONFIG_ARCH_HAVE_TASK_FORK)) Review Comment: This is required for this to merge before the nuttx PR. We can remove this with a follow up pr after the companion pr in nuttx gets merged -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
