RTEMS | rtems/bsps: Test software code placed inside #if #endif (!1078)

Sebastian Huber (@sebhub) gitlab at rtems.org
Wed Feb 25 13:05:02 UTC 2026




Sebastian Huber started a new discussion on bsps/sparc/leon3/start/eirq.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1078#note_143476

 >      }
 >    } else {
 > -    rtems_interrupt_lock_context lock_context;
 > -    uint32_t ipend;
 > -
 > -    /*
 > -     * This is a very dangerous operation and should only be used for test
 > -     * software.  We may accidentally clear the pending state set by
 > -     * peripherals with this read-modify-write operation.
 > -     */
 > -    LEON3_IRQCTRL_ACQUIRE(&lock_context);
 > -    ipend = grlib_load_32(&regs->ipend);
 > -    ipend |= bit;
 > -    grlib_store_32(&regs->ipend, ipend);
 > -    LEON3_IRQCTRL_RELEASE(&lock_context);
 > +    #if defined(RTEMS_TEST)

No, there should be definitely no usage of RTEMS_TEST or whatever in the code base. This change breaks the validation tests. How did you test this?

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1078#note_143476
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260225/cf3cfc3a/attachment-0001.htm>


More information about the bugs mailing list