diff mbox

[27/30] fwts-test: Add SRAT test

Message ID 1434617382-9980-28-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King June 18, 2015, 8:49 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Add two tests, one to check for a valid SRAT and another to check
an invalid SRAT

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 Makefile.am                           |   2 +
 fwts-test/srat-0001/acpidump-0001.log |  41 ++++++++++++++
 fwts-test/srat-0001/acpidump-0002.log |  41 ++++++++++++++
 fwts-test/srat-0001/srat-0001.log     |  90 ++++++++++++++++++++++++++++++
 fwts-test/srat-0001/srat-0002.log     | 100 ++++++++++++++++++++++++++++++++++
 fwts-test/srat-0001/test-0001.sh      |  17 ++++++
 fwts-test/srat-0001/test-0002.sh      |  17 ++++++
 7 files changed, 308 insertions(+)
 create mode 100644 fwts-test/srat-0001/acpidump-0001.log
 create mode 100644 fwts-test/srat-0001/acpidump-0002.log
 create mode 100644 fwts-test/srat-0001/srat-0001.log
 create mode 100644 fwts-test/srat-0001/srat-0002.log
 create mode 100755 fwts-test/srat-0001/test-0001.sh
 create mode 100755 fwts-test/srat-0001/test-0002.sh

Comments

Alex Hung June 23, 2015, 6:02 a.m. UTC | #1
On 06/18/2015 04:49 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Add two tests, one to check for a valid SRAT and another to check
> an invalid SRAT
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu June 24, 2015, 6:59 a.m. UTC | #2
On 2015年06月18日 16:49, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Add two tests, one to check for a valid SRAT and another to check
> an invalid SRAT
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   Makefile.am                           |   2 +
>   fwts-test/srat-0001/acpidump-0001.log |  41 ++++++++++++++
>   fwts-test/srat-0001/acpidump-0002.log |  41 ++++++++++++++
>   fwts-test/srat-0001/srat-0001.log     |  90 ++++++++++++++++++++++++++++++
>   fwts-test/srat-0001/srat-0002.log     | 100 ++++++++++++++++++++++++++++++++++
>   fwts-test/srat-0001/test-0001.sh      |  17 ++++++
>   fwts-test/srat-0001/test-0002.sh      |  17 ++++++
>   7 files changed, 308 insertions(+)
>   create mode 100644 fwts-test/srat-0001/acpidump-0001.log
>   create mode 100644 fwts-test/srat-0001/acpidump-0002.log
>   create mode 100644 fwts-test/srat-0001/srat-0001.log
>   create mode 100644 fwts-test/srat-0001/srat-0002.log
>   create mode 100755 fwts-test/srat-0001/test-0001.sh
>   create mode 100755 fwts-test/srat-0001/test-0002.sh
>
> diff --git a/Makefile.am b/Makefile.am
> index 0315f0b..e53da9a 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -86,6 +86,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
>   	fwts-test/rsdt-0001/test-0001.sh \
>   	fwts-test/sbst-0001/test-0001.sh \
>   	fwts-test/sbst-0001/test-0002.sh \
> +	fwts-test/srat-0001/test-0001.sh \
> +	fwts-test/srat-0001/test-0002.sh \
>   	fwts-test/syntaxcheck-0001/test-0001.sh \
>   	fwts-test/wmi-0001/test-0001.sh \
>   	fwts-test/wmi-0001/test-0002.sh \
> diff --git a/fwts-test/srat-0001/acpidump-0001.log b/fwts-test/srat-0001/acpidump-0001.log
> new file mode 100644
> index 0000000..f9d41dc
> --- /dev/null
> +++ b/fwts-test/srat-0001/acpidump-0001.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@...........
> +  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  . ...........@..
> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
> +  00f0: 00 00 00 00                                      ....
> +
> +SRAT @ 0x00000000
> +  0000: 53 52 41 54 e8 00 00 00 03 9e 41 4d 44 20 20 20  SRAT......AMD
> +  0010: 46 41 4d 5f 46 5f 31 30 02 00 00 00 41 4d 44 20  FAM_F_10....AMD
> +  0020: 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0030: 00 10 00 00 01 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0040: 00 10 00 01 01 00 00 00 00 00 00 00 01 00 00 00  ................
> +  0050: 00 10 00 02 01 00 00 00 00 00 00 00 02 00 00 00  ................
> +  0060: 00 10 00 03 01 00 00 00 00 00 00 00 03 00 00 00  ................
> +  0070: 01 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00  .(..............
> +  0080: 00 00 0a 00 00 00 00 00 01 00 00 00 01 00 00 00  ................
> +  0090: 00 00 00 00 00 00 00 00 01 28 00 00 00 00 00 00  .........(......
> +  00a0: 00 00 10 00 00 00 00 00 00 00 f0 cf 00 00 00 00  ................
> +  00b0: 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00  ................
> +  00c0: 01 28 00 00 00 00 00 00 00 00 00 00 01 00 00 00  .(..............
> +  00d0: 00 00 00 30 01 00 00 00 01 00 00 00 01 00 00 00  ...0............
> +  00e0: 00 00 00 00 00 00 00 00
> diff --git a/fwts-test/srat-0001/acpidump-0002.log b/fwts-test/srat-0001/acpidump-0002.log
> new file mode 100644
> index 0000000..dca9504
> --- /dev/null
> +++ b/fwts-test/srat-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@...........
> +  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  . ...........@..
> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
> +  00f0: 00 00 00 00                                      ....
> +
> +SRAT @ 0x00000000
> +  0000: 53 52 41 54 e8 00 00 00 03 9e 41 4d 44 20 20 20  SRAT......AMD
> +  0010: 46 41 4d 5f 46 5f 31 30 02 00 00 00 41 4d 44 20  FAM_F_10....AMD
> +  0020: 01 00 00 00 07 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0030: 00 10 00 00 09 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0040: 00 10 00 01 01 00 00 00 00 00 00 00 01 00 00 00  ................
> +  0050: 00 10 00 02 01 00 00 00 00 00 00 00 02 00 00 00  ................
> +  0060: 00 10 00 03 01 00 00 00 00 00 00 00 03 00 00 00  ................
> +  0070: 01 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00  .(..............
> +  0080: 00 00 0a 00 00 00 00 00 01 00 00 00 01 00 00 00  ................
> +  0090: 00 00 00 00 00 00 00 00 01 28 00 00 00 00 00 00  .........(......
> +  00a0: 00 00 10 00 00 00 00 00 00 00 f0 cf 00 00 00 00  ................
> +  00b0: 0f 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00  ................
> +  00c0: 01 28 00 00 00 00 00 00 00 00 00 00 01 00 00 00  .(..............
> +  00d0: 00 00 00 30 01 00 00 00 01 00 00 00 08 00 00 00  ...0............
> +  00e0: 00 00 00 00 00 00 00 00
> diff --git a/fwts-test/srat-0001/srat-0001.log b/fwts-test/srat-0001/srat-0001.log
> new file mode 100644
> index 0000000..42e90ca
> --- /dev/null
> +++ b/fwts-test/srat-0001/srat-0001.log
> @@ -0,0 +1,90 @@
> +srat            srat: SRAT System Resource Affinity Table test.
> +srat            ----------------------------------------------------------
> +srat            Test 1 of 1: SRAT System Resource Affinity Table test.
> +srat            SRAT Local APIC/SAPIC Affinity Structure:
> +srat              Type:                     0x00
> +srat              Length:                   0x10
> +srat              Proximity Domain:   [7:0] 0x00
> +srat              APIC ID:                  0x00
> +srat              Flags:                    0x00000001
> +srat              Local SAPIC EID:          0x00
> +srat              Proximity Domain:  [8:15] 0x00
> +srat              Proximity Domain: [16:23] 0x00
> +srat              Proximity Domain: [23:31] 0x00
> +srat              Clock Domain              0x00000000
> +srat
> +srat            SRAT Local APIC/SAPIC Affinity Structure:
> +srat              Type:                     0x00
> +srat              Length:                   0x10
> +srat              Proximity Domain:   [7:0] 0x00
> +srat              APIC ID:                  0x01
> +srat              Flags:                    0x00000001
> +srat              Local SAPIC EID:          0x00
> +srat              Proximity Domain:  [8:15] 0x00
> +srat              Proximity Domain: [16:23] 0x00
> +srat              Proximity Domain: [23:31] 0x00
> +srat              Clock Domain              0x00000001
> +srat
> +srat            SRAT Local APIC/SAPIC Affinity Structure:
> +srat              Type:                     0x00
> +srat              Length:                   0x10
> +srat              Proximity Domain:   [7:0] 0x00
> +srat              APIC ID:                  0x02
> +srat              Flags:                    0x00000001
> +srat              Local SAPIC EID:          0x00
> +srat              Proximity Domain:  [8:15] 0x00
> +srat              Proximity Domain: [16:23] 0x00
> +srat              Proximity Domain: [23:31] 0x00
> +srat              Clock Domain              0x00000002
> +srat
> +srat            SRAT Local APIC/SAPIC Affinity Structure:
> +srat              Type:                     0x00
> +srat              Length:                   0x10
> +srat              Proximity Domain:   [7:0] 0x00
> +srat              APIC ID:                  0x03
> +srat              Flags:                    0x00000001
> +srat              Local SAPIC EID:          0x00
> +srat              Proximity Domain:  [8:15] 0x00
> +srat              Proximity Domain: [16:23] 0x00
> +srat              Proximity Domain: [23:31] 0x00
> +srat              Clock Domain              0x00000003
> +srat
> +srat            SRAT Memory Affinity Structure:
> +srat              Type:                     0x01
> +srat              Length:                   0x28
> +srat              Proximity Domain:         0x00000000
> +srat              Reserved:                 0x0000
> +srat              Base Address:             0x0000000000000000
> +srat              Length:                   0x00000000000a0000
> +srat              Reserved:                 0x00000001
> +srat              Flags:                    0x00000001
> +srat              Reserved:                 0x0000000000000000
> +srat
> +srat            SRAT Memory Affinity Structure:
> +srat              Type:                     0x01
> +srat              Length:                   0x28
> +srat              Proximity Domain:         0x00000000
> +srat              Reserved:                 0x0000
> +srat              Base Address:             0x0000000000100000
> +srat              Length:                   0x00000000cff00000
> +srat              Reserved:                 0x00000001
> +srat              Flags:                    0x00000001
> +srat              Reserved:                 0x0000000000000000
> +srat
> +srat            SRAT Memory Affinity Structure:
> +srat              Type:                     0x01
> +srat              Length:                   0x28
> +srat              Proximity Domain:         0x00000000
> +srat              Reserved:                 0x0000
> +srat              Base Address:             0x0000000100000000
> +srat              Length:                   0x0000000130000000
> +srat              Reserved:                 0x00000001
> +srat              Flags:                    0x00000001
> +srat              Reserved:                 0x0000000000000000
> +srat
> +srat            PASSED: Test 1, No issues found in SRAT table.
> +srat
> +srat            ==========================================================
> +srat            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
> +srat            info only.
> +srat            ==========================================================
> diff --git a/fwts-test/srat-0001/srat-0002.log b/fwts-test/srat-0001/srat-0002.log
> new file mode 100644
> index 0000000..2abc922
> --- /dev/null
> +++ b/fwts-test/srat-0001/srat-0002.log
> @@ -0,0 +1,100 @@
> +srat            srat: SRAT System Resource Affinity Table test.
> +srat            ----------------------------------------------------------
> +srat            Test 1 of 1: SRAT System Resource Affinity Table test.
> +srat            FAILED [MEDIUM] SRATInterfaceReserved: Test 1, SRAT
> +srat            reserved field 1 should be 1, instead was 0x7
> +srat            SRAT Local APIC/SAPIC Affinity Structure:
> +srat              Type:                     0x00
> +srat              Length:                   0x10
> +srat              Proximity Domain:   [7:0] 0x00
> +srat              APIC ID:                  0x00
> +srat              Flags:                    0x00000009
> +srat              Local SAPIC EID:          0x00
> +srat              Proximity Domain:  [8:15] 0x00
> +srat              Proximity Domain: [16:23] 0x00
> +srat              Proximity Domain: [23:31] 0x00
> +srat              Clock Domain              0x00000000
> +srat
> +srat            FAILED [MEDIUM] SRATLocalApicSapicAffinityFlags: Test 1,
> +srat            SRAT Local APIC/SPAIC Affinity Flags field reserved bits
> +srat            1..31 should be zero, got 0x9
> +srat            SRAT Local APIC/SAPIC Affinity Structure:
> +srat              Type:                     0x00
> +srat              Length:                   0x10
> +srat              Proximity Domain:   [7:0] 0x00
> +srat              APIC ID:                  0x01
> +srat              Flags:                    0x00000001
> +srat              Local SAPIC EID:          0x00
> +srat              Proximity Domain:  [8:15] 0x00
> +srat              Proximity Domain: [16:23] 0x00
> +srat              Proximity Domain: [23:31] 0x00
> +srat              Clock Domain              0x00000001
> +srat
> +srat            SRAT Local APIC/SAPIC Affinity Structure:
> +srat              Type:                     0x00
> +srat              Length:                   0x10
> +srat              Proximity Domain:   [7:0] 0x00
> +srat              APIC ID:                  0x02
> +srat              Flags:                    0x00000001
> +srat              Local SAPIC EID:          0x00
> +srat              Proximity Domain:  [8:15] 0x00
> +srat              Proximity Domain: [16:23] 0x00
> +srat              Proximity Domain: [23:31] 0x00
> +srat              Clock Domain              0x00000002
> +srat
> +srat            SRAT Local APIC/SAPIC Affinity Structure:
> +srat              Type:                     0x00
> +srat              Length:                   0x10
> +srat              Proximity Domain:   [7:0] 0x00
> +srat              APIC ID:                  0x03
> +srat              Flags:                    0x00000001
> +srat              Local SAPIC EID:          0x00
> +srat              Proximity Domain:  [8:15] 0x00
> +srat              Proximity Domain: [16:23] 0x00
> +srat              Proximity Domain: [23:31] 0x00
> +srat              Clock Domain              0x00000003
> +srat
> +srat            SRAT Memory Affinity Structure:
> +srat              Type:                     0x01
> +srat              Length:                   0x28
> +srat              Proximity Domain:         0x00000000
> +srat              Reserved:                 0x0000
> +srat              Base Address:             0x0000000000000000
> +srat              Length:                   0x00000000000a0000
> +srat              Reserved:                 0x00000001
> +srat              Flags:                    0x00000001
> +srat              Reserved:                 0x0000000000000000
> +srat
> +srat            SRAT Memory Affinity Structure:
> +srat              Type:                     0x01
> +srat              Length:                   0x28
> +srat              Proximity Domain:         0x00000000
> +srat              Reserved:                 0x0000
> +srat              Base Address:             0x0000000000100000
> +srat              Length:                   0x00000000cff00000
> +srat              Reserved:                 0x0000000f
> +srat              Flags:                    0x000000ff
> +srat              Reserved:                 0x0000000000000000
> +srat
> +srat            FAILED [MEDIUM] SRATMemoryAffinityFlags: Test 1, SRAT
> +srat            Memory Affinity Flags field reserved bits 3..31 should be
> +srat            zero, got 0xff
> +srat            SRAT Memory Affinity Structure:
> +srat              Type:                     0x01
> +srat              Length:                   0x28
> +srat              Proximity Domain:         0x00000000
> +srat              Reserved:                 0x0000
> +srat              Base Address:             0x0000000100000000
> +srat              Length:                   0x0000000130000000
> +srat              Reserved:                 0x00000001
> +srat              Flags:                    0x00000008
> +srat              Reserved:                 0x0000000000000000
> +srat
> +srat            FAILED [MEDIUM] SRATMemoryAffinityFlags: Test 1, SRAT
> +srat            Memory Affinity Flags field reserved bits 3..31 should be
> +srat            zero, got 0x8
> +srat
> +srat            ==========================================================
> +srat            0 passed, 4 failed, 0 warning, 0 aborted, 0 skipped, 0
> +srat            info only.
> +srat            ==========================================================
> diff --git a/fwts-test/srat-0001/test-0001.sh b/fwts-test/srat-0001/test-0001.sh
> new file mode 100755
> index 0000000..a5cc279
> --- /dev/null
> +++ b/fwts-test/srat-0001/test-0001.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test apcitables against SRAT"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/srat.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/srat-0001/acpidump-0001.log srat - | cut -c7- | grep "^srat" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/srat-0001/srat-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/srat-0001/test-0002.sh b/fwts-test/srat-0001/test-0002.sh
> new file mode 100755
> index 0000000..b658d21
> --- /dev/null
> +++ b/fwts-test/srat-0001/test-0002.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test apcitables against invalid SRAT"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/srat.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/srat-0001/acpidump-0002.log srat - | cut -c7- | grep "^srat" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/srat-0001/srat-0002.log >> $FAILURE_LOG
> +ret=$?
> +if [ $ret -eq 0 ]; then
> +	echo PASSED: $TEST, $NAME
> +else
> +	echo FAILED: $TEST, $NAME
> +fi
> +
> +rm $TMPLOG
> +exit $ret
Acked-by: Ivan Hu<ivan.hu@canonical.com>
diff mbox

Patch

diff --git a/Makefile.am b/Makefile.am
index 0315f0b..e53da9a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -86,6 +86,8 @@  TESTS = fwts-test/acpidump-0001/test-0001.sh \
 	fwts-test/rsdt-0001/test-0001.sh \
 	fwts-test/sbst-0001/test-0001.sh \
 	fwts-test/sbst-0001/test-0002.sh \
+	fwts-test/srat-0001/test-0001.sh \
+	fwts-test/srat-0001/test-0002.sh \
 	fwts-test/syntaxcheck-0001/test-0001.sh \
 	fwts-test/wmi-0001/test-0001.sh \
 	fwts-test/wmi-0001/test-0002.sh \
diff --git a/fwts-test/srat-0001/acpidump-0001.log b/fwts-test/srat-0001/acpidump-0001.log
new file mode 100644
index 0000000..f9d41dc
--- /dev/null
+++ b/fwts-test/srat-0001/acpidump-0001.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@...........
+  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  . ...........@..
+  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
+  00f0: 00 00 00 00                                      ....
+
+SRAT @ 0x00000000
+  0000: 53 52 41 54 e8 00 00 00 03 9e 41 4d 44 20 20 20  SRAT......AMD
+  0010: 46 41 4d 5f 46 5f 31 30 02 00 00 00 41 4d 44 20  FAM_F_10....AMD
+  0020: 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00  ................
+  0030: 00 10 00 00 01 00 00 00 00 00 00 00 00 00 00 00  ................
+  0040: 00 10 00 01 01 00 00 00 00 00 00 00 01 00 00 00  ................
+  0050: 00 10 00 02 01 00 00 00 00 00 00 00 02 00 00 00  ................
+  0060: 00 10 00 03 01 00 00 00 00 00 00 00 03 00 00 00  ................
+  0070: 01 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00  .(..............
+  0080: 00 00 0a 00 00 00 00 00 01 00 00 00 01 00 00 00  ................
+  0090: 00 00 00 00 00 00 00 00 01 28 00 00 00 00 00 00  .........(......
+  00a0: 00 00 10 00 00 00 00 00 00 00 f0 cf 00 00 00 00  ................
+  00b0: 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00  ................
+  00c0: 01 28 00 00 00 00 00 00 00 00 00 00 01 00 00 00  .(..............
+  00d0: 00 00 00 30 01 00 00 00 01 00 00 00 01 00 00 00  ...0............
+  00e0: 00 00 00 00 00 00 00 00  
diff --git a/fwts-test/srat-0001/acpidump-0002.log b/fwts-test/srat-0001/acpidump-0002.log
new file mode 100644
index 0000000..dca9504
--- /dev/null
+++ b/fwts-test/srat-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@...........
+  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  . ...........@..
+  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
+  00f0: 00 00 00 00                                      ....
+
+SRAT @ 0x00000000
+  0000: 53 52 41 54 e8 00 00 00 03 9e 41 4d 44 20 20 20  SRAT......AMD
+  0010: 46 41 4d 5f 46 5f 31 30 02 00 00 00 41 4d 44 20  FAM_F_10....AMD
+  0020: 01 00 00 00 07 00 00 00 00 00 00 00 00 00 00 00  ................
+  0030: 00 10 00 00 09 00 00 00 00 00 00 00 00 00 00 00  ................
+  0040: 00 10 00 01 01 00 00 00 00 00 00 00 01 00 00 00  ................
+  0050: 00 10 00 02 01 00 00 00 00 00 00 00 02 00 00 00  ................
+  0060: 00 10 00 03 01 00 00 00 00 00 00 00 03 00 00 00  ................
+  0070: 01 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00  .(..............
+  0080: 00 00 0a 00 00 00 00 00 01 00 00 00 01 00 00 00  ................
+  0090: 00 00 00 00 00 00 00 00 01 28 00 00 00 00 00 00  .........(......
+  00a0: 00 00 10 00 00 00 00 00 00 00 f0 cf 00 00 00 00  ................
+  00b0: 0f 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00  ................
+  00c0: 01 28 00 00 00 00 00 00 00 00 00 00 01 00 00 00  .(..............
+  00d0: 00 00 00 30 01 00 00 00 01 00 00 00 08 00 00 00  ...0............
+  00e0: 00 00 00 00 00 00 00 00  
diff --git a/fwts-test/srat-0001/srat-0001.log b/fwts-test/srat-0001/srat-0001.log
new file mode 100644
index 0000000..42e90ca
--- /dev/null
+++ b/fwts-test/srat-0001/srat-0001.log
@@ -0,0 +1,90 @@ 
+srat            srat: SRAT System Resource Affinity Table test.
+srat            ----------------------------------------------------------
+srat            Test 1 of 1: SRAT System Resource Affinity Table test.
+srat            SRAT Local APIC/SAPIC Affinity Structure:
+srat              Type:                     0x00
+srat              Length:                   0x10
+srat              Proximity Domain:   [7:0] 0x00
+srat              APIC ID:                  0x00
+srat              Flags:                    0x00000001
+srat              Local SAPIC EID:          0x00
+srat              Proximity Domain:  [8:15] 0x00
+srat              Proximity Domain: [16:23] 0x00
+srat              Proximity Domain: [23:31] 0x00
+srat              Clock Domain              0x00000000
+srat            
+srat            SRAT Local APIC/SAPIC Affinity Structure:
+srat              Type:                     0x00
+srat              Length:                   0x10
+srat              Proximity Domain:   [7:0] 0x00
+srat              APIC ID:                  0x01
+srat              Flags:                    0x00000001
+srat              Local SAPIC EID:          0x00
+srat              Proximity Domain:  [8:15] 0x00
+srat              Proximity Domain: [16:23] 0x00
+srat              Proximity Domain: [23:31] 0x00
+srat              Clock Domain              0x00000001
+srat            
+srat            SRAT Local APIC/SAPIC Affinity Structure:
+srat              Type:                     0x00
+srat              Length:                   0x10
+srat              Proximity Domain:   [7:0] 0x00
+srat              APIC ID:                  0x02
+srat              Flags:                    0x00000001
+srat              Local SAPIC EID:          0x00
+srat              Proximity Domain:  [8:15] 0x00
+srat              Proximity Domain: [16:23] 0x00
+srat              Proximity Domain: [23:31] 0x00
+srat              Clock Domain              0x00000002
+srat            
+srat            SRAT Local APIC/SAPIC Affinity Structure:
+srat              Type:                     0x00
+srat              Length:                   0x10
+srat              Proximity Domain:   [7:0] 0x00
+srat              APIC ID:                  0x03
+srat              Flags:                    0x00000001
+srat              Local SAPIC EID:          0x00
+srat              Proximity Domain:  [8:15] 0x00
+srat              Proximity Domain: [16:23] 0x00
+srat              Proximity Domain: [23:31] 0x00
+srat              Clock Domain              0x00000003
+srat            
+srat            SRAT Memory Affinity Structure:
+srat              Type:                     0x01
+srat              Length:                   0x28
+srat              Proximity Domain:         0x00000000
+srat              Reserved:                 0x0000
+srat              Base Address:             0x0000000000000000
+srat              Length:                   0x00000000000a0000
+srat              Reserved:                 0x00000001
+srat              Flags:                    0x00000001
+srat              Reserved:                 0x0000000000000000
+srat            
+srat            SRAT Memory Affinity Structure:
+srat              Type:                     0x01
+srat              Length:                   0x28
+srat              Proximity Domain:         0x00000000
+srat              Reserved:                 0x0000
+srat              Base Address:             0x0000000000100000
+srat              Length:                   0x00000000cff00000
+srat              Reserved:                 0x00000001
+srat              Flags:                    0x00000001
+srat              Reserved:                 0x0000000000000000
+srat            
+srat            SRAT Memory Affinity Structure:
+srat              Type:                     0x01
+srat              Length:                   0x28
+srat              Proximity Domain:         0x00000000
+srat              Reserved:                 0x0000
+srat              Base Address:             0x0000000100000000
+srat              Length:                   0x0000000130000000
+srat              Reserved:                 0x00000001
+srat              Flags:                    0x00000001
+srat              Reserved:                 0x0000000000000000
+srat            
+srat            PASSED: Test 1, No issues found in SRAT table.
+srat            
+srat            ==========================================================
+srat            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
+srat            info only.
+srat            ==========================================================
diff --git a/fwts-test/srat-0001/srat-0002.log b/fwts-test/srat-0001/srat-0002.log
new file mode 100644
index 0000000..2abc922
--- /dev/null
+++ b/fwts-test/srat-0001/srat-0002.log
@@ -0,0 +1,100 @@ 
+srat            srat: SRAT System Resource Affinity Table test.
+srat            ----------------------------------------------------------
+srat            Test 1 of 1: SRAT System Resource Affinity Table test.
+srat            FAILED [MEDIUM] SRATInterfaceReserved: Test 1, SRAT
+srat            reserved field 1 should be 1, instead was 0x7
+srat            SRAT Local APIC/SAPIC Affinity Structure:
+srat              Type:                     0x00
+srat              Length:                   0x10
+srat              Proximity Domain:   [7:0] 0x00
+srat              APIC ID:                  0x00
+srat              Flags:                    0x00000009
+srat              Local SAPIC EID:          0x00
+srat              Proximity Domain:  [8:15] 0x00
+srat              Proximity Domain: [16:23] 0x00
+srat              Proximity Domain: [23:31] 0x00
+srat              Clock Domain              0x00000000
+srat            
+srat            FAILED [MEDIUM] SRATLocalApicSapicAffinityFlags: Test 1,
+srat            SRAT Local APIC/SPAIC Affinity Flags field reserved bits
+srat            1..31 should be zero, got 0x9
+srat            SRAT Local APIC/SAPIC Affinity Structure:
+srat              Type:                     0x00
+srat              Length:                   0x10
+srat              Proximity Domain:   [7:0] 0x00
+srat              APIC ID:                  0x01
+srat              Flags:                    0x00000001
+srat              Local SAPIC EID:          0x00
+srat              Proximity Domain:  [8:15] 0x00
+srat              Proximity Domain: [16:23] 0x00
+srat              Proximity Domain: [23:31] 0x00
+srat              Clock Domain              0x00000001
+srat            
+srat            SRAT Local APIC/SAPIC Affinity Structure:
+srat              Type:                     0x00
+srat              Length:                   0x10
+srat              Proximity Domain:   [7:0] 0x00
+srat              APIC ID:                  0x02
+srat              Flags:                    0x00000001
+srat              Local SAPIC EID:          0x00
+srat              Proximity Domain:  [8:15] 0x00
+srat              Proximity Domain: [16:23] 0x00
+srat              Proximity Domain: [23:31] 0x00
+srat              Clock Domain              0x00000002
+srat            
+srat            SRAT Local APIC/SAPIC Affinity Structure:
+srat              Type:                     0x00
+srat              Length:                   0x10
+srat              Proximity Domain:   [7:0] 0x00
+srat              APIC ID:                  0x03
+srat              Flags:                    0x00000001
+srat              Local SAPIC EID:          0x00
+srat              Proximity Domain:  [8:15] 0x00
+srat              Proximity Domain: [16:23] 0x00
+srat              Proximity Domain: [23:31] 0x00
+srat              Clock Domain              0x00000003
+srat            
+srat            SRAT Memory Affinity Structure:
+srat              Type:                     0x01
+srat              Length:                   0x28
+srat              Proximity Domain:         0x00000000
+srat              Reserved:                 0x0000
+srat              Base Address:             0x0000000000000000
+srat              Length:                   0x00000000000a0000
+srat              Reserved:                 0x00000001
+srat              Flags:                    0x00000001
+srat              Reserved:                 0x0000000000000000
+srat            
+srat            SRAT Memory Affinity Structure:
+srat              Type:                     0x01
+srat              Length:                   0x28
+srat              Proximity Domain:         0x00000000
+srat              Reserved:                 0x0000
+srat              Base Address:             0x0000000000100000
+srat              Length:                   0x00000000cff00000
+srat              Reserved:                 0x0000000f
+srat              Flags:                    0x000000ff
+srat              Reserved:                 0x0000000000000000
+srat            
+srat            FAILED [MEDIUM] SRATMemoryAffinityFlags: Test 1, SRAT
+srat            Memory Affinity Flags field reserved bits 3..31 should be
+srat            zero, got 0xff
+srat            SRAT Memory Affinity Structure:
+srat              Type:                     0x01
+srat              Length:                   0x28
+srat              Proximity Domain:         0x00000000
+srat              Reserved:                 0x0000
+srat              Base Address:             0x0000000100000000
+srat              Length:                   0x0000000130000000
+srat              Reserved:                 0x00000001
+srat              Flags:                    0x00000008
+srat              Reserved:                 0x0000000000000000
+srat            
+srat            FAILED [MEDIUM] SRATMemoryAffinityFlags: Test 1, SRAT
+srat            Memory Affinity Flags field reserved bits 3..31 should be
+srat            zero, got 0x8
+srat            
+srat            ==========================================================
+srat            0 passed, 4 failed, 0 warning, 0 aborted, 0 skipped, 0
+srat            info only.
+srat            ==========================================================
diff --git a/fwts-test/srat-0001/test-0001.sh b/fwts-test/srat-0001/test-0001.sh
new file mode 100755
index 0000000..a5cc279
--- /dev/null
+++ b/fwts-test/srat-0001/test-0001.sh
@@ -0,0 +1,17 @@ 
+#!/bin/bash
+#
+TEST="Test apcitables against SRAT"
+NAME=test-0001.sh
+TMPLOG=$TMP/srat.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/srat-0001/acpidump-0001.log srat - | cut -c7- | grep "^srat" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/srat-0001/srat-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/srat-0001/test-0002.sh b/fwts-test/srat-0001/test-0002.sh
new file mode 100755
index 0000000..b658d21
--- /dev/null
+++ b/fwts-test/srat-0001/test-0002.sh
@@ -0,0 +1,17 @@ 
+#!/bin/bash
+#
+TEST="Test apcitables against invalid SRAT"
+NAME=test-0001.sh
+TMPLOG=$TMP/srat.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/srat-0001/acpidump-0002.log srat - | cut -c7- | grep "^srat" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/srat-0001/srat-0002.log >> $FAILURE_LOG
+ret=$?
+if [ $ret -eq 0 ]; then
+	echo PASSED: $TEST, $NAME
+else
+	echo FAILED: $TEST, $NAME
+fi
+
+rm $TMPLOG
+exit $ret