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

Alex Hung alex.hung at canonical.com
Wed Jul 29 03:43:07 UTC 2015


On 07/27/2015 02:47 PM, Ivan Hu wrote:
> Signed-off-by: Ivan Hu <ivan.hu 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/fpdt-0001/acpidump-0001.log              | 32 +++++++++++++++++++++
>  fwts-test/fpdt-0001/acpidump-0002.log              | 33 ++++++++++++++++++++++
>  fwts-test/fpdt-0001/fpdt-0001.log                  | 25 ++++++++++++++++
>  fwts-test/fpdt-0001/fpdt-0002.log                  | 22 +++++++++++++++
>  fwts-test/fpdt-0001/test-0001.sh                   | 17 +++++++++++
>  fwts-test/fpdt-0001/test-0002.sh                   | 17 +++++++++++
>  9 files changed, 155 insertions(+), 1 deletion(-)
>  create mode 100644 fwts-test/fpdt-0001/acpidump-0001.log
>  create mode 100644 fwts-test/fpdt-0001/acpidump-0002.log
>  create mode 100644 fwts-test/fpdt-0001/fpdt-0001.log
>  create mode 100644 fwts-test/fpdt-0001/fpdt-0002.log
>  create mode 100755 fwts-test/fpdt-0001/test-0001.sh
>  create mode 100755 fwts-test/fpdt-0001/test-0002.sh
> 
> diff --git a/Makefile.am b/Makefile.am
> index d8083b4..0cb63dd 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -71,6 +71,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
>  	fwts-test/erst-0001/test-0002.sh \
>  	fwts-test/facs-0001/test-0001.sh \
>  	fwts-test/facs-0001/test-0002.sh \
> +	fwts-test/fpdt-0001/test-0001.sh \
> +	fwts-test/fpdt-0001/test-0002.sh \
>  	fwts-test/hest-0001/test-0001.sh \
>  	fwts-test/hest-0001/test-0002.sh \
>  	fwts-test/iort-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 b17f082..1aaf9df 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
> @@ -16,6 +16,7 @@ ACPI tests:
>   erst            ERST Error Record Serialization Table test.
>   facs            FACS Firmware ACPI Control Structure test.
>   fadt            FADT Fixed ACPI Description Table tests.
> + fpdt            FPDT Firmware Performance Data Table test.
>   gtdt            GTDT Generic Timer Description Table test.
>   hest            HEST Hardware Error Source Table test.
>   hpet            HPET IA-PC High Precision Event Timer Table tests.
> @@ -71,6 +72,7 @@ Batch tests:
>   facs            FACS Firmware ACPI Control Structure test.
>   fadt            FADT Fixed ACPI Description Table tests.
>   fan             Simple fan tests.
> + fpdt            FPDT Firmware Performance Data Table test.
>   gtdt            GTDT Generic Timer Description Table test.
>   hda_audio       HDA Audio Pin Configuration test.
>   hest            HEST Hardware Error Source 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 0d8d6b4..3fd9769 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
> @@ -37,6 +37,8 @@ ACPI tests:
>    Test FADT ACPI Description Table tests.
>    Test FADT SCI_EN bit is enabled.
>    Test FADT reset register.
> + fpdt            (1 test):
> +  FPDT Firmware Performance Data Table test.
>   gtdt            (1 test):
>    GTDT Generic Timer Description Table test.
>   hest            (1 test):
> @@ -342,6 +344,8 @@ Batch tests:
>   fan             (2 tests):
>    Test fan status.
>    Load system, check CPU fan status.
> + fpdt            (1 test):
> +  FPDT Firmware Performance Data Table test.
>   gtdt            (1 test):
>    GTDT Generic Timer Description Table test.
>   hda_audio       (1 test):
> @@ -824,4 +828,4 @@ UEFI tests:
>    Test UEFI RT service query variable info interface stress test.
>    Test UEFI RT service get variable interface, invalid parameters.
>  
> -Total of 666 tests
> +Total of 668 tests
> diff --git a/fwts-test/fpdt-0001/acpidump-0001.log b/fwts-test/fpdt-0001/acpidump-0001.log
> new file mode 100644
> index 0000000..66f59a0
> --- /dev/null
> +++ b/fwts-test/fpdt-0001/acpidump-0001.log
> @@ -0,0 +1,32 @@
> +FACS @ 0x00000000
> +  0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00  FACS at ...........
> +  0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +
> +FACP @ 0x00000000
> +  0000: 46 41 43 50 f4 00 00 00 03 f9 41 4d 44 20 20 20  FACP......AMD   
> +  0010: 47 55 41 4d 20 20 20 20 00 00 04 06 41 4d 44 20  GUAM    ....AMD 
> +  0020: 40 42 0f 00 c0 2f e9 af 92 47 e8 af 00 02 09 00  @B.../...G......
> +  0030: b0 00 00 00 f0 f1 00 00 00 80 00 00 00 00 00 00  ................
> +  0040: 04 80 00 00 00 00 00 00 00 82 00 00 08 80 00 00  ................
> +  0050: 20 80 00 00 00 00 00 00 04 02 01 04 08 00 00 00   ...............
> +  0060: 65 00 e9 03 00 00 00 00 01 00 0d 00 32 00 00 00  e...........2...
> +  0070: a5 c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0080: 00 00 00 00 c0 2f e9 af 00 00 00 00 92 47 e8 af  ...../.......G..
> +  0090: 00 00 00 00 01 20 00 00 00 80 00 00 00 00 00 00  ..... ..........
> +  00a0: 00 00 00 00 00 00 00 00 00 00 00 00 01 10 00 00  ................
> +  00b0: 04 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  00c0: 00 00 00 00 01 08 00 00 00 82 00 00 00 00 00 00  ................
> +  00d0: 01 20 00 00 08 80 00 00 00 00 00 00 01 40 00 00  . ........... at ..
> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
> +  00f0: 00 00 00 00                                      ....
> +
> +FPDT @ 0x00000000
> +  0000: 46 50 44 54 44 00 00 00 01 90 41 4C 41 53 4B 41  FPDTD.....ALASKA
> +  0010: 41 20 4D 20 49 00 00 00 09 20 07 01 41 4D 49 20  A M I.... ..AMI
> +  0020: 13 00 01 00 01 00 10 01 00 00 00 00 18 00 EC D9  ................
> +  0030: 00 00 00 00 00 00 10 01 00 00 00 00 38 00 EC D9  ............8...
> +  0040: 00 00 00 00                                      ....
> +
> diff --git a/fwts-test/fpdt-0001/acpidump-0002.log b/fwts-test/fpdt-0001/acpidump-0002.log
> new file mode 100644
> index 0000000..1868c63
> --- /dev/null
> +++ b/fwts-test/fpdt-0001/acpidump-0002.log
> @@ -0,0 +1,33 @@
> +FACS @ 0x00000000
> +  0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00  FACS at ...........
> +  0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +
> +FACP @ 0x00000000
> +  0000: 46 41 43 50 f4 00 00 00 03 f9 41 4d 44 20 20 20  FACP......AMD   
> +  0010: 47 55 41 4d 20 20 20 20 00 00 04 06 41 4d 44 20  GUAM    ....AMD 
> +  0020: 40 42 0f 00 c0 2f e9 af 92 47 e8 af 00 02 09 00  @B.../...G......
> +  0030: b0 00 00 00 f0 f1 00 00 00 80 00 00 00 00 00 00  ................
> +  0040: 04 80 00 00 00 00 00 00 00 82 00 00 08 80 00 00  ................
> +  0050: 20 80 00 00 00 00 00 00 04 02 01 04 08 00 00 00   ...............
> +  0060: 65 00 e9 03 00 00 00 00 01 00 0d 00 32 00 00 00  e...........2...
> +  0070: a5 c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0080: 00 00 00 00 c0 2f e9 af 00 00 00 00 92 47 e8 af  ...../.......G..
> +  0090: 00 00 00 00 01 20 00 00 00 80 00 00 00 00 00 00  ..... ..........
> +  00a0: 00 00 00 00 00 00 00 00 00 00 00 00 01 10 00 00  ................
> +  00b0: 04 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  00c0: 00 00 00 00 01 08 00 00 00 82 00 00 00 00 00 00  ................
> +  00d0: 01 20 00 00 08 80 00 00 00 00 00 00 01 40 00 00  . ........... at ..
> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
> +  00f0: 00 00 00 00                                      ....
> +
> +FPDT @ 0x00000000
> +  0000: 46 50 44 54 44 00 00 00 01 90 41 4C 41 53 4B 41  FPDTD.....ALASKA
> +  0010: 41 20 4D 20 49 00 00 00 09 20 07 01 41 4D 49 20  A M I.... ..AMI
> +  0020: 13 00 01 00 01 00 10 01 00 00 00 00 18 00 EC D9  ................
> +  0030: 00 00 00 00 00 00 11 01 00 00 00 00 38 00 EC D9  ............8...
> +  0040: 00 00 00 00 00 00 40 10 01 00 00 00 00 38 00 EC  .............8..
> +  0050: D9 00 00 00 00                                   .....
> +
> diff --git a/fwts-test/fpdt-0001/fpdt-0001.log b/fwts-test/fpdt-0001/fpdt-0001.log
> new file mode 100644
> index 0000000..91d2363
> --- /dev/null
> +++ b/fwts-test/fpdt-0001/fpdt-0001.log
> @@ -0,0 +1,25 @@
> +fpdt            fpdt: FPDT Firmware Performance Data Table test.
> +fpdt            ----------------------------------------------------------
> +fpdt            Test 1 of 1: FPDT Firmware Performance Data Table test.
> +fpdt              S3 Performance Table Pointer Record:
> +fpdt                Perf Rec Type:	0x0001
> +fpdt                Rec Length:	0x10
> +fpdt                Revision:	0x01
> +fpdt                Reserved:	0x00000000
> +fpdt                S3PT Pointer:	0x00000000d9ec0018
> +fpdt            Note: currently fwts does not check S3PT validity and the
> +fpdt            associated data
> +fpdt                Firmware Basic Boot Performance Pointer Record:
> +fpdt                Perf Rec Type:	0x0000
> +fpdt                Rec Length:	0x10
> +fpdt                Revision:	0x01
> +fpdt                Reserved:	0x00000000
> +fpdt                FBPT Pointer:	0x00000000d9ec0038
> +fpdt            Note: currently fwts does not check FBPT validity and the
> +fpdt            associated data
> +fpdt            PASSED: Test 1, No issues found in FPDT table.
> +fpdt            
> +fpdt            ==========================================================
> +fpdt            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
> +fpdt            info only.
> +fpdt            ==========================================================
> diff --git a/fwts-test/fpdt-0001/fpdt-0002.log b/fwts-test/fpdt-0001/fpdt-0002.log
> new file mode 100644
> index 0000000..306801b
> --- /dev/null
> +++ b/fwts-test/fpdt-0001/fpdt-0002.log
> @@ -0,0 +1,22 @@
> +fpdt            fpdt: FPDT Firmware Performance Data Table test.
> +fpdt            ----------------------------------------------------------
> +fpdt            Test 1 of 1: FPDT Firmware Performance Data Table test.
> +fpdt              S3 Performance Table Pointer Record:
> +fpdt                Perf Rec Type:	0x0001
> +fpdt                Rec Length:	0x10
> +fpdt                Revision:	0x01
> +fpdt                Reserved:	0x00000000
> +fpdt                S3PT Pointer:	0x00000000d9ec0018
> +fpdt            Note: currently fwts does not check S3PT validity and the
> +fpdt            associated data
> +fpdt            FAILED [HIGH] FPDTFWBootPerfPrtRecBadLength: Test 1, FPDT
> +fpdt            Firmware Basic Boot Performance Pointer Record is 17 bytes
> +fpdt            and should be 16 bytes in size
> +fpdt            FAILED [HIGH] FPDTPerformanceRecordTypeInvalid: Test 1,
> +fpdt            FPDT Performance Record Type is 0x4000 which is a reserved
> +fpdt            type for future use only
> +fpdt            
> +fpdt            ==========================================================
> +fpdt            0 passed, 2 failed, 0 warning, 0 aborted, 0 skipped, 0
> +fpdt            info only.
> +fpdt            ==========================================================
> diff --git a/fwts-test/fpdt-0001/test-0001.sh b/fwts-test/fpdt-0001/test-0001.sh
> new file mode 100755
> index 0000000..959d67b
> --- /dev/null
> +++ b/fwts-test/fpdt-0001/test-0001.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test table against FPDT"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/fpdt.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/fpdt-0001/acpidump-0001.log fpdt - | cut -c7- | grep "^fpdt" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/fpdt-0001/fpdt-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/fpdt-0001/test-0002.sh b/fwts-test/fpdt-0001/test-0002.sh
> new file mode 100755
> index 0000000..ac9d6c6
> --- /dev/null
> +++ b/fwts-test/fpdt-0001/test-0002.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test table against FPDT"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/fpdt.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/fpdt-0001/acpidump-0002.log fpdt - | cut -c7- | grep "^fpdt" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/fpdt-0001/fpdt-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