Browse Source

tests: adapted to renamed THREAD_FLAGS

cc430
Hauke Petersen 7 years ago
parent
commit
cc23481d55
  1. 2
      tests/conn_ip/ip.c
  2. 2
      tests/driver_pir/main.c
  3. 2
      tests/irq/main.c
  4. 2
      tests/mutex_unlock_and_sleep/main.c
  5. 6
      tests/pipe/main.c
  6. 9
      tests/posix_semaphore/main.c
  7. 2
      tests/pthread_condition_variable/main.c
  8. 2
      tests/pthread_rwlock/main.c
  9. 2
      tests/sched_testing/main.c
  10. 3
      tests/thread_basic/main.c
  11. 3
      tests/thread_cooperation/main.c
  12. 6
      tests/thread_exit/main.c
  13. 6
      tests/thread_msg/main.c
  14. 2
      tests/thread_msg_block_w_queue/main.c
  15. 2
      tests/thread_msg_block_wo_queue/main.c
  16. 6
      tests/thread_msg_seq/main.c
  17. 3
      tests/unittests/tests-core/tests-core-ringbuffer.c
  18. 3
      tests/unittests/tests-ubjson/tests-ubjson.c
  19. 4
      tests/vtimer_msg/main.c
  20. 2
      tests/vtimer_msg_diff/main.c
  21. 6
      tests/xtimer_drift/main.c
  22. 4
      tests/xtimer_hang/main.c
  23. 4
      tests/xtimer_msg/main.c

2
tests/conn_ip/ip.c

@ -147,7 +147,7 @@ static int ip_send(char *addr_str, char *port_str, char *data, unsigned int num,
static int ip_start_server(char *port_str)
{
if (thread_create(server_stack, sizeof(server_stack), THREAD_PRIORITY_MAIN - 1,
CREATE_STACKTEST, _server_thread, port_str, "IP server") <= KERNEL_PID_UNDEF) {
THREAD_CREATE_STACKTEST, _server_thread, port_str, "IP server") <= KERNEL_PID_UNDEF) {
return 1;
}
return 0;

2
tests/driver_pir/main.c

@ -80,7 +80,7 @@ int main(void)
#else
thread_create(
pir_handler_stack, sizeof(pir_handler_stack), THREAD_PRIORITY_MAIN - 1,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
pir_handler, NULL, "pir_handler");
#endif
return 0;

2
tests/irq/main.c

@ -54,7 +54,7 @@ int main(void)
busy = 1;
k = 23;
thread_create(busy_stack, sizeof(busy_stack),
THREAD_PRIORITY_MAIN + 1, CREATE_WOUT_YIELD,
THREAD_PRIORITY_MAIN + 1, THREAD_CREATE_WOUT_YIELD,
busy_thread, NULL, "busy_thread");
puts("busy_thread created");

2
tests/mutex_unlock_and_sleep/main.c

@ -49,7 +49,7 @@ int main(void)
kernel_pid_t second_pid = thread_create(stack,
sizeof(stack),
THREAD_PRIORITY_MAIN - 1,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
second_thread,
NULL,
"second_thread");

6
tests/pipe/main.c

@ -100,10 +100,12 @@ int main(void)
}
thread_create(stacks[0], sizeof (stacks[0]),
THREAD_PRIORITY_MAIN, CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_PRIORITY_MAIN,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
run_middle, NULL, "middle");
thread_create(stacks[1], sizeof (stacks[1]),
THREAD_PRIORITY_MAIN, CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_PRIORITY_MAIN,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
run_end, NULL, "end");
unsigned total = 0;

9
tests/posix_semaphore/main.c

@ -77,7 +77,8 @@ static void test1(void)
kernel_pid_t pid = thread_create(test1_thread_stack,
sizeof(test1_thread_stack),
THREAD_PRIORITY_MAIN - 1,
CREATE_STACKTEST | CREATE_WOUT_YIELD,
THREAD_CREATE_STACKTEST |
THREAD_CREATE_WOUT_YIELD,
test1_second_thread,
NULL,
"second");
@ -154,7 +155,7 @@ void test2(void)
kernel_pid_t pid = thread_create(test2_thread_stack[i],
sizeof(test2_thread_stack[i]),
priority,
CREATE_STACKTEST,
THREAD_CREATE_STACKTEST,
priority_sema_thread,
names[i],
names[i]);
@ -211,14 +212,14 @@ void test3(void)
}
puts("first: create thread 1");
if (thread_create(test2_thread_stack[0], sizeof(test2_thread_stack[0]),
THREAD_PRIORITY_MAIN - 1, CREATE_STACKTEST,
THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
test3_one_two_thread, NULL, "thread 1") < 0) {
puts("first: thread create FAILED");
return;
}
puts("first: create thread 2");
if (thread_create(test2_thread_stack[1], sizeof(test2_thread_stack[1]),
THREAD_PRIORITY_MAIN - 1, CREATE_STACKTEST,
THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
test3_two_one_thread, NULL, "thread 2") < 0) {
puts("first: thread create FAILED");
return;

2
tests/pthread_condition_variable/main.c

@ -58,7 +58,7 @@ int main(void)
pthread_cond_init(&cv, NULL);
kernel_pid_t pid = thread_create(stack,sizeof(stack), THREAD_PRIORITY_MAIN - 1,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
second_thread, NULL, "second_thread");
while (1) {

2
tests/pthread_rwlock/main.c

@ -128,7 +128,7 @@ int main(void)
}
thread_create(stacks[i], sizeof(stacks[i]),
prio, CREATE_WOUT_YIELD | CREATE_STACKTEST,
prio, THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
fun, NULL, name);
}

2
tests/sched_testing/main.c

@ -34,7 +34,7 @@ int main(void)
puts("----------------------------------------------------------------");
thread_create(snd_thread_stack, sizeof(snd_thread_stack), THREAD_PRIORITY_MAIN,
CREATE_WOUT_YIELD, snd_thread, NULL, "snd");
THREAD_CREATE_WOUT_YIELD, snd_thread, NULL, "snd");
puts("yield 1");
thread_yield();

3
tests/thread_basic/main.c

@ -34,7 +34,8 @@ int main(void)
{
(void) thread_create(
t2_stack, sizeof(t2_stack),
THREAD_PRIORITY_MAIN - 1, CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_PRIORITY_MAIN - 1,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
second_thread, NULL, "nr2");
puts("first thread\n");
return 0;

3
tests/thread_cooperation/main.c

@ -70,7 +70,8 @@ int main(void)
for (int i = 0; i < PROBLEM; ++i) {
printf("Creating thread with arg %d\n", (i + 1));
ths[i] = thread_create(stacks[i], sizeof(stacks[i]),
THREAD_PRIORITY_MAIN - 1, CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_PRIORITY_MAIN - 1,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
run, NULL, "thread");
if (ths[i] < 0) {

6
tests/thread_exit/main.c

@ -50,7 +50,7 @@ void *second_thread(void *arg)
third_thread_stack,
sizeof(third_thread_stack),
THREAD_PRIORITY_MAIN - 2,
CREATE_STACKTEST,
THREAD_CREATE_STACKTEST,
third_thread,
NULL,
"nr3")
@ -64,7 +64,7 @@ void *second_thread(void *arg)
third_thread_stack,
sizeof(third_thread_stack),
THREAD_PRIORITY_MAIN - 1,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
fourth_thread,
NULL,
"nr4")
@ -84,7 +84,7 @@ int main(void)
second_thread_stack,
sizeof(second_thread_stack),
THREAD_PRIORITY_MAIN - 1,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
second_thread,
NULL,
"nr2")

6
tests/thread_msg/main.c

@ -84,13 +84,13 @@ void *thread3(void *arg)
int main(void)
{
p1 = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
thread1, NULL, "nr1");
p2 = thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN - 1,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
thread2, NULL, "nr2");
p3 = thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN - 1,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
thread3, NULL, "nr3");
puts("THREADS CREATED\n");
return 0;

2
tests/thread_msg_block_w_queue/main.c

@ -60,7 +60,7 @@ int main(void)
msg_init_queue(msg_q, 1);
p1 = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
thread1, NULL, "nr1");
/* step 3: receive a msg */

2
tests/thread_msg_block_wo_queue/main.c

@ -57,7 +57,7 @@ int main(void)
p_main = sched_active_pid;
p1 = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
thread1, NULL, "nr1");
/* step 3: receive a msg */

6
tests/thread_msg_seq/main.c

@ -56,13 +56,13 @@ int main(void)
p_main = sched_active_pid;
p1 = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
sub_thread, "nr1", "nr1");
p2 = thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN - 1,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
sub_thread, "nr2", "nr2");
p3 = thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN - 1,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
sub_thread, "nr3", "nr3");
puts("THREADS CREATED\n");

3
tests/unittests/tests-core/tests-core-ringbuffer.c

@ -109,7 +109,8 @@ static void tests_core_ringbuffer(void)
{
pid_add = sched_active_pid;
pid_get = thread_create(stack_get, sizeof (stack_get),
THREAD_PRIORITY_MAIN, CREATE_SLEEPING | CREATE_STACKTEST,
THREAD_PRIORITY_MAIN,
THREAD_CREATE_SLEEPING | THREAD_CREATE_STACKTEST,
run_get, NULL, "get");
run_add();
}

3
tests/unittests/tests-ubjson/tests-ubjson.c

@ -87,7 +87,8 @@ void test_ubjson_test(void (*sender_fun)(void), void (*receiver_fun)(void))
mutex_lock(&data.mutexes[1]);
kernel_pid_t receiver_pid = thread_create(receiver_stack, sizeof(receiver_stack),
THREAD_PRIORITY_MAIN, CREATE_WOUT_YIELD,
THREAD_PRIORITY_MAIN,
THREAD_CREATE_WOUT_YIELD,
test_ubjson_receiver_trampoline, &data, "receiver");
TEST_ASSERT(pid_is_valid(receiver_pid));

4
tests/vtimer_msg/main.c

@ -94,7 +94,7 @@ int main(void)
timer_stack,
sizeof(timer_stack),
THREAD_PRIORITY_MAIN - 1,
CREATE_STACKTEST,
THREAD_CREATE_STACKTEST,
timer_thread,
NULL,
"timer");
@ -111,7 +111,7 @@ int main(void)
timer_stack_local,
sizeof(timer_stack_local),
THREAD_PRIORITY_MAIN - 1,
CREATE_STACKTEST,
THREAD_CREATE_STACKTEST,
timer_thread_local,
NULL,
"timer local");

2
tests/vtimer_msg_diff/main.c

@ -108,7 +108,7 @@ int main(void)
timer_stack,
sizeof(timer_stack),
THREAD_PRIORITY_MAIN - 1,
CREATE_STACKTEST,
THREAD_CREATE_STACKTEST,
timer_thread,
NULL,
"timer");

6
tests/xtimer_drift/main.c

@ -140,7 +140,7 @@ int main(void)
slacker_stack1,
sizeof(slacker_stack1),
THREAD_PRIORITY_MAIN - 1,
CREATE_STACKTEST,
THREAD_CREATE_STACKTEST,
slacker_thread,
NULL,
"slacker1");
@ -157,7 +157,7 @@ int main(void)
slacker_stack2,
sizeof(slacker_stack2),
THREAD_PRIORITY_MAIN - 1,
CREATE_STACKTEST,
THREAD_CREATE_STACKTEST,
slacker_thread,
NULL,
"slacker2");
@ -174,7 +174,7 @@ int main(void)
worker_stack,
sizeof(worker_stack),
THREAD_PRIORITY_MAIN - 1,
CREATE_STACKTEST,
THREAD_CREATE_STACKTEST,
worker_thread,
NULL,
"worker");

4
tests/xtimer_hang/main.c

@ -64,7 +64,7 @@ int main(void)
thread_create(stack_timer1,
STACKSIZE_TIMER,
2,
CREATE_STACKTEST,
THREAD_CREATE_STACKTEST,
timer_func1,
NULL,
"timer1");
@ -72,7 +72,7 @@ int main(void)
thread_create(stack_timer2,
STACKSIZE_TIMER,
3,
CREATE_STACKTEST,
THREAD_CREATE_STACKTEST,
timer_func2,
NULL,
"timer2");

4
tests/xtimer_msg/main.c

@ -98,7 +98,7 @@ int main(void)
timer_stack,
sizeof(timer_stack),
THREAD_PRIORITY_MAIN - 1,
CREATE_STACKTEST,
THREAD_CREATE_STACKTEST,
timer_thread,
NULL,
"timer");
@ -115,7 +115,7 @@ int main(void)
timer_stack_local,
sizeof(timer_stack_local),
THREAD_PRIORITY_MAIN - 1,
CREATE_STACKTEST,
THREAD_CREATE_STACKTEST,
timer_thread_local,
NULL,
"timer local");

Loading…
Cancel
Save