From patchwork Wed Jul 29 13:20:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 501709 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 24CE71402C8; Wed, 29 Jul 2015 23:20:34 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1ZKRHd-0008KC-17; Wed, 29 Jul 2015 13:20:33 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1ZKRHV-0008HM-Oq for fwts-devel@lists.ubuntu.com; Wed, 29 Jul 2015 13:20:25 +0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ZKRHV-0007rC-KE for fwts-devel@lists.ubuntu.com; Wed, 29 Jul 2015 13:20:25 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH 2/2] fwts-test: Add STAO table regression tests Date: Wed, 29 Jul 2015 14:20:00 +0100 Message-Id: <1438176000-14024-3-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 2.4.6 In-Reply-To: <1438176000-14024-1-git-send-email-colin.king@canonical.com> References: <1438176000-14024-1-git-send-email-colin.king@canonical.com> X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: fwts-devel-bounces@lists.ubuntu.com From: Colin Ian King Signed-off-by: Colin Ian King Acked-by: Ivan Hu Acked-by: Alex Hung --- Makefile.am | 2 + .../arg-show-tests-0001/arg-show-tests-0001.log | 2 + .../arg-show-tests-full-0001.log | 4 ++ fwts-test/stao-0001/acpidump-0001.log | 43 ++++++++++++++++++++++ fwts-test/stao-0001/acpidump-0002.log | 43 ++++++++++++++++++++++ fwts-test/stao-0001/stao-0001.log | 14 +++++++ fwts-test/stao-0001/stao-0002.log | 19 ++++++++++ fwts-test/stao-0001/test-0001.sh | 17 +++++++++ fwts-test/stao-0001/test-0002.sh | 17 +++++++++ 9 files changed, 161 insertions(+) create mode 100644 fwts-test/stao-0001/acpidump-0001.log create mode 100644 fwts-test/stao-0001/acpidump-0002.log create mode 100644 fwts-test/stao-0001/stao-0001.log create mode 100644 fwts-test/stao-0001/stao-0002.log create mode 100755 fwts-test/stao-0001/test-0001.sh create mode 100755 fwts-test/stao-0001/test-0002.sh diff --git a/Makefile.am b/Makefile.am index 31bedd9..22085ca 100644 --- a/Makefile.am +++ b/Makefile.am @@ -109,6 +109,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \ fwts-test/spcr-0001/test-0002.sh \ fwts-test/srat-0001/test-0001.sh \ fwts-test/srat-0001/test-0002.sh \ + fwts-test/stao-0001/test-0001.sh \ + fwts-test/stao-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 \ 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 fac372d..a84117d 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 @@ -36,6 +36,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. + stao STAO Status Override Table test. tcpa TCPA Trusted Computing Platform Alliance Capabilities Table test. tpm2 TPM2 Trusted Platform Module 2 test. uefi UEFI Data Table test. @@ -107,6 +108,7 @@ Batch 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. + stao STAO Status Override Table test. syntaxcheck Re-assemble DSDT and SSDTs to find syntax errors and warnings. tcpa TCPA Trusted Computing Platform Alliance Capabilities Table test. tpm2 TPM2 Trusted Platform Module 2 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 f7865a0..aff1731 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 @@ -260,6 +260,8 @@ ACPI tests: SPMI Service Processor Management Interface Description Table test. srat (1 test): SRAT System Resource Affinity Table test. + stao (1 test): + STAO Status Override Table test. tcpa (1 test): Validate TCPA table. tpm2 (1 test): @@ -613,6 +615,8 @@ Batch tests: SPMI Service Processor Management Interface Description Table test. srat (1 test): SRAT System Resource Affinity Table test. + stao (1 test): + STAO Status Override Table test. syntaxcheck (1 test): Disassemble and reassemble DSDT and SSDTs. tcpa (1 test): diff --git a/fwts-test/stao-0001/acpidump-0001.log b/fwts-test/stao-0001/acpidump-0001.log new file mode 100644 index 0000000..94508a2 --- /dev/null +++ b/fwts-test/stao-0001/acpidump-0001.log @@ -0,0 +1,43 @@ +FACS @ 0x00000000 + 0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00 FACS@........... + 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 . ...........@.. + 00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... + 00f0: 00 00 00 00 .... + +DSDT @ 0x00000000 + 0000: 44 53 44 54 91 00 00 00 01 f0 46 57 54 53 56 31 DSDT......FWTSV1 + 0010: 46 57 54 53 54 45 53 54 10 11 00 00 49 4e 54 4c FWTSTEST....INTL + 0020: 19 06 15 20 10 4c 06 5f 53 42 5f 5b 82 20 43 30 ... .L._SB_[. C0 + 0030: 30 45 08 5f 48 49 44 0c 41 d0 0c 0f 08 5f 55 49 0E._HID.A...._UI + 0040: 44 0a 70 14 09 5f 53 54 41 00 a4 0a 0f 5b 82 20 D.p.._STA....[. + 0050: 43 30 31 45 08 5f 48 49 44 0c 41 d0 0c 0f 08 5f C01E._HID.A...._ + 0060: 55 49 44 0a 70 14 09 5f 53 54 41 00 a4 0a 0f 5b UID.p.._STA....[ + 0070: 82 20 43 30 32 30 08 5f 48 49 44 0c 41 d0 0c 09 . C020._HID.A... + 0080: 08 5f 55 49 44 0a 70 14 09 5f 53 54 41 00 a4 0a ._UID.p.._STA... + 0090: 0f + +STAO @ 0x00000000 + 0000: 53 54 41 4f 43 00 00 00 01 e1 49 4e 54 45 4c 20 STAOC.....INTEL + 0010: 54 45 4d 50 4c 41 54 45 00 00 00 00 49 4e 54 4c TEMPLATE....INTL + 0020: 19 06 15 20 01 5c 5f 53 42 2e 43 30 30 45 00 5c ... .\_SB.C00E.\ + 0030: 5f 53 42 2e 43 30 32 30 00 5c 5f 53 42 2e 43 30 _SB.C020.\_SB.C0 + 0040: 31 45 00 diff --git a/fwts-test/stao-0001/acpidump-0002.log b/fwts-test/stao-0001/acpidump-0002.log new file mode 100644 index 0000000..056bf7e --- /dev/null +++ b/fwts-test/stao-0001/acpidump-0002.log @@ -0,0 +1,43 @@ +FACS @ 0x00000000 + 0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00 FACS@........... + 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 . ...........@.. + 00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... + 00f0: 00 00 00 00 .... + +DSDT @ 0x00000000 + 0000: 44 53 44 54 91 00 00 00 01 f0 46 57 54 53 56 31 DSDT......FWTSV1 + 0010: 46 57 54 53 54 45 53 54 10 11 00 00 49 4e 54 4c FWTSTEST....INTL + 0020: 19 06 15 20 10 4c 06 5f 53 42 5f 5b 82 20 43 30 ... .L._SB_[. C0 + 0030: 30 45 08 5f 48 49 44 0c 41 d0 0c 0f 08 5f 55 49 0E._HID.A...._UI + 0040: 44 0a 70 14 09 5f 53 54 41 00 a4 0a 0f 5b 82 20 D.p.._STA....[. + 0050: 43 30 31 45 08 5f 48 49 44 0c 41 d0 0c 0f 08 5f C01E._HID.A...._ + 0060: 55 49 44 0a 70 14 09 5f 53 54 41 00 a4 0a 0f 5b UID.p.._STA....[ + 0070: 82 20 43 30 32 30 08 5f 48 49 44 0c 41 d0 0c 09 . C020._HID.A... + 0080: 08 5f 55 49 44 0a 70 14 09 5f 53 54 41 00 a4 0a ._UID.p.._STA... + 0090: 0f + +STAO @ 0x00000000 + 0000: 53 54 41 4f 43 00 00 00 01 e1 49 4e 54 45 4c 20 STAOC.....INTEL + 0010: 54 45 4d 50 4c 41 54 45 00 00 00 00 49 4e 54 4c TEMPLATE....INTL + 0020: 19 06 15 20 01 5c 5f 53 42 2e 43 30 45 30 00 5c ... .\_SB.C0E0.\ + 0030: 5f 53 42 2e 43 30 32 32 00 5c 5f 53 42 2e 43 30 _SB.C022.\_SB.C0 + 0040: 32 45 00 diff --git a/fwts-test/stao-0001/stao-0001.log b/fwts-test/stao-0001/stao-0001.log new file mode 100644 index 0000000..7daa5dc --- /dev/null +++ b/fwts-test/stao-0001/stao-0001.log @@ -0,0 +1,14 @@ +stao stao: STAO Status Override Table test. +stao ---------------------------------------------------------- +stao Test 1 of 1: STAO Status Override Table test. +stao STAO Status Override Table: +stao UART: 0x01 +stao ACPI String: '\_SB.C00E' +stao ACPI String: '\_SB.C020' +stao ACPI String: '\_SB.C01E' +stao PASSED: Test 1, No issues found in STAO table. +stao +stao ========================================================== +stao 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 +stao info only. +stao ========================================================== diff --git a/fwts-test/stao-0001/stao-0002.log b/fwts-test/stao-0001/stao-0002.log new file mode 100644 index 0000000..6756845 --- /dev/null +++ b/fwts-test/stao-0001/stao-0002.log @@ -0,0 +1,19 @@ +stao stao: STAO Status Override Table test. +stao ---------------------------------------------------------- +stao Test 1 of 1: STAO Status Override Table test. +stao STAO Status Override Table: +stao UART: 0x01 +stao ACPI String: '\_SB.C0E0' +stao ACPI String: '\_SB.C022' +stao ACPI String: '\_SB.C02E' +stao FAILED [HIGH] STAOAcpiStringNotFound: Test 1, STAO ACPI +stao String '\_SB_.C0E0' not found in ACPI object name space. +stao FAILED [HIGH] STAOAcpiStringNotFound: Test 1, STAO ACPI +stao String '\_SB_.C022' not found in ACPI object name space. +stao FAILED [HIGH] STAOAcpiStringNotFound: Test 1, STAO ACPI +stao String '\_SB_.C02E' not found in ACPI object name space. +stao +stao ========================================================== +stao 0 passed, 3 failed, 0 warning, 0 aborted, 0 skipped, 0 +stao info only. +stao ========================================================== diff --git a/fwts-test/stao-0001/test-0001.sh b/fwts-test/stao-0001/test-0001.sh new file mode 100755 index 0000000..baf5375 --- /dev/null +++ b/fwts-test/stao-0001/test-0001.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +TEST="Test apci table against STAO" +NAME=test-0001.sh +TMPLOG=$TMP/stao.log.$$ + +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/stao-0001/acpidump-0001.log stao - | cut -c7- | grep "^stao" > $TMPLOG +diff $TMPLOG $FWTSTESTDIR/stao-0001/stao-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/stao-0001/test-0002.sh b/fwts-test/stao-0001/test-0002.sh new file mode 100755 index 0000000..2efd264 --- /dev/null +++ b/fwts-test/stao-0001/test-0002.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +TEST="Test apci table against invalid STAO" +NAME=test-0001.sh +TMPLOG=$TMP/stao.log.$$ + +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/stao-0001/acpidump-0002.log stao - | cut -c7- | grep "^stao" > $TMPLOG +diff $TMPLOG $FWTSTESTDIR/stao-0001/stao-0002.log >> $FAILURE_LOG +ret=$? +if [ $ret -eq 0 ]; then + echo PASSED: $TEST, $NAME +else + echo FAILED: $TEST, $NAME +fi + +rm $TMPLOG +exit $ret