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

ivanhu ivan.hu at canonical.com
Tue Jun 30 07:23:16 UTC 2015



On 2015年06月29日 17:24, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung 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/tcpa-0001/acpidump-0001.log              | 31 ++++++++++++++++++++++
>   fwts-test/tcpa-0001/acpidump-0002.log              | 31 ++++++++++++++++++++++
>   fwts-test/tcpa-0001/tcpa-0001.log                  | 14 ++++++++++
>   fwts-test/tcpa-0001/tcpa-0002.log                  | 17 ++++++++++++
>   fwts-test/tcpa-0001/test-0001.sh                   | 17 ++++++++++++
>   fwts-test/tcpa-0001/test-0002.sh                   | 17 ++++++++++++
>   9 files changed, 136 insertions(+), 1 deletion(-)
>   create mode 100644 fwts-test/tcpa-0001/acpidump-0001.log
>   create mode 100644 fwts-test/tcpa-0001/acpidump-0002.log
>   create mode 100644 fwts-test/tcpa-0001/tcpa-0001.log
>   create mode 100644 fwts-test/tcpa-0001/tcpa-0002.log
>   create mode 100755 fwts-test/tcpa-0001/test-0001.sh
>   create mode 100755 fwts-test/tcpa-0001/test-0002.sh
>
> diff --git a/Makefile.am b/Makefile.am
> index fa48f75..ff5196a 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -96,6 +96,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
>   	fwts-test/srat-0001/test-0001.sh \
>   	fwts-test/srat-0001/test-0002.sh \
>   	fwts-test/syntaxcheck-0001/test-0001.sh \
> +	fwts-test/tcpa-0001/test-0001.sh \
> +	fwts-test/tcpa-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 d50d078..84b8618 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
> @@ -29,6 +29,7 @@ ACPI tests:
>    spcr            SPCR Serial Port Console Redirection Table test.
>    spmi            SPMI Service Processor Management Interface Description Table test.
>    srat            SRAT System Resource Affinity Table test.
> + tcpa            Trusted Computing Platform Alliance Capabilities Table test.
>    wmi             Extract and analyse Windows Management Instrumentation (WMI).
>    xsdt            XSDT Extended System Description Table test.
>   
> @@ -90,6 +91,7 @@ Batch tests:
>    spmi            SPMI Service Processor Management Interface Description Table test.
>    srat            SRAT System Resource Affinity Table test.
>    syntaxcheck     Re-assemble DSDT and SSDTs to find syntax errors and warnings.
> + tcpa            Trusted Computing Platform Alliance Capabilities Table test.
>    uefibootpath    Sanity check for UEFI Boot Path Boot####.
>    version         Gather kernel system information.
>    virt            CPU Virtualisation Configuration 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 efc0d56..47f64c6 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
> @@ -246,6 +246,8 @@ ACPI tests:
>     SPMI Service Processor Management Interface Description Table test.
>    srat            (1 test):
>     SRAT System Resource Affinity Table test.
> + tcpa            (1 test):
> +  Validate TCPA table.
>    wmi             (1 test):
>     Windows Management Instrumentation test.
>    xsdt            (1 test):
> @@ -579,6 +581,8 @@ Batch tests:
>     SRAT System Resource Affinity Table test.
>    syntaxcheck     (1 test):
>     Disassemble and reassemble DSDT and SSDTs.
> + tcpa            (1 test):
> +  Validate TCPA table.
>    uefibootpath    (1 test):
>     Test UEFI Boot Path Boot####.
>    version         (4 tests):
> @@ -786,4 +790,4 @@ UEFI tests:
>     Test UEFI RT service query variable info interface stress test.
>     Test UEFI RT service get variable interface, invalid parameters.
>   
> -Total of 647 tests
> +Total of 649 tests
> diff --git a/fwts-test/tcpa-0001/acpidump-0001.log b/fwts-test/tcpa-0001/acpidump-0001.log
> new file mode 100644
> index 0000000..7097a12
> --- /dev/null
> +++ b/fwts-test/tcpa-0001/acpidump-0001.log
> @@ -0,0 +1,31 @@
> +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                                      ....
> +
> +TCPA @ 0x00000000
> +  0000: 54 43 50 41 32 00 00 00 02 44 41 50 54 49 4F 34  TCPA2....DAPTIO4
> +  0010: 4E 41 50 41 41 53 46 00 01 00 00 00 4D 53 46 54  NAPAASF.....MSFT
> +  0020: 13 00 00 01 00 00 00 00 01 00 10 C0 CB CA 00 00  ................
> +  0030: 00 00                                            ..
> +
> diff --git a/fwts-test/tcpa-0001/acpidump-0002.log b/fwts-test/tcpa-0001/acpidump-0002.log
> new file mode 100644
> index 0000000..6439e64
> --- /dev/null
> +++ b/fwts-test/tcpa-0001/acpidump-0002.log
> @@ -0,0 +1,31 @@
> +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                                      ....
> +
> +TCPA @ 0x00000000
> +  0000: 54 43 50 41 64 00 00 00 01 75 41 50 54 49 4F 34  TCPA2....DAPTIO4
> +  0010: 4E 41 50 41 41 53 46 00 01 00 00 00 4D 53 46 54  NAPAASF.....MSFT
> +  0020: 13 00 00 01 00 00 00 00 01 00 10 C0 CB CA 00 00  ................
> +  0030: 00 00                                            ..
> +
> diff --git a/fwts-test/tcpa-0001/tcpa-0001.log b/fwts-test/tcpa-0001/tcpa-0001.log
> new file mode 100644
> index 0000000..dc35077
> --- /dev/null
> +++ b/fwts-test/tcpa-0001/tcpa-0001.log
> @@ -0,0 +1,14 @@
> +tcpa            tcpa: Trusted Computing Platform Alliance Capabilities
> +tcpa            Table test.
> +tcpa            ----------------------------------------------------------
> +tcpa            Test 1 of 1: Validate TCPA table.
> +tcpa            TCPA Table:
> +tcpa              Platform Class:                  0x0000
> +tcpa              Log Area Minimum Length:         0x00010000
> +tcpa              Log Area Start Address:          0x00000000cacbc010
> +tcpa            PASSED: Test 1, No issues found in TCPA table.
> +tcpa
> +tcpa            ==========================================================
> +tcpa            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
> +tcpa            info only.
> +tcpa            ==========================================================
> diff --git a/fwts-test/tcpa-0001/tcpa-0002.log b/fwts-test/tcpa-0001/tcpa-0002.log
> new file mode 100644
> index 0000000..0bc3a0e
> --- /dev/null
> +++ b/fwts-test/tcpa-0001/tcpa-0002.log
> @@ -0,0 +1,17 @@
> +tcpa            tcpa: Trusted Computing Platform Alliance Capabilities
> +tcpa            Table test.
> +tcpa            ----------------------------------------------------------
> +tcpa            Test 1 of 1: Validate TCPA table.
> +tcpa            FAILED [HIGH] TCPABadSize: Test 1, TCPA size is incorrect,
> +tcpa            expecting 0x32 bytes, instead got 0x00000064 bytes
> +tcpa            FAILED [HIGH] TCPABadRevision: Test 1, TCPA revision is
> +tcpa            incorrect, expecting 0x02, instead got 0x01
> +tcpa            TCPA Table:
> +tcpa              Platform Class:                  0x0000
> +tcpa              Log Area Minimum Length:         0x00010000
> +tcpa              Log Area Start Address:          0x00000000cacbc010
> +tcpa
> +tcpa            ==========================================================
> +tcpa            0 passed, 2 failed, 0 warning, 0 aborted, 0 skipped, 0
> +tcpa            info only.
> +tcpa            ==========================================================
> diff --git a/fwts-test/tcpa-0001/test-0001.sh b/fwts-test/tcpa-0001/test-0001.sh
> new file mode 100755
> index 0000000..ec71ce6
> --- /dev/null
> +++ b/fwts-test/tcpa-0001/test-0001.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test table against TCPA"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/tcpa.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/tcpa-0001/acpidump-0001.log tcpa - | cut -c7- | grep "^tcpa" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/tcpa-0001/tcpa-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/tcpa-0001/test-0002.sh b/fwts-test/tcpa-0001/test-0002.sh
> new file mode 100755
> index 0000000..8b5ee6e
> --- /dev/null
> +++ b/fwts-test/tcpa-0001/test-0002.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test table against invalid TCPA"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/tcpa.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/tcpa-0001/acpidump-0002.log tcpa - | cut -c7- | grep "^tcpa" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/tcpa-0001/tcpa-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: Ivan Hu<ivan.hu at canonical.com>



More information about the fwts-devel mailing list