[PATCH 2/2] fwts-test: Add regression test for PDTT

Alex Hung alex.hung at canonical.com
Sat Oct 21 05:44:47 UTC 2017


Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
 Makefile.am                           |  2 ++
 fwts-test/pdtt-0001/acpidump-0001.log | 31 +++++++++++++++++++++++++++++++
 fwts-test/pdtt-0001/acpidump-0002.log | 31 +++++++++++++++++++++++++++++++
 fwts-test/pdtt-0001/pdtt-0001.log     | 23 +++++++++++++++++++++++
 fwts-test/pdtt-0001/pdtt-0002.log     | 30 ++++++++++++++++++++++++++++++
 fwts-test/pdtt-0001/test-0001.sh      | 23 +++++++++++++++++++++++
 fwts-test/pdtt-0001/test-0002.sh      | 23 +++++++++++++++++++++++
 7 files changed, 163 insertions(+)
 create mode 100644 fwts-test/pdtt-0001/acpidump-0001.log
 create mode 100644 fwts-test/pdtt-0001/acpidump-0002.log
 create mode 100644 fwts-test/pdtt-0001/pdtt-0001.log
 create mode 100644 fwts-test/pdtt-0001/pdtt-0002.log
 create mode 100755 fwts-test/pdtt-0001/test-0001.sh
 create mode 100755 fwts-test/pdtt-0001/test-0002.sh

diff --git a/Makefile.am b/Makefile.am
index af2fb91..278661c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -134,6 +134,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
 	fwts-test/osilinux-0001/test-0002.sh \
 	fwts-test/pcct-0001/test-0001.sh \
 	fwts-test/pcct-0001/test-0002.sh \
+	fwts-test/pdtt-0001/test-0001.sh \
+	fwts-test/pdtt-0001/test-0002.sh \
 	fwts-test/pmtt-0001/test-0001.sh \
 	fwts-test/pmtt-0001/test-0002.sh \
 	fwts-test/pptt-0001/test-0001.sh \
diff --git a/fwts-test/pdtt-0001/acpidump-0001.log b/fwts-test/pdtt-0001/acpidump-0001.log
new file mode 100644
index 0000000..7531960
--- /dev/null
+++ b/fwts-test/pdtt-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                                      ....
+
+PDTT @ 0x0000000000000000
+  0000: 50 44 54 54 34 00 00 00 01 d2 49 4e 54 45 4c 20  PDTT4.....INTEL 
+  0010: 54 65 6d 70 6c 61 74 65 01 00 00 00 49 4e 54 4c  Template....INTL
+  0020: 29 09 17 20 04 00 00 00 2c 00 00 00 aa 03 bb 02  ).. ....,.......
+  0030: cc 01 dd 00                                      ....
+
diff --git a/fwts-test/pdtt-0001/acpidump-0002.log b/fwts-test/pdtt-0001/acpidump-0002.log
new file mode 100644
index 0000000..f019d00
--- /dev/null
+++ b/fwts-test/pdtt-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                                      ....
+
+PDTT @ 0x0000000000000000
+  0000: 50 44 54 54 34 00 00 00 01 d2 49 4e 54 45 4c 20  PDTT4.....INTEL 
+  0010: 54 65 6d 70 6c 61 74 65 01 00 00 00 49 4e 54 4c  Template....INTL
+  0020: 29 09 17 20 04 01 02 03 2c 00 00 00 aa 05 bb 02  ).. ....,.......
+  0030: cc 07 dd 08                                      ....
+
diff --git a/fwts-test/pdtt-0001/pdtt-0001.log b/fwts-test/pdtt-0001/pdtt-0001.log
new file mode 100644
index 0000000..555a015
--- /dev/null
+++ b/fwts-test/pdtt-0001/pdtt-0001.log
@@ -0,0 +1,23 @@
+pdtt            pdtt: PDTT Platform Debug Trigger Table test.
+pdtt            ----------------------------------------------------------
+pdtt            Test 1 of 1: Validate PDTT table.
+pdtt            PDTT Platform Debug Trigger Table:
+pdtt              Trigger Count:           0x04
+pdtt              Reserved[3]:             0x000000
+pdtt              Trigger ID Array Offset: 0x2c
+pdtt              Platform Communication Channel IDs
+pdtt                Sub channel ID:          0xaa
+pdtt                Flags:                   0x03
+pdtt                Sub channel ID:          0xbb
+pdtt                Flags:                   0x02
+pdtt                Sub channel ID:          0xcc
+pdtt                Flags:                   0x01
+pdtt                Sub channel ID:          0xdd
+pdtt                Flags:                   0x00
+pdtt            
+pdtt            PASSED: Test 1, No issues found in PDTT table.
+pdtt            
+pdtt            ==========================================================
+pdtt            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
+pdtt            info only.
+pdtt            ==========================================================
diff --git a/fwts-test/pdtt-0001/pdtt-0002.log b/fwts-test/pdtt-0001/pdtt-0002.log
new file mode 100644
index 0000000..1f9e440
--- /dev/null
+++ b/fwts-test/pdtt-0001/pdtt-0002.log
@@ -0,0 +1,30 @@
+pdtt            pdtt: PDTT Platform Debug Trigger Table test.
+pdtt            ----------------------------------------------------------
+pdtt            Test 1 of 1: Validate PDTT table.
+pdtt            PDTT Platform Debug Trigger Table:
+pdtt              Trigger Count:           0x04
+pdtt              Reserved[3]:             0x030201
+pdtt              Trigger ID Array Offset: 0x2c
+pdtt            FAILED [MEDIUM] PDTTReservedNonZero: Test 1, PDTT Reserved
+pdtt            field must be zero, got 0x00030201 instead
+pdtt              Platform Communication Channel IDs
+pdtt                Sub channel ID:          0xaa
+pdtt                Flags:                   0x05
+pdtt            FAILED [HIGH] PDTTReservedBitsNonZero: Test 1, PDTT Flags
+pdtt            Bits [7..2] must be zero, got 0x05 instead
+pdtt                Sub channel ID:          0xbb
+pdtt                Flags:                   0x02
+pdtt                Sub channel ID:          0xcc
+pdtt                Flags:                   0x07
+pdtt            FAILED [HIGH] PDTTReservedBitsNonZero: Test 1, PDTT Flags
+pdtt            Bits [7..2] must be zero, got 0x07 instead
+pdtt                Sub channel ID:          0xdd
+pdtt                Flags:                   0x08
+pdtt            FAILED [HIGH] PDTTReservedBitsNonZero: Test 1, PDTT Flags
+pdtt            Bits [7..2] must be zero, got 0x08 instead
+pdtt            
+pdtt            
+pdtt            ==========================================================
+pdtt            0 passed, 4 failed, 0 warning, 0 aborted, 0 skipped, 0
+pdtt            info only.
+pdtt            ==========================================================
diff --git a/fwts-test/pdtt-0001/test-0001.sh b/fwts-test/pdtt-0001/test-0001.sh
new file mode 100755
index 0000000..825d0c6
--- /dev/null
+++ b/fwts-test/pdtt-0001/test-0001.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+TEST="Test acpitables against PDTT"
+NAME=test-0001.sh
+TMPLOG=$TMP/pdtt.log.$$
+
+$FWTS --show-tests | grep pdtt > /dev/null
+if [ $? -eq 1 ]; then
+	echo SKIP: $TEST, $NAME
+	exit 77
+fi
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/pdtt-0001/acpidump-0001.log pdtt - | cut -c7- | grep "^pdtt" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/pdtt-0001/pdtt-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/pdtt-0001/test-0002.sh b/fwts-test/pdtt-0001/test-0002.sh
new file mode 100755
index 0000000..6fb1d93
--- /dev/null
+++ b/fwts-test/pdtt-0001/test-0002.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+TEST="Test acpitables against invalid PDTT"
+NAME=test-0001.sh
+TMPLOG=$TMP/pdtt.log.$$
+
+$FWTS --show-tests | grep pdtt > /dev/null
+if [ $? -eq 1 ]; then
+	echo SKIP: $TEST, $NAME
+	exit 77
+fi
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/pdtt-0001/acpidump-0002.log pdtt - | cut -c7- | grep "^pdtt" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/pdtt-0001/pdtt-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.7.4




More information about the fwts-devel mailing list