[PATCH 26/30] fwts-test: Add SLIT test
Colin King
colin.king at canonical.com
Thu Jun 18 08:49:38 UTC 2015
From: Colin Ian King <colin.king at canonical.com>
Add two tests, one to check for a valid SLIT and another to check
an invalid SLIT.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
Makefile.am | 2 ++
fwts-test/slit-0001/acpidump-0001.log | 33 +++++++++++++++++++++++++++++++
fwts-test/slit-0001/acpidump-0002.log | 33 +++++++++++++++++++++++++++++++
fwts-test/slit-0001/slit-0001.log | 12 ++++++++++++
fwts-test/slit-0001/slit-0002.log | 37 +++++++++++++++++++++++++++++++++++
fwts-test/slit-0001/test-0001.sh | 17 ++++++++++++++++
fwts-test/slit-0001/test-0002.sh | 17 ++++++++++++++++
7 files changed, 151 insertions(+)
create mode 100644 fwts-test/slit-0001/acpidump-0001.log
create mode 100644 fwts-test/slit-0001/acpidump-0002.log
create mode 100644 fwts-test/slit-0001/slit-0001.log
create mode 100644 fwts-test/slit-0001/slit-0002.log
create mode 100755 fwts-test/slit-0001/test-0001.sh
create mode 100755 fwts-test/slit-0001/test-0002.sh
diff --git a/Makefile.am b/Makefile.am
index 467723e..0315f0b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -72,6 +72,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
fwts-test/klog-0002/test-0001.sh \
fwts-test/klog-0002/test-0002.sh \
fwts-test/klog-0002/test-0003.sh \
+ fwts-test/slit-0001/test-0001.sh \
+ fwts-test/slit-0001/test-0002.sh \
fwts-test/madt-0001/test-0001.sh \
fwts-test/madt-0001/test-0002.sh \
fwts-test/method-0001/test-0001.sh \
diff --git a/fwts-test/slit-0001/acpidump-0001.log b/fwts-test/slit-0001/acpidump-0001.log
new file mode 100644
index 0000000..9c8ca31
--- /dev/null
+++ b/fwts-test/slit-0001/acpidump-0001.log
@@ -0,0 +1,33 @@
+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 ....
+
+SLIT @ 0x00000000
+ 0000: 53 4c 49 54 6c 00 00 00 01 20 41 4d 44 20 20 20 SLITl.... AMD
+ 0010: 41 47 45 53 41 20 20 20 01 00 00 00 41 4d 44 20 AGESA ....AMD
+ 0020: 01 00 00 00 08 00 00 00 00 00 00 00 0a 10 10 16 ................
+ 0030: 10 16 10 16 10 0a 16 10 16 10 10 16 10 16 0a 10 ................
+ 0040: 10 16 10 16 16 10 10 0a 10 16 16 10 10 16 10 10 ................
+ 0050: 0a 10 10 10 16 10 16 16 10 0a 10 10 10 10 10 16 ................
+ 0060: 10 10 0a 10 16 16 16 10 10 10 10 0a ............
diff --git a/fwts-test/slit-0001/acpidump-0002.log b/fwts-test/slit-0001/acpidump-0002.log
new file mode 100644
index 0000000..4498172
--- /dev/null
+++ b/fwts-test/slit-0001/acpidump-0002.log
@@ -0,0 +1,33 @@
+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 ....
+
+SLIT @ 0x00000000
+ 0000: 53 4c 49 54 6c 00 00 00 01 20 41 4d 44 20 20 20 SLITl.... AMD
+ 0010: 41 47 45 53 41 20 20 20 01 00 00 00 41 4d 44 20 AGESA ....AMD
+ 0020: 01 00 00 00 08 00 00 00 00 00 00 00 0b 10 10 16 ................
+ 0030: 11 16 10 16 10 0a 16 10 16 10 10 16 10 16 0a 10 ................
+ 0040: 10 16 93 16 16 09 10 0a 10 16 16 10 10 16 10 10 ................
+ 0050: 0a 14 10 10 16 10 16 16 10 0a 10 10 10 10 10 16 ................
+ 0060: 10 10 0a 10 16 16 16 10 10 10 10 fe ............
diff --git a/fwts-test/slit-0001/slit-0001.log b/fwts-test/slit-0001/slit-0001.log
new file mode 100644
index 0000000..5dc9a79
--- /dev/null
+++ b/fwts-test/slit-0001/slit-0001.log
@@ -0,0 +1,12 @@
+slit slit: SLIT System Locality Distance Information test.
+slit ----------------------------------------------------------
+slit Test 1 of 1: SLIT System Locality Distance Information
+slit test.
+slit SLIT System Locality Distance Information Table:
+slit Number of Localities: 0x8
+slit PASSED: Test 1, No issues found in SLIT table.
+slit
+slit ==========================================================
+slit 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
+slit info only.
+slit ==========================================================
diff --git a/fwts-test/slit-0001/slit-0002.log b/fwts-test/slit-0001/slit-0002.log
new file mode 100644
index 0000000..fadc2f9
--- /dev/null
+++ b/fwts-test/slit-0001/slit-0002.log
@@ -0,0 +1,37 @@
+slit slit: SLIT System Locality Distance Information test.
+slit ----------------------------------------------------------
+slit Test 1 of 1: SLIT System Locality Distance Information
+slit test.
+slit SLIT System Locality Distance Information Table:
+slit Number of Localities: 0x8
+slit FAILED [HIGH] SLITBadCornerEntry: Test 1, SLIT Entry[0][0]
+slit is 0xb, expecting value 0x0a.
+slit FAILED [HIGH] SLITBadCornerEntry: Test 1, SLIT Entry[7][7]
+slit is 0xfe, expecting value 0x0a.
+slit FAILED [HIGH] SLITEntryReserved: Test 1, SLIT Entry[0][4]
+slit is 0x11 and not the same as SLIT Entry[4][0] which is 0x10
+slit FAILED [HIGH] SLITEntryReserved: Test 1, SLIT Entry[1][3]
+slit is 0x10 and not the same as SLIT Entry[3][1] which is 0x9
+slit FAILED [HIGH] SLITEntryReserved: Test 1, SLIT Entry[2][6]
+slit is 0x93 and not the same as SLIT Entry[6][2] which is 0x10
+slit FAILED [HIGH] SLITEntryReserved: Test 1, SLIT Entry[3][1]
+slit is 0x9 which is a reserved value and has no defined
+slit meaning
+slit FAILED [HIGH] SLITEntryReserved: Test 1, SLIT Entry[3][1]
+slit is 0x9 and not the same as SLIT Entry[1][3] which is 0x10
+slit FAILED [HIGH] SLITEntryReserved: Test 1, SLIT Entry[4][0]
+slit is 0x10 and not the same as SLIT Entry[0][4] which is 0x11
+slit FAILED [HIGH] SLITEntryReserved: Test 1, SLIT Entry[4][5]
+slit is 0x14 and not the same as SLIT Entry[5][4] which is 0x10
+slit FAILED [HIGH] SLITEntryReserved: Test 1, SLIT Entry[5][4]
+slit is 0x10 and not the same as SLIT Entry[4][5] which is 0x14
+slit FAILED [HIGH] SLITEntryReserved: Test 1, SLIT Entry[6][2]
+slit is 0x10 and not the same as SLIT Entry[2][6] which is 0x93
+slit Total of 1 entries were using reserved values
+slit Total of 8 entries were not matching their diagonal parner
+slit element
+slit
+slit ==========================================================
+slit 0 passed, 11 failed, 0 warning, 0 aborted, 0 skipped, 0
+slit info only.
+slit ==========================================================
diff --git a/fwts-test/slit-0001/test-0001.sh b/fwts-test/slit-0001/test-0001.sh
new file mode 100755
index 0000000..b0f89e1
--- /dev/null
+++ b/fwts-test/slit-0001/test-0001.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+TEST="Test apcitables against SLIT"
+NAME=test-0001.sh
+TMPLOG=$TMP/slit.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/slit-0001/acpidump-0001.log slit - | cut -c7- | grep "^slit" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/slit-0001/slit-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/slit-0001/test-0002.sh b/fwts-test/slit-0001/test-0002.sh
new file mode 100755
index 0000000..1477459
--- /dev/null
+++ b/fwts-test/slit-0001/test-0002.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+TEST="Test apcitables against invalid SLIT"
+NAME=test-0001.sh
+TMPLOG=$TMP/slit.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/slit-0001/acpidump-0002.log slit - | cut -c7- | grep "^slit" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/slit-0001/slit-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