#2156 closed defect (fixed)

psxtmthread02 test does not benchmark what it is documented as benchmarking.

Reported by: Daniel Ramirez Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: unspecified Version: 4.11
Severity: minor Keywords:
Cc: Blocked By:


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, preempt"

Attachments (1)

psxtmthread02.patch (2.8 KB) - added by Daniel Ramirez on Nov 30, 2013 at 5:25:02 PM.
patch to fix psxtmthread to actually benchmark "pthread_create, preempt"

Download all attachments as: .zip

Change History (4)

Changed on Nov 30, 2013 at 5:25:02 PM by Daniel Ramirez

Attachment: psxtmthread02.patch added

patch to fix psxtmthread to actually benchmark "pthread_create, preempt"

comment:1 Changed on Nov 30, 2013 at 9:27:56 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

Patch committed

comment:2 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

comment:3 Changed on Oct 10, 2017 at 6:46:55 AM by Sebastian Huber

Component: testingunspecified
Note: See TracTickets for help on using tickets.