ACK: [PATCH 2/2] fwts-test: sync up with new s0idle tests

Colin Ian King colin.king at canonical.com
Thu Sep 10 08:11:08 UTC 2020


On 10/09/2020 00:17, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
>  Makefile.am                             |  2 ++
>  fwts-test/s0idle-0001/acpidump-0001.log | 25 +++++++++++++++++++++++++
>  fwts-test/s0idle-0001/acpidump-0002.log | 25 +++++++++++++++++++++++++
>  fwts-test/s0idle-0001/s0idle-0001.log   |  6 ++++++
>  fwts-test/s0idle-0001/s0idle-0002.log   |  6 ++++++
>  fwts-test/s0idle-0001/test-0001.sh      | 23 +++++++++++++++++++++++
>  fwts-test/s0idle-0001/test-0002.sh      | 23 +++++++++++++++++++++++
>  7 files changed, 110 insertions(+)
>  create mode 100644 fwts-test/s0idle-0001/acpidump-0001.log
>  create mode 100644 fwts-test/s0idle-0001/acpidump-0002.log
>  create mode 100644 fwts-test/s0idle-0001/s0idle-0001.log
>  create mode 100644 fwts-test/s0idle-0001/s0idle-0002.log
>  create mode 100755 fwts-test/s0idle-0001/test-0001.sh
>  create mode 100755 fwts-test/s0idle-0001/test-0002.sh
> 
> diff --git a/Makefile.am b/Makefile.am
> index c753ce41..08480220 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -166,6 +166,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
>  	fwts-test/rasf-0001/test-0002.sh \
>  	fwts-test/rsdp-0001/test-0001.sh \
>  	fwts-test/rsdt-0001/test-0001.sh \
> +	fwts-test/s0idle-0001/test-0001.sh \
> +	fwts-test/s0idle-0001/test-0002.sh \
>  	fwts-test/sbst-0001/test-0001.sh \
>  	fwts-test/sbst-0001/test-0002.sh \
>  	fwts-test/spcr-0001/test-0001.sh \
> diff --git a/fwts-test/s0idle-0001/acpidump-0001.log b/fwts-test/s0idle-0001/acpidump-0001.log
> new file mode 100644
> index 00000000..d0916c13
> --- /dev/null
> +++ b/fwts-test/s0idle-0001/acpidump-0001.log
> @@ -0,0 +1,25 @@
> +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 B8 41 4D 44 20 20 20  FACP......AMD   
> +    0010: 47 55 41 4D 20 20 20 20 00 00 04 06 49 4E 54 4C  GUAM    ....INTL
> +    0020: 28 05 20 20 C0 2F E9 AF 92 47 E8 AF 00 02 09 00  (.  ./...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 20 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                                      ....
> +
> diff --git a/fwts-test/s0idle-0001/acpidump-0002.log b/fwts-test/s0idle-0001/acpidump-0002.log
> new file mode 100644
> index 00000000..3a4c4c78
> --- /dev/null
> +++ b/fwts-test/s0idle-0001/acpidump-0002.log
> @@ -0,0 +1,25 @@
> +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 D8 41 4D 44 20 20 20  FACP......AMD   
> +    0010: 47 55 41 4D 20 20 20 20 00 00 04 06 49 4E 54 4C  GUAM    ....INTL
> +    0020: 28 05 20 20 C0 2F E9 AF 92 47 E8 AF 00 02 09 00  (.  ./...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                                      ....
> +
> diff --git a/fwts-test/s0idle-0001/s0idle-0001.log b/fwts-test/s0idle-0001/s0idle-0001.log
> new file mode 100644
> index 00000000..8075a5d5
> --- /dev/null
> +++ b/fwts-test/s0idle-0001/s0idle-0001.log
> @@ -0,0 +1,6 @@
> +s0idle          s0idle: S0IDLE FADT Low Power S0 Idle tests.
> +s0idle          ----------------------------------------------------------
> +s0idle          Test 1 of 1: Test ACPI FADT S0 idle capable.
> +s0idle          PASSED: Test 1, LOW_POWER_S0_IDLE_CAPABLE is set in ACPI
> +s0idle          FADT.
> +s0idle          
> diff --git a/fwts-test/s0idle-0001/s0idle-0002.log b/fwts-test/s0idle-0001/s0idle-0002.log
> new file mode 100644
> index 00000000..d0948466
> --- /dev/null
> +++ b/fwts-test/s0idle-0001/s0idle-0002.log
> @@ -0,0 +1,6 @@
> +s0idle          s0idle: S0IDLE FADT Low Power S0 Idle tests.
> +s0idle          ----------------------------------------------------------
> +s0idle          Test 1 of 1: Test ACPI FADT S0 idle capable.
> +s0idle          FAILED [HIGH] S0idleNoFADT: Test 1,
> +s0idle          LOW_POWER_S0_IDLE_CAPABLE is not set in ACPI FADT.
> +s0idle          
> diff --git a/fwts-test/s0idle-0001/test-0001.sh b/fwts-test/s0idle-0001/test-0001.sh
> new file mode 100755
> index 00000000..da067960
> --- /dev/null
> +++ b/fwts-test/s0idle-0001/test-0001.sh
> @@ -0,0 +1,23 @@
> +#!/bin/bash
> +#
> +TEST="Test table against S0IDLE"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/s0idle.log.$$
> +
> +$FWTS --show-tests | grep S0IDLE > /dev/null
> +if [ $? -eq 1 ]; then
> +	echo SKIP: $TEST, $NAME
> +	exit 77
> +fi
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/s0idle-0001/acpidump-0001.log s0idle - | cut -c7- | grep "^s0idle" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/s0idle-0001/s0idle-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/s0idle-0001/test-0002.sh b/fwts-test/s0idle-0001/test-0002.sh
> new file mode 100755
> index 00000000..489babef
> --- /dev/null
> +++ b/fwts-test/s0idle-0001/test-0002.sh
> @@ -0,0 +1,23 @@
> +#!/bin/bash
> +#
> +TEST="Test table against invalid S0IDLE"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/s0idle.log.$$
> +
> +$FWTS --show-tests | grep S0IDLE > /dev/null
> +if [ $? -eq 1 ]; then
> +	echo SKIP: $TEST, $NAME
> +	exit 77
> +fi
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/s0idle-0001/acpidump-0002.log s0idle - | cut -c7- | grep "^s0idle" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/s0idle-0001/s0idle-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: Colin Ian King <colin.king at canonical.com>



More information about the fwts-devel mailing list