diff options
author | Cyril Hrubis <chrubis@suse.cz> | 2011-02-07 18:59:33 +0100 |
---|---|---|
committer | Cyril Hrubis <chrubis@suse.cz> | 2011-02-07 18:59:33 +0100 |
commit | ef78227f9275d780649e14a8785c6913c18b7462 (patch) | |
tree | 4e9975763277d7b4d6c6d92bbe0279003c8a6686 /testcases/realtime | |
parent | 4590c297cff4643bba8c730a62ce71889a22ca92 (diff) |
Unbreak realtime testsuite compilation.
The realtime testsuite is not using ltp tst_xxx interface.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Diffstat (limited to 'testcases/realtime')
19 files changed, 52 insertions, 43 deletions
diff --git a/testcases/realtime/func/async_handler/async_handler_tsc.c b/testcases/realtime/func/async_handler/async_handler_tsc.c index 475d5b234..bed720e66 100644 --- a/testcases/realtime/func/async_handler/async_handler_tsc.c +++ b/testcases/realtime/func/async_handler/async_handler_tsc.c @@ -221,5 +221,5 @@ int main(int argc, char *argv[]) printf("%d samples over 25 us latency\n", over_25); printf("%d samples over 30 us latency\n", over_30); - tst_exit(); -}
\ No newline at end of file + return 0; +} diff --git a/testcases/realtime/func/gtod_latency/gtod_infinite.c b/testcases/realtime/func/gtod_latency/gtod_infinite.c index 7c4b532b0..7615d9795 100644 --- a/testcases/realtime/func/gtod_latency/gtod_infinite.c +++ b/testcases/realtime/func/gtod_latency/gtod_infinite.c @@ -193,5 +193,6 @@ int main(int argc, char *argv[]) } } - tst_exit(); -}
\ No newline at end of file + + return 0; +} diff --git a/testcases/realtime/func/gtod_latency/gtod_latency.c b/testcases/realtime/func/gtod_latency/gtod_latency.c index 56ac74e10..ccf64e5a8 100644 --- a/testcases/realtime/func/gtod_latency/gtod_latency.c +++ b/testcases/realtime/func/gtod_latency/gtod_latency.c @@ -341,5 +341,5 @@ int main(int argc, char *argv[]) stats_container_free(&hist); stats_quantiles_free(&quantiles); - tst_exit(); -}
\ No newline at end of file + return 0; +} diff --git a/testcases/realtime/func/matrix_mult/matrix_mult.c b/testcases/realtime/func/matrix_mult/matrix_mult.c index a7df06984..be2e392d9 100644 --- a/testcases/realtime/func/matrix_mult/matrix_mult.c +++ b/testcases/realtime/func/matrix_mult/matrix_mult.c @@ -343,5 +343,5 @@ int main(int argc, char *argv[]) set_priority(PRIO); main_thread(); - tst_exit(); -}
\ No newline at end of file + return 0; +} diff --git a/testcases/realtime/func/measurement/preempt_timing.c b/testcases/realtime/func/measurement/preempt_timing.c index 7650de5cd..f4ec3da40 100644 --- a/testcases/realtime/func/measurement/preempt_timing.c +++ b/testcases/realtime/func/measurement/preempt_timing.c @@ -147,5 +147,5 @@ int main(int argc, char *argv[]) printf("Maximum: %llu \n", max); printf("Average: %llu \n", avg); - tst_exit(); -}
\ No newline at end of file + return 0; +} diff --git a/testcases/realtime/func/measurement/rdtsc-latency.c b/testcases/realtime/func/measurement/rdtsc-latency.c index bbab813ed..03b459bc6 100644 --- a/testcases/realtime/func/measurement/rdtsc-latency.c +++ b/testcases/realtime/func/measurement/rdtsc-latency.c @@ -155,5 +155,5 @@ int main(int argc, char *argv[]) printf(" Min: %llu ns\n", min); printf(" Avg: %llu ns\n", avg); - tst_exit(); -}
\ No newline at end of file + return 0; +} diff --git a/testcases/realtime/func/pi-tests/sbrk_mutex.c b/testcases/realtime/func/pi-tests/sbrk_mutex.c index ac013b9d2..cc49b8d99 100644 --- a/testcases/realtime/func/pi-tests/sbrk_mutex.c +++ b/testcases/realtime/func/pi-tests/sbrk_mutex.c @@ -145,11 +145,13 @@ int main(int argc, char* argv[]) free(mutexes[m]); } } - tst_exit(); + + return 0; } #else int main(void) { - tst_brkm(TCONF, NULL, "Your system doesn't support the pthread robust mutexattr APIs\n"); + printf("Your system doesn't support the pthread robust mutexattr APIs\n"); + return 1; } -#endif
\ No newline at end of file +#endif diff --git a/testcases/realtime/func/pi-tests/test-skeleton.c b/testcases/realtime/func/pi-tests/test-skeleton.c index 028679b0c..3b670fe56 100644 --- a/testcases/realtime/func/pi-tests/test-skeleton.c +++ b/testcases/realtime/func/pi-tests/test-skeleton.c @@ -118,5 +118,5 @@ main(int argc, char **argv) exit(1); } - tst_exit(); -}
\ No newline at end of file + return 0; +} diff --git a/testcases/realtime/func/pi-tests/testpi-0.c b/testcases/realtime/func/pi-tests/testpi-0.c index 3a7e5340d..cf0a24d54 100644 --- a/testcases/realtime/func/pi-tests/testpi-0.c +++ b/testcases/realtime/func/pi-tests/testpi-0.c @@ -98,5 +98,5 @@ int main(int argc, char *argv[]) printf("Prio inheritance support present\n"); - tst_exit(); -}
\ No newline at end of file + return 0; +} diff --git a/testcases/realtime/func/pi-tests/testpi-1.c b/testcases/realtime/func/pi-tests/testpi-1.c index 32767b334..c962d35e7 100644 --- a/testcases/realtime/func/pi-tests/testpi-1.c +++ b/testcases/realtime/func/pi-tests/testpi-1.c @@ -216,5 +216,6 @@ int main(int argc, char *argv[]) pthread_mutex_destroy(&glob_mutex); pthread_mutex_destroy(&cond_mutex); pthread_cond_destroy(&cond_var); - tst_exit(); -}
\ No newline at end of file + + return 0; +} diff --git a/testcases/realtime/func/pi-tests/testpi-2.c b/testcases/realtime/func/pi-tests/testpi-2.c index b41db2e84..530502f1c 100644 --- a/testcases/realtime/func/pi-tests/testpi-2.c +++ b/testcases/realtime/func/pi-tests/testpi-2.c @@ -217,5 +217,6 @@ int main(int argc, char *argv[]) pthread_mutex_destroy(&glob_mutex); pthread_mutex_destroy(&cond_mutex); pthread_cond_destroy(&cond_var); - tst_exit(); -}
\ No newline at end of file + + return 0; +} diff --git a/testcases/realtime/func/pi-tests/testpi-4.c b/testcases/realtime/func/pi-tests/testpi-4.c index 35faa8023..dd822f5c9 100644 --- a/testcases/realtime/func/pi-tests/testpi-4.c +++ b/testcases/realtime/func/pi-tests/testpi-4.c @@ -222,5 +222,6 @@ int main(int argc, char *argv[]) pthread_mutex_destroy(glob_mutex); pthread_mutex_destroy(&cond_mutex); pthread_cond_destroy(&cond_var); - tst_exit(); -}
\ No newline at end of file + + return 0; +} diff --git a/testcases/realtime/func/pi-tests/testpi-7.c b/testcases/realtime/func/pi-tests/testpi-7.c index 6a5e3fd08..4c0f5e833 100644 --- a/testcases/realtime/func/pi-tests/testpi-7.c +++ b/testcases/realtime/func/pi-tests/testpi-7.c @@ -282,5 +282,6 @@ int main(int argc, char *argv[]) printf("High priority lock aquisition maximum delay: %dus\n", max_delay_us); printf("Low priority lock drop to high priority acqusistion time: %dus\n", max_drop2grab_us); printf("\n"); - tst_exit(); -}
\ No newline at end of file + + return 0; +} diff --git a/testcases/realtime/func/rt-migrate/rt-migrate.c b/testcases/realtime/func/rt-migrate/rt-migrate.c index db9e6956e..42a5e6d4b 100644 --- a/testcases/realtime/func/rt-migrate/rt-migrate.c +++ b/testcases/realtime/func/rt-migrate/rt-migrate.c @@ -516,10 +516,9 @@ int main(int argc, char **argv) else exit(1); } + if (check < 0) exit(-1); else exit(0); - - tst_exit(); -}
\ No newline at end of file +} diff --git a/testcases/realtime/func/sched_jitter/sched_jitter.c b/testcases/realtime/func/sched_jitter/sched_jitter.c index 3b51da755..c29f9ee23 100644 --- a/testcases/realtime/func/sched_jitter/sched_jitter.c +++ b/testcases/realtime/func/sched_jitter/sched_jitter.c @@ -177,5 +177,5 @@ int main(int argc, char *argv[]) flag = 1; join_thread(interrupter); - tst_exit(); -}
\ No newline at end of file + return 0; +} diff --git a/testcases/realtime/perf/latency/pthread_cond_latency.c b/testcases/realtime/perf/latency/pthread_cond_latency.c index 8fe32a1a9..bd2711e68 100644 --- a/testcases/realtime/perf/latency/pthread_cond_latency.c +++ b/testcases/realtime/perf/latency/pthread_cond_latency.c @@ -217,5 +217,5 @@ main(int argc, char *argv[]) iter = strtol(argv[1], NULL, 0); test_signal(argc == 2, iter); - tst_exit(); -}
\ No newline at end of file + return 0; +} diff --git a/testcases/realtime/perf/latency/pthread_cond_many.c b/testcases/realtime/perf/latency/pthread_cond_many.c index ea9c89416..d6671f94a 100644 --- a/testcases/realtime/perf/latency/pthread_cond_many.c +++ b/testcases/realtime/perf/latency/pthread_cond_many.c @@ -317,5 +317,6 @@ main(int argc, char *argv[]) test_signal(iterations, nthreads); printf("\nCriteria: latencies < %d us\n", PASS_US); printf("Result: %s\n", fail ? "FAIL" : "PASS"); - tst_exit(); -}
\ No newline at end of file + + return 0; +} diff --git a/testcases/realtime/stress/pi-tests/lookup_pi_state.c b/testcases/realtime/stress/pi-tests/lookup_pi_state.c index d1166190f..82cc7463c 100644 --- a/testcases/realtime/stress/pi-tests/lookup_pi_state.c +++ b/testcases/realtime/stress/pi-tests/lookup_pi_state.c @@ -191,5 +191,5 @@ int main(int argc, char *argv[]) join_threads(); - tst_exit(); -}
\ No newline at end of file + return 0; +} diff --git a/testcases/realtime/stress/pi-tests/testpi-3.c b/testcases/realtime/stress/pi-tests/testpi-3.c index ce6c45ba7..b4033115b 100644 --- a/testcases/realtime/stress/pi-tests/testpi-3.c +++ b/testcases/realtime/stress/pi-tests/testpi-3.c @@ -306,8 +306,7 @@ void joinThread(Thread* thr) * Test pthread creation at different thread priorities. */ int main(int argc, char* argv[]) { - pthread_mutexattr_t mutexattr; - int i, retc, protocol, nopi = 0; + int i, retc, nopi = 0; cpu_set_t mask; CPU_ZERO(&mask); CPU_SET(0, &mask); @@ -339,8 +338,11 @@ int main(int argc, char* argv[]) { printf("Start %s\n",argv[0]); - if (!nopi) { #if HAVE_DECL_PTHREAD_PRIO_INHERIT + if (!nopi) { + pthread_mutexattr_t mutexattr; + int protocol; + if (pthread_mutexattr_init(&mutexattr) != 0) { printf("Failed to init mutexattr\n"); }; @@ -355,8 +357,8 @@ int main(int argc, char* argv[]) { if ((retc = pthread_mutex_init(&glob_mutex, &mutexattr)) != 0) { printf("Failed to init mutex: %d\n", retc); } -#endif } +#endif startThread(&arg1); startThread(&arg2); @@ -378,4 +380,4 @@ int main(int argc, char* argv[]) { printf("Done\n"); return 0; -}
\ No newline at end of file +} |