blob: 8fb1f3ed59791f8a88ad48f1e22c4411cc357b15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
// IBM_PROLOG_BEGIN_TAG
// This is an automatically generated prolog.
//
// $Source: src/usr/errl/test/errluserdetailtest.H $
//
// IBM CONFIDENTIAL
//
// COPYRIGHT International Business Machines Corp. 2011
//
// p1
//
// Object Code Only (OCO) source materials
// Licensed Internal Code Source Materials
// IBM HostBoot Licensed Internal Code
//
// The source code for this program is not published or other-
// wise divested of its trade secrets, irrespective of what has
// been deposited with the U.S. Copyright Office.
//
// Origin: 30
//
// IBM_PROLOG_END
#ifndef __TEST_ERRLUSERDETAILSTEST_H
#define __TEST_USERUSERDETAILSTEST_H
/**
* @file errluserdetailstest.H
*
* @brief Test user data plugins for errorlog.
*
*/
#include <cxxtest/TestSuite.H>
#include <errl/errlentry.H>
#include <errl/errluserdetails.H>
#include <errl/errlreasoncodes.H>
#include <errl/errludstring.H>
using namespace ERRORLOG;
class UtilErrlUsrDataTest: public CxxTest::TestSuite
{
public:
// Note that errlUserDetailsTarget is tested in the targeting unit test
/**
* @test testString - Capture a String in an error log
*/
void testString(void)
{
errlHndl_t l_errl = NULL;
TS_TRACE( "testString errorlog user detail data");
/*@
* @errortype
* @severity ERRORLOG_SEV_INFORMATIONAL
* @moduleid HBERRL_USERDATA_TEST_MOD_ID
* @reasoncode HBERRL_TEST_STRING_UD
* @userdata1 Test data 1
* @userdata2 Test data 2
* @devdesc User Details unit test - create string user detail data
*/
l_errl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_INFORMATIONAL,
HBERRL_USERDATA_TEST_MOD_ID,
HBERRL_TEST_STRING_UD,
0x1234567890, // user1
0x9876543210 ); // user2
// Create a test string and add it to the error log as user detail data
const char * l_pString = "This is a test string";
ErrlUserDetailsString(l_pString).addToLog(l_errl);
// commit the errorlog
errlCommit(l_errl, CXXTEST_COMP_ID);
}
};
#endif
|