os: synchronize thread destruction of trace test

* Increase test-thread count to trigger quota exceeding on all platforms
* Synchronize test-thread destruction, otherwise an half-destructed thread
  object can lead to an error message of the thread to be destructed,
  which causes a deadlock, when the destructed thread still holds the log lock
* Limit SMP settings for QEMU to x86 (Ref #2307)
This commit is contained in:
Stefan Kalkowski 2017-03-08 10:45:40 +01:00 committed by Christian Helmuth
parent beb5169ee9
commit 4a30c13c2d
2 changed files with 12 additions and 13 deletions

View File

@ -68,6 +68,7 @@ set boot_modules {
build_boot_image $boot_modules
append qemu_args " -nographic -serial mon:stdio -m 256 -smp 2 "
append qemu_args " -nographic -serial mon:stdio -m 256 "
append_if [have_spec x86] qemu_args " -smp 2 "
run_genode_until {.*child "test-trace" exited with exit value 0.*} 30

View File

@ -112,11 +112,12 @@ struct Test_out_of_metadata
struct Test_thread : Genode::Thread
{
Test_thread(Genode::Env &env,
Genode::Thread::Name name)
: Thread(env, name, 4096) { start(); }
Test_thread(Genode::Env &env, const char * name)
: Thread(env, Thread::Name(name), 4096) { start(); }
void entry() { Genode::sleep_forever(); }
~Test_thread() { join(); }
void entry() { }
};
Test_out_of_metadata(Env &env) : env(env)
@ -152,14 +153,11 @@ struct Test_out_of_metadata
* are not enough available subjects to trigger the Out_of_metadata
* exception.
*/
Test_thread::Name thread_name1 { "test-thread1" };
Test_thread thread1 { env, thread_name1 };
Test_thread::Name thread_name2 { "test-thread2" };
Test_thread thread2 { env, thread_name2 };
Test_thread::Name thread_name3 { "test-thread3" };
Test_thread thread3 { env, thread_name3 };
Test_thread::Name thread_name4 { "test-thread4" };
Test_thread thread4 { env, thread_name4 };
Test_thread thread1 { env, "test-thread1" };
Test_thread thread2 { env, "test-thread2" };
Test_thread thread3 { env, "test-thread3" };
Test_thread thread4 { env, "test-thread4" };
Test_thread thread5 { env, "test-thread5" };
Trace::Connection trace(env, sizeof(subject_ids) + 5*4096,
sizeof(subject_ids), 0);