Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDIA: Update timeout FFDC gathering for OCMBs
Change-Id: Ib3104995bd97515b1e94d2b6e0e11517a9eeaa14 RTC: 250934 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/93200 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Benjamen G Tyner <ben.tyner@ibm.com> Reviewed-by: Zane C Shelley <zshelle@us.ibm.com> Reviewed-by: Brian J Stegmiller <bjs@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>
- Loading branch information
Showing
6 changed files
with
124 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/* IBM_PROLOG_BEGIN_TAG */ | ||
/* This is an automatically generated prolog. */ | ||
/* */ | ||
/* $Source: src/usr/diag/mdia/test/mdiaTestTimeoutFfdc.H $ */ | ||
/* */ | ||
/* OpenPOWER HostBoot Project */ | ||
/* */ | ||
/* Contributors Listed Below - COPYRIGHT 2020 */ | ||
/* [+] International Business Machines Corp. */ | ||
/* */ | ||
/* */ | ||
/* Licensed under the Apache License, Version 2.0 (the "License"); */ | ||
/* you may not use this file except in compliance with the License. */ | ||
/* You may obtain a copy of the License at */ | ||
/* */ | ||
/* http://www.apache.org/licenses/LICENSE-2.0 */ | ||
/* */ | ||
/* Unless required by applicable law or agreed to in writing, software */ | ||
/* distributed under the License is distributed on an "AS IS" BASIS, */ | ||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ | ||
/* implied. See the License for the specific language governing */ | ||
/* permissions and limitations under the License. */ | ||
/* */ | ||
/* IBM_PROLOG_END_TAG */ | ||
#ifndef __TEST_MDIATESTTIMEOUTFFDC_H | ||
#define __TEST_MDIATESTTIMEOUTFFDC_H | ||
|
||
/** | ||
* @file mdiaTestTimeoutFfdc.H | ||
* @brief Timeout FFDC collection unit test | ||
*/ | ||
|
||
#include <builtins.h> | ||
#include <cxxtest/TestSuite.H> | ||
#include "../mdiasm.H" | ||
#include "../mdiasmimpl.H" | ||
#include <targeting/common/utilFilter.H> | ||
#include "../mdiatrace.H" | ||
#include "../mdiamonitor.H" | ||
#include "../mdiafwd.H" | ||
#include <sys/time.h> | ||
|
||
using namespace MDIA; | ||
using namespace TARGETING; | ||
|
||
class MdiaTimeoutFfdcTest : public CxxTest::TestSuite | ||
{ | ||
private: | ||
|
||
TargetHandle_t getTarget() | ||
{ | ||
TargetHandleList tmp; | ||
|
||
// Need to determine whether we are using MBA, MCBIST, or OCMB | ||
fapi2::TargetType type = getMdiaTargetType(); | ||
if (fapi2::TARGET_TYPE_MBA_CHIPLET == type) | ||
{ | ||
TARGETING::getAllChiplets(tmp, TYPE_MBA); | ||
} | ||
else if (fapi2::TARGET_TYPE_MCBIST == type) | ||
{ | ||
TARGETING::getAllChiplets(tmp, TYPE_MCBIST); | ||
} | ||
else if (fapi2::TARGET_TYPE_OCMB_CHIP == type) | ||
{ | ||
TARGETING::getAllChips(tmp, TYPE_OCMB_CHIP); | ||
} | ||
|
||
return tmp[0]; | ||
} | ||
|
||
public: | ||
|
||
void testTimeoutFfdc(void) | ||
{ | ||
using namespace MDIA; | ||
using namespace TARGETING; | ||
|
||
TS_TRACE(ENTER_MRK "testOcmbTimeoutFfdc"); | ||
|
||
// Just call addTimeoutFFDC with some appropriate target to ensure | ||
// it doesn't assert or crash. | ||
TargetHandle_t trgt = getTarget(); | ||
errlHndl_t err = new ERRORLOG::ErrlEntry( | ||
ERRORLOG::ERRL_SEV_INFORMATIONAL, | ||
PROCESS_COMMAND_TIMEOUT, | ||
MAINT_COMMAND_SW_TIMED_OUT, | ||
get_huid(trgt) ); | ||
addTimeoutFFDC( trgt, err ); | ||
|
||
TS_TRACE(EXIT_MRK "testOcmbTimeoutFfdc"); | ||
} | ||
|
||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters