[PATCH 2/2] fwts-test: Add regression test for BGRT, update fwst-tests

Colin King colin.king at canonical.com
Tue Jun 23 09:54:00 UTC 2015


From: Colin Ian King <colin.king at canonical.com>

Add BGRT test and update arg-show-test* tests to accommodate this
new test too.

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/bgrt-0001/acpidump-0001.log              | 31 ++++++++++++++++++++++
 fwts-test/bgrt-0001/acpidump-0002.log              | 31 ++++++++++++++++++++++
 fwts-test/bgrt-0001/bgrt-0001.log                  | 16 +++++++++++
 fwts-test/bgrt-0001/bgrt-0002.log                  | 21 +++++++++++++++
 fwts-test/bgrt-0001/test-0001.sh                   | 17 ++++++++++++
 fwts-test/bgrt-0001/test-0002.sh                   | 17 ++++++++++++
 9 files changed, 142 insertions(+), 1 deletion(-)
 create mode 100644 fwts-test/bgrt-0001/acpidump-0001.log
 create mode 100644 fwts-test/bgrt-0001/acpidump-0002.log
 create mode 100644 fwts-test/bgrt-0001/bgrt-0001.log
 create mode 100644 fwts-test/bgrt-0001/bgrt-0002.log
 create mode 100755 fwts-test/bgrt-0001/test-0001.sh
 create mode 100755 fwts-test/bgrt-0001/test-0002.sh

diff --git a/Makefile.am b/Makefile.am
index cfad941..954ae5d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -51,6 +51,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
 	fwts-test/arg-width-0001/test-0008.sh \
 	fwts-test/bert-0001/test-0001.sh \
 	fwts-test/bert-0001/test-0002.sh \
+	fwts-test/bgrt-0001/test-0001.sh \
+	fwts-test/bgrt-0001/test-0002.sh \
 	fwts-test/boot-0001/test-0001.sh \
 	fwts-test/boot-0001/test-0002.sh \
 	fwts-test/checksum-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 2625757..4d73b08 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
@@ -3,6 +3,7 @@ ACPI tests:
  acpitables      ACPI table headers sanity tests.
  apicinstance    Test for single instance of APIC/MADT table.
  bert            BERT Boot Error Record Table test.
+ bgrt            BGRT Boot Graphics Resource Table test.
  boot            BOOT Table test.
  checksum        ACPI table checksum test.
  cstates         Processor C state support test.
@@ -37,6 +38,7 @@ Batch tests:
  aspm            PCIe ASPM test.
  autobrightness  Automated LCD brightness test.
  bert            BERT Boot Error Record Table test.
+ bgrt            BGRT Boot Graphics Resource Table test.
  bios32          BIOS32 Service Directory test.
  bios_info       Gather BIOS DMI information.
  boot            BOOT 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 b6d73b0..61aed52 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
@@ -9,6 +9,8 @@ ACPI tests:
   Test for single instance of APIC/MADT table.
  bert            (1 test):
   BERT Boot Error Record Table test.
+ bgrt            (1 test):
+  BGRT Boot Graphics Resource Table test.
  boot            (1 test):
   BOOT Table test.
  checksum        (1 test):
@@ -264,6 +266,8 @@ Batch tests:
   Change actual brightness.
  bert            (1 test):
   BERT Boot Error Record Table test.
+ bgrt            (1 test):
+  BGRT Boot Graphics Resource Table test.
  bios32          (1 test):
   BIOS32 Service Directory test.
  bios_info       (1 test):
@@ -774,4 +778,4 @@ UEFI tests:
   Test UEFI RT service query variable info interface stress test.
   Test UEFI RT service get variable interface, invalid parameters.
 
-Total of 641 tests
+Total of 643 tests
diff --git a/fwts-test/bgrt-0001/acpidump-0001.log b/fwts-test/bgrt-0001/acpidump-0001.log
new file mode 100644
index 0000000..fa2e0c0
--- /dev/null
+++ b/fwts-test/bgrt-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                                      ....
+
+BGRT @ 0x00000000
+  0000: 42 47 52 54 3c 00 00 00 00 a9 41 4c 41 53 4b 41  BGRT<.....ALASKA
+  0010: 41 20 4d 20 49 00 00 00 09 20 07 01 41 4d 49 20  A M I.... ..AMI
+  0020: 13 00 01 00 01 00 00 00 01 00 00 00 18 70 5f 03  .............p_.
+  0030: 00 00 00 00 00 00 00 00 00 00 00 00              ............
+                                                                          
diff --git a/fwts-test/bgrt-0001/acpidump-0002.log b/fwts-test/bgrt-0001/acpidump-0002.log
new file mode 100644
index 0000000..c0f8a7c
--- /dev/null
+++ b/fwts-test/bgrt-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                                      ....
+
+BGRT @ 0x00000000
+  0000: 42 47 52 54 3c 00 00 00 00 a9 41 4c 41 53 4b 41  BGRT<.....ALASKA
+  0010: 41 20 4d 20 49 00 00 00 09 20 07 01 41 4d 49 20  A M I.... ..AMI
+  0020: 13 00 01 00 02 00 ff 01 00 00 00 00 18 70 5f 03  .............p_.
+  0030: 00 00 00 00 00 00 00 00 00 00 00 00              ............
+                                                                          
diff --git a/fwts-test/bgrt-0001/bgrt-0001.log b/fwts-test/bgrt-0001/bgrt-0001.log
new file mode 100644
index 0000000..7985940
--- /dev/null
+++ b/fwts-test/bgrt-0001/bgrt-0001.log
@@ -0,0 +1,16 @@
+bgrt            bgrt: BGRT Boot Graphics Resource Table test.
+bgrt            ----------------------------------------------------------
+bgrt            Test 1 of 1: BGRT Boot Graphics Resource Table test.
+bgrt            BGRT Boot Graphics Resource Table:
+bgrt              Version:                  0x0001
+bgrt              Status:                   0x00
+bgrt              Image Type:               0x00
+bgrt              Image Memory Address:     0x035f701800000001
+bgrt              Image Offset X:           0x00000000
+bgrt              Image Offset Y:           0x00000000
+bgrt            PASSED: Test 1, No issues found in BGRT table.
+bgrt            
+bgrt            ==========================================================
+bgrt            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
+bgrt            info only.
+bgrt            ==========================================================
diff --git a/fwts-test/bgrt-0001/bgrt-0002.log b/fwts-test/bgrt-0001/bgrt-0002.log
new file mode 100644
index 0000000..c9af7a3
--- /dev/null
+++ b/fwts-test/bgrt-0001/bgrt-0002.log
@@ -0,0 +1,21 @@
+bgrt            bgrt: BGRT Boot Graphics Resource Table test.
+bgrt            ----------------------------------------------------------
+bgrt            Test 1 of 1: BGRT Boot Graphics Resource Table test.
+bgrt            BGRT Boot Graphics Resource Table:
+bgrt              Version:                  0x0002
+bgrt              Status:                   0xff
+bgrt              Image Type:               0x01
+bgrt              Image Memory Address:     0x035f701800000000
+bgrt              Image Offset X:           0x00000000
+bgrt              Image Offset Y:           0x00000000
+bgrt            FAILED [MEDIUM] BGRTInvalidVersion: Test 1, BGRT: Version
+bgrt            field is 0x2 and not the expected value of 0x01
+bgrt            FAILED [MEDIUM] BGRTStatusRersevedBits: Test 1, BGRT:
+bgrt            Status field is 0xff, reserved bits [1:7] should be zero
+bgrt            FAILED [MEDIUM] BGRTInvalidImageType: Test 1, BGRT: Image
+bgrt            Type field is 0x1, the only allowed type is 0x00
+bgrt            
+bgrt            ==========================================================
+bgrt            0 passed, 3 failed, 0 warning, 0 aborted, 0 skipped, 0
+bgrt            info only.
+bgrt            ==========================================================
diff --git a/fwts-test/bgrt-0001/test-0001.sh b/fwts-test/bgrt-0001/test-0001.sh
new file mode 100755
index 0000000..518687b
--- /dev/null
+++ b/fwts-test/bgrt-0001/test-0001.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+TEST="Test apcitables against BGRT"
+NAME=test-0001.sh
+TMPLOG=$TMP/bgrt.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/bgrt-0001/acpidump-0001.log bgrt - | cut -c7- | grep "^bgrt" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/bgrt-0001/bgrt-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/bgrt-0001/test-0002.sh b/fwts-test/bgrt-0001/test-0002.sh
new file mode 100755
index 0000000..5e0c6ab
--- /dev/null
+++ b/fwts-test/bgrt-0001/test-0002.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+TEST="Test apcitables against invalid GBRT"
+NAME=test-0001.sh
+TMPLOG=$TMP/bgrt.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/bgrt-0001/acpidump-0002.log bgrt - | cut -c7- | grep "^bgrt" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/bgrt-0001/bgrt-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