[Bug 2156] New: psxtmthread02 test does not benchmark what it is documented as benchmarking.

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Sat Nov 30 18:25:02 UTC 2013


             Bug #: 2156
           Summary: psxtmthread02 test does not benchmark what it is
                    documented as benchmarking.
    Classification: Unclassified
           Product: RTEMS
           Version: HEAD
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: minor
          Priority: P3
         Component: testing
        AssignedTo: joel.sherrill at oarcorp.com
        ReportedBy: javamonn at gmail.com

Created attachment 1521
  --> https://www.rtems.org/bugzilla/attachment.cgi?id=1521
patch to fix psxtmthread to actually benchmark "pthread_create, preempt"

psxtmtests/psxtmthread02 is documented as benchmarking "pthread_create,
preempt". The code reveals it is benchmarking a case of "pthread_create, no
preempt" though. 



  status = pthread_create(&thread_ID, NULL, thread, NULL);
  rtems_test_assert( status == 0 );

  end_time = benchmark_timer_read();

The fact that a preempt does not occur is evidenced by the timer being started
and stopped in the same thread. A preempt would require thead_ID to be created
at a higher priority, and the timer would have to be stopped there after the
call to pthread_create.

psxtmthread01 already tests the case of "pthread_create, no preempt" so I've
attached a patch to fix 02 to actually test the case of "pthread_create,

Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the bugs mailing list