diff mbox

[2/2] fwts-test: Add WDAT table regression tests

Message ID 1438343301-20431-3-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King July 31, 2015, 11:48 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 Makefile.am                                        |  2 +
 .../arg-show-tests-0001/arg-show-tests-0001.log    |  2 +
 .../arg-show-tests-full-0001.log                   |  4 ++
 fwts-test/wdat-0001/acpidump-0001.log              | 61 ++++++++++++++++++++++
 fwts-test/wdat-0001/acpidump-0002.log              | 61 ++++++++++++++++++++++
 fwts-test/wdat-0001/test-0001.sh                   | 17 ++++++
 fwts-test/wdat-0001/test-0002.sh                   | 17 ++++++
 fwts-test/wdat-0001/wdat-0001.log                  | 12 +++++
 fwts-test/wdat-0001/wdat-0002.log                  | 31 +++++++++++
 9 files changed, 207 insertions(+)
 create mode 100644 fwts-test/wdat-0001/acpidump-0001.log
 create mode 100644 fwts-test/wdat-0001/acpidump-0002.log
 create mode 100755 fwts-test/wdat-0001/test-0001.sh
 create mode 100755 fwts-test/wdat-0001/test-0002.sh
 create mode 100644 fwts-test/wdat-0001/wdat-0001.log
 create mode 100644 fwts-test/wdat-0001/wdat-0002.log

Comments

Ivan Hu Aug. 3, 2015, 3:51 a.m. UTC | #1
On 2015年07月31日 19:48, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   Makefile.am                                        |  2 +
>   .../arg-show-tests-0001/arg-show-tests-0001.log    |  2 +
>   .../arg-show-tests-full-0001.log                   |  4 ++
>   fwts-test/wdat-0001/acpidump-0001.log              | 61 ++++++++++++++++++++++
>   fwts-test/wdat-0001/acpidump-0002.log              | 61 ++++++++++++++++++++++
>   fwts-test/wdat-0001/test-0001.sh                   | 17 ++++++
>   fwts-test/wdat-0001/test-0002.sh                   | 17 ++++++
>   fwts-test/wdat-0001/wdat-0001.log                  | 12 +++++
>   fwts-test/wdat-0001/wdat-0002.log                  | 31 +++++++++++
>   9 files changed, 207 insertions(+)
>   create mode 100644 fwts-test/wdat-0001/acpidump-0001.log
>   create mode 100644 fwts-test/wdat-0001/acpidump-0002.log
>   create mode 100755 fwts-test/wdat-0001/test-0001.sh
>   create mode 100755 fwts-test/wdat-0001/test-0002.sh
>   create mode 100644 fwts-test/wdat-0001/wdat-0001.log
>   create mode 100644 fwts-test/wdat-0001/wdat-0002.log
>
> diff --git a/Makefile.am b/Makefile.am
> index 535cc82..40b6025 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -123,6 +123,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
>   	fwts-test/waet-0001/test-0001.sh \
>   	fwts-test/waet-0001/test-0002.sh \
>   	fwts-test/waet-0001/test-0003.sh \
> +	fwts-test/wdat-0001/test-0001.sh \
> +	fwts-test/wdat-0001/test-0002.sh \
>   	fwts-test/wmi-0001/test-0001.sh \
>   	fwts-test/wmi-0001/test-0002.sh \
>   	fwts-test/wmi-0001/test-0003.sh \
> diff --git a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log
> index ac4e4f1..a971cfe 100644
> --- a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log
> +++ b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log
> @@ -42,6 +42,7 @@ ACPI tests:
>    tpm2            TPM2 Trusted Platform Module 2 test.
>    uefi            UEFI Data Table test.
>    waet            WAET Windows ACPI Emulated Devices Table test.
> + wdat            WDAT Microsoft Hardware Watchdog Action Table test.
>    wmi             Extract and analyse Windows Management Instrumentation (WMI).
>    xenv            XENV Xen Environment Table tests.
>    xsdt            XSDT Extended System Description Table test.
> @@ -120,6 +121,7 @@ Batch tests:
>    virt            CPU Virtualisation Configuration test.
>    waet            WAET Windows ACPI Emulated Devices Table test.
>    wakealarm       ACPI Wakealarm tests.
> + wdat            WDAT Microsoft Hardware Watchdog Action Table test.
>    wmi             Extract and analyse Windows Management Instrumentation (WMI).
>    xenv            XENV Xen Environment Table tests.
>    xsdt            XSDT Extended System Description Table test.
> diff --git a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
> index 8f1f03a..6c14ebe 100644
> --- a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
> +++ b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
> @@ -272,6 +272,8 @@ ACPI tests:
>     UEFI Data Table test.
>    waet            (1 test):
>     Windows ACPI Emulated Devices Table test.
> + wdat            (1 test):
> +  WDAT Microsoft Hardware Watchdog Action Table test.
>    wmi             (1 test):
>     Windows Management Instrumentation test.
>    xenv            (1 test):
> @@ -645,6 +647,8 @@ Batch tests:
>     Trigger wakealarm for 1 seconds in the future.
>     Test if wakealarm is fired.
>     Multiple wakealarm firing tests.
> + wdat            (1 test):
> +  WDAT Microsoft Hardware Watchdog Action Table test.
>    wmi             (1 test):
>     Windows Management Instrumentation test.
>    xenv            (1 test):
> diff --git a/fwts-test/wdat-0001/acpidump-0001.log b/fwts-test/wdat-0001/acpidump-0001.log
> new file mode 100644
> index 0000000..561b6b4
> --- /dev/null
> +++ b/fwts-test/wdat-0001/acpidump-0001.log
> @@ -0,0 +1,61 @@
> +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  ................
> +  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  . ...........@..
> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
> +  00f0: 00 00 00 00                                      ....
> +
> +WDAT @ 0x00000000
> +  0000: 57 44 41 54 24 02 00 00 01 8a 4c 47 45 20 20 20  WDAT$.....LGE
> +  0010: 4c 47 50 43 20 20 20 20 01 00 00 00 4d 53 46 54  LGPC    ....MSFT
> +  0020: 13 00 00 01 20 00 00 00 ff 00 ff ff ff 00 00 00  .... ...........
> +  0030: 58 02 00 00 ff 03 00 00 02 00 00 00 81 00 00 00  X...............
> +  0040: 14 00 00 00 01 02 00 00 01 10 00 02 60 04 00 00  ............`...
> +  0050: 00 00 00 00 00 00 00 00 ff 03 00 00 04 01 00 00  ................
> +  0060: 01 10 00 02 60 04 00 00 00 00 00 00 00 00 00 00  ....`...........
> +  0070: ff 03 00 00 05 01 00 00 01 10 00 02 72 04 00 00  ............r...
> +  0080: 00 00 00 00 00 00 00 00 ff 03 00 00 06 83 00 00  ................
> +  0090: 01 10 00 02 72 04 00 00 00 00 00 00 00 00 00 00  ....r...........
> +  00a0: ff 03 00 00 08 00 00 00 01 10 0b 02 68 04 00 00  ............h...
> +  00b0: 00 00 00 00 00 00 00 00 01 00 00 00 09 82 00 00  ................
> +  00c0: 01 10 00 02 68 04 00 00 00 00 00 00 00 00 00 00  ....h...........
> +  00d0: 00 08 00 00 09 02 00 00 01 08 00 01 72 00 00 00  ............r...
> +  00e0: 00 00 00 00 45 00 00 00 ff 00 00 00 09 82 00 00  ....E...........
> +  00f0: 01 08 00 01 73 00 00 00 00 00 00 00 01 00 00 00  ....s...........
> +  0100: 01 00 00 00 0a 00 00 00 01 10 0b 02 68 04 00 00  ............h...
> +  0110: 00 00 00 00 01 00 00 00 01 00 00 00 0b 82 00 00  ................
> +  0120: 01 10 00 02 68 04 00 00 00 00 00 00 00 08 00 00  ....h...........
> +  0130: 00 08 00 00 0b 02 00 00 01 08 00 01 72 00 00 00  ............r...
> +  0140: 00 00 00 00 45 00 00 00 ff 00 00 00 0b 82 00 00  ....E...........
> +  0150: 01 08 00 01 73 00 00 00 00 00 00 00 00 00 00 00  ....s...........
> +  0160: 01 00 00 00 10 00 00 00 01 08 04 01 6a 04 00 00  ............j...
> +  0170: 00 00 00 00 00 00 00 00 03 00 00 00 11 82 00 00  ................
> +  0180: 01 10 00 02 6a 04 00 00 00 00 00 00 00 00 00 00  ....j...........
> +  0190: 30 00 00 00 12 00 00 00 01 08 04 01 6a 04 00 00  0...........j...
> +  01a0: 00 00 00 00 01 00 00 00 03 00 00 00 13 82 00 00  ................
> +  01b0: 01 10 00 02 6a 04 00 00 00 00 00 00 10 00 00 00  ....j...........
> +  01c0: 30 00 00 00 20 02 00 00 01 08 00 01 72 00 00 00  0... .......r...
> +  01d0: 00 00 00 00 45 00 00 00 ff 00 00 00 20 00 00 00  ....E....... ...
> +  01e0: 01 08 00 01 73 00 00 00 00 00 00 00 01 00 00 00  ....s...........
> +  01f0: 01 00 00 00 21 02 00 00 01 08 00 01 72 00 00 00  ....!.......r...
> +  0200: 00 00 00 00 45 00 00 00 ff 00 00 00 21 82 00 00  ....E.......!...
> +  0210: 01 08 00 01 73 00 00 00 00 00 00 00 00 00 00 00  ....s...........
> +  0220: 01 00 00 00
> diff --git a/fwts-test/wdat-0001/acpidump-0002.log b/fwts-test/wdat-0001/acpidump-0002.log
> new file mode 100644
> index 0000000..f288fb3
> --- /dev/null
> +++ b/fwts-test/wdat-0001/acpidump-0002.log
> @@ -0,0 +1,61 @@
> +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  ................
> +  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  . ...........@..
> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
> +  00f0: 00 00 00 00                                      ....
> +
> +WDAT @ 0x00000000
> +  0000: 57 44 41 54 24 02 00 00 01 8a 4c 47 45 20 20 20  WDAT$.....LGE
> +  0010: 4c 47 50 43 20 20 20 20 01 00 00 00 4d 53 46 54  LGPC    ....MSFT
> +  0020: 13 00 00 01 20 00 00 00 ff 00 ff ff ff 10 20 30  .... ...........
> +  0030: 58 02 00 00 ff 03 00 00 09 04 00 00 81 00 00 00  X...............
> +  0040: 14 00 00 00 07 46 00 00 01 10 00 02 60 04 00 00  ............`...
> +  0050: 00 00 00 00 00 00 00 00 ff 03 00 00 04 01 00 00  ................
> +  0060: 01 10 00 02 60 04 00 00 00 00 00 00 00 00 00 00  ....`...........
> +  0070: ff 03 00 00 05 01 00 00 01 10 00 02 72 04 00 00  ............r...
> +  0080: 00 00 00 00 00 00 00 00 ff 03 00 00 06 83 00 00  ................
> +  0090: 01 10 00 02 72 04 00 00 00 00 00 00 00 00 00 00  ....r...........
> +  00a0: ff 03 00 00 08 00 00 00 01 10 0b 02 68 04 00 00  ............h...
> +  00b0: 00 00 00 00 00 00 00 00 01 00 00 00 09 82 00 00  ................
> +  00c0: 01 10 00 02 68 04 00 00 00 00 00 00 00 00 00 00  ....h...........
> +  00d0: 00 08 00 00 09 02 00 00 01 08 00 01 72 00 00 00  ............r...
> +  00e0: 00 00 00 00 45 00 00 00 ff 00 00 00 09 82 00 00  ....E...........
> +  00f0: 01 08 00 01 73 00 00 00 00 00 00 00 01 00 00 00  ....s...........
> +  0100: 01 00 00 00 0a 00 00 00 01 10 0b 02 68 04 00 00  ............h...
> +  0110: 00 00 00 00 01 00 00 00 01 00 00 00 0b 82 00 00  ................
> +  0120: 01 10 00 02 68 04 00 00 00 00 00 00 00 08 00 00  ....h...........
> +  0130: 00 08 00 00 0b 02 00 00 01 08 00 01 72 00 00 00  ............r...
> +  0140: 00 00 00 00 45 00 00 00 ff 00 00 00 0b 82 00 00  ....E...........
> +  0150: 01 08 00 01 73 00 00 00 00 00 00 00 00 00 00 00  ....s...........
> +  0160: 01 00 00 00 10 00 00 00 01 08 04 01 6a 04 00 00  ............j...
> +  0170: 00 00 00 00 00 00 00 00 03 00 00 00 11 82 00 00  ................
> +  0180: 01 10 00 02 6a 04 00 00 00 00 00 00 00 00 00 00  ....j...........
> +  0190: 30 00 00 00 12 00 00 00 01 08 04 01 6a 04 00 00  0...........j...
> +  01a0: 00 00 00 00 01 00 00 00 03 00 00 00 13 82 00 00  ................
> +  01b0: 01 10 00 02 6a 04 00 00 00 00 00 00 10 00 00 00  ....j...........
> +  01c0: 30 00 00 00 20 02 00 00 01 08 00 01 72 00 00 00  0... .......r...
> +  01d0: 00 00 00 00 45 00 00 00 ff 00 00 00 20 00 00 00  ....E....... ...
> +  01e0: 01 08 00 01 73 00 00 00 00 00 00 00 01 00 00 00  ....s...........
> +  01f0: 01 00 00 00 21 02 00 00 01 08 00 01 72 00 00 00  ....!.......r...
> +  0200: 00 00 00 00 45 00 00 00 ff 00 00 00 ff ff 00 00  ....E.......!...
> +  0210: ff ff 00 ff 73 00 00 00 00 00 00 00 00 00 00 00  ....s...........
> +  0220: 01 00 00 00
> diff --git a/fwts-test/wdat-0001/test-0001.sh b/fwts-test/wdat-0001/test-0001.sh
> new file mode 100755
> index 0000000..587a3b7
> --- /dev/null
> +++ b/fwts-test/wdat-0001/test-0001.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test apci table against WDAT"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/wdat.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/wdat-0001/acpidump-0001.log wdat - | cut -c7- | grep "^wdat" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/wdat-0001/wdat-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/wdat-0001/test-0002.sh b/fwts-test/wdat-0001/test-0002.sh
> new file mode 100755
> index 0000000..17a279f
> --- /dev/null
> +++ b/fwts-test/wdat-0001/test-0002.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test apci against invalid WDAT"
> +NAME=test-0002.sh
> +TMPLOG=$TMP/wdat.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/wdat-0001/acpidump-0002.log wdat - | cut -c7- | grep "^wdat" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/wdat-0001/wdat-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/wdat-0001/wdat-0001.log b/fwts-test/wdat-0001/wdat-0001.log
> new file mode 100644
> index 0000000..1dea97e
> --- /dev/null
> +++ b/fwts-test/wdat-0001/wdat-0001.log
> @@ -0,0 +1,12 @@
> +wdat            wdat: WDAT Microsoft Hardware Watchdog Action Table test.
> +wdat            ----------------------------------------------------------
> +wdat            Test 1 of 1: WDAT Microsoft Hardware Watchdog Action Table
> +wdat            test.
> +wdat            PASSED: Test 1, All 20 WDAT Watchdog Instruction Entries
> +wdat            look sane.
> +wdat            PASSED: Test 1, No issues found in WDAT table.
> +wdat
> +wdat            ==========================================================
> +wdat            2 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
> +wdat            info only.
> +wdat            ==========================================================
> diff --git a/fwts-test/wdat-0001/wdat-0002.log b/fwts-test/wdat-0001/wdat-0002.log
> new file mode 100644
> index 0000000..f07f5b6
> --- /dev/null
> +++ b/fwts-test/wdat-0001/wdat-0002.log
> @@ -0,0 +1,31 @@
> +wdat            wdat: WDAT Microsoft Hardware Watchdog Action Table test.
> +wdat            ----------------------------------------------------------
> +wdat            Test 1 of 1: WDAT Microsoft Hardware Watchdog Action Table
> +wdat            test.
> +wdat            FAILED [MEDIUM] WDATReservedFieldsNonZero: Test 1, WDAT
> +wdat            Reserved Fields contain a non-zero value, these all should
> +wdat            be zero.
> +wdat            FAILED [MEDIUM] WDATMinGreaterThanMax: Test 1, WDAT
> +wdat            Minimum Count is 0x409 and is greater than the Maximum
> +wdat            Count of 0x3ff
> +wdat            FAILED [HIGH] WDATWatchdogActionInvalid: Test 1, WDAT
> +wdat            Watchdog Instruction Entry 1 Watchdog Action field is 0x7
> +wdat            and should be one of 0x00, 0x04, 0x05, 0x06, 0x08, 0x09,
> +wdat            0x0a, 0x0b, 0x10, 0x11, 0x12, 0x13, 0x20 or 0x21
> +wdat            FAILED [HIGH] WDATInstructionFlagsInvalid: Test 1, WDAT
> +wdat            Watchdog Instruction Entry 1 Instruction Flags field is
> +wdat            0x46 and should be one of 0x00, 0x01, 0x02, 0x03 or 0x80,
> +wdat            0x81, 0x82, 0x83
> +wdat            FAILED [HIGH] WDATWatchdogActionInvalid: Test 1, WDAT
> +wdat            Watchdog Instruction Entry 20 Watchdog Action field is
> +wdat            0xff and should be one of 0x00, 0x04, 0x05, 0x06, 0x08,
> +wdat            0x09, 0x0a, 0x0b, 0x10, 0x11, 0x12, 0x13, 0x20 or 0x21
> +wdat            FAILED [HIGH] WDATInstructionFlagsInvalid: Test 1, WDAT
> +wdat            Watchdog Instruction Entry 20 Instruction Flags field is
> +wdat            0xff and should be one of 0x00, 0x01, 0x02, 0x03 or 0x80,
> +wdat            0x81, 0x82, 0x83
> +wdat
> +wdat            ==========================================================
> +wdat            0 passed, 6 failed, 0 warning, 0 aborted, 0 skipped, 0
> +wdat            info only.
> +wdat            ==========================================================
Acked-by: Ivan Hu<ivan.hu@canonical.com>
Alex Hung Aug. 4, 2015, 4:12 a.m. UTC | #2
On 07/31/2015 07:48 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  Makefile.am                                        |  2 +
>  .../arg-show-tests-0001/arg-show-tests-0001.log    |  2 +
>  .../arg-show-tests-full-0001.log                   |  4 ++
>  fwts-test/wdat-0001/acpidump-0001.log              | 61 ++++++++++++++++++++++
>  fwts-test/wdat-0001/acpidump-0002.log              | 61 ++++++++++++++++++++++
>  fwts-test/wdat-0001/test-0001.sh                   | 17 ++++++
>  fwts-test/wdat-0001/test-0002.sh                   | 17 ++++++
>  fwts-test/wdat-0001/wdat-0001.log                  | 12 +++++
>  fwts-test/wdat-0001/wdat-0002.log                  | 31 +++++++++++
>  9 files changed, 207 insertions(+)
>  create mode 100644 fwts-test/wdat-0001/acpidump-0001.log
>  create mode 100644 fwts-test/wdat-0001/acpidump-0002.log
>  create mode 100755 fwts-test/wdat-0001/test-0001.sh
>  create mode 100755 fwts-test/wdat-0001/test-0002.sh
>  create mode 100644 fwts-test/wdat-0001/wdat-0001.log
>  create mode 100644 fwts-test/wdat-0001/wdat-0002.log
> 
> diff --git a/Makefile.am b/Makefile.am
> index 535cc82..40b6025 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -123,6 +123,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
>  	fwts-test/waet-0001/test-0001.sh \
>  	fwts-test/waet-0001/test-0002.sh \
>  	fwts-test/waet-0001/test-0003.sh \
> +	fwts-test/wdat-0001/test-0001.sh \
> +	fwts-test/wdat-0001/test-0002.sh \
>  	fwts-test/wmi-0001/test-0001.sh \
>  	fwts-test/wmi-0001/test-0002.sh \
>  	fwts-test/wmi-0001/test-0003.sh \
> diff --git a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log
> index ac4e4f1..a971cfe 100644
> --- a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log
> +++ b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log
> @@ -42,6 +42,7 @@ ACPI tests:
>   tpm2            TPM2 Trusted Platform Module 2 test.
>   uefi            UEFI Data Table test.
>   waet            WAET Windows ACPI Emulated Devices Table test.
> + wdat            WDAT Microsoft Hardware Watchdog Action Table test.
>   wmi             Extract and analyse Windows Management Instrumentation (WMI).
>   xenv            XENV Xen Environment Table tests.
>   xsdt            XSDT Extended System Description Table test.
> @@ -120,6 +121,7 @@ Batch tests:
>   virt            CPU Virtualisation Configuration test.
>   waet            WAET Windows ACPI Emulated Devices Table test.
>   wakealarm       ACPI Wakealarm tests.
> + wdat            WDAT Microsoft Hardware Watchdog Action Table test.
>   wmi             Extract and analyse Windows Management Instrumentation (WMI).
>   xenv            XENV Xen Environment Table tests.
>   xsdt            XSDT Extended System Description Table test.
> diff --git a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
> index 8f1f03a..6c14ebe 100644
> --- a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
> +++ b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
> @@ -272,6 +272,8 @@ ACPI tests:
>    UEFI Data Table test.
>   waet            (1 test):
>    Windows ACPI Emulated Devices Table test.
> + wdat            (1 test):
> +  WDAT Microsoft Hardware Watchdog Action Table test.
>   wmi             (1 test):
>    Windows Management Instrumentation test.
>   xenv            (1 test):
> @@ -645,6 +647,8 @@ Batch tests:
>    Trigger wakealarm for 1 seconds in the future.
>    Test if wakealarm is fired.
>    Multiple wakealarm firing tests.
> + wdat            (1 test):
> +  WDAT Microsoft Hardware Watchdog Action Table test.
>   wmi             (1 test):
>    Windows Management Instrumentation test.
>   xenv            (1 test):
> diff --git a/fwts-test/wdat-0001/acpidump-0001.log b/fwts-test/wdat-0001/acpidump-0001.log
> new file mode 100644
> index 0000000..561b6b4
> --- /dev/null
> +++ b/fwts-test/wdat-0001/acpidump-0001.log
> @@ -0,0 +1,61 @@
> +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  ................
> +  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  . ...........@..
> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
> +  00f0: 00 00 00 00                                      ....
> +
> +WDAT @ 0x00000000
> +  0000: 57 44 41 54 24 02 00 00 01 8a 4c 47 45 20 20 20  WDAT$.....LGE
> +  0010: 4c 47 50 43 20 20 20 20 01 00 00 00 4d 53 46 54  LGPC    ....MSFT
> +  0020: 13 00 00 01 20 00 00 00 ff 00 ff ff ff 00 00 00  .... ...........
> +  0030: 58 02 00 00 ff 03 00 00 02 00 00 00 81 00 00 00  X...............
> +  0040: 14 00 00 00 01 02 00 00 01 10 00 02 60 04 00 00  ............`...
> +  0050: 00 00 00 00 00 00 00 00 ff 03 00 00 04 01 00 00  ................
> +  0060: 01 10 00 02 60 04 00 00 00 00 00 00 00 00 00 00  ....`...........
> +  0070: ff 03 00 00 05 01 00 00 01 10 00 02 72 04 00 00  ............r...
> +  0080: 00 00 00 00 00 00 00 00 ff 03 00 00 06 83 00 00  ................
> +  0090: 01 10 00 02 72 04 00 00 00 00 00 00 00 00 00 00  ....r...........
> +  00a0: ff 03 00 00 08 00 00 00 01 10 0b 02 68 04 00 00  ............h...
> +  00b0: 00 00 00 00 00 00 00 00 01 00 00 00 09 82 00 00  ................
> +  00c0: 01 10 00 02 68 04 00 00 00 00 00 00 00 00 00 00  ....h...........
> +  00d0: 00 08 00 00 09 02 00 00 01 08 00 01 72 00 00 00  ............r...
> +  00e0: 00 00 00 00 45 00 00 00 ff 00 00 00 09 82 00 00  ....E...........
> +  00f0: 01 08 00 01 73 00 00 00 00 00 00 00 01 00 00 00  ....s...........
> +  0100: 01 00 00 00 0a 00 00 00 01 10 0b 02 68 04 00 00  ............h...
> +  0110: 00 00 00 00 01 00 00 00 01 00 00 00 0b 82 00 00  ................
> +  0120: 01 10 00 02 68 04 00 00 00 00 00 00 00 08 00 00  ....h...........
> +  0130: 00 08 00 00 0b 02 00 00 01 08 00 01 72 00 00 00  ............r...
> +  0140: 00 00 00 00 45 00 00 00 ff 00 00 00 0b 82 00 00  ....E...........
> +  0150: 01 08 00 01 73 00 00 00 00 00 00 00 00 00 00 00  ....s...........
> +  0160: 01 00 00 00 10 00 00 00 01 08 04 01 6a 04 00 00  ............j...
> +  0170: 00 00 00 00 00 00 00 00 03 00 00 00 11 82 00 00  ................
> +  0180: 01 10 00 02 6a 04 00 00 00 00 00 00 00 00 00 00  ....j...........
> +  0190: 30 00 00 00 12 00 00 00 01 08 04 01 6a 04 00 00  0...........j...
> +  01a0: 00 00 00 00 01 00 00 00 03 00 00 00 13 82 00 00  ................
> +  01b0: 01 10 00 02 6a 04 00 00 00 00 00 00 10 00 00 00  ....j...........
> +  01c0: 30 00 00 00 20 02 00 00 01 08 00 01 72 00 00 00  0... .......r...
> +  01d0: 00 00 00 00 45 00 00 00 ff 00 00 00 20 00 00 00  ....E....... ...
> +  01e0: 01 08 00 01 73 00 00 00 00 00 00 00 01 00 00 00  ....s...........
> +  01f0: 01 00 00 00 21 02 00 00 01 08 00 01 72 00 00 00  ....!.......r...
> +  0200: 00 00 00 00 45 00 00 00 ff 00 00 00 21 82 00 00  ....E.......!...
> +  0210: 01 08 00 01 73 00 00 00 00 00 00 00 00 00 00 00  ....s...........
> +  0220: 01 00 00 00
> diff --git a/fwts-test/wdat-0001/acpidump-0002.log b/fwts-test/wdat-0001/acpidump-0002.log
> new file mode 100644
> index 0000000..f288fb3
> --- /dev/null
> +++ b/fwts-test/wdat-0001/acpidump-0002.log
> @@ -0,0 +1,61 @@
> +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  ................
> +  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  . ...........@..
> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
> +  00f0: 00 00 00 00                                      ....
> +
> +WDAT @ 0x00000000
> +  0000: 57 44 41 54 24 02 00 00 01 8a 4c 47 45 20 20 20  WDAT$.....LGE
> +  0010: 4c 47 50 43 20 20 20 20 01 00 00 00 4d 53 46 54  LGPC    ....MSFT
> +  0020: 13 00 00 01 20 00 00 00 ff 00 ff ff ff 10 20 30  .... ...........
> +  0030: 58 02 00 00 ff 03 00 00 09 04 00 00 81 00 00 00  X...............
> +  0040: 14 00 00 00 07 46 00 00 01 10 00 02 60 04 00 00  ............`...
> +  0050: 00 00 00 00 00 00 00 00 ff 03 00 00 04 01 00 00  ................
> +  0060: 01 10 00 02 60 04 00 00 00 00 00 00 00 00 00 00  ....`...........
> +  0070: ff 03 00 00 05 01 00 00 01 10 00 02 72 04 00 00  ............r...
> +  0080: 00 00 00 00 00 00 00 00 ff 03 00 00 06 83 00 00  ................
> +  0090: 01 10 00 02 72 04 00 00 00 00 00 00 00 00 00 00  ....r...........
> +  00a0: ff 03 00 00 08 00 00 00 01 10 0b 02 68 04 00 00  ............h...
> +  00b0: 00 00 00 00 00 00 00 00 01 00 00 00 09 82 00 00  ................
> +  00c0: 01 10 00 02 68 04 00 00 00 00 00 00 00 00 00 00  ....h...........
> +  00d0: 00 08 00 00 09 02 00 00 01 08 00 01 72 00 00 00  ............r...
> +  00e0: 00 00 00 00 45 00 00 00 ff 00 00 00 09 82 00 00  ....E...........
> +  00f0: 01 08 00 01 73 00 00 00 00 00 00 00 01 00 00 00  ....s...........
> +  0100: 01 00 00 00 0a 00 00 00 01 10 0b 02 68 04 00 00  ............h...
> +  0110: 00 00 00 00 01 00 00 00 01 00 00 00 0b 82 00 00  ................
> +  0120: 01 10 00 02 68 04 00 00 00 00 00 00 00 08 00 00  ....h...........
> +  0130: 00 08 00 00 0b 02 00 00 01 08 00 01 72 00 00 00  ............r...
> +  0140: 00 00 00 00 45 00 00 00 ff 00 00 00 0b 82 00 00  ....E...........
> +  0150: 01 08 00 01 73 00 00 00 00 00 00 00 00 00 00 00  ....s...........
> +  0160: 01 00 00 00 10 00 00 00 01 08 04 01 6a 04 00 00  ............j...
> +  0170: 00 00 00 00 00 00 00 00 03 00 00 00 11 82 00 00  ................
> +  0180: 01 10 00 02 6a 04 00 00 00 00 00 00 00 00 00 00  ....j...........
> +  0190: 30 00 00 00 12 00 00 00 01 08 04 01 6a 04 00 00  0...........j...
> +  01a0: 00 00 00 00 01 00 00 00 03 00 00 00 13 82 00 00  ................
> +  01b0: 01 10 00 02 6a 04 00 00 00 00 00 00 10 00 00 00  ....j...........
> +  01c0: 30 00 00 00 20 02 00 00 01 08 00 01 72 00 00 00  0... .......r...
> +  01d0: 00 00 00 00 45 00 00 00 ff 00 00 00 20 00 00 00  ....E....... ...
> +  01e0: 01 08 00 01 73 00 00 00 00 00 00 00 01 00 00 00  ....s...........
> +  01f0: 01 00 00 00 21 02 00 00 01 08 00 01 72 00 00 00  ....!.......r...
> +  0200: 00 00 00 00 45 00 00 00 ff 00 00 00 ff ff 00 00  ....E.......!...
> +  0210: ff ff 00 ff 73 00 00 00 00 00 00 00 00 00 00 00  ....s...........
> +  0220: 01 00 00 00
> diff --git a/fwts-test/wdat-0001/test-0001.sh b/fwts-test/wdat-0001/test-0001.sh
> new file mode 100755
> index 0000000..587a3b7
> --- /dev/null
> +++ b/fwts-test/wdat-0001/test-0001.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test apci table against WDAT"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/wdat.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/wdat-0001/acpidump-0001.log wdat - | cut -c7- | grep "^wdat" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/wdat-0001/wdat-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/wdat-0001/test-0002.sh b/fwts-test/wdat-0001/test-0002.sh
> new file mode 100755
> index 0000000..17a279f
> --- /dev/null
> +++ b/fwts-test/wdat-0001/test-0002.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test apci against invalid WDAT"
> +NAME=test-0002.sh
> +TMPLOG=$TMP/wdat.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/wdat-0001/acpidump-0002.log wdat - | cut -c7- | grep "^wdat" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/wdat-0001/wdat-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/wdat-0001/wdat-0001.log b/fwts-test/wdat-0001/wdat-0001.log
> new file mode 100644
> index 0000000..1dea97e
> --- /dev/null
> +++ b/fwts-test/wdat-0001/wdat-0001.log
> @@ -0,0 +1,12 @@
> +wdat            wdat: WDAT Microsoft Hardware Watchdog Action Table test.
> +wdat            ----------------------------------------------------------
> +wdat            Test 1 of 1: WDAT Microsoft Hardware Watchdog Action Table
> +wdat            test.
> +wdat            PASSED: Test 1, All 20 WDAT Watchdog Instruction Entries
> +wdat            look sane.
> +wdat            PASSED: Test 1, No issues found in WDAT table.
> +wdat            
> +wdat            ==========================================================
> +wdat            2 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
> +wdat            info only.
> +wdat            ==========================================================
> diff --git a/fwts-test/wdat-0001/wdat-0002.log b/fwts-test/wdat-0001/wdat-0002.log
> new file mode 100644
> index 0000000..f07f5b6
> --- /dev/null
> +++ b/fwts-test/wdat-0001/wdat-0002.log
> @@ -0,0 +1,31 @@
> +wdat            wdat: WDAT Microsoft Hardware Watchdog Action Table test.
> +wdat            ----------------------------------------------------------
> +wdat            Test 1 of 1: WDAT Microsoft Hardware Watchdog Action Table
> +wdat            test.
> +wdat            FAILED [MEDIUM] WDATReservedFieldsNonZero: Test 1, WDAT
> +wdat            Reserved Fields contain a non-zero value, these all should
> +wdat            be zero.
> +wdat            FAILED [MEDIUM] WDATMinGreaterThanMax: Test 1, WDAT
> +wdat            Minimum Count is 0x409 and is greater than the Maximum
> +wdat            Count of 0x3ff
> +wdat            FAILED [HIGH] WDATWatchdogActionInvalid: Test 1, WDAT
> +wdat            Watchdog Instruction Entry 1 Watchdog Action field is 0x7
> +wdat            and should be one of 0x00, 0x04, 0x05, 0x06, 0x08, 0x09,
> +wdat            0x0a, 0x0b, 0x10, 0x11, 0x12, 0x13, 0x20 or 0x21
> +wdat            FAILED [HIGH] WDATInstructionFlagsInvalid: Test 1, WDAT
> +wdat            Watchdog Instruction Entry 1 Instruction Flags field is
> +wdat            0x46 and should be one of 0x00, 0x01, 0x02, 0x03 or 0x80,
> +wdat            0x81, 0x82, 0x83
> +wdat            FAILED [HIGH] WDATWatchdogActionInvalid: Test 1, WDAT
> +wdat            Watchdog Instruction Entry 20 Watchdog Action field is
> +wdat            0xff and should be one of 0x00, 0x04, 0x05, 0x06, 0x08,
> +wdat            0x09, 0x0a, 0x0b, 0x10, 0x11, 0x12, 0x13, 0x20 or 0x21
> +wdat            FAILED [HIGH] WDATInstructionFlagsInvalid: Test 1, WDAT
> +wdat            Watchdog Instruction Entry 20 Instruction Flags field is
> +wdat            0xff and should be one of 0x00, 0x01, 0x02, 0x03 or 0x80,
> +wdat            0x81, 0x82, 0x83
> +wdat            
> +wdat            ==========================================================
> +wdat            0 passed, 6 failed, 0 warning, 0 aborted, 0 skipped, 0
> +wdat            info only.
> +wdat            ==========================================================
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
diff mbox

Patch

diff --git a/Makefile.am b/Makefile.am
index 535cc82..40b6025 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -123,6 +123,8 @@  TESTS = fwts-test/acpidump-0001/test-0001.sh \
 	fwts-test/waet-0001/test-0001.sh \
 	fwts-test/waet-0001/test-0002.sh \
 	fwts-test/waet-0001/test-0003.sh \
+	fwts-test/wdat-0001/test-0001.sh \
+	fwts-test/wdat-0001/test-0002.sh \
 	fwts-test/wmi-0001/test-0001.sh \
 	fwts-test/wmi-0001/test-0002.sh \
 	fwts-test/wmi-0001/test-0003.sh \
diff --git a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log
index ac4e4f1..a971cfe 100644
--- a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log
+++ b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log
@@ -42,6 +42,7 @@  ACPI tests:
  tpm2            TPM2 Trusted Platform Module 2 test.
  uefi            UEFI Data Table test.
  waet            WAET Windows ACPI Emulated Devices Table test.
+ wdat            WDAT Microsoft Hardware Watchdog Action Table test.
  wmi             Extract and analyse Windows Management Instrumentation (WMI).
  xenv            XENV Xen Environment Table tests.
  xsdt            XSDT Extended System Description Table test.
@@ -120,6 +121,7 @@  Batch tests:
  virt            CPU Virtualisation Configuration test.
  waet            WAET Windows ACPI Emulated Devices Table test.
  wakealarm       ACPI Wakealarm tests.
+ wdat            WDAT Microsoft Hardware Watchdog Action Table test.
  wmi             Extract and analyse Windows Management Instrumentation (WMI).
  xenv            XENV Xen Environment Table tests.
  xsdt            XSDT Extended System Description Table test.
diff --git a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
index 8f1f03a..6c14ebe 100644
--- a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
+++ b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
@@ -272,6 +272,8 @@  ACPI tests:
   UEFI Data Table test.
  waet            (1 test):
   Windows ACPI Emulated Devices Table test.
+ wdat            (1 test):
+  WDAT Microsoft Hardware Watchdog Action Table test.
  wmi             (1 test):
   Windows Management Instrumentation test.
  xenv            (1 test):
@@ -645,6 +647,8 @@  Batch tests:
   Trigger wakealarm for 1 seconds in the future.
   Test if wakealarm is fired.
   Multiple wakealarm firing tests.
+ wdat            (1 test):
+  WDAT Microsoft Hardware Watchdog Action Table test.
  wmi             (1 test):
   Windows Management Instrumentation test.
  xenv            (1 test):
diff --git a/fwts-test/wdat-0001/acpidump-0001.log b/fwts-test/wdat-0001/acpidump-0001.log
new file mode 100644
index 0000000..561b6b4
--- /dev/null
+++ b/fwts-test/wdat-0001/acpidump-0001.log
@@ -0,0 +1,61 @@ 
+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  ................
+  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  . ...........@..
+  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
+  00f0: 00 00 00 00                                      ....
+
+WDAT @ 0x00000000
+  0000: 57 44 41 54 24 02 00 00 01 8a 4c 47 45 20 20 20  WDAT$.....LGE
+  0010: 4c 47 50 43 20 20 20 20 01 00 00 00 4d 53 46 54  LGPC    ....MSFT
+  0020: 13 00 00 01 20 00 00 00 ff 00 ff ff ff 00 00 00  .... ...........
+  0030: 58 02 00 00 ff 03 00 00 02 00 00 00 81 00 00 00  X...............
+  0040: 14 00 00 00 01 02 00 00 01 10 00 02 60 04 00 00  ............`...
+  0050: 00 00 00 00 00 00 00 00 ff 03 00 00 04 01 00 00  ................
+  0060: 01 10 00 02 60 04 00 00 00 00 00 00 00 00 00 00  ....`...........
+  0070: ff 03 00 00 05 01 00 00 01 10 00 02 72 04 00 00  ............r...
+  0080: 00 00 00 00 00 00 00 00 ff 03 00 00 06 83 00 00  ................
+  0090: 01 10 00 02 72 04 00 00 00 00 00 00 00 00 00 00  ....r...........
+  00a0: ff 03 00 00 08 00 00 00 01 10 0b 02 68 04 00 00  ............h...
+  00b0: 00 00 00 00 00 00 00 00 01 00 00 00 09 82 00 00  ................
+  00c0: 01 10 00 02 68 04 00 00 00 00 00 00 00 00 00 00  ....h...........
+  00d0: 00 08 00 00 09 02 00 00 01 08 00 01 72 00 00 00  ............r...
+  00e0: 00 00 00 00 45 00 00 00 ff 00 00 00 09 82 00 00  ....E...........
+  00f0: 01 08 00 01 73 00 00 00 00 00 00 00 01 00 00 00  ....s...........
+  0100: 01 00 00 00 0a 00 00 00 01 10 0b 02 68 04 00 00  ............h...
+  0110: 00 00 00 00 01 00 00 00 01 00 00 00 0b 82 00 00  ................
+  0120: 01 10 00 02 68 04 00 00 00 00 00 00 00 08 00 00  ....h...........
+  0130: 00 08 00 00 0b 02 00 00 01 08 00 01 72 00 00 00  ............r...
+  0140: 00 00 00 00 45 00 00 00 ff 00 00 00 0b 82 00 00  ....E...........
+  0150: 01 08 00 01 73 00 00 00 00 00 00 00 00 00 00 00  ....s...........
+  0160: 01 00 00 00 10 00 00 00 01 08 04 01 6a 04 00 00  ............j...
+  0170: 00 00 00 00 00 00 00 00 03 00 00 00 11 82 00 00  ................
+  0180: 01 10 00 02 6a 04 00 00 00 00 00 00 00 00 00 00  ....j...........
+  0190: 30 00 00 00 12 00 00 00 01 08 04 01 6a 04 00 00  0...........j...
+  01a0: 00 00 00 00 01 00 00 00 03 00 00 00 13 82 00 00  ................
+  01b0: 01 10 00 02 6a 04 00 00 00 00 00 00 10 00 00 00  ....j...........
+  01c0: 30 00 00 00 20 02 00 00 01 08 00 01 72 00 00 00  0... .......r...
+  01d0: 00 00 00 00 45 00 00 00 ff 00 00 00 20 00 00 00  ....E....... ...
+  01e0: 01 08 00 01 73 00 00 00 00 00 00 00 01 00 00 00  ....s...........
+  01f0: 01 00 00 00 21 02 00 00 01 08 00 01 72 00 00 00  ....!.......r...
+  0200: 00 00 00 00 45 00 00 00 ff 00 00 00 21 82 00 00  ....E.......!...
+  0210: 01 08 00 01 73 00 00 00 00 00 00 00 00 00 00 00  ....s...........
+  0220: 01 00 00 00
diff --git a/fwts-test/wdat-0001/acpidump-0002.log b/fwts-test/wdat-0001/acpidump-0002.log
new file mode 100644
index 0000000..f288fb3
--- /dev/null
+++ b/fwts-test/wdat-0001/acpidump-0002.log
@@ -0,0 +1,61 @@ 
+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  ................
+  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  . ...........@..
+  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
+  00f0: 00 00 00 00                                      ....
+
+WDAT @ 0x00000000
+  0000: 57 44 41 54 24 02 00 00 01 8a 4c 47 45 20 20 20  WDAT$.....LGE
+  0010: 4c 47 50 43 20 20 20 20 01 00 00 00 4d 53 46 54  LGPC    ....MSFT
+  0020: 13 00 00 01 20 00 00 00 ff 00 ff ff ff 10 20 30  .... ...........
+  0030: 58 02 00 00 ff 03 00 00 09 04 00 00 81 00 00 00  X...............
+  0040: 14 00 00 00 07 46 00 00 01 10 00 02 60 04 00 00  ............`...
+  0050: 00 00 00 00 00 00 00 00 ff 03 00 00 04 01 00 00  ................
+  0060: 01 10 00 02 60 04 00 00 00 00 00 00 00 00 00 00  ....`...........
+  0070: ff 03 00 00 05 01 00 00 01 10 00 02 72 04 00 00  ............r...
+  0080: 00 00 00 00 00 00 00 00 ff 03 00 00 06 83 00 00  ................
+  0090: 01 10 00 02 72 04 00 00 00 00 00 00 00 00 00 00  ....r...........
+  00a0: ff 03 00 00 08 00 00 00 01 10 0b 02 68 04 00 00  ............h...
+  00b0: 00 00 00 00 00 00 00 00 01 00 00 00 09 82 00 00  ................
+  00c0: 01 10 00 02 68 04 00 00 00 00 00 00 00 00 00 00  ....h...........
+  00d0: 00 08 00 00 09 02 00 00 01 08 00 01 72 00 00 00  ............r...
+  00e0: 00 00 00 00 45 00 00 00 ff 00 00 00 09 82 00 00  ....E...........
+  00f0: 01 08 00 01 73 00 00 00 00 00 00 00 01 00 00 00  ....s...........
+  0100: 01 00 00 00 0a 00 00 00 01 10 0b 02 68 04 00 00  ............h...
+  0110: 00 00 00 00 01 00 00 00 01 00 00 00 0b 82 00 00  ................
+  0120: 01 10 00 02 68 04 00 00 00 00 00 00 00 08 00 00  ....h...........
+  0130: 00 08 00 00 0b 02 00 00 01 08 00 01 72 00 00 00  ............r...
+  0140: 00 00 00 00 45 00 00 00 ff 00 00 00 0b 82 00 00  ....E...........
+  0150: 01 08 00 01 73 00 00 00 00 00 00 00 00 00 00 00  ....s...........
+  0160: 01 00 00 00 10 00 00 00 01 08 04 01 6a 04 00 00  ............j...
+  0170: 00 00 00 00 00 00 00 00 03 00 00 00 11 82 00 00  ................
+  0180: 01 10 00 02 6a 04 00 00 00 00 00 00 00 00 00 00  ....j...........
+  0190: 30 00 00 00 12 00 00 00 01 08 04 01 6a 04 00 00  0...........j...
+  01a0: 00 00 00 00 01 00 00 00 03 00 00 00 13 82 00 00  ................
+  01b0: 01 10 00 02 6a 04 00 00 00 00 00 00 10 00 00 00  ....j...........
+  01c0: 30 00 00 00 20 02 00 00 01 08 00 01 72 00 00 00  0... .......r...
+  01d0: 00 00 00 00 45 00 00 00 ff 00 00 00 20 00 00 00  ....E....... ...
+  01e0: 01 08 00 01 73 00 00 00 00 00 00 00 01 00 00 00  ....s...........
+  01f0: 01 00 00 00 21 02 00 00 01 08 00 01 72 00 00 00  ....!.......r...
+  0200: 00 00 00 00 45 00 00 00 ff 00 00 00 ff ff 00 00  ....E.......!...
+  0210: ff ff 00 ff 73 00 00 00 00 00 00 00 00 00 00 00  ....s...........
+  0220: 01 00 00 00
diff --git a/fwts-test/wdat-0001/test-0001.sh b/fwts-test/wdat-0001/test-0001.sh
new file mode 100755
index 0000000..587a3b7
--- /dev/null
+++ b/fwts-test/wdat-0001/test-0001.sh
@@ -0,0 +1,17 @@ 
+#!/bin/bash
+#
+TEST="Test apci table against WDAT"
+NAME=test-0001.sh
+TMPLOG=$TMP/wdat.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/wdat-0001/acpidump-0001.log wdat - | cut -c7- | grep "^wdat" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/wdat-0001/wdat-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/wdat-0001/test-0002.sh b/fwts-test/wdat-0001/test-0002.sh
new file mode 100755
index 0000000..17a279f
--- /dev/null
+++ b/fwts-test/wdat-0001/test-0002.sh
@@ -0,0 +1,17 @@ 
+#!/bin/bash
+#
+TEST="Test apci against invalid WDAT"
+NAME=test-0002.sh
+TMPLOG=$TMP/wdat.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/wdat-0001/acpidump-0002.log wdat - | cut -c7- | grep "^wdat" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/wdat-0001/wdat-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/wdat-0001/wdat-0001.log b/fwts-test/wdat-0001/wdat-0001.log
new file mode 100644
index 0000000..1dea97e
--- /dev/null
+++ b/fwts-test/wdat-0001/wdat-0001.log
@@ -0,0 +1,12 @@ 
+wdat            wdat: WDAT Microsoft Hardware Watchdog Action Table test.
+wdat            ----------------------------------------------------------
+wdat            Test 1 of 1: WDAT Microsoft Hardware Watchdog Action Table
+wdat            test.
+wdat            PASSED: Test 1, All 20 WDAT Watchdog Instruction Entries
+wdat            look sane.
+wdat            PASSED: Test 1, No issues found in WDAT table.
+wdat            
+wdat            ==========================================================
+wdat            2 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
+wdat            info only.
+wdat            ==========================================================
diff --git a/fwts-test/wdat-0001/wdat-0002.log b/fwts-test/wdat-0001/wdat-0002.log
new file mode 100644
index 0000000..f07f5b6
--- /dev/null
+++ b/fwts-test/wdat-0001/wdat-0002.log
@@ -0,0 +1,31 @@ 
+wdat            wdat: WDAT Microsoft Hardware Watchdog Action Table test.
+wdat            ----------------------------------------------------------
+wdat            Test 1 of 1: WDAT Microsoft Hardware Watchdog Action Table
+wdat            test.
+wdat            FAILED [MEDIUM] WDATReservedFieldsNonZero: Test 1, WDAT
+wdat            Reserved Fields contain a non-zero value, these all should
+wdat            be zero.
+wdat            FAILED [MEDIUM] WDATMinGreaterThanMax: Test 1, WDAT
+wdat            Minimum Count is 0x409 and is greater than the Maximum
+wdat            Count of 0x3ff
+wdat            FAILED [HIGH] WDATWatchdogActionInvalid: Test 1, WDAT
+wdat            Watchdog Instruction Entry 1 Watchdog Action field is 0x7
+wdat            and should be one of 0x00, 0x04, 0x05, 0x06, 0x08, 0x09,
+wdat            0x0a, 0x0b, 0x10, 0x11, 0x12, 0x13, 0x20 or 0x21
+wdat            FAILED [HIGH] WDATInstructionFlagsInvalid: Test 1, WDAT
+wdat            Watchdog Instruction Entry 1 Instruction Flags field is
+wdat            0x46 and should be one of 0x00, 0x01, 0x02, 0x03 or 0x80,
+wdat            0x81, 0x82, 0x83
+wdat            FAILED [HIGH] WDATWatchdogActionInvalid: Test 1, WDAT
+wdat            Watchdog Instruction Entry 20 Watchdog Action field is
+wdat            0xff and should be one of 0x00, 0x04, 0x05, 0x06, 0x08,
+wdat            0x09, 0x0a, 0x0b, 0x10, 0x11, 0x12, 0x13, 0x20 or 0x21
+wdat            FAILED [HIGH] WDATInstructionFlagsInvalid: Test 1, WDAT
+wdat            Watchdog Instruction Entry 20 Instruction Flags field is
+wdat            0xff and should be one of 0x00, 0x01, 0x02, 0x03 or 0x80,
+wdat            0x81, 0x82, 0x83
+wdat            
+wdat            ==========================================================
+wdat            0 passed, 6 failed, 0 warning, 0 aborted, 0 skipped, 0
+wdat            info only.
+wdat            ==========================================================