ACK: [PATCH 2/2] fwts-test: Add WAET table regression tests

ivanhu ivan.hu at canonical.com
Fri Jul 3 06:15:40 UTC 2015



On 2015年07月01日 21:11, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   Makefile.am                                        |  3 +++
>   .../arg-show-tests-0001/arg-show-tests-0001.log    |  2 ++
>   .../arg-show-tests-full-0001.log                   |  6 ++++-
>   fwts-test/waet-0001/acpidump-0001.log              | 29 ++++++++++++++++++++++
>   fwts-test/waet-0001/acpidump-0002.log              | 29 ++++++++++++++++++++++
>   fwts-test/waet-0001/acpidump-0003.log              | 29 ++++++++++++++++++++++
>   fwts-test/waet-0001/test-0001.sh                   | 17 +++++++++++++
>   fwts-test/waet-0001/test-0002.sh                   | 17 +++++++++++++
>   fwts-test/waet-0001/test-0003.sh                   | 17 +++++++++++++
>   fwts-test/waet-0001/waet-0001.log                  | 14 +++++++++++
>   fwts-test/waet-0001/waet-0002.log                  | 16 ++++++++++++
>   fwts-test/waet-0001/waet-0003.log                  | 10 ++++++++
>   12 files changed, 188 insertions(+), 1 deletion(-)
>   create mode 100644 fwts-test/waet-0001/acpidump-0001.log
>   create mode 100644 fwts-test/waet-0001/acpidump-0002.log
>   create mode 100644 fwts-test/waet-0001/acpidump-0003.log
>   create mode 100755 fwts-test/waet-0001/test-0001.sh
>   create mode 100755 fwts-test/waet-0001/test-0002.sh
>   create mode 100755 fwts-test/waet-0001/test-0003.sh
>   create mode 100644 fwts-test/waet-0001/waet-0001.log
>   create mode 100644 fwts-test/waet-0001/waet-0002.log
>   create mode 100644 fwts-test/waet-0001/waet-0003.log
>
> diff --git a/Makefile.am b/Makefile.am
> index 61dfde8..cbeaea3 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -102,6 +102,9 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
>   	fwts-test/syntaxcheck-0001/test-0001.sh \
>   	fwts-test/tcpa-0001/test-0001.sh \
>   	fwts-test/tcpa-0001/test-0002.sh \
> +	fwts-test/waet-0001/test-0001.sh \
> +	fwts-test/waet-0001/test-0002.sh \
> +	fwts-test/waet-0001/test-0003.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 5d5bb4a..5a54e51 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
> @@ -32,6 +32,7 @@ ACPI tests:
>    spmi            SPMI Service Processor Management Interface Description Table test.
>    srat            SRAT System Resource Affinity Table test.
>    tcpa            Trusted Computing Platform Alliance Capabilities Table test.
> + waet            Windows ACPI Emulated Devices Table test.
>    wmi             Extract and analyse Windows Management Instrumentation (WMI).
>    xsdt            XSDT Extended System Description Table test.
>   
> @@ -99,6 +100,7 @@ Batch tests:
>    uefibootpath    Sanity check for UEFI Boot Path Boot####.
>    version         Gather kernel system information.
>    virt            CPU Virtualisation Configuration test.
> + waet            Windows ACPI Emulated Devices Table test.
>    wakealarm       ACPI Wakealarm tests.
>    wmi             Extract and analyse Windows Management Instrumentation (WMI).
>    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 96e6764..ac262e6 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
> @@ -252,6 +252,8 @@ ACPI tests:
>     SRAT System Resource Affinity Table test.
>    tcpa            (1 test):
>     Validate TCPA table.
> + waet            (1 test):
> +  Windows ACPI Emulated Devices Table test.
>    wmi             (1 test):
>     Windows Management Instrumentation test.
>    xsdt            (1 test):
> @@ -600,6 +602,8 @@ Batch tests:
>     Gather ACPI driver version.
>    virt            (1 test):
>     CPU Virtualisation Configuration test.
> + waet            (1 test):
> +  Windows ACPI Emulated Devices Table test.
>    wakealarm       (4 tests):
>     Test existence of RTC with alarm interface.
>     Trigger wakealarm for 1 seconds in the future.
> @@ -798,4 +802,4 @@ UEFI tests:
>     Test UEFI RT service query variable info interface stress test.
>     Test UEFI RT service get variable interface, invalid parameters.
>   
> -Total of 653 tests
> +Total of 655 tests
> diff --git a/fwts-test/waet-0001/acpidump-0001.log b/fwts-test/waet-0001/acpidump-0001.log
> new file mode 100644
> index 0000000..6f9776f
> --- /dev/null
> +++ b/fwts-test/waet-0001/acpidump-0001.log
> @@ -0,0 +1,29 @@
> +FACS @ 0x00000000
> +  0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00  FACS at ...........
> +  0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +
> +FACP @ 0x00000000
> +  0000: 46 41 43 50 f4 00 00 00 03 f9 41 4d 44 20 20 20  FACP......AMD
> +  0010: 47 55 41 4d 20 20 20 20 00 00 04 06 41 4d 44 20  GUAM    ....AMD
> +  0020: 40 42 0f 00 c0 2f e9 af 92 47 e8 af 00 02 09 00  @B.../...G......
> +  0030: b0 00 00 00 f0 f1 00 00 00 80 00 00 00 00 00 00  ................
> +  0040: 04 80 00 00 00 00 00 00 00 82 00 00 08 80 00 00  ................
> +  0050: 20 80 00 00 00 00 00 00 04 02 01 04 08 00 00 00   ...............
> +  0060: 65 00 e9 03 00 00 00 00 01 00 0d 00 32 00 00 00  e...........2...
> +  0070: a5 c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0080: 00 00 00 00 c0 2f e9 af 00 00 00 00 92 47 e8 af  ...../.......G..
> +  0090: 00 00 00 00 01 20 00 00 00 80 00 00 00 00 00 00  ..... ..........
> +  00a0: 00 00 00 00 00 00 00 00 00 00 00 00 01 10 00 00  ................
> +  00b0: 04 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  00c0: 00 00 00 00 01 08 00 00 00 82 00 00 00 00 00 00  ................
> +  00d0: 01 20 00 00 08 80 00 00 00 00 00 00 01 40 00 00  . ........... at ..
> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
> +  00f0: 00 00 00 00                                      ....
> +
> +WAET @ 0x00000000
> +  0000: 57 41 45 54 28 00 00 00 01 62 56 4d 57 41 52 45  WAET(....bVMWARE
> +  0010: 56 4d 57 20 57 41 45 54 00 00 04 06 56 4d 57 20  VMW WAET....VMW
> +  0020: 01 00 00 00 02 00 00 00
> diff --git a/fwts-test/waet-0001/acpidump-0002.log b/fwts-test/waet-0001/acpidump-0002.log
> new file mode 100644
> index 0000000..cfc8af2
> --- /dev/null
> +++ b/fwts-test/waet-0001/acpidump-0002.log
> @@ -0,0 +1,29 @@
> +FACS @ 0x00000000
> +  0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00  FACS at ...........
> +  0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +
> +FACP @ 0x00000000
> +  0000: 46 41 43 50 f4 00 00 00 03 f9 41 4d 44 20 20 20  FACP......AMD
> +  0010: 47 55 41 4d 20 20 20 20 00 00 04 06 41 4d 44 20  GUAM    ....AMD
> +  0020: 40 42 0f 00 c0 2f e9 af 92 47 e8 af 00 02 09 00  @B.../...G......
> +  0030: b0 00 00 00 f0 f1 00 00 00 80 00 00 00 00 00 00  ................
> +  0040: 04 80 00 00 00 00 00 00 00 82 00 00 08 80 00 00  ................
> +  0050: 20 80 00 00 00 00 00 00 04 02 01 04 08 00 00 00   ...............
> +  0060: 65 00 e9 03 00 00 00 00 01 00 0d 00 32 00 00 00  e...........2...
> +  0070: a5 c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0080: 00 00 00 00 c0 2f e9 af 00 00 00 00 92 47 e8 af  ...../.......G..
> +  0090: 00 00 00 00 01 20 00 00 00 80 00 00 00 00 00 00  ..... ..........
> +  00a0: 00 00 00 00 00 00 00 00 00 00 00 00 01 10 00 00  ................
> +  00b0: 04 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  00c0: 00 00 00 00 01 08 00 00 00 82 00 00 00 00 00 00  ................
> +  00d0: 01 20 00 00 08 80 00 00 00 00 00 00 01 40 00 00  . ........... at ..
> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
> +  00f0: 00 00 00 00                                      ....
> +
> +WAET @ 0x00000000
> +  0000: 57 41 45 54 28 00 00 00 01 62 56 4d 57 41 52 45  WAET(....bVMWARE
> +  0010: 56 4d 57 20 57 41 45 54 00 00 04 06 56 4d 57 20  VMW WAET....VMW
> +  0020: 01 00 00 00 fc ff ff ff
> diff --git a/fwts-test/waet-0001/acpidump-0003.log b/fwts-test/waet-0001/acpidump-0003.log
> new file mode 100644
> index 0000000..cf12805
> --- /dev/null
> +++ b/fwts-test/waet-0001/acpidump-0003.log
> @@ -0,0 +1,29 @@
> +FACS @ 0x00000000
> +  0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00  FACS at ...........
> +  0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +
> +FACP @ 0x00000000
> +  0000: 46 41 43 50 f4 00 00 00 03 f9 41 4d 44 20 20 20  FACP......AMD
> +  0010: 47 55 41 4d 20 20 20 20 00 00 04 06 41 4d 44 20  GUAM    ....AMD
> +  0020: 40 42 0f 00 c0 2f e9 af 92 47 e8 af 00 02 09 00  @B.../...G......
> +  0030: b0 00 00 00 f0 f1 00 00 00 80 00 00 00 00 00 00  ................
> +  0040: 04 80 00 00 00 00 00 00 00 82 00 00 08 80 00 00  ................
> +  0050: 20 80 00 00 00 00 00 00 04 02 01 04 08 00 00 00   ...............
> +  0060: 65 00 e9 03 00 00 00 00 01 00 0d 00 32 00 00 00  e...........2...
> +  0070: a5 c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0080: 00 00 00 00 c0 2f e9 af 00 00 00 00 92 47 e8 af  ...../.......G..
> +  0090: 00 00 00 00 01 20 00 00 00 80 00 00 00 00 00 00  ..... ..........
> +  00a0: 00 00 00 00 00 00 00 00 00 00 00 00 01 10 00 00  ................
> +  00b0: 04 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  00c0: 00 00 00 00 01 08 00 00 00 82 00 00 00 00 00 00  ................
> +  00d0: 01 20 00 00 08 80 00 00 00 00 00 00 01 40 00 00  . ........... at ..
> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
> +  00f0: 00 00 00 00                                      ....
> +
> +WAET @ 0x00000000
> +  0000: 57 41 45 54 26 00 00 00 01 62 56 4d 57 41 52 45  WAET(....bVMWARE
> +  0010: 56 4d 57 20 57 41 45 54 00 00 04 06 56 4d 57 20  VMW WAET....VMW
> +  0020: 01 00 00 00 fc ff
> diff --git a/fwts-test/waet-0001/test-0001.sh b/fwts-test/waet-0001/test-0001.sh
> new file mode 100755
> index 0000000..31271a2
> --- /dev/null
> +++ b/fwts-test/waet-0001/test-0001.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test table against WAET"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/waet.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/waet-0001/acpidump-0001.log waet - | cut -c7- | grep "^waet" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/waet-0001/waet-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/waet-0001/test-0002.sh b/fwts-test/waet-0001/test-0002.sh
> new file mode 100755
> index 0000000..9bdf5ae
> --- /dev/null
> +++ b/fwts-test/waet-0001/test-0002.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test table against invalid WAET"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/waet.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/waet-0001/acpidump-0002.log waet - | cut -c7- | grep "^waet" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/waet-0001/waet-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/waet-0001/test-0003.sh b/fwts-test/waet-0001/test-0003.sh
> new file mode 100755
> index 0000000..1767240
> --- /dev/null
> +++ b/fwts-test/waet-0001/test-0003.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test table against invalid WAET"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/waet.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/waet-0001/acpidump-0003.log waet - | cut -c7- | grep "^waet" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/waet-0001/waet-0003.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/waet-0001/waet-0001.log b/fwts-test/waet-0001/waet-0001.log
> new file mode 100644
> index 0000000..34dbad0
> --- /dev/null
> +++ b/fwts-test/waet-0001/waet-0001.log
> @@ -0,0 +1,14 @@
> +waet            waet: Windows ACPI Emulated Devices Table test.
> +waet            ----------------------------------------------------------
> +waet            Test 1 of 1: Windows ACPI Emulated Devices Table test.
> +waet            WAET Table:
> +waet              Emulated Device Flags:    0x00000002
> +waet                Bit [0] RTC Good:       0
> +waet                Bit [1] PM Timer Good:  1
> +waet
> +waet            PASSED: Test 1, No issues found in WAET table.
> +waet
> +waet            ==========================================================
> +waet            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
> +waet            info only.
> +waet            ==========================================================
> diff --git a/fwts-test/waet-0001/waet-0002.log b/fwts-test/waet-0001/waet-0002.log
> new file mode 100644
> index 0000000..96ca5cb
> --- /dev/null
> +++ b/fwts-test/waet-0001/waet-0002.log
> @@ -0,0 +1,16 @@
> +waet            waet: Windows ACPI Emulated Devices Table test.
> +waet            ----------------------------------------------------------
> +waet            Test 1 of 1: Windows ACPI Emulated Devices Table test.
> +waet            WAET Table:
> +waet              Emulated Device Flags:    0xfffffffc
> +waet                Bit [0] RTC Good:       0
> +waet                Bit [1] PM Timer Good:  0
> +waet
> +waet            FAILED [HIGH] WAETFlagReservedNotZero: Test 1, WAET
> +waet            Emulated Device Flags was 0xfffffffc and so some of
> +waet            reserved bits [31:2] are not zero as expected.
> +waet
> +waet            ==========================================================
> +waet            0 passed, 1 failed, 0 warning, 0 aborted, 0 skipped, 0
> +waet            info only.
> +waet            ==========================================================
> diff --git a/fwts-test/waet-0001/waet-0003.log b/fwts-test/waet-0001/waet-0003.log
> new file mode 100644
> index 0000000..360d608
> --- /dev/null
> +++ b/fwts-test/waet-0001/waet-0003.log
> @@ -0,0 +1,10 @@
> +waet            waet: Windows ACPI Emulated Devices Table test.
> +waet            ----------------------------------------------------------
> +waet            Test 1 of 1: Windows ACPI Emulated Devices Table test.
> +waet            FAILED [HIGH] WAETTooShort: Test 1, WAET table too short,
> +waet            expecting 40 bytes, instead got 38 bytes
> +waet
> +waet            ==========================================================
> +waet            0 passed, 1 failed, 0 warning, 0 aborted, 0 skipped, 0
> +waet            info only.
> +waet            ==========================================================
Acked-by: Ivan Hu<ivan.hu at canonical.com>



More information about the fwts-devel mailing list