From 9f8470d37ce5f4628563b5ff535dedba0d6fe0ab Mon Sep 17 00:00:00 2001 From: Nicolas Benech Date: Thu, 26 Sep 2019 14:56:37 -0400 Subject: [PATCH] gpu: nvgpu: fw: fix error code in signal handler In the signal handler (i.e. when a crash such as segfault occurs), the framework needs to register the test as failed. The call to core_add_test_record was incorrect as it was using a boolean instead of an enum value. JIRA NVGPU-1246 Change-Id: I5480ec38ca9949bc85aa523cc50a68af203fd165 Signed-off-by: Nicolas Benech Reviewed-on: https://git-master.nvidia.com/r/2206539 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: Rajesh Devaraj Reviewed-by: Thomas Fleury Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- userspace/src/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userspace/src/exec.c b/userspace/src/exec.c index d45afa369..ded1301ee 100644 --- a/userspace/src/exec.c +++ b/userspace/src/exec.c @@ -129,7 +129,7 @@ static void thread_error_handler(int sig, siginfo_t *siginfo, void *context) " Signal %d in Test: %s.%s!\n", sig, thread_local_module->name, thread_local_test->name); core_add_test_record(thread_local_module->fw, thread_local_module, - thread_local_test, false); + thread_local_test, FAILED); sem_post(&unit_thread_semaphore); pthread_exit(NULL); }