Changeset 72ff756 in rtems


Ignore:
Timestamp:
12/01/13 02:27:44 (10 years ago)
Author:
Daniel Ramirez <javamonn@…>
Branches:
4.11, 5, master
Children:
972579d
Parents:
95d7ac7
git-author:
Daniel Ramirez <javamonn@…> (12/01/13 02:27:44)
git-committer:
Gedare Bloom <gedare@…> (12/01/13 02:31:30)
Message:

psxtmtests: added new psxtmcond04 test, fixed psxtmcond03

Location:
testsuites/psxtmtests
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtmtests/Makefile.am

    r95d7ac7 r72ff756  
    1111SUBDIRS += psxtmcond02
    1212SUBDIRS += psxtmcond03
     13SUBDIRS += psxtmcond04
    1314SUBDIRS += psxtmcond05
    1415SUBDIRS += psxtmcond08
  • testsuites/psxtmtests/configure.ac

    r95d7ac7 r72ff756  
    8585psxtmcond02/Makefile
    8686psxtmcond03/Makefile
     87psxtmcond04/Makefile
    8788psxtmcond05/Makefile
    8889psxtmcond08/Makefile
  • testsuites/psxtmtests/psxtmcond03/init.c

    r95d7ac7 r72ff756  
    3131)
    3232{
     33  int status;
     34
     35  status = pthread_mutex_lock(&MutexID);
     36  rtems_test_assert( status == 0 );
     37 
     38  /* Unlock mutex, block, wait for CondID to be signaled */
    3339  pthread_cond_wait(&CondID,&MutexID);
    34   /* should never return */
     40 
     41 /* should never return */
    3542  rtems_test_assert( FALSE );
    3643
     
    4552  pthread_t  threadId;
    4653  long       end_time;
     54  struct sched_param param;
     55  int policy;
    4756
    4857  puts( "\n\n*** POSIX TIME TEST PSXTMCOND03 ***" );
     
    5867
    5968  /*
    60    * Ensure the mutex is unavailable so the other threads block.
    61    */
    62   status = pthread_mutex_lock(&MutexID);
    63   rtems_test_assert( status == 0 );
    64 
    65   /*
    6669   * Let the other thread start so the thread startup overhead,
    6770   * is accounted for.  When we return, we can start the benchmark.
     
    6972  sched_yield();
    7073    /* let other thread run */
     74
     75  /* To be extra sure we don't get preempted on the signal */
     76  status = pthread_getschedparam(pthread_self(), &policy, &param);
     77  rtems_test_assert( status == 0);
     78  param.sched_priority = sched_get_priority_max(policy) - 1;
     79  status = pthread_setschedparam(pthread_self(), policy, &param);
     80  rtems_test_assert( status == 0);
    7181
    7282  benchmark_timer_initialize();
  • testsuites/psxtmtests/psxtmtests_plan.csv

    r95d7ac7 r72ff756  
    1818"pthread_cond_signal - no threads waiting","psxtmcond02","psxtmtest_single","Yes"
    1919"pthread_cond_signal - thread waiting: no preempt","psxtmcond03","psxtmtest_unblocking_nopreempt","Yes"
    20 "pthread_cond_signal - thread waiting: preempt","psxtmcond04","psxtmtest_unblocking_preempt","No"
     20"pthread_cond_signal - thread waiting: preempt","psxtmcond04","psxtmtest_unblocking_preempt","Yes"
    2121"pthread_cond_broadcast - no threads waiting","psxtmcond05","psxtmtest_single","Yes"
    2222"pthread_cond_broadcast -  threads waiting: no preempt","psxtmcond06","psxtmtest_unblocking_nopreempt","No"
Note: See TracChangeset for help on using the changeset viewer.