ACK: [PATCH 23/30] fwts-test: Add DBGP test

ivanhu ivan.hu at canonical.com
Wed Jun 24 06:58:12 UTC 2015



On 2015年06月18日 16:49, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Add two tests, one to check for a valid DBGP and another to check
> an invalid DBGP.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   Makefile.am                           |  2 ++
>   fwts-test/dbgp-0001/acpidump-0001.log | 30 ++++++++++++++++++++++++++++++
>   fwts-test/dbgp-0001/acpidump-0002.log | 30 ++++++++++++++++++++++++++++++
>   fwts-test/dbgp-0001/dbgp-0001.log     | 22 ++++++++++++++++++++++
>   fwts-test/dbgp-0001/dbgp-0002.log     | 28 ++++++++++++++++++++++++++++
>   fwts-test/dbgp-0001/test-0001.sh      | 17 +++++++++++++++++
>   fwts-test/dbgp-0001/test-0002.sh      | 17 +++++++++++++++++
>   7 files changed, 146 insertions(+)
>   create mode 100644 fwts-test/dbgp-0001/acpidump-0001.log
>   create mode 100644 fwts-test/dbgp-0001/acpidump-0002.log
>   create mode 100644 fwts-test/dbgp-0001/dbgp-0001.log
>   create mode 100644 fwts-test/dbgp-0001/dbgp-0002.log
>   create mode 100755 fwts-test/dbgp-0001/test-0001.sh
>   create mode 100755 fwts-test/dbgp-0001/test-0002.sh
>
> diff --git a/Makefile.am b/Makefile.am
> index 1bf7ba1..e8f6855 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -61,6 +61,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
>   	fwts-test/checksum-0001/test-0004.sh \
>   	fwts-test/dbg2-0001/test-0001.sh \
>   	fwts-test/dbg2-0001/test-0002.sh \
> +	fwts-test/dbgp-0001/test-0001.sh \
> +	fwts-test/dbgp-0001/test-0002.sh \
>   	fwts-test/disassemble-0001/test-0001.sh \
>   	fwts-test/klog-0001/test-0001.sh \
>   	fwts-test/klog-0001/test-0002.sh \
> diff --git a/fwts-test/dbgp-0001/acpidump-0001.log b/fwts-test/dbgp-0001/acpidump-0001.log
> new file mode 100644
> index 0000000..87441e8
> --- /dev/null
> +++ b/fwts-test/dbgp-0001/acpidump-0001.log
> @@ -0,0 +1,30 @@
> +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                                      ....
> +
> +DBGP @ 0x00000000
> +  0000: 44 42 47 50 34 00 00 00 01 82 4c 45 4e 4f 56 4f  DBGP4.....LENOVO
> +  0010: 54 50 2d 36 41 20 20 20 70 05 00 00 4d 53 46 54  TP-6A   p...MSFT
> +  0020: 97 00 00 00 00 00 00 00 01 08 00 00 60 02 00 00  ............`...
> +  0030: 00 00 00 00
> diff --git a/fwts-test/dbgp-0001/acpidump-0002.log b/fwts-test/dbgp-0001/acpidump-0002.log
> new file mode 100644
> index 0000000..878f42c
> --- /dev/null
> +++ b/fwts-test/dbgp-0001/acpidump-0002.log
> @@ -0,0 +1,30 @@
> +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                                      ....
> +
> +DBGP @ 0x00000000
> +  0000: 44 42 47 50 34 00 00 00 01 82 4c 45 4e 4f 56 4f  DBGP4.....LENOVO
> +  0010: 54 50 2d 36 41 20 20 20 70 05 00 00 4d 53 46 54  TP-6A   p...MSFT
> +  0020: 97 00 00 00 04 00 00 00 05 00 00 00 60 02 00 00  ............`...
> +  0030: 00 00 00 00
> diff --git a/fwts-test/dbgp-0001/dbgp-0001.log b/fwts-test/dbgp-0001/dbgp-0001.log
> new file mode 100644
> index 0000000..c2a36d6
> --- /dev/null
> +++ b/fwts-test/dbgp-0001/dbgp-0001.log
> @@ -0,0 +1,21 @@
> +dbgp            dbgp: DBGP (Debug Port) Table test.
> +dbgp            ----------------------------------------------------------
> +dbgp            Test 1 of 1: DBGP (Debug Port) Table test.
> +dbgp            DBGP Table:
> +dbgp              Interface Type            0x00 (Full 16550 interface)
> +dbgp              Reserved:                 0x00
> +dbgp              Reserved:                 0x00
> +dbgp              Reserved:                 0x00
> +dbgp              Base Address:
> +dbgp                Address Space ID:       0x01
> +dbgp                Register Bit Width      0x08
> +dbgp                Register Bit Offset     0x00
> +dbgp                Access Size             0x00
> +dbgp                Address                 0x0000000000000260
> +dbgp
> +dbgp            PASSED: Test 1, No issues found in DBGP table.
> +dbgp
> +dbgp            ==========================================================
> +dbgp            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
> +dbgp            info only.
> +dbgp            ==========================================================
> diff --git a/fwts-test/dbgp-0001/dbgp-0002.log b/fwts-test/dbgp-0001/dbgp-0002.log
> new file mode 100644
> index 0000000..83f935b
> --- /dev/null
> +++ b/fwts-test/dbgp-0001/dbgp-0002.log
> @@ -0,0 +1,27 @@
> +dbgp            dbgp: DBGP (Debug Port) Table test.
> +dbgp            ----------------------------------------------------------
> +dbgp            Test 1 of 1: DBGP (Debug Port) Table test.
> +dbgp            DBGP Table:
> +dbgp              Interface Type            0x04 (Reserved)
> +dbgp              Reserved:                 0x00
> +dbgp              Reserved:                 0x00
> +dbgp              Reserved:                 0x00
> +dbgp              Base Address:
> +dbgp                Address Space ID:       0x05
> +dbgp                Register Bit Width      0x00
> +dbgp                Register Bit Offset     0x00
> +dbgp                Access Size             0x00
> +dbgp                Address                 0x0000000000000260
> +dbgp
> +dbgp            FAILED [HIGH] DBGPReservedInterfaceType: Test 1, DBGP
> +dbgp            Interface Type is 0x04 which is a reserved interface type.
> +dbgp            Expecting 0x00 (Full 16550) or 0x01 (16550 subset)
> +dbgp            FAILED [HIGH] DBGPBaseAddrBitWidthZero: Test 1, DBGP Base
> +dbgp            Address Bit Width is zero.
> +dbgp            FAILED [HIGH] DBGPBaseAddrAddrSpaceID: Test 1, DBGP Base
> +dbgp            Address, Address Space ID 0x5 which is a reserved value.
> +dbgp
> +dbgp            ==========================================================
> +dbgp            0 passed, 3 failed, 0 warning, 0 aborted, 0 skipped, 0
> +dbgp            info only.
> +dbgp            ==========================================================
> diff --git a/fwts-test/dbgp-0001/test-0001.sh b/fwts-test/dbgp-0001/test-0001.sh
> new file mode 100755
> index 0000000..eba78ab
> --- /dev/null
> +++ b/fwts-test/dbgp-0001/test-0001.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test apcitables against DBGP"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/dbgp.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/dbgp-0001/acpidump-0001.log dbgp - | cut -c7- | grep "^dbgp" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/dbgp-0001/dbgp-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/dbgp-0001/test-0002.sh b/fwts-test/dbgp-0001/test-0002.sh
> new file mode 100755
> index 0000000..94cd278
> --- /dev/null
> +++ b/fwts-test/dbgp-0001/test-0002.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test apcitables against invalid DBGP"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/dbgp.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/dbgp-0001/acpidump-0002.log dbgp - | cut -c7- | grep "^dbgp" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/dbgp-0001/dbgp-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