Skip to content

Commit

Permalink
Ensure server prio greater than client for timeout
Browse files Browse the repository at this point in the history
We must ensure that during the reset of the server in the timeout test
that the client is not able to preempt the server. If it does, it can
perform a send before the server performs a receive. If this occurs, the
server will not be blocked when the test thread removes its scheduling
context and the test will hang indefinitely.

Signed-off-by: Curtis Millar <[email protected]>
  • Loading branch information
xurtis committed May 13, 2021
1 parent a57923b commit fe6f489
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/sel4test-tests/src/tests/faults.c
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,11 @@ static int test_timeout_fault_in_server(env_t env)
set_helper_sched_params(env, &client, 0.1 * US_IN_S, US_IN_S, client_data);
start_helper(env, &client, (helper_fn_t) timeout_fault_client_fn, ep, 0, 0, 0);

/* Ensure the client doesn't preempt the server when the server is
* being reset */
set_helper_priority(env, &server, OUR_PRIO - 1);
set_helper_priority(env, &client, OUR_PRIO - 2);

/* handle a few faults */
for (int i = 0; i < 5; i++) {
ZF_LOGD("Handling fault");
Expand Down

0 comments on commit fe6f489

Please sign in to comment.