[PATCH 2/2][V2] fwts-test: Add UEFI ACPI data table regression tests
Ivan Hu
ivan.hu at canonical.com
Tue Jul 7 06:44:59 UTC 2015
Signed-off-by: Ivan Hu <ivan.hu 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/uefi-0001/acpidump-0001.log | 31 ++++++++++++++++++++++
fwts-test/uefi-0001/acpidump-0001.log~ | 31 ++++++++++++++++++++++
fwts-test/uefi-0001/acpidump-0002.log | 31 ++++++++++++++++++++++
fwts-test/uefi-0001/acpidump-0002.log~ | 31 ++++++++++++++++++++++
fwts-test/uefi-0001/test-0001.sh | 17 ++++++++++++
fwts-test/uefi-0001/test-0002.sh | 17 ++++++++++++
fwts-test/uefi-0001/uefi-0001.log | 14 ++++++++++
fwts-test/uefi-0001/uefi-0002.log | 19 +++++++++++++
11 files changed, 200 insertions(+), 1 deletion(-)
create mode 100644 fwts-test/uefi-0001/acpidump-0001.log
create mode 100644 fwts-test/uefi-0001/acpidump-0001.log~
create mode 100644 fwts-test/uefi-0001/acpidump-0002.log
create mode 100644 fwts-test/uefi-0001/acpidump-0002.log~
create mode 100755 fwts-test/uefi-0001/test-0001.sh
create mode 100755 fwts-test/uefi-0001/test-0002.sh
create mode 100644 fwts-test/uefi-0001/uefi-0001.log
create mode 100644 fwts-test/uefi-0001/uefi-0002.log
diff --git a/Makefile.am b/Makefile.am
index 7d5c1f0..a431c2e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -106,6 +106,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
fwts-test/syntaxcheck-0001/test-0001.sh \
fwts-test/tcpa-0001/test-0001.sh \
fwts-test/tcpa-0001/test-0002.sh \
+ fwts-test/uefi-0001/test-0001.sh \
+ fwts-test/uefi-0001/test-0002.sh \
fwts-test/waet-0001/test-0001.sh \
fwts-test/waet-0001/test-0002.sh \
fwts-test/waet-0001/test-0003.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 bd388a6..a7575ce 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
@@ -34,6 +34,7 @@ ACPI tests:
spmi SPMI Service Processor Management Interface Description Table test.
srat SRAT System Resource Affinity Table test.
tcpa Trusted Computing Platform Alliance Capabilities Table test.
+ uefi UEFI Data Table test.
waet Windows ACPI Emulated Devices Table test.
wmi Extract and analyse Windows Management Instrumentation (WMI).
xenv Xen Environment Table tests.
@@ -101,6 +102,7 @@ Batch tests:
srat SRAT System Resource Affinity Table test.
syntaxcheck Re-assemble DSDT and SSDTs to find syntax errors and warnings.
tcpa Trusted Computing Platform Alliance Capabilities Table test.
+ uefi UEFI Data Table test.
uefibootpath Sanity check for UEFI Boot Path Boot####.
version Gather kernel system information.
virt CPU Virtualisation Configuration 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 d81ebf0..7b7f097 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
@@ -256,6 +256,8 @@ ACPI tests:
SRAT System Resource Affinity Table test.
tcpa (1 test):
Validate TCPA table.
+ uefi (1 test):
+ UEFI Data Table test.
waet (1 test):
Windows ACPI Emulated Devices Table test.
wmi (1 test):
@@ -601,6 +603,8 @@ Batch tests:
Disassemble and reassemble DSDT and SSDTs.
tcpa (1 test):
Validate TCPA table.
+ uefi (1 test):
+ UEFI Data Table test.
uefibootpath (1 test):
Test UEFI Boot Path Boot####.
version (4 tests):
@@ -812,4 +816,4 @@ UEFI tests:
Test UEFI RT service query variable info interface stress test.
Test UEFI RT service get variable interface, invalid parameters.
-Total of 660 tests
+Total of 662 tests
diff --git a/fwts-test/uefi-0001/acpidump-0001.log b/fwts-test/uefi-0001/acpidump-0001.log
new file mode 100644
index 0000000..f1f0b9e
--- /dev/null
+++ b/fwts-test/uefi-0001/acpidump-0001.log
@@ -0,0 +1,31 @@
+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 ................
+ 0040: 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 ....
+
+UEFI @ 0x00000000
+ 0000: 55 45 46 49 42 00 00 00 01 52 49 4E 54 45 4C 20 UEFIB....RINTEL
+ 0010: 45 44 4B 32 20 20 20 20 02 00 00 00 20 20 20 20 EDK2 ....
+ 0020: 13 00 00 01 E2 D8 8E C6 C6 9D BD 4C 9D 94 DB 65 ...........L...e
+ 0030: AC C5 C3 32 36 00 03 00 00 00 00 00 00 00 00 00 ...26...........
+ 0040: 00 00
diff --git a/fwts-test/uefi-0001/acpidump-0001.log~ b/fwts-test/uefi-0001/acpidump-0001.log~
new file mode 100644
index 0000000..6c964d1
--- /dev/null
+++ b/fwts-test/uefi-0001/acpidump-0001.log~
@@ -0,0 +1,31 @@
+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 ....
+
+UEFI @ 0x00000000
+ 0000: 55 45 46 49 42 00 00 00 01 52 49 4E 54 45 4C 20 UEFIB....RINTEL
+ 0010: 45 44 4B 32 20 20 20 20 02 00 00 00 20 20 20 20 EDK2 ....
+ 0020: 13 00 00 01 E2 D8 8E C6 C6 9D BD 4C 9D 94 DB 65 ...........L...e
+ 0030: AC C5 C3 32 36 00 03 00 00 00 00 00 00 00 00 00 ...26...........
+ 0040: 00 00
diff --git a/fwts-test/uefi-0001/acpidump-0002.log b/fwts-test/uefi-0001/acpidump-0002.log
new file mode 100644
index 0000000..23d8ed7
--- /dev/null
+++ b/fwts-test/uefi-0001/acpidump-0002.log
@@ -0,0 +1,31 @@
+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 ................
+ 0040: 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 ....
+
+UEFI @ 0x00000000
+ 0000: 55 45 46 49 42 00 00 00 01 52 49 4E 54 45 4C 20 UEFIB....RINTEL
+ 0010: 45 44 4B 32 20 20 20 20 02 00 00 00 20 20 20 20 EDK2 ....
+ 0020: 13 00 00 01 E2 D8 8E C6 C6 9D BD 4C 9D 94 DB 65 ...........L...e
+ 0030: AC C5 C3 32 46 00 03 00 00 00 00 00 00 00 00 00 ...26...........
+ 0040: 00 00
diff --git a/fwts-test/uefi-0001/acpidump-0002.log~ b/fwts-test/uefi-0001/acpidump-0002.log~
new file mode 100644
index 0000000..beae65a
--- /dev/null
+++ b/fwts-test/uefi-0001/acpidump-0002.log~
@@ -0,0 +1,31 @@
+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 ....
+
+UEFI @ 0x00000000
+ 0000: 55 45 46 49 42 00 00 00 01 52 49 4E 54 45 4C 20 UEFIB....RINTEL
+ 0010: 45 44 4B 32 20 20 20 20 02 00 00 00 20 20 20 20 EDK2 ....
+ 0020: 13 00 00 01 E2 D8 8E C6 C6 9D BD 4C 9D 94 DB 65 ...........L...e
+ 0030: AC C5 C3 32 46 00 03 00 00 00 00 00 00 00 00 00 ...26...........
+ 0040: 00 00
diff --git a/fwts-test/uefi-0001/test-0001.sh b/fwts-test/uefi-0001/test-0001.sh
new file mode 100755
index 0000000..bed98e4
--- /dev/null
+++ b/fwts-test/uefi-0001/test-0001.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+TEST="Test table against UEFI"
+NAME=test-0001.sh
+TMPLOG=$TMP/uefi.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/uefi-0001/acpidump-0001.log uefi - | cut -c7- | grep "^uefi" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/uefi-0001/uefi-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/uefi-0001/test-0002.sh b/fwts-test/uefi-0001/test-0002.sh
new file mode 100755
index 0000000..44baaeb
--- /dev/null
+++ b/fwts-test/uefi-0001/test-0002.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+TEST="Test table against invalid UEFI"
+NAME=test-0001.sh
+TMPLOG=$TMP/uefi.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/uefi-0001/acpidump-0001.log uefi - | cut -c7- | grep "^uefi" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/uefi-0001/uefi-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/uefi-0001/uefi-0001.log b/fwts-test/uefi-0001/uefi-0001.log
new file mode 100644
index 0000000..e82f4ea
--- /dev/null
+++ b/fwts-test/uefi-0001/uefi-0001.log
@@ -0,0 +1,14 @@
+uefi uefi: UEFI Data Table test.
+uefi ----------------------------------------------------------
+uefi Test 1 of 1: UEFI Data Table test.
+uefi UEFI ACPI Data Table:
+uefi Identifier: C68ED8E2-9DC6-4CBD-9D94-DB65ACC5C332
+uefi DataOffset: 0x0036
+uefi SW SMI Number: 0x00000003
+uefi Buffer Ptr Address: 0x0000000000000000
+uefi PASSED: Test 1, No issues found in UEFI table.
+uefi
+uefi ==========================================================
+uefi 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
+uefi info only.
+uefi ==========================================================
diff --git a/fwts-test/uefi-0001/uefi-0002.log b/fwts-test/uefi-0001/uefi-0002.log
new file mode 100644
index 0000000..f26d0fc
--- /dev/null
+++ b/fwts-test/uefi-0001/uefi-0002.log
@@ -0,0 +1,19 @@
+uefi uefi: UEFI Data Table test.
+uefi ----------------------------------------------------------
+uefi Test 1 of 1: UEFI Data Table test.
+uefi UEFI ACPI Data Table:
+uefi Identifier: C68ED8E2-9DC6-4CBD-9D94-DB65ACC5C332
+uefi DataOffset: 0x0046
+uefi FAILED [HIGH] UEFIDataOffset: Test 1, Invalid UEFI
+uefi DataOffset, exceed the whole table length 66 bytes,
+uefi instead got 70 offset bytes
+uefi FAILED [HIGH] UEFIDataOffset: Test 1, Invalid UEFI
+uefi DataOffset for SMM Communication table, DataOffset should
+uefi be 54, instead got 70 offset bytes
+uefi SW SMI Number: 0x00000003
+uefi Buffer Ptr Address: 0x0000000000000000
+uefi
+uefi ==========================================================
+uefi 0 passed, 2 failed, 0 warning, 0 aborted, 0 skipped, 0
+uefi info only.
+uefi ==========================================================
--
1.9.1
More information about the fwts-devel
mailing list