[PATCH 2/2] fwts-test: Add CSRT table regression test
Colin King
colin.king at canonical.com
Tue Jun 30 14:17:44 UTC 2015
From: Colin Ian King <colin.king at canonical.com>
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
Makefile.am | 2 ++
.../arg-show-tests-0001/arg-show-tests-0001.log | 2 ++
.../arg-show-tests-full-0001.log | 6 +++-
fwts-test/csrt-0001/acpidump-0001.log | 38 ++++++++++++++++++++++
fwts-test/csrt-0001/acpidump-0002.log | 38 ++++++++++++++++++++++
fwts-test/csrt-0001/csrt-0001.log | 9 +++++
fwts-test/csrt-0001/csrt-0002.log | 21 ++++++++++++
fwts-test/csrt-0001/test-0001.sh | 17 ++++++++++
fwts-test/csrt-0001/test-0002.sh | 17 ++++++++++
9 files changed, 149 insertions(+), 1 deletion(-)
create mode 100644 fwts-test/csrt-0001/acpidump-0001.log
create mode 100644 fwts-test/csrt-0001/acpidump-0002.log
create mode 100644 fwts-test/csrt-0001/csrt-0001.log
create mode 100644 fwts-test/csrt-0001/csrt-0002.log
create mode 100755 fwts-test/csrt-0001/test-0001.sh
create mode 100755 fwts-test/csrt-0001/test-0002.sh
diff --git a/Makefile.am b/Makefile.am
index ff5196a..ebfca0f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -60,6 +60,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
fwts-test/checksum-0001/test-0004.sh \
fwts-test/cpep-0001/test-0001.sh \
fwts-test/cpep-0001/test-0002.sh \
+ fwts-test/csrt-0001/test-0001.sh \
+ fwts-test/csrt-0001/test-0002.sh \
fwts-test/dbg2-0001/test-0001.sh \
fwts-test/dbg2-0001/test-0002.sh \
fwts-test/dbgp-0001/test-0001.sh \
diff --git a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log
index 84b8618..9f4b305 100644
--- a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log
+++ b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log
@@ -7,6 +7,7 @@ ACPI tests:
boot BOOT Table test.
checksum ACPI table checksum test.
cpep CPEP Corrected Platform Error Polling Table test.
+ csrt CSRT Core System Resource Table test.
cstates Processor C state support test.
dbg2 DBG2 (Debug Port Table 2) test.
dbgp DBGP (Debug Port) Table test.
@@ -50,6 +51,7 @@ Batch tests:
cpufreq CPU frequency scaling tests.
crs Test PCI host bridge configuration using _CRS.
csm UEFI Compatibility Support Module test.
+ csrt CSRT Core System Resource Table test.
cstates Processor C state support test.
dbg2 DBG2 (Debug Port Table 2) test.
dbgp DBGP (Debug Port) Table test.
diff --git a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
index 47f64c6..cd013bd 100644
--- a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
+++ b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
@@ -17,6 +17,8 @@ ACPI tests:
ACPI table checksum test.
cpep (1 test):
CPEP Corrected Platform Error Polling Table test.
+ csrt (1 test):
+ CSRT Core System Resource Table test.
cstates (1 test):
Test all CPUs C-states.
dbg2 (1 test):
@@ -296,6 +298,8 @@ Batch tests:
Test PCI host bridge configuration using _CRS.
csm (1 test):
UEFI Compatibility Support Module test.
+ csrt (1 test):
+ CSRT Core System Resource Table test.
cstates (1 test):
Test all CPUs C-states.
dbg2 (1 test):
@@ -790,4 +794,4 @@ UEFI tests:
Test UEFI RT service query variable info interface stress test.
Test UEFI RT service get variable interface, invalid parameters.
-Total of 649 tests
+Total of 651 tests
diff --git a/fwts-test/csrt-0001/acpidump-0001.log b/fwts-test/csrt-0001/acpidump-0001.log
new file mode 100644
index 0000000..b93c071
--- /dev/null
+++ b/fwts-test/csrt-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 ....
+
+CSRT @ 0x00000000
+ 0000: 43 53 52 54 b8 00 00 00 01 20 41 4d 44 20 20 20 CSRT............
+ 0010: 41 47 45 53 41 20 20 20 01 00 00 00 41 4d 44 20 ................
+ 0020: 01 00 00 00 24 00 00 00 44 43 42 41 5a 59 58 57 ........DCBAZYXW
+ 0030: be ef de ad ff fe 00 00 00 00 00 00 0c 00 00 00 ................
+ 0040: 01 00 00 00 ff fe fd fc 30 00 00 00 44 43 42 41 ............DCBA
+ 0050: 5a 49 58 57 be ef de ad ff fd 00 00 00 00 00 00 ZYXW............
+ 0060: 0c 00 00 00 01 00 01 00 10 20 30 40 0c 00 00 00 ................
+ 0070: 02 00 00 00 50 60 70 80 40 00 00 00 03 00 00 00 ................
+ 0080: 03 00 00 00 f0 f1 f2 f3 00 00 00 00 1c 00 00 00 ................
+ 0090: a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af ................
+ 00a0: b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb 28 00 00 00 ................
+ 00b0: 01 00 01 00 fe ff ff ff ...............
diff --git a/fwts-test/csrt-0001/acpidump-0002.log b/fwts-test/csrt-0001/acpidump-0002.log
new file mode 100644
index 0000000..c000d4d
--- /dev/null
+++ b/fwts-test/csrt-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 ....
+
+CSRT @ 0x00000000
+ 0000: 43 53 52 54 b8 00 00 00 01 20 41 4d 44 20 20 20 CSRT............
+ 0010: 41 47 45 53 41 20 20 20 01 00 00 00 41 4d 44 20 ................
+ 0020: 01 00 00 00 24 00 00 00 44 43 42 41 5a 59 58 57 ........DCBAZYXW
+ 0030: be ef de ad ff fe 17 23 00 00 00 00 0c 00 00 00 ................
+ 0040: 01 00 00 00 ff fe fd fc 30 00 00 00 44 43 42 41 ............DCBA
+ 0050: 5a 49 58 57 be ef de ad ff fd 00 00 00 00 00 00 ZYXW............
+ 0060: 0c 00 00 00 00 00 00 00 10 20 30 40 0c 00 00 00 ................
+ 0070: 02 00 00 00 50 60 70 80 40 00 00 00 03 00 00 00 ................
+ 0080: 03 00 00 00 f0 f1 f2 f3 00 00 00 00 1c 00 00 00 ................
+ 0090: a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af ................
+ 00a0: b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb 28 00 00 00 ................
+ 00b0: 01 00 08 00 ff ff ff ff ...............
diff --git a/fwts-test/csrt-0001/csrt-0001.log b/fwts-test/csrt-0001/csrt-0001.log
new file mode 100644
index 0000000..28130ec
--- /dev/null
+++ b/fwts-test/csrt-0001/csrt-0001.log
@@ -0,0 +1,9 @@
+csrt csrt: CSRT Core System Resource Table test.
+csrt ----------------------------------------------------------
+csrt Test 1 of 1: CSRT Core System Resource Table test.
+csrt PASSED: Test 1, No issues found in CSRT table.
+csrt
+csrt ==========================================================
+csrt 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
+csrt info only.
+csrt ==========================================================
diff --git a/fwts-test/csrt-0001/csrt-0002.log b/fwts-test/csrt-0001/csrt-0002.log
new file mode 100644
index 0000000..3392ea8
--- /dev/null
+++ b/fwts-test/csrt-0001/csrt-0002.log
@@ -0,0 +1,21 @@
+csrt csrt: CSRT Core System Resource Table test.
+csrt ----------------------------------------------------------
+csrt Test 1 of 1: CSRT Core System Resource Table test.
+csrt FAILED [HIGH] CSRTResourceGroupReservedFieldNonZero: Test
+csrt 1, CSRT Resource Group 0 Reserved Field is 0x2317 and was
+csrt expecting a zero value
+csrt FAILED [HIGH] CSRTResourceDescriptorResourceTypeInvalid:
+csrt Test 1, CSRT Resource Group 1 Descriptor 0 Resource Type
+csrt is 0x0000 which is a reserved type
+csrt FAILED [HIGH] CSRTResourceDescriptorResourceSubTypeInvalid
+csrt : Test 1, CSRT Resource Group 2 Descriptor 0 Resource
+csrt Subtype is 0x0008 which is a reserved type, expecting
+csrt 0x0000 (Interrupt Line) or 0x0001 (Interrupt Controller)
+csrt FAILED [HIGH] CSRTResourceDescriptorReservedUID: Test 1,
+csrt CSRT Resource Group 2 Descriptor 0 UID Field is 0xffffffff
+csrt and this is a reserved UID value
+csrt
+csrt ==========================================================
+csrt 0 passed, 4 failed, 0 warning, 0 aborted, 0 skipped, 0
+csrt info only.
+csrt ==========================================================
diff --git a/fwts-test/csrt-0001/test-0001.sh b/fwts-test/csrt-0001/test-0001.sh
new file mode 100755
index 0000000..69797ce
--- /dev/null
+++ b/fwts-test/csrt-0001/test-0001.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+TEST="Test table against CSRT"
+NAME=test-0001.sh
+TMPLOG=$TMP/csrt.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/csrt-0001/acpidump-0001.log csrt - | cut -c7- | grep "^csrt" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/csrt-0001/csrt-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/csrt-0001/test-0002.sh b/fwts-test/csrt-0001/test-0002.sh
new file mode 100755
index 0000000..1da7543
--- /dev/null
+++ b/fwts-test/csrt-0001/test-0002.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+TEST="Test table against invalid CSRT"
+NAME=test-0002.sh
+TMPLOG=$TMP/csrt.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/csrt-0001/acpidump-0002.log csrt - | cut -c7- | grep "^csrt" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/csrt-0001/csrt-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