<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style></head>
<body>
<body><p dir="ltr">I think this patch is wrong. Subsequent changes to the thread queue after I posted this resulted in the test breaking again.</p><p dir="ltr">What is the test trying to do? I think sometimes through the loop, the condition the test expects is not occurring and it fails.</p><div class="quote">On Jul 9, 2014 9:32 AM, Sebastian Huber <sebastian.huber@embedded-brains.de> wrote:<br type="attribution"></div></body>
<font size="2"><div class="PlainText">On 2014-07-08 22:52, Joel Sherrill wrote:<br>
> The test assumed that the thread would have enough time to block<br>
> and become enqueued. In fact, the thread would still be in the<br>
> ready state and not blocked on the semaphore. Thus the state<br>
> of the Wait sub-structure in the TCB would not be in the expected<br>
> state. The simple solution was to continue when the thread was<br>
> in the ready state.<br>
> ---<br>
>   testsuites/sptests/spintrcritical20/init.c |    4 ++++<br>
>   1 files changed, 4 insertions(+), 0 deletions(-)<br>
><br>
> diff --git a/testsuites/sptests/spintrcritical20/init.c b/testsuites/sptests/spintrcritical20/init.c<br>
> index cae8fdb..209c9e5 100644<br>
> --- a/testsuites/sptests/spintrcritical20/init.c<br>
> +++ b/testsuites/sptests/spintrcritical20/init.c<br>
> @@ -20,6 +20,7 @@<br>
>   #include <intrcritical.h><br>
>   #include <rtems/score/threadqimpl.h><br>
>   #include <rtems/rtems/semimpl.h><br>
> +#include <rtems/score/statesimpl.h><br>
><br>
>   const char rtems_test_name[] = "SPINTRCRITICAL 20";<br>
><br>
> @@ -108,6 +109,9 @@ static void Init(rtems_task_argument ignored)<br>
>         ++resets;<br>
>       }<br>
><br>
> +    if (ctx->semaphore_task_tcb->current_state == STATES_READY)<br>
> +      continue;<br>
<br>
In case the semaphore task is ready at this point, then we have a massive <br>
problem since the semaphore task has a higher priority.<br>
<br>
> +<br>
>       _Thread_Disable_dispatch();<br>
<br>
Should this check move to here?<br>
<br>
><br>
>       rtems_test_assert(<br>
><br>
<br>
<br>
-- <br>
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone   : +49 89 189 47 41-16<br>
Fax     : +49 89 189 47 41-09<br>
E-Mail  : sebastian.huber@embedded-brains.de<br>
PGP     : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
</div></font>
</body>
</html>