ACK: [PATCH 2/2] fwts-test: Add regression test for FACS, update fwst-tests

Alex Hung alex.hung at canonical.com
Wed Jun 24 07:30:02 UTC 2015


On 06/23/2015 11:12 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Add FACS test and update arg-show-test* tests to accommodate this
> new test too.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  Makefile.am                                        |  2 ++
>  .../arg-show-tests-0001/arg-show-tests-0001.log    |  2 ++
>  .../arg-show-tests-full-0001.log                   |  6 +++-
>  fwts-test/facs-0001/acpidump-0001.log              |  6 ++++
>  fwts-test/facs-0001/acpidump-0002.log              |  6 ++++
>  fwts-test/facs-0001/facs-0001.log                  | 27 ++++++++++++++++
>  fwts-test/facs-0001/facs-0002.log                  | 36 ++++++++++++++++++++++
>  fwts-test/facs-0001/test-0001.sh                   | 17 ++++++++++
>  fwts-test/facs-0001/test-0002.sh                   | 17 ++++++++++
>  9 files changed, 118 insertions(+), 1 deletion(-)
>  create mode 100644 fwts-test/facs-0001/acpidump-0001.log
>  create mode 100644 fwts-test/facs-0001/acpidump-0002.log
>  create mode 100644 fwts-test/facs-0001/facs-0001.log
>  create mode 100644 fwts-test/facs-0001/facs-0002.log
>  create mode 100755 fwts-test/facs-0001/test-0001.sh
>  create mode 100755 fwts-test/facs-0001/test-0002.sh
> 
> diff --git a/Makefile.am b/Makefile.am
> index 43fa9d8..d753f9f 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -66,6 +66,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
>  	fwts-test/dbgp-0001/test-0002.sh \
>  	fwts-test/disassemble-0001/test-0001.sh \
>  	fwts-test/erst-0001/test-0001.sh \
> +	fwts-test/facs-0001/test-0001.sh \
> +	fwts-test/facs-0001/test-0002.sh \
>  	fwts-test/hest-0001/test-0001.sh \
>  	fwts-test/hest-0001/test-0002.sh \
>  	fwts-test/klog-0001/test-0001.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 9211b37..d50d078 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
> @@ -13,6 +13,7 @@ ACPI tests:
>   dmar            DMA Remapping (VT-d) test.
>   ecdt            Embedded Controller Boot Resources Table test.
>   erst            ERST Error Record Serialization Table test.
> + facs            FACS Firmware ACPI Control Structure test.
>   fadt            FADT Fixed ACPI Description Table tests.
>   gtdt            GTDT Generic Timer Description Table test.
>   hest            HEST Hardware Error Source Table test.
> @@ -56,6 +57,7 @@ Batch tests:
>   ebda            Test EBDA region is mapped and reserved in memory map table.
>   ecdt            Embedded Controller Boot Resources Table test.
>   erst            ERST Error Record Serialization Table test.
> + facs            FACS Firmware ACPI Control Structure test.
>   fadt            FADT Fixed ACPI Description Table tests.
>   fan             Simple fan tests.
>   gtdt            GTDT Generic Timer 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 6e224e7..efc0d56 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
> @@ -29,6 +29,8 @@ ACPI tests:
>    ECDT Embedded Controller Boot Resources Table test.
>   erst            (1 test):
>    ERST Error Record Serialization Table test.
> + facs            (1 test):
> +  FACS Firmware ACPI Control Structure test.
>   fadt            (3 tests):
>    Test FADT ACPI Description Table tests.
>    Test FADT SCI_EN bit is enabled.
> @@ -309,6 +311,8 @@ Batch tests:
>    ECDT Embedded Controller Boot Resources Table test.
>   erst            (1 test):
>    ERST Error Record Serialization Table test.
> + facs            (1 test):
> +  FACS Firmware ACPI Control Structure test.
>   fadt            (3 tests):
>    Test FADT ACPI Description Table tests.
>    Test FADT SCI_EN bit is enabled.
> @@ -782,4 +786,4 @@ UEFI tests:
>    Test UEFI RT service query variable info interface stress test.
>    Test UEFI RT service get variable interface, invalid parameters.
>  
> -Total of 645 tests
> +Total of 647 tests
> diff --git a/fwts-test/facs-0001/acpidump-0001.log b/fwts-test/facs-0001/acpidump-0001.log
> new file mode 100644
> index 0000000..4d5f775
> --- /dev/null
> +++ b/fwts-test/facs-0001/acpidump-0001.log
> @@ -0,0 +1,6 @@
> +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  ................
> diff --git a/fwts-test/facs-0001/acpidump-0002.log b/fwts-test/facs-0001/acpidump-0002.log
> new file mode 100644
> index 0000000..6d11ec7
> --- /dev/null
> +++ b/fwts-test/facs-0001/acpidump-0002.log
> @@ -0,0 +1,6 @@
> +FACS @ 0x00000000
> +  0000: 46 41 43 53 40 00 00 00 ef be ad de 00 00 00 00  FACS at ...........
> +  0010: 00 00 00 00 ff ff ff ff 00 00 00 00 00 00 00 00  ................
> +  0020: 01 aa 55 aa ef ef ef ef 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 01 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> diff --git a/fwts-test/facs-0001/facs-0001.log b/fwts-test/facs-0001/facs-0001.log
> new file mode 100644
> index 0000000..7c80423
> --- /dev/null
> +++ b/fwts-test/facs-0001/facs-0001.log
> @@ -0,0 +1,27 @@
> +facs            facs: FACS Firmware ACPI Control Structure test.
> +facs            ----------------------------------------------------------
> +facs            Cannot find FACP.
> +facs            Test 1 of 1: FACS Firmware ACPI Control Structure test.
> +facs            FACS Firmware ACPI Control Structure:
> +facs              Signature:                'FACS'
> +facs              Length:                   0x00000040
> +facs              Hardware Signature:       0x00000000
> +facs              Firmware Waking Vector:   0x00000000
> +facs              Global Lock:              0x00000000
> +facs              Flags:                    0x00000000
> +facs              X-Firmware Waking Vector: 0x0000000000000000
> +facs              Version:                  0x01
> +facs              Reserved:                 0x00 0x00 0x00
> +facs              OSPM Flags:               0x00000000
> +facs              Reserved:                 0x00 0x00 0x00 0x00
> +facs              Reserved:                 0x00 0x00 0x00 0x00
> +facs              Reserved:                 0x00 0x00 0x00 0x00
> +facs              Reserved:                 0x00 0x00 0x00 0x00
> +facs              Reserved:                 0x00 0x00 0x00 0x00
> +facs              Reserved:                 0x00 0x00 0x00 0x00
> +facs            PASSED: Test 1, No issues found in FACS table.
> +facs            
> +facs            ==========================================================
> +facs            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
> +facs            info only.
> +facs            ==========================================================
> diff --git a/fwts-test/facs-0001/facs-0002.log b/fwts-test/facs-0001/facs-0002.log
> new file mode 100644
> index 0000000..6d7cb7c
> --- /dev/null
> +++ b/fwts-test/facs-0001/facs-0002.log
> @@ -0,0 +1,36 @@
> +facs            facs: FACS Firmware ACPI Control Structure test.
> +facs            ----------------------------------------------------------
> +facs            Cannot find FACP.
> +facs            Test 1 of 1: FACS Firmware ACPI Control Structure test.
> +facs            FACS Firmware ACPI Control Structure:
> +facs              Signature:                'FACS'
> +facs              Length:                   0x00000040
> +facs              Hardware Signature:       0xdeadbeef
> +facs              Firmware Waking Vector:   0x00000000
> +facs              Global Lock:              0x00000000
> +facs              Flags:                    0xffffffff
> +facs              X-Firmware Waking Vector: 0x0000000000000000
> +facs              Version:                  0x01
> +facs              Reserved:                 0xaa 0x55 0xaa
> +facs              OSPM Flags:               0xefefefef
> +facs              Reserved:                 0x00 0x00 0x00 0x00
> +facs              Reserved:                 0x00 0x00 0x00 0x00
> +facs              Reserved:                 0x00 0x00 0x01 0x00
> +facs              Reserved:                 0x00 0x00 0x00 0x00
> +facs              Reserved:                 0x00 0x00 0x00 0x00
> +facs              Reserved:                 0x00 0x00 0x00 0x00
> +facs            FAILED [LOW] FACSInvalidReserved1: Test 1, FACS: 1st
> +facs            Reserved field is non-zero
> +facs            FAILED [MEDIUM] FACSFlagsReservedBitsSet: Test 1, FACS:
> +facs            Flags field is 0xffffffff and some of the reserved bits
> +facs            [31:2] are set
> +facs            FAILED [MEDIUM] FACSFlagsReservedBitsSet: Test 1, FACS:
> +facs            OSPM Flags field is 0xefefefef and some of the reserved
> +facs            bits [31:1] are set
> +facs            FAILED [LOW] FACSInvalidReserved1: Test 1, FACS: 2nd
> +facs            Reserved field is non-zero
> +facs            
> +facs            ==========================================================
> +facs            0 passed, 4 failed, 0 warning, 0 aborted, 0 skipped, 0
> +facs            info only.
> +facs            ==========================================================
> diff --git a/fwts-test/facs-0001/test-0001.sh b/fwts-test/facs-0001/test-0001.sh
> new file mode 100755
> index 0000000..8733a18
> --- /dev/null
> +++ b/fwts-test/facs-0001/test-0001.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test table against FACS"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/facs.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/facs-0001/acpidump-0001.log facs - | cut -c7- | grep "^facs" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/facs-0001/facs-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/facs-0001/test-0002.sh b/fwts-test/facs-0001/test-0002.sh
> new file mode 100755
> index 0000000..5d16b2e
> --- /dev/null
> +++ b/fwts-test/facs-0001/test-0002.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test table against invalid FACS"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/facs.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/facs-0001/acpidump-0002.log facs - | cut -c7- | grep "^facs" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/facs-0001/facs-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: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list