Adjust the regex of spawn-task-external-bad test
Now the program fails in runtime directly as the stream is not initialized when Nanos6 attempts to write events.
This commit is contained in:
parent
7212273141
commit
1930cc4fd6
@ -51,7 +51,7 @@ nanos6_rt_test(taskloop.c)
|
||||
nanos6_rt_test(spawn-task.c)
|
||||
nanos6_rt_test(spawn-task-external.c)
|
||||
nanos6_rt_test(spawn-task-external-bad.c SHOULD_FAIL
|
||||
REGEX "ovni_finish: thread [0-9]* is not dead")
|
||||
REGEX "ovni_ev_add: thread is not initialized")
|
||||
|
||||
# Test multiple instrumentation levels
|
||||
nanos6_rt_test(simple-task.c NAME simple-task-level-1 LEVEL 1)
|
||||
|
@ -52,12 +52,17 @@ complete_func(void *arg)
|
||||
complete = 1;
|
||||
}
|
||||
|
||||
/* Call the nanos6_spawn_function from an external thread */
|
||||
/* Call the nanos6_spawn_function from an external thread without
|
||||
* instrumentation. */
|
||||
static void *
|
||||
spawn(void *arg)
|
||||
{
|
||||
/* Here Nanos6 will try to write events in the thread stream,
|
||||
* but the thread has not been initialized so it will abort */
|
||||
nanos6_spawn_function(polling_func, arg,
|
||||
complete_func, NULL, "polling_task");
|
||||
|
||||
/* Not reached */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user