Skip to content

Commit

Permalink
Add Printk Traces to ThreadPool Unit Tests
Browse files Browse the repository at this point in the history
Some ThreadPool unit tests that test crashed tasks were
missing printk logs to indicate the crashes were expected.
This creates confusion when debugging printk logs. This commit
adds the traces to indicate the crashes are expected and are part
of the test.

Change-Id: I38d2d886cfd73106e32fb4e461bba3d5a39a8032
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/83783
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R Geddes <crgeddes@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
  • Loading branch information
Ilya Smirnov authored and dcrowell77 committed Sep 16, 2019
1 parent 69f3bd2 commit d2bcdef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/usr/util/test/threadpool.H
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <errl/errlmanager.H>
#include <util/util_reasoncodes.H>
#include <hbotcompid.H>
#include <kernel/console.H>

// Thread pool constructor flags
#define DISABLE_CHILD_RC_CHECKING false
Expand Down Expand Up @@ -256,6 +257,7 @@ class ThreadPoolTest: public CxxTest::TestSuite
errlHndl_t l_errl = nullptr;

do {
printk("testChildRCCrashedTask: Expect to see uncaught exception\n");
l_threadPool.insert(new __ThreadPoolTest::CrashedTask());
l_threadPool.start();
l_errl = l_threadPool.shutdown();
Expand Down Expand Up @@ -300,6 +302,7 @@ class ThreadPoolTest: public CxxTest::TestSuite
l_threadPool(DISABLE_CHILD_RC_CHECKING);
errlHndl_t l_errl = nullptr;

printk("testChildNoRCCrashedTask: Expect to see uncaught exception\n");
l_threadPool.insert(new __ThreadPoolTest::CrashedTask());
l_threadPool.start();
l_errl = l_threadPool.shutdown();
Expand Down

0 comments on commit d2bcdef

Please sign in to comment.