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

Alex Hung alex.hung at canonical.com
Thu Jun 25 14:54:25 UTC 2015


On 06/23/2015 07:39 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Add CPEP 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/cpep-0001/acpidump-0001.log              | 32 ++++++++++++++++++++
>  fwts-test/cpep-0001/acpidump-0002.log              | 32 ++++++++++++++++++++
>  fwts-test/cpep-0001/cpep-0001.log                  | 15 ++++++++++
>  fwts-test/cpep-0001/cpep-0002.log                  | 35 ++++++++++++++++++++++
>  fwts-test/cpep-0001/test-0001.sh                   | 17 +++++++++++
>  fwts-test/cpep-0001/test-0002.sh                   | 17 +++++++++++
>  9 files changed, 157 insertions(+), 1 deletion(-)
>  create mode 100644 fwts-test/cpep-0001/acpidump-0001.log
>  create mode 100644 fwts-test/cpep-0001/acpidump-0002.log
>  create mode 100644 fwts-test/cpep-0001/cpep-0001.log
>  create mode 100644 fwts-test/cpep-0001/cpep-0002.log
>  create mode 100755 fwts-test/cpep-0001/test-0001.sh
>  create mode 100755 fwts-test/cpep-0001/test-0002.sh
> 
> diff --git a/Makefile.am b/Makefile.am
> index 954ae5d..43fa9d8 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -58,6 +58,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
>  	fwts-test/checksum-0001/test-0001.sh \
>  	fwts-test/checksum-0001/test-0003.sh \
>  	fwts-test/checksum-0001/test-0004.sh \
> +	fwts-test/cpep-0001/test-0001.sh \
> +	fwts-test/cpep-0001/test-0002.sh \
>  	fwts-test/dbg2-0001/test-0001.sh \
>  	fwts-test/dbg2-0001/test-0002.sh \
>  	fwts-test/dbgp-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 4d73b08..9211b37 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
> @@ -6,6 +6,7 @@ ACPI tests:
>   bgrt            BGRT Boot Graphics Resource Table test.
>   boot            BOOT Table test.
>   checksum        ACPI table checksum test.
> + cpep            CPEP Corrected Platform Error Polling Table test.
>   cstates         Processor C state support test.
>   dbg2            DBG2 (Debug Port Table 2) test.
>   dbgp            DBGP (Debug Port) Table test.
> @@ -43,6 +44,7 @@ Batch tests:
>   bios_info       Gather BIOS DMI information.
>   boot            BOOT Table test.
>   checksum        ACPI table checksum test.
> + cpep            CPEP Corrected Platform Error Polling Table test.
>   cpufreq         CPU frequency scaling tests.
>   crs             Test PCI host bridge configuration using _CRS.
>   csm             UEFI Compatibility Support Module 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 61aed52..6e224e7 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
> @@ -15,6 +15,8 @@ ACPI tests:
>    BOOT Table test.
>   checksum        (1 test):
>    ACPI table checksum test.
> + cpep            (1 test):
> +  CPEP Corrected Platform Error Polling Table test.
>   cstates         (1 test):
>    Test all CPUs C-states.
>   dbg2            (1 test):
> @@ -276,6 +278,8 @@ Batch tests:
>    BOOT Table test.
>   checksum        (1 test):
>    ACPI table checksum test.
> + cpep            (1 test):
> +  CPEP Corrected Platform Error Polling Table test.
>   cpufreq         (7 tests):
>    CPU frequency table consistency
>    CPU frequency table duplicates
> @@ -778,4 +782,4 @@ UEFI tests:
>    Test UEFI RT service query variable info interface stress test.
>    Test UEFI RT service get variable interface, invalid parameters.
>  
> -Total of 643 tests
> +Total of 645 tests
> diff --git a/fwts-test/cpep-0001/acpidump-0001.log b/fwts-test/cpep-0001/acpidump-0001.log
> new file mode 100644
> index 0000000..1427a62
> --- /dev/null
> +++ b/fwts-test/cpep-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  ................
> +  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                                      ....
> +
> +CPEP @ 0x00000000
> +  0000: 43 50 45 50 44 00 00 00 00 a9 41 4c 41 53 4b 41  CPEP<.....ALASKA
> +  0010: 41 20 4d 20 49 00 00 00 09 20 07 01 41 4d 49 20  A M I.... ..AMI
> +  0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00  .............p_.
> +  0030: 20 00 00 00 00 08 01 01 21 00 00 00 00 08 02 02  ................
> +  0040: 20 00 00 00                                      ....
> +                                                                          
> diff --git a/fwts-test/cpep-0001/acpidump-0002.log b/fwts-test/cpep-0001/acpidump-0002.log
> new file mode 100644
> index 0000000..26cc8b8
> --- /dev/null
> +++ b/fwts-test/cpep-0001/acpidump-0002.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  ................
> +  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                                      ....
> +
> +CPEP @ 0x00000000
> +  0000: 43 50 45 50 44 00 00 00 00 a9 41 4c 41 53 4b 41  CPEP<.....ALASKA
> +  0010: 41 20 4d 20 49 00 00 00 09 20 07 01 41 4d 49 20  A M I.... ..AMI
> +  0020: 01 00 00 00 00 00 00 00 00 00 00 00 01 10 00 00  .............p_.
> +  0030: 00 00 00 00 02 00 01 01 ff ff ff ff 23 ff 02 02  ................
> +  0040: 04 00 00 00                                      ....
> +                                                                          
> diff --git a/fwts-test/cpep-0001/cpep-0001.log b/fwts-test/cpep-0001/cpep-0001.log
> new file mode 100644
> index 0000000..ed7a5cd
> --- /dev/null
> +++ b/fwts-test/cpep-0001/cpep-0001.log
> @@ -0,0 +1,15 @@
> +cpep            cpep: CPEP Corrected Platform Error Polling Table test.
> +cpep            ----------------------------------------------------------
> +cpep            Test 1 of 1: CPEP Corrected Platform Error Polling Table
> +cpep            test.
> +cpep            CPEP Corrected Platform Error Polling Table:
> +cpep              Reserved:                 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> +cpep            CPEP Processor Structure 0 looks sane.
> +cpep            CPEP Processor Structure 1 looks sane.
> +cpep            CPEP Processor Structure 2 looks sane.
> +cpep            PASSED: Test 1, No issues found in CPEP table.
> +cpep            
> +cpep            ==========================================================
> +cpep            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
> +cpep            info only.
> +cpep            ==========================================================
> diff --git a/fwts-test/cpep-0001/cpep-0002.log b/fwts-test/cpep-0001/cpep-0002.log
> new file mode 100644
> index 0000000..e65261c
> --- /dev/null
> +++ b/fwts-test/cpep-0001/cpep-0002.log
> @@ -0,0 +1,35 @@
> +cpep            cpep: CPEP Corrected Platform Error Polling Table test.
> +cpep            ----------------------------------------------------------
> +cpep            Test 1 of 1: CPEP Corrected Platform Error Polling Table
> +cpep            test.
> +cpep            CPEP Corrected Platform Error Polling Table:
> +cpep              Reserved:                 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> +cpep            FAILED [HIGH] CPEPInvalidProcStructureType: Test 1, CPEP:
> +cpep            Processor Structure 0 Type field is 0x1 and was expected
> +cpep            to be 0x00
> +cpep            FAILED [MEDIUM] CPEPInvalidProcStructureType: Test 1, CPEP
> +cpep            : Processor Structure 0 Length field is 0x10 and was
> +cpep            expected to be 0x08
> +cpep            WARNING: Test 1, CPEP Processor Structure 0 Polling
> +cpep            Interval of 0 milliseconds is relatively short and may
> +cpep            cause excessive polling CPU load
> +cpep            FAILED [HIGH] CPEPInvalidProcStructureType: Test 1, CPEP:
> +cpep            Processor Structure 1 Type field is 0x2 and was expected
> +cpep            to be 0x00
> +cpep            FAILED [MEDIUM] CPEPInvalidProcStructureType: Test 1, CPEP
> +cpep            : Processor Structure 1 Length field is 0x0 and was
> +cpep            expected to be 0x08
> +cpep            FAILED [HIGH] CPEPInvalidProcStructureType: Test 1, CPEP:
> +cpep            Processor Structure 2 Type field is 0x23 and was expected
> +cpep            to be 0x00
> +cpep            FAILED [MEDIUM] CPEPInvalidProcStructureType: Test 1, CPEP
> +cpep            : Processor Structure 2 Length field is 0xff and was
> +cpep            expected to be 0x08
> +cpep            WARNING: Test 1, CPEP Processor Structure 2 Polling
> +cpep            Interval of 4 milliseconds is relatively short and may
> +cpep            cause excessive polling CPU load
> +cpep            
> +cpep            ==========================================================
> +cpep            0 passed, 6 failed, 2 warnings, 0 aborted, 0 skipped, 0
> +cpep            info only.
> +cpep            ==========================================================
> diff --git a/fwts-test/cpep-0001/test-0001.sh b/fwts-test/cpep-0001/test-0001.sh
> new file mode 100755
> index 0000000..daf49b0
> --- /dev/null
> +++ b/fwts-test/cpep-0001/test-0001.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test table against CPEP"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/cpep.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/cpep-0001/acpidump-0001.log cpep - | cut -c7- | grep "^cpep" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/cpep-0001/cpep-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/cpep-0001/test-0002.sh b/fwts-test/cpep-0001/test-0002.sh
> new file mode 100755
> index 0000000..63882e6
> --- /dev/null
> +++ b/fwts-test/cpep-0001/test-0002.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test table against invalid CPEP"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/cpep.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/cpep-0001/acpidump-0002.log cpep - | cut -c7- | grep "^cpep" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/cpep-0001/cpep-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