Changeset 68ae40a in mainline


Ignore:
Timestamp:
2019-08-07T09:58:57Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
ed5367b
Parents:
ce08421
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-11-05 01:51:29)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-07 09:58:57)
Message:

taskman: Test case for wrong task event flags

Will be fixed later.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tester/proc/task_anywait.c

    rce08421 r68ae40a  
    3939static task_id_t task_id;
    4040static task_exit_t last_texit;
    41 static bool last_has_retval;
     41static bool last_flags;
    4242static int last_retval;
    4343static bool handler_hit;
     
    6464        }
    6565
    66         last_has_retval = flags & TASK_WAIT_RETVAL;
    67         if (last_has_retval) {
     66        last_flags = flags;
     67        if (last_flags & TASK_WAIT_RETVAL) {
    6868                last_retval = retval;
    6969        }
     
    8181        if (purge) {
    8282                last_texit = TASK_EXIT_RUNNING;
    83                 last_has_retval = false;
     83                last_flags = 0;
    8484                last_retval = 255;
    8585        }
     
    120120        TASSERT(rc == EOK);
    121121        wait_for_handler();
    122         TASSERT(last_has_retval == false);
     122        TASSERT(last_flags == (TASK_WAIT_EXIT));
    123123        TASSERT(last_texit == TASK_EXIT_UNEXPECTED);
    124124        /* --- */
     
    130130        TASSERT(rc == EOK);
    131131        wait_for_handler();
    132         TASSERT(last_has_retval == true);
     132        TASSERT(last_flags == (TASK_WAIT_RETVAL));
    133133        TASSERT(last_retval == EOK);
    134134        TASSERT(last_texit == TASK_EXIT_RUNNING);
     
    137137        task_kill(task_id);
    138138        wait_for_handler();
     139        TASSERT(last_flags == (TASK_WAIT_EXIT));
    139140        TASSERT(last_texit == TASK_EXIT_UNEXPECTED);
    140141        /* --- */
     
    146147        TASSERT(rc == EOK);
    147148        wait_for_handler(); /* job is notified in a single handler call */
    148         TASSERT(last_has_retval == true);
     149        TASSERT(last_flags == (TASK_WAIT_RETVAL | TASK_WAIT_EXIT));
    149150        TASSERT(last_retval == EOK);
    150151        TASSERT(last_texit == TASK_EXIT_NORMAL);
     
    160161        TASSERT(rc == EOK);
    161162        wait_for_handler();
    162         TASSERT(last_has_retval == true);
     163        TASSERT(last_flags == (TASK_WAIT_RETVAL | TASK_WAIT_EXIT));
    163164        TASSERT(last_retval == EOK);
    164165        TASSERT(last_texit == TASK_EXIT_NORMAL);
Note: See TracChangeset for help on using the changeset viewer.