[PATCH 24/30] fwts-test: Add HEST test
Colin King
colin.king at canonical.com
Thu Jun 18 08:49:36 UTC 2015
From: Colin Ian King <colin.king at canonical.com>
Add two tests, one to check for a valid HEST and another to check
an invalid HEST.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
Makefile.am | 2 +
fwts-test/hest-0001/acpidump-0001.log | 38 ++++++++++++++++
fwts-test/hest-0001/acpidump-0002.log | 38 ++++++++++++++++
fwts-test/hest-0001/hest-0001.log | 69 ++++++++++++++++++++++++++++
fwts-test/hest-0001/hest-0002.log | 86 +++++++++++++++++++++++++++++++++++
fwts-test/hest-0001/test-0001.sh | 17 +++++++
fwts-test/hest-0001/test-0002.sh | 17 +++++++
7 files changed, 267 insertions(+)
create mode 100644 fwts-test/hest-0001/acpidump-0001.log
create mode 100644 fwts-test/hest-0001/acpidump-0002.log
create mode 100644 fwts-test/hest-0001/hest-0001.log
create mode 100644 fwts-test/hest-0001/hest-0002.log
create mode 100755 fwts-test/hest-0001/test-0001.sh
create mode 100755 fwts-test/hest-0001/test-0002.sh
diff --git a/Makefile.am b/Makefile.am
index e8f6855..5cfbfa4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -64,6 +64,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
fwts-test/dbgp-0001/test-0001.sh \
fwts-test/dbgp-0001/test-0002.sh \
fwts-test/disassemble-0001/test-0001.sh \
+ fwts-test/hest-0001/test-0001.sh \
+ fwts-test/hest-0001/test-0002.sh \
fwts-test/klog-0001/test-0001.sh \
fwts-test/klog-0001/test-0002.sh \
fwts-test/klog-0001/test-0003.sh \
diff --git a/fwts-test/hest-0001/acpidump-0001.log b/fwts-test/hest-0001/acpidump-0001.log
new file mode 100644
index 0000000..57ab66d
--- /dev/null
+++ b/fwts-test/hest-0001/acpidump-0001.log
@@ -0,0 +1,38 @@
+FACS @ 0x00000000
+ 0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00 FACS at ...........
+ 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+
+FACP @ 0x00000000
+ 0000: 46 41 43 50 f4 00 00 00 03 f9 41 4d 44 20 20 20 FACP......AMD
+ 0010: 47 55 41 4d 20 20 20 20 00 00 04 06 41 4d 44 20 GUAM ....AMD
+ 0020: 40 42 0f 00 c0 2f e9 af 92 47 e8 af 00 02 09 00 @B.../...G......
+ 0030: b0 00 00 00 f0 f1 00 00 00 80 00 00 00 00 00 00 ................
+ 0040: 04 80 00 00 00 00 00 00 00 82 00 00 08 80 00 00 ................
+ 0050: 20 80 00 00 00 00 00 00 04 02 01 04 08 00 00 00 ...............
+ 0060: 65 00 e9 03 00 00 00 00 01 00 0d 00 32 00 00 00 e...........2...
+ 0070: a5 c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0080: 00 00 00 00 c0 2f e9 af 00 00 00 00 92 47 e8 af ...../.......G..
+ 0090: 00 00 00 00 01 20 00 00 00 80 00 00 00 00 00 00 ..... ..........
+ 00a0: 00 00 00 00 00 00 00 00 00 00 00 00 01 10 00 00 ................
+ 00b0: 04 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 00c0: 00 00 00 00 01 08 00 00 00 82 00 00 00 00 00 00 ................
+ 00d0: 01 20 00 00 08 80 00 00 00 00 00 00 01 40 00 00 . ........... at ..
+ 00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
+ 00f0: 00 00 00 00 ....
+
+HEST @ 0x00000000
+ 0000: 48 45 53 54 bc 00 00 00 01 1c 48 50 20 20 20 20 HEST......HP
+ 0010: 50 72 6f 4c 69 61 6e 74 01 00 00 00 d2 04 00 00 ProLiant........
+ 0020: 2e 16 00 00 03 00 00 00 06 00 06 00 00 00 02 00 ................
+ 0030: 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0040: 56 08 00 00 20 00 10 00 11 f0 17 00 c1 11 00 00 V... ...........
+ 0050: 00 00 00 00 06 00 00 00 07 00 07 00 00 00 02 00 ................
+ 0060: 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0070: 56 08 00 00 20 00 10 00 11 f0 17 00 c1 11 00 00 V... ...........
+ 0080: 00 00 00 00 08 00 08 00 00 00 02 00 01 00 00 00 ................
+ 0090: 01 00 00 00 00 00 00 00 00 00 00 00 06 00 00 00 ................
+ 00a0: 20 00 10 00 11 f0 17 00 c1 11 00 00 00 00 00 00 ...............
+ 00b0: 20 00 10 00 11 f0 17 00 00 00 00 00 ...........
diff --git a/fwts-test/hest-0001/acpidump-0002.log b/fwts-test/hest-0001/acpidump-0002.log
new file mode 100644
index 0000000..f98b873
--- /dev/null
+++ b/fwts-test/hest-0001/acpidump-0002.log
@@ -0,0 +1,38 @@
+FACS @ 0x00000000
+ 0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00 FACS at ...........
+ 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+
+FACP @ 0x00000000
+ 0000: 46 41 43 50 f4 00 00 00 03 f9 41 4d 44 20 20 20 FACP......AMD
+ 0010: 47 55 41 4d 20 20 20 20 00 00 04 06 41 4d 44 20 GUAM ....AMD
+ 0020: 40 42 0f 00 c0 2f e9 af 92 47 e8 af 00 02 09 00 @B.../...G......
+ 0030: b0 00 00 00 f0 f1 00 00 00 80 00 00 00 00 00 00 ................
+ 0040: 04 80 00 00 00 00 00 00 00 82 00 00 08 80 00 00 ................
+ 0050: 20 80 00 00 00 00 00 00 04 02 01 04 08 00 00 00 ...............
+ 0060: 65 00 e9 03 00 00 00 00 01 00 0d 00 32 00 00 00 e...........2...
+ 0070: a5 c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0080: 00 00 00 00 c0 2f e9 af 00 00 00 00 92 47 e8 af ...../.......G..
+ 0090: 00 00 00 00 01 20 00 00 00 80 00 00 00 00 00 00 ..... ..........
+ 00a0: 00 00 00 00 00 00 00 00 00 00 00 00 01 10 00 00 ................
+ 00b0: 04 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 00c0: 00 00 00 00 01 08 00 00 00 82 00 00 00 00 00 00 ................
+ 00d0: 01 20 00 00 08 80 00 00 00 00 00 00 01 40 00 00 . ........... at ..
+ 00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
+ 00f0: 00 00 00 00 ....
+
+HEST @ 0x00000000
+ 0000: 48 45 53 54 bc 00 00 00 01 1c 48 50 20 20 20 20 HEST......HP
+ 0010: 50 72 6f 4c 69 61 6e 74 01 00 00 00 d2 04 00 00 ProLiant........
+ 0020: 2e 16 00 00 03 00 00 00 06 00 06 00 00 00 07 00 ................
+ 0030: 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0040: 56 08 00 00 20 00 10 00 11 f0 17 00 c1 11 00 00 V... ...........
+ 0050: 00 00 00 00 06 00 00 00 07 00 ff 00 00 00 09 00 ................
+ 0060: 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0070: 56 08 00 00 20 00 10 00 11 f0 17 00 c1 11 00 00 V... ...........
+ 0080: 00 00 00 00 08 00 08 00 00 00 0f 00 00 00 00 00 ................
+ 0090: 00 00 00 00 00 00 00 00 00 00 00 00 06 00 00 00 ................
+ 00a0: 20 00 10 00 11 f0 17 00 c1 11 00 00 00 00 00 00 ...............
+ 00b0: 20 00 10 00 11 f0 17 00 00 00 00 00 ...........
diff --git a/fwts-test/hest-0001/hest-0001.log b/fwts-test/hest-0001/hest-0001.log
new file mode 100644
index 0000000..c87a1bb
--- /dev/null
+++ b/fwts-test/hest-0001/hest-0001.log
@@ -0,0 +1,69 @@
+hest hest: HEST Hardware Error Source Table test.
+hest ----------------------------------------------------------
+hest Test 1 of 1: HEST Hardware Error Source Table test.
+hest HEST Hardware Error Source Table test
+hest Error Source Count: 0x03
+hest
+hest HEST PCI Express Root Port AER:
+hest Type: 0x06
+hest Source ID: 0x0006
+hest Reserved: 0x0000
+hest Flags: 0x02
+hest Enabled: 0x00
+hest Number of Records: 0x00000001
+hest Max Sections Per Record: 0x00000001
+hest Bus: 0x00000000
+hest Device: 0x0000
+hest Function: 0x0000
+hest Device Control: 0x0856
+hest Reserved: 0x0000
+hest Uncorrectable Mask: 0x00100020
+hest Uncorrectable Severity: 0x0017f011
+hest Correctable Error Mask: 0x000011c1
+hest Advanced Capabilities: 0x00000000
+hest Root Error Command: 0x00000006
+hest
+hest HEST PCI Express Device AER:
+hest Type: 0x07
+hest Source ID: 0x0007
+hest Reserved: 0x0000
+hest Flags: 0x02
+hest Enabled: 0x00
+hest Number of Records: 0x00000001
+hest Max Sections Per Record: 0x00000001
+hest Bus: 0x00000000
+hest Device: 0x0000
+hest Function: 0x0000
+hest Device Control: 0x0856
+hest Uncorrectable Mask: 0x00100020
+hest Uncorrectable Severity: 0x0017f011
+hest Correctable Error Mask: 0x000011c1
+hest Advanced Capabilities: 0x00000000
+hest
+hest HEST PCI Express Bridge AER:
+hest Type: 0x08
+hest Source ID: 0x0008
+hest Reserved: 0x0000
+hest Flags: 0x02
+hest Enabled: 0x00
+hest Number of Records: 0x00000001
+hest Max Sections Per Record: 0x00000001
+hest Bus: 0x00000000
+hest Device: 0x0000
+hest Function: 0x0000
+hest Device Control: 0x0006
+hest Reserved: 0x0000
+hest Uncorrectable Mask: 0x00100020
+hest Uncorrectable Severity: 0x0017f011
+hest Correctable Mask: 0x000011c1
+hest Advanced Capabilities: 0x00000000
+hest 2nd Uncorrectable Mask: 0x00100020
+hest 2nd Uncurrectable Svrity: 0x0017f011
+hest 2nd Advanced Capabilities:0x00000000
+hest
+hest PASSED: Test 1, No issues found in HEST table.
+hest
+hest ==========================================================
+hest 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
+hest info only.
+hest ==========================================================
diff --git a/fwts-test/hest-0001/hest-0002.log b/fwts-test/hest-0001/hest-0002.log
new file mode 100644
index 0000000..5a069a4
--- /dev/null
+++ b/fwts-test/hest-0001/hest-0002.log
@@ -0,0 +1,86 @@
+hest hest: HEST Hardware Error Source Table test.
+hest ----------------------------------------------------------
+hest Test 1 of 1: HEST Hardware Error Source Table test.
+hest HEST Hardware Error Source Table test
+hest Error Source Count: 0x03
+hest
+hest HEST PCI Express Root Port AER:
+hest Type: 0x06
+hest Source ID: 0x0006
+hest Reserved: 0x0000
+hest Flags: 0x07
+hest Enabled: 0x00
+hest Number of Records: 0x00000001
+hest Max Sections Per Record: 0x00000001
+hest Bus: 0x00000000
+hest Device: 0x0000
+hest Function: 0x0000
+hest Device Control: 0x0856
+hest Reserved: 0x0000
+hest Uncorrectable Mask: 0x00100020
+hest Uncorrectable Severity: 0x0017f011
+hest Correctable Error Mask: 0x000011c1
+hest Advanced Capabilities: 0x00000000
+hest Root Error Command: 0x00000006
+hest
+hest FAILED [MEDIUM] HESTPciExpressRootPortFlagsReserved: Test
+hest 1, HEST PCI Express Root Port Flags Reserved bits [2:7]
+hest must be zero, instead got 0x7
+hest HEST PCI Express Device AER:
+hest Type: 0x07
+hest Source ID: 0x00ff
+hest Reserved: 0x0000
+hest Flags: 0x09
+hest Enabled: 0x00
+hest Number of Records: 0x00000000
+hest Max Sections Per Record: 0x00000001
+hest Bus: 0x00000000
+hest Device: 0x0000
+hest Function: 0x0000
+hest Device Control: 0x0856
+hest Uncorrectable Mask: 0x00100020
+hest Uncorrectable Severity: 0x0017f011
+hest Correctable Error Mask: 0x000011c1
+hest Advanced Capabilities: 0x00000000
+hest
+hest FAILED [MEDIUM] HESTPciExpressRootPortFlagsReserved: Test
+hest 1, HEST PCI Express Root Port Flags Reserved bits [2:7]
+hest must be zero, instead got 0x9
+hest FAILED [HIGH] HESTInvalidRecordsToPreallocate: Test 1,
+hest HEST PCI Express Root Port Number of Records to
+hest Preallocate is 0x0 and must be more than zero.
+hest HEST PCI Express Bridge AER:
+hest Type: 0x08
+hest Source ID: 0x0008
+hest Reserved: 0x0000
+hest Flags: 0x0f
+hest Enabled: 0x00
+hest Number of Records: 0x00000000
+hest Max Sections Per Record: 0x00000000
+hest Bus: 0x00000000
+hest Device: 0x0000
+hest Function: 0x0000
+hest Device Control: 0x0006
+hest Reserved: 0x0000
+hest Uncorrectable Mask: 0x00100020
+hest Uncorrectable Severity: 0x0017f011
+hest Correctable Mask: 0x000011c1
+hest Advanced Capabilities: 0x00000000
+hest 2nd Uncorrectable Mask: 0x00100020
+hest 2nd Uncurrectable Svrity: 0x0017f011
+hest 2nd Advanced Capabilities:0x00000000
+hest
+hest FAILED [MEDIUM] HESTPciExpressBridgeFlagsReserved: Test 1,
+hest HEST PCI Express Bridge Flags Reserved bits [2:7] must be
+hest zero, instead got 0xf
+hest FAILED [HIGH] HESTInvalidRecordsToPreallocate: Test 1,
+hest HEST PCI Express Bridge Number of Records to Preallocate
+hest is 0x0 and must be more than zero.
+hest FAILED [HIGH] HESTInvalidMaxSectionsPerRecord: Test 1,
+hest HEST PCI Express Brdige Max Sections Per Record is 0x0 and
+hest must be more than zero.
+hest
+hest ==========================================================
+hest 0 passed, 6 failed, 0 warning, 0 aborted, 0 skipped, 0
+hest info only.
+hest ==========================================================
diff --git a/fwts-test/hest-0001/test-0001.sh b/fwts-test/hest-0001/test-0001.sh
new file mode 100755
index 0000000..de943db
--- /dev/null
+++ b/fwts-test/hest-0001/test-0001.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+TEST="Test apcitables against HEST"
+NAME=test-0001.sh
+TMPLOG=$TMP/hest.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/hest-0001/acpidump-0001.log hest - | cut -c7- | grep "^hest" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/hest-0001/hest-0001.log >> $FAILURE_LOG
+ret=$?
+if [ $ret -eq 0 ]; then
+ echo PASSED: $TEST, $NAME
+else
+ echo FAILED: $TEST, $NAME
+fi
+
+rm $TMPLOG
+exit $ret
diff --git a/fwts-test/hest-0001/test-0002.sh b/fwts-test/hest-0001/test-0002.sh
new file mode 100755
index 0000000..a1d9c9d
--- /dev/null
+++ b/fwts-test/hest-0001/test-0002.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+TEST="Test apcitables against invalid HEST"
+NAME=test-0001.sh
+TMPLOG=$TMP/hest.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/hest-0001/acpidump-0002.log hest - | cut -c7- | grep "^hest" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/hest-0001/hest-0002.log >> $FAILURE_LOG
+ret=$?
+if [ $ret -eq 0 ]; then
+ echo PASSED: $TEST, $NAME
+else
+ echo FAILED: $TEST, $NAME
+fi
+
+rm $TMPLOG
+exit $ret
--
2.1.4
More information about the fwts-devel
mailing list