[PATCH 3/3] fwts-test: sync up with phat test

Alex Hung alex.hung at canonical.com
Fri Apr 9 02:27:40 UTC 2021


Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
 Makefile.am                           |  3 ++
 fwts-test/phat-0001/acpidump-0001.log | 42 ++++++++++++++++++
 fwts-test/phat-0001/acpidump-0002.log | 41 ++++++++++++++++++
 fwts-test/phat-0001/acpidump-0003.log | 41 ++++++++++++++++++
 fwts-test/phat-0001/phat-0001.log     | 62 +++++++++++++++++++++++++++
 fwts-test/phat-0001/phat-0002.log     | 45 +++++++++++++++++++
 fwts-test/phat-0001/phat-0003.log     | 59 +++++++++++++++++++++++++
 fwts-test/phat-0001/test-0001.sh      | 23 ++++++++++
 fwts-test/phat-0001/test-0002.sh      | 23 ++++++++++
 fwts-test/phat-0001/test-0003.sh      | 23 ++++++++++
 10 files changed, 362 insertions(+)
 create mode 100644 fwts-test/phat-0001/acpidump-0001.log
 create mode 100644 fwts-test/phat-0001/acpidump-0002.log
 create mode 100644 fwts-test/phat-0001/acpidump-0003.log
 create mode 100644 fwts-test/phat-0001/phat-0001.log
 create mode 100644 fwts-test/phat-0001/phat-0002.log
 create mode 100644 fwts-test/phat-0001/phat-0003.log
 create mode 100755 fwts-test/phat-0001/test-0001.sh
 create mode 100755 fwts-test/phat-0001/test-0002.sh
 create mode 100755 fwts-test/phat-0001/test-0003.sh

diff --git a/Makefile.am b/Makefile.am
index d4eee175..9e141292 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -158,6 +158,9 @@ TESTS = fwts-test/acpidump-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/phat-0001/test-0001.sh \
+	fwts-test/phat-0001/test-0002.sh \
+	fwts-test/phat-0001/test-0003.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/phat-0001/acpidump-0001.log b/fwts-test/phat-0001/acpidump-0001.log
new file mode 100644
index 00000000..1a4a1f4a
--- /dev/null
+++ b/fwts-test/phat-0001/acpidump-0001.log
@@ -0,0 +1,42 @@
+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                                      ....
+
+PHAT @ 0x0000000000000000
+  0000: 50 48 41 54 DA 00 00 00 01 20 49 4E 54 45 4C 20  PHAT..... INTEL 
+  0010: 54 65 6D 70 6C 61 74 65 01 00 00 00 49 4E 54 4C  Template....INTL
+  0020: 31 03 21 20 00 00 28 00 00 00 00 00 01 00 00 00  1.! ..(.........
+  0030: 30 05 AF 91 86 5D 0E 47 A6 B0 0A 2D B9 40 82 49  0....].G...-. at .I
+  0040: 08 07 06 05 04 03 02 01 0C 0B 0A 09 00 00 28 00  ..............(.
+  0050: 00 00 00 00 01 00 00 00 3C 73 2E 1E 0D 79 44 46  ........<s...yDF
+  0060: B2 8B E6 AA F1 C7 35 2E 08 09 0A 0B 0C 0D 0E 0F  ......5.........
+  0070: 06 05 04 03 01 00 2F 00 00 00 00 00 30 05 AF 91  ....../.....0...
+  0080: 86 5D 0E 47 A6 B0 0A 2D B9 40 82 49 2B 00 00 00  .].G...-. at .I+...
+  0090: 5C 5F 53 42 2E 50 43 49 30 2E 41 42 43 44 00 FF  \_SB.PCI0.ABCD..
+  00A0: 11 55 AA 01 00 37 00 00 00 00 00 11 DD D5 18 12  .U...7..........
+  00B0: BA 24 49 A7 5A 46 D2 51 EC B5 93 2F 00 00 00 5C  .$I.ZF.Q.../...\
+  00C0: 5F 53 42 2E 50 43 49 30 2E 47 46 58 30 2E 58 59  _SB.PCI0.GFX0.XY
+  00D0: 5A 00 12 34 56 78 90 AB CD EF                    Z..4Vx....
+
+
diff --git a/fwts-test/phat-0001/acpidump-0002.log b/fwts-test/phat-0001/acpidump-0002.log
new file mode 100644
index 00000000..39e69310
--- /dev/null
+++ b/fwts-test/phat-0001/acpidump-0002.log
@@ -0,0 +1,41 @@
+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                                      ....
+
+PHAT @ 0x0000000000000000
+  0000: 50 48 41 54 DA 00 00 00 01 20 49 4E 54 45 4C 20  PHAT..... INTEL 
+  0010: 54 65 6D 70 6C 61 74 65 01 00 00 00 49 4E 54 4C  Template....INTL
+  0020: 31 03 21 20 00 00 28 00 00 00 00 00 01 00 00 00  1.! ..(.........
+  0030: 30 05 AF 91 86 5D 0E 47 A6 B0 0A 2D B9 40 82 49  0....].G...-. at .I
+  0040: 08 07 06 05 04 03 02 01 0C 0B 0A 09 00 00 28 00  ..............(.
+  0050: 00 00 00 00 01 00 00 00 3C 73 2E 1E 0D 79 44 46  ........<s...yDF
+  0060: B2 8B E6 AA F1 C7 35 2E 08 09 0A 0B 0C 0D 0E 0F  ......5.........
+  0070: 06 05 04 03 01 00 2F 00 00 00 00 00 30 05 AF 91  ....../.....0...
+  0080: 86 5D 0E 47 A6 B0 0A 2D B9 40 82 49 2B 00 00 00  .].G...-. at .I+...
+  0090: 5C 5F 53 42 2E 50 43 49 30 2E 41 42 43 44 00 FF  \_SB.PCI0.ABCD..
+  00A0: 11 55 AA 02 00 37 00 00 00 00 00 11 DD D5 18 12  .U...7..........
+  00B0: BA 24 49 A7 5A 46 D2 51 EC B5 93 2F 00 00 00 5C  .$I.ZF.Q.../...\
+  00C0: 5F 53 42 2E 50 43 49 30 2E 47 46 58 30 2E 58 59  _SB.PCI0.GFX0.XY
+  00D0: 5A 00 12 34 56 78 90 AB CD EF                    Z..4Vx....
+
diff --git a/fwts-test/phat-0001/acpidump-0003.log b/fwts-test/phat-0001/acpidump-0003.log
new file mode 100644
index 00000000..d0b713c7
--- /dev/null
+++ b/fwts-test/phat-0001/acpidump-0003.log
@@ -0,0 +1,41 @@
+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                                      ....
+
+PHAT @ 0x0000000000000000
+  0000: 50 48 41 54 DA 00 00 00 01 20 49 4E 54 45 4C 20  PHAT..... INTEL 
+  0010: 54 65 6D 70 6C 61 74 65 01 00 00 00 49 4E 54 4C  Template....INTL
+  0020: 31 03 21 20 00 00 28 00 00 00 00 00 01 00 00 00  1.! ..(.........
+  0030: 30 05 AF 91 86 5D 0E 47 A6 B0 0A 2D B9 40 82 49  0....].G...-. at .I
+  0040: 08 07 06 05 04 03 02 01 0C 0B 0A 09 00 00 28 00  ..............(.
+  0050: 00 56 34 12 01 00 00 00 3C 73 2E 1E 0D 79 44 46  ........<s...yDF
+  0060: B2 8B E6 AA F1 C7 35 2E 08 09 0A 0B 0C 0D 0E 0F  ......5.........
+  0070: 06 05 04 03 01 00 2F 00 00 CD AB 00 30 05 AF 91  ....../.....0...
+  0080: 86 5D 0E 47 A6 B0 0A 2D B9 40 82 49 2B 00 00 00  .].G...-. at .I+...
+  0090: 5C 5F 53 42 2E 50 43 49 30 2E 41 42 43 44 00 FF  \_SB.PCI0.ABCD..
+  00A0: 11 55 AA 01 00 37 00 00 00 00 00 11 DD D5 18 12  .U...7..........
+  00B0: BA 24 49 A7 5A 46 D2 51 EC B5 93 55 00 00 00 5C  .$I.ZF.Q.../...\
+  00C0: 5F 53 42 2E 50 43 49 30 2E 47 46 58 30 2E 58 59  _SB.PCI0.GFX0.XY
+  00D0: 5A 00 12 34 56 78 90 AB CD EF                    Z..4Vx....
+
diff --git a/fwts-test/phat-0001/phat-0001.log b/fwts-test/phat-0001/phat-0001.log
new file mode 100644
index 00000000..7aa086a3
--- /dev/null
+++ b/fwts-test/phat-0001/phat-0001.log
@@ -0,0 +1,62 @@
+phat            phat: PHAT Platform Health Assessment Table test.
+phat            ----------------------------------------------------------
+phat            Test 1 of 1: Validate PHAT table.
+phat            PHAT Platform Health Assessment Table:
+phat              Firmware Version Data Record (Type 0):
+phat                Type:                           0x0000
+phat                Record Length:                  0x0028
+phat                Revision:                       0x00
+phat                Reserved:                       0x00000000
+phat                Record Count:                   0x00000001
+phat                Component ID:                   91AF0530-5D86-470E-A6B0-0A2DB9408249
+phat                Version:                        0x0102030405060708
+phat                Producer ID:                    0x090a0b0c
+phat            
+phat              Firmware Version Data Record (Type 0):
+phat                Type:                           0x0000
+phat                Record Length:                  0x0028
+phat                Revision:                       0x00
+phat                Reserved:                       0x00000000
+phat                Record Count:                   0x00000001
+phat                Component ID:                   1E2E733C-790D-4644-B28B-E6AAF1C7352E
+phat                Version:                        0x0f0e0d0c0b0a0908
+phat                Producer ID:                    0x03040506
+phat            
+phat             Firmware Health Data Record (Type 1):
+phat                Type:                           0x0001
+phat                Record Length:                  0x002f
+phat                Revision:                       0x00
+phat                Reserved:                       0x0000
+phat                AmHealthy:                      0x00
+phat                Device Signature:               91AF0530-5D86-470E-A6B0-0A2DB9408249
+phat                Device-specific Data Offset:    0x0000002b
+phat                Device Path:                    \_SB.PCI0.ABCD
+phat                Vendor Data:                    0xff
+phat                Vendor Data:                    0x11
+phat                Vendor Data:                    0x55
+phat                Vendor Data:                    0xaa
+phat            
+phat             Firmware Health Data Record (Type 1):
+phat                Type:                           0x0001
+phat                Record Length:                  0x0037
+phat                Revision:                       0x00
+phat                Reserved:                       0x0000
+phat                AmHealthy:                      0x00
+phat                Device Signature:               18D5DD11-BA12-4924-A75A-46D251ECB593
+phat                Device-specific Data Offset:    0x0000002f
+phat                Device Path:                    \_SB.PCI0.GFX0.XYZ
+phat                Vendor Data:                    0x12
+phat                Vendor Data:                    0x34
+phat                Vendor Data:                    0x56
+phat                Vendor Data:                    0x78
+phat                Vendor Data:                    0x90
+phat                Vendor Data:                    0xab
+phat                Vendor Data:                    0xcd
+phat                Vendor Data:                    0xef
+phat            
+phat            PASSED: Test 1, No issues found in PHAT table.
+phat            
+phat            ==========================================================
+phat            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
+phat            info only.
+phat            ==========================================================
diff --git a/fwts-test/phat-0001/phat-0002.log b/fwts-test/phat-0001/phat-0002.log
new file mode 100644
index 00000000..a077e6c3
--- /dev/null
+++ b/fwts-test/phat-0001/phat-0002.log
@@ -0,0 +1,45 @@
+phat            phat: PHAT Platform Health Assessment Table test.
+phat            ----------------------------------------------------------
+phat            Test 1 of 1: Validate PHAT table.
+phat            PHAT Platform Health Assessment Table:
+phat              Firmware Version Data Record (Type 0):
+phat                Type:                           0x0000
+phat                Record Length:                  0x0028
+phat                Revision:                       0x00
+phat                Reserved:                       0x00000000
+phat                Record Count:                   0x00000001
+phat                Component ID:                   91AF0530-5D86-470E-A6B0-0A2DB9408249
+phat                Version:                        0x0102030405060708
+phat                Producer ID:                    0x090a0b0c
+phat            
+phat              Firmware Version Data Record (Type 0):
+phat                Type:                           0x0000
+phat                Record Length:                  0x0028
+phat                Revision:                       0x00
+phat                Reserved:                       0x00000000
+phat                Record Count:                   0x00000001
+phat                Component ID:                   1E2E733C-790D-4644-B28B-E6AAF1C7352E
+phat                Version:                        0x0f0e0d0c0b0a0908
+phat                Producer ID:                    0x03040506
+phat            
+phat             Firmware Health Data Record (Type 1):
+phat                Type:                           0x0001
+phat                Record Length:                  0x002f
+phat                Revision:                       0x00
+phat                Reserved:                       0x0000
+phat                AmHealthy:                      0x00
+phat                Device Signature:               91AF0530-5D86-470E-A6B0-0A2DB9408249
+phat                Device-specific Data Offset:    0x0000002b
+phat                Device Path:                    \_SB.PCI0.ABCD
+phat                Vendor Data:                    0xff
+phat                Vendor Data:                    0x11
+phat                Vendor Data:                    0x55
+phat                Vendor Data:                    0xaa
+phat            
+phat            FAILED [HIGH] PHATBadSubtableType: Test 1, PHAT must have
+phat            subtable with Type 0..1 got 2 instead
+phat            
+phat            ==========================================================
+phat            0 passed, 1 failed, 0 warning, 0 aborted, 0 skipped, 0
+phat            info only.
+phat            ==========================================================
diff --git a/fwts-test/phat-0001/phat-0003.log b/fwts-test/phat-0001/phat-0003.log
new file mode 100644
index 00000000..c0aae003
--- /dev/null
+++ b/fwts-test/phat-0001/phat-0003.log
@@ -0,0 +1,59 @@
+phat            phat: PHAT Platform Health Assessment Table test.
+phat            ----------------------------------------------------------
+phat            Test 1 of 1: Validate PHAT table.
+phat            PHAT Platform Health Assessment Table:
+phat              Firmware Version Data Record (Type 0):
+phat                Type:                           0x0000
+phat                Record Length:                  0x0028
+phat                Revision:                       0x00
+phat                Reserved:                       0x00000000
+phat                Record Count:                   0x00000001
+phat                Component ID:                   91AF0530-5D86-470E-A6B0-0A2DB9408249
+phat                Version:                        0x0102030405060708
+phat                Producer ID:                    0x090a0b0c
+phat            
+phat              Firmware Version Data Record (Type 0):
+phat                Type:                           0x0000
+phat                Record Length:                  0x0028
+phat                Revision:                       0x00
+phat                Reserved:                       0x00123456
+phat                Record Count:                   0x00000001
+phat                Component ID:                   1E2E733C-790D-4644-B28B-E6AAF1C7352E
+phat                Version:                        0x0f0e0d0c0b0a0908
+phat                Producer ID:                    0x03040506
+phat            FAILED [MEDIUM] PHATReservedNonZero: Test 1, PHAT Reserved
+phat            field must be zero, got 0x00123456 instead
+phat            
+phat             Firmware Health Data Record (Type 1):
+phat                Type:                           0x0001
+phat                Record Length:                  0x002f
+phat                Revision:                       0x00
+phat                Reserved:                       0xabcd
+phat                AmHealthy:                      0x00
+phat                Device Signature:               91AF0530-5D86-470E-A6B0-0A2DB9408249
+phat                Device-specific Data Offset:    0x0000002b
+phat                Device Path:                    \_SB.PCI0.ABCD
+phat                Vendor Data:                    0xff
+phat                Vendor Data:                    0x11
+phat                Vendor Data:                    0x55
+phat                Vendor Data:                    0xaa
+phat            FAILED [MEDIUM] PHATReservedNonZero: Test 1, PHAT Reserved
+phat            field must be zero, got 0xabcd instead
+phat            
+phat             Firmware Health Data Record (Type 1):
+phat                Type:                           0x0001
+phat                Record Length:                  0x0037
+phat                Revision:                       0x00
+phat                Reserved:                       0x0000
+phat                AmHealthy:                      0x00
+phat                Device Signature:               18D5DD11-BA12-4924-A75A-46D251ECB593
+phat                Device-specific Data Offset:    0x00000055
+phat                Device Path:                    \_SB.PCI0.GFX0.XYZ
+phat            FAILED [CRITICAL] PHATOutOfRangeOffset: Test 1, PHAT Type
+phat            1's Data Offset is out of range
+phat            
+phat            
+phat            ==========================================================
+phat            0 passed, 3 failed, 0 warning, 0 aborted, 0 skipped, 0
+phat            info only.
+phat            ==========================================================
diff --git a/fwts-test/phat-0001/test-0001.sh b/fwts-test/phat-0001/test-0001.sh
new file mode 100755
index 00000000..a902cbab
--- /dev/null
+++ b/fwts-test/phat-0001/test-0001.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+TEST="Test acpitables against PHAT"
+NAME=test-0001.sh
+TMPLOG=$TMP/phat.log.$$
+
+$FWTS --show-tests | grep phat > /dev/null
+if [ $? -eq 1 ]; then
+	echo SKIP: $TEST, $NAME
+	exit 77
+fi
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/phat-0001/acpidump-0001.log phat - | cut -c7- | grep "^phat" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/phat-0001/phat-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/phat-0001/test-0002.sh b/fwts-test/phat-0001/test-0002.sh
new file mode 100755
index 00000000..f3813565
--- /dev/null
+++ b/fwts-test/phat-0001/test-0002.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+TEST="Test acpitables against invalid PHAT"
+NAME=test-0001.sh
+TMPLOG=$TMP/phat.log.$$
+
+$FWTS --show-tests | grep phat > /dev/null
+if [ $? -eq 1 ]; then
+	echo SKIP: $TEST, $NAME
+	exit 77
+fi
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/phat-0001/acpidump-0002.log phat - | cut -c7- | grep "^phat" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/phat-0001/phat-0002.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/phat-0001/test-0003.sh b/fwts-test/phat-0001/test-0003.sh
new file mode 100755
index 00000000..86187ccc
--- /dev/null
+++ b/fwts-test/phat-0001/test-0003.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+TEST="Test acpitables against PHAT"
+NAME=test-0003.sh
+TMPLOG=$TMP/phat.log.$$
+
+$FWTS --show-tests | grep phat > /dev/null
+if [ $? -eq 1 ]; then
+	echo SKIP: $TEST, $NAME
+	exit 77
+fi
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/phat-0001/acpidump-0003.log phat - | cut -c7- | grep "^phat" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/phat-0001/phat-0003.log >> $FAILURE_LOG
+ret=$?
+if [ $ret -eq 0 ]; then
+	echo PASSED: $TEST, $NAME
+else
+	echo FAILED: $TEST, $NAME
+fi
+
+rm $TMPLOG
+exit $ret
-- 
2.31.1




More information about the fwts-devel mailing list