[PATCH 2/2] fwts-test: Add regression test for NFIT
Alex Hung
alex.hung at canonical.com
Wed Jul 27 10:48:05 UTC 2016
Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
Makefile.am | 2 +
fwts-test/nfit-0001/acpidump-0001.log | 51 +++++++++++++
fwts-test/nfit-0001/acpidump-0002.log | 52 +++++++++++++
fwts-test/nfit-0001/nfit-0001.log | 101 +++++++++++++++++++++++++
fwts-test/nfit-0001/nfit-0002.log | 136 ++++++++++++++++++++++++++++++++++
fwts-test/nfit-0001/test-0001.sh | 23 ++++++
fwts-test/nfit-0001/test-0002.sh | 23 ++++++
7 files changed, 388 insertions(+)
create mode 100644 fwts-test/nfit-0001/acpidump-0001.log
create mode 100644 fwts-test/nfit-0001/acpidump-0002.log
create mode 100644 fwts-test/nfit-0001/nfit-0001.log
create mode 100644 fwts-test/nfit-0001/nfit-0002.log
create mode 100755 fwts-test/nfit-0001/test-0001.sh
create mode 100755 fwts-test/nfit-0001/test-0002.sh
diff --git a/Makefile.am b/Makefile.am
index 7425d4f..abff598 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -97,6 +97,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
fwts-test/msdm-0001/test-0001.sh \
fwts-test/msdm-0001/test-0002.sh \
fwts-test/method-0001/test-0001.sh \
+ fwts-test/nfit-0001/test-0001.sh \
+ fwts-test/nfit-0001/test-0002.sh \
fwts-test/oops-0001/test-0001.sh \
fwts-test/oops-0001/test-0002.sh \
fwts-test/oops-0001/test-0003.sh \
diff --git a/fwts-test/nfit-0001/acpidump-0001.log b/fwts-test/nfit-0001/acpidump-0001.log
new file mode 100644
index 0000000..a99df62
--- /dev/null
+++ b/fwts-test/nfit-0001/acpidump-0001.log
@@ -0,0 +1,51 @@
+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 ....
+
+NFIT @ 0x00000000
+ 0000: 4e 46 49 54 70 01 00 00 01 35 49 4e 54 45 4c 20 NFITp....5INTEL
+ 0010: 54 65 6d 70 6c 61 74 65 01 00 00 00 49 4e 54 4c Template....INTL
+ 0020: 27 05 16 20 00 00 00 00 00 00 38 00 01 00 00 00 '.. ......8.....
+ 0030: 00 00 00 00 00 00 00 00 30 05 af 91 86 5d 0e 47 ........0....].G
+ 0040: a6 b0 0a 2d b9 40 82 49 00 00 00 7c 03 00 00 00 ...-. at .I...|....
+ 0050: 00 00 00 0c 00 00 00 00 08 00 00 00 00 00 00 00 ................
+ 0060: 01 00 30 00 01 00 00 00 04 00 00 00 01 00 01 00 ..0.............
+ 0070: 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0080: 00 00 00 08 00 00 00 00 01 00 03 00 2a 00 00 00 ............*...
+ 0090: 02 00 20 00 01 00 00 00 04 00 00 00 00 01 00 00 .. .............
+ 00a0: 00 00 00 00 00 02 00 00 00 05 00 00 00 10 00 00 ................
+ 00b0: 03 00 28 00 00 00 00 00 b4 13 5d 40 91 0b 29 93 ..(.......]@..).
+ 00c0: 67 e8 23 4c 00 00 00 88 00 11 22 33 44 55 66 77 g.#L......"3DUfw
+ 00d0: 88 99 aa bb cc dd ee ff 04 00 50 00 01 00 86 80 ..........P.....
+ 00e0: 17 20 01 00 86 80 17 20 01 00 00 00 00 00 00 00 . ..... ........
+ 00f0: 89 00 54 76 01 03 00 01 00 20 00 00 00 00 00 00 ..Tv..... ......
+ 0100: 00 00 80 00 00 00 00 00 08 00 00 00 00 00 00 00 ................
+ 0110: 00 10 80 00 00 00 00 00 04 00 00 00 00 00 00 00 ................
+ 0120: 00 00 00 00 00 00 00 00 05 00 28 00 01 00 00 01 ..........(.....
+ 0130: 00 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 ......... ......
+ 0140: 00 00 00 e0 0f 00 00 00 00 00 00 10 00 00 00 00 ................
+ 0150: 06 00 20 00 01 00 00 00 02 00 00 00 00 00 00 00 .. .............
+ 0160: 00 00 00 18 04 00 00 00 00 00 00 18 06 00 00 00 ................
+
+
diff --git a/fwts-test/nfit-0001/acpidump-0002.log b/fwts-test/nfit-0001/acpidump-0002.log
new file mode 100644
index 0000000..3bfce2c
--- /dev/null
+++ b/fwts-test/nfit-0001/acpidump-0002.log
@@ -0,0 +1,52 @@
+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 ....
+
+NFIT @ 0x00000000
+ 0000: 4e 46 49 54 70 01 00 00 01 33 49 4e 54 45 4c 20 NFITp....3INTEL
+ 0010: 54 65 6d 70 6c 61 74 65 01 00 00 00 49 4e 54 4c Template....INTL
+ 0020: 27 05 16 20 00 00 00 05 00 00 38 00 00 00 05 00 '.. ......8.....
+ 0030: 0F 00 00 00 00 00 00 00 30 05 af 91 86 5d 0e 47 ........0....].G
+ 0040: a6 b0 0a 2d b9 40 82 49 00 00 00 7c 03 00 00 00 ...-. at .I...|....
+ 0050: 00 00 00 0c 00 00 00 00 FF 00 00 00 00 00 00 00 ................
+ 0060: 01 00 30 00 01 00 00 00 04 00 00 00 01 00 01 00 ..0.............
+ 0070: 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0080: 00 00 00 08 00 00 00 00 01 00 03 00 fa 00 00 00 ............*...
+ 0090: 02 00 20 00 01 00 00 00 04 00 00 00 00 01 00 00 .. .............
+ 00a0: 00 00 00 00 10 02 00 00 20 05 00 00 30 10 00 00 ................
+ 00b0: 03 00 28 00 00 00 00 00 b4 13 5d 40 91 0b 29 93 ..(.......]@..).
+ 00c0: 67 e8 23 4c 00 00 00 88 00 11 22 33 44 55 66 77 g.#L......"3DUfw
+ 00d0: 88 99 aa bb cc dd ee ff 04 00 50 00 01 00 86 80 ..........P.....
+ 00e0: 17 20 01 55 86 80 17 20 01 AA 03 00 00 00 00 0F . ..... ........
+ 00f0: 89 00 54 76 01 03 00 01 00 20 00 00 00 00 00 00 ..Tv..... ......
+ 0100: 00 00 80 00 00 00 00 00 08 00 00 00 00 00 00 00 ................
+ 0110: 00 10 80 00 00 00 00 00 04 00 00 00 00 00 00 00 ................
+ 0120: 03 00 00 00 00 00 00 00 05 00 28 00 00 00 00 01 ..........(.....
+ 0130: 00 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 ......... ......
+ 0140: 00 00 00 e0 0f 00 00 00 00 00 00 10 00 00 00 00 ................
+ 0150: 06 00 20 00 01 00 00 00 02 00 F0 00 00 00 00 00 .. .............
+ 0160: 00 00 00 18 04 00 00 00 00 00 00 18 06 00 00 00 ................
+
+
+
diff --git a/fwts-test/nfit-0001/nfit-0001.log b/fwts-test/nfit-0001/nfit-0001.log
new file mode 100644
index 0000000..9470917
--- /dev/null
+++ b/fwts-test/nfit-0001/nfit-0001.log
@@ -0,0 +1,101 @@
+nfit nfit: NFIT NVDIMM Firmware Interface Table test.
+nfit ----------------------------------------------------------
+nfit Test 1 of 1: NFIT NVDIMM Firmware Interface Table test.
+nfit NFIT NVDIMM Firmware Interface Table:
+nfit Reserved: 0x00000000
+nfit
+nfit NFIT Subtable:
+nfit Type: 0x0000
+nfit Length: 0x0038
+nfit SPA Range Structure Index: 0x0001
+nfit Flags: 0x0000
+nfit Reserved: 0x00000000
+nfit Proximity Domain: 0x00000000
+nfit Address Range Type GUID: 91AF0530-5D86-470E-A6B0-0A2DB9408249
+nfit System Physical Address Range Base: 0x000000037c000000
+nfit System Physical Address Range Length: 0x000000000c000000
+nfit Address Range Memory Mapping Attribute: 0x0000000000000008
+nfit
+nfit NFIT Subtable:
+nfit Type: 0x0001
+nfit Length: 0x0030
+nfit NFIT Device Handle: 0x00000001
+nfit NVDIMM Physical ID: 0x0004
+nfit NVDIMM Region ID: 0x0000
+nfit SPA Range Structure Index: 0x0001
+nfit NVDIMM Control Region Structure Index: 0x0001
+nfit NVDIMM Region Size: 0x0000000004000000
+nfit Region Offset: 0x0000000000000000
+nfit NVDIMM Physical Address Region Base: 0x0000000008000000
+nfit Interleave Structure Index: 0x0001
+nfit Interleave Ways: 0x0003
+nfit NVDIMM State Flags: 0x002a
+nfit Reserved: 0x0000
+nfit
+nfit NFIT Subtable:
+nfit Type: 0x0002
+nfit Length: 0x0020
+nfit Interleave Structure Index: 0x0001
+nfit Reserved: 0x0000
+nfit Number of Lines Described: 0x00000004
+nfit Line Size: 0x00000100
+nfit Line Offset: 0x00000000
+nfit Line Offset: 0x00000200
+nfit Line Offset: 0x00000500
+nfit Line Offset: 0x00001000
+nfit
+nfit NFIT Subtable:
+nfit Type: 0x0003
+nfit Length: 0x0028
+nfit Reserved: 0x00000000
+nfit
+nfit NFIT Subtable:
+nfit Type: 0x0004
+nfit Length: 0x0050
+nfit NVDIMM Control Region Structure Index: 0x0001
+nfit Vendor ID: 0x8086
+nfit Device ID: 0x2017
+nfit Revision ID: 0x0001
+nfit Subsystem Vendor ID: 0x8086
+nfit Subsystem Device ID: 0x2017
+nfit Subsystem Revision ID: 0x0001
+nfit Valid Fields: 0x00
+nfit Manufacturing Location: 0x00
+nfit Manufacturing Date: 0x0000
+nfit Reserved: 0x0000
+nfit Serial Number: 0x76540089
+nfit Region Format Interface Code: 0x0301
+nfit Number of Block Control Windows: 0x0100
+nfit Size of Block Control Window: 0x0000000000002000
+nfit Command Register Offset: 0x0000000000800000
+nfit Size of Command Register: 0x0000000000000008
+nfit Status RegisterOffset: 0x0000000000801000
+nfit Size of Status Register: 0x0000000000000004
+nfit NVDIMM Control Region Flag: 0x0000
+nfit Reserved: 0x0000000000000000
+nfit
+nfit NFIT Subtable:
+nfit Type: 0x0005
+nfit Length: 0x0028
+nfit NVDIMM Control Region Structure Index: 0x0001
+nfit Number of Block Data Windows: 0x0100
+nfit Block Data Window Start Offset: 0x0000000000000000
+nfit Size of Block Data Window: 0x0000000000002000
+nfit NBlock Accessible Memory Capacity: 0x0000000fe0000000
+nfit Beginning address of First Block: 0x0000000010000000
+nfit
+nfit NFIT Subtable:
+nfit Type: 0x0006
+nfit Length: 0x0020
+nfit NFIT Device Handle: 0x00000001
+nfit Number of Flush Hint Addresses: 0x0002
+nfit Reserved: 0x0000000000000000
+nfit Flush Hint Address: 0x0000000418000000
+nfit Flush Hint Address: 0x0000000618000000
+nfit
+nfit PASSED: Test 1, No issues found in NFIT table.
+nfit
+nfit ==========================================================
+nfit 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
+nfit info only.
+nfit ==========================================================
diff --git a/fwts-test/nfit-0001/nfit-0002.log b/fwts-test/nfit-0001/nfit-0002.log
new file mode 100644
index 0000000..47be360
--- /dev/null
+++ b/fwts-test/nfit-0001/nfit-0002.log
@@ -0,0 +1,136 @@
+nfit nfit: NFIT NVDIMM Firmware Interface Table test.
+nfit ----------------------------------------------------------
+nfit Test 1 of 1: NFIT NVDIMM Firmware Interface Table test.
+nfit NFIT NVDIMM Firmware Interface Table:
+nfit Reserved: 0x05000000
+nfit
+nfit FAILED [LOW] NFITReservedNonZero: Test 1, NFIT reserved
+nfit field must be zero, got 0x05000000 instead
+nfit NFIT Subtable:
+nfit Type: 0x0000
+nfit Length: 0x0038
+nfit SPA Range Structure Index: 0x0000
+nfit Flags: 0x0005
+nfit Reserved: 0x0000000f
+nfit Proximity Domain: 0x00000000
+nfit Address Range Type GUID: 91AF0530-5D86-470E-A6B0-0A2DB9408249
+nfit System Physical Address Range Base: 0x000000037c000000
+nfit System Physical Address Range Length: 0x000000000c000000
+nfit Address Range Memory Mapping Attribute: 0x00000000000000ff
+nfit FAILED [HIGH] NFITBadRangeIndexZero: Test 1, NFIT SPA
+nfit Range Structure Index must not be zero
+nfit FAILED [HIGH] NFITBadFlags: Test 1, NFIT Flags's
+nfit Bits[15..2] must be zero, got 0x00000005 instead
+nfit FAILED [HIGH] NFITBadMemoryMappingAttribute: Test 1, NFIT
+nfit Memory Mapping Attribute must meet UEFI Spec, got
+nfit 0x00000000000000ff instead
+nfit FAILED [LOW] NFITReservedNonZero: Test 1, NFIT reserved
+nfit field must be zero, got 0x000000000000000f instead
+nfit
+nfit NFIT Subtable:
+nfit Type: 0x0001
+nfit Length: 0x0030
+nfit NFIT Device Handle: 0x00000001
+nfit NVDIMM Physical ID: 0x0004
+nfit NVDIMM Region ID: 0x0000
+nfit SPA Range Structure Index: 0x0001
+nfit NVDIMM Control Region Structure Index: 0x0001
+nfit NVDIMM Region Size: 0x0000000004000000
+nfit Region Offset: 0x0000000000000000
+nfit NVDIMM Physical Address Region Base: 0x0000000008000000
+nfit Interleave Structure Index: 0x0001
+nfit Interleave Ways: 0x0003
+nfit NVDIMM State Flags: 0x00fa
+nfit Reserved: 0x0000
+nfit FAILED [HIGH] NFITBadFlags: Test 1, NFIT Flags's
+nfit Bits[15..7] must be zero, got 0x000000fa instead
+nfit
+nfit NFIT Subtable:
+nfit Type: 0x0002
+nfit Length: 0x0020
+nfit Interleave Structure Index: 0x0001
+nfit Reserved: 0x0000
+nfit Number of Lines Described: 0x00000004
+nfit Line Size: 0x00000100
+nfit Line Offset: 0x00000000
+nfit Line Offset: 0x00000210
+nfit FAILED [HIGH] NFITBadLineOffsetAlignment: Test 1, NFIT
+nfit Line Offset must be aligned nfit_struct->line_size, got
+nfit 0x00000210 instead
+nfit Line Offset: 0x00000520
+nfit FAILED [HIGH] NFITBadLineOffsetAlignment: Test 1, NFIT
+nfit Line Offset must be aligned nfit_struct->line_size, got
+nfit 0x00000520 instead
+nfit Line Offset: 0x00001030
+nfit FAILED [HIGH] NFITBadLineOffsetAlignment: Test 1, NFIT
+nfit Line Offset must be aligned nfit_struct->line_size, got
+nfit 0x00001030 instead
+nfit
+nfit NFIT Subtable:
+nfit Type: 0x0003
+nfit Length: 0x0028
+nfit Reserved: 0x00000000
+nfit
+nfit NFIT Subtable:
+nfit Type: 0x0004
+nfit Length: 0x0050
+nfit NVDIMM Control Region Structure Index: 0x0001
+nfit Vendor ID: 0x8086
+nfit Device ID: 0x2017
+nfit Revision ID: 0x5501
+nfit Subsystem Vendor ID: 0x8086
+nfit Subsystem Device ID: 0x2017
+nfit Subsystem Revision ID: 0xaa01
+nfit Valid Fields: 0x03
+nfit Manufacturing Location: 0x00
+nfit Manufacturing Date: 0x0000
+nfit Reserved: 0x0f00
+nfit Serial Number: 0x76540089
+nfit Region Format Interface Code: 0x0301
+nfit Number of Block Control Windows: 0x0100
+nfit Size of Block Control Window: 0x0000000000002000
+nfit Command Register Offset: 0x0000000000800000
+nfit Size of Command Register: 0x0000000000000008
+nfit Status RegisterOffset: 0x0000000000801000
+nfit Size of Status Register: 0x0000000000000004
+nfit NVDIMM Control Region Flag: 0x0003
+nfit Reserved: 0x0000000000000000
+nfit FAILED [HIGH] NFITBadRevisionId: Test 1, NFIT Revision
+nfit ID's BYTE 1 must be zero, got 0x5501 instead
+nfit FAILED [HIGH] NFITBadRevisionId: Test 1, NFIT Subsystem
+nfit Revision ID's BYTE 1 must be zero, got 0xaa01 instead
+nfit FAILED [HIGH] NFITBadValidField: Test 1, NFIT Valid
+nfit Field's Bits[7..1] must be zero, got 0x03 instead
+nfit FAILED [HIGH] NFITBadFlags: Test 1, NFIT Flags's
+nfit Bits[15..1] must be zero, got 0x0003 instead
+nfit FAILED [LOW] NFITReservedNonZero: Test 1, NFIT reserved
+nfit field must be zero, got 0x0000000000000f00 instead
+nfit
+nfit NFIT Subtable:
+nfit Type: 0x0005
+nfit Length: 0x0028
+nfit NVDIMM Control Region Structure Index: 0x0000
+nfit Number of Block Data Windows: 0x0100
+nfit Block Data Window Start Offset: 0x0000000000000000
+nfit Size of Block Data Window: 0x0000000000002000
+nfit NBlock Accessible Memory Capacity: 0x0000000fe0000000
+nfit Beginning address of First Block: 0x0000000010000000
+nfit FAILED [HIGH] NFITBadRegionIndex: Test 1, NFIT NVDIMM
+nfit Control Region Structure Index must not be zero
+nfit
+nfit NFIT Subtable:
+nfit Type: 0x0006
+nfit Length: 0x0020
+nfit NFIT Device Handle: 0x00000001
+nfit Number of Flush Hint Addresses: 0x0002
+nfit Reserved: 0x00000000000000f0
+nfit Flush Hint Address: 0x0000000418000000
+nfit Flush Hint Address: 0x0000000618000000
+nfit FAILED [LOW] NFITReservedNonZero: Test 1, NFIT reserved
+nfit field must be zero, got 0x00000000000000f0 instead
+nfit
+nfit
+nfit ==========================================================
+nfit 0 passed, 16 failed, 0 warning, 0 aborted, 0 skipped, 0
+nfit info only.
+nfit ==========================================================
diff --git a/fwts-test/nfit-0001/test-0001.sh b/fwts-test/nfit-0001/test-0001.sh
new file mode 100755
index 0000000..0ae8fb6
--- /dev/null
+++ b/fwts-test/nfit-0001/test-0001.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+TEST="Test apcitables against NFIT"
+NAME=test-0001.sh
+TMPLOG=$TMP/nfit.log.$$
+
+$FWTS --show-tests | grep nfit > /dev/null
+if [ $? -eq 1 ]; then
+ echo SKIP: $TEST, $NAME
+ exit 77
+fi
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/nfit-0001/acpidump-0001.log nfit - | cut -c7- | grep "^nfit" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/nfit-0001/nfit-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/nfit-0001/test-0002.sh b/fwts-test/nfit-0001/test-0002.sh
new file mode 100755
index 0000000..b4f61fb
--- /dev/null
+++ b/fwts-test/nfit-0001/test-0002.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+TEST="Test apcitables against invalid NFIT"
+NAME=test-0001.sh
+TMPLOG=$TMP/nfit.log.$$
+
+$FWTS --show-tests | grep nfit > /dev/null
+if [ $? -eq 1 ]; then
+ echo SKIP: $TEST, $NAME
+ exit 77
+fi
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/nfit-0001/acpidump-0002.log nfit - | cut -c7- | grep "^nfit" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/nfit-0001/nfit-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