From patchwork Fri Aug 4 22:49:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 798089 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3xPMZV2Pb5z9s7m; Sat, 5 Aug 2017 08:50:10 +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 1ddlQ1-0003Bx-3g; Fri, 04 Aug 2017 22:50:09 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ddlPu-0003Al-Ge for fwts-devel@lists.ubuntu.com; Fri, 04 Aug 2017 22:50:02 +0000 Received: from 1.general.alexhung.us.vpn ([10.172.65.254] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ddlPt-00030B-Q2; Fri, 04 Aug 2017 22:50:02 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH 2/2] fwts-test: Add regression test for SDEI Date: Fri, 4 Aug 2017 15:49:56 -0700 Message-Id: <1501886996-29373-2-git-send-email-alex.hung@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501886996-29373-1-git-send-email-alex.hung@canonical.com> References: <1501886996-29373-1-git-send-email-alex.hung@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 Signed-off-by: Alex Hung Acked-by: Colin Ian King Acked-by: Ivan Hu --- Makefile.am | 2 ++ fwts-test/sdei-0001/acpidump-0001.log | 29 +++++++++++++++++++++++++++++ fwts-test/sdei-0001/acpidump-0002.log | 29 +++++++++++++++++++++++++++++ fwts-test/sdei-0001/sdei-0001.log | 11 +++++++++++ fwts-test/sdei-0001/sdei-0002.log | 11 +++++++++++ fwts-test/sdei-0001/test-0001.sh | 23 +++++++++++++++++++++++ fwts-test/sdei-0001/test-0002.sh | 23 +++++++++++++++++++++++ 7 files changed, 128 insertions(+) create mode 100644 fwts-test/sdei-0001/acpidump-0001.log create mode 100644 fwts-test/sdei-0001/acpidump-0002.log create mode 100644 fwts-test/sdei-0001/sdei-0001.log create mode 100644 fwts-test/sdei-0001/sdei-0002.log create mode 100755 fwts-test/sdei-0001/test-0001.sh create mode 100755 fwts-test/sdei-0001/test-0002.sh diff --git a/Makefile.am b/Makefile.am index 546dbcf..f53ee07 100644 --- a/Makefile.am +++ b/Makefile.am @@ -108,6 +108,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \ fwts-test/klog-0002/test-0003.sh \ fwts-test/lpit-0001/test-0001.sh \ fwts-test/lpit-0001/test-0002.sh \ + fwts-test/sdei-0001/test-0001.sh \ + fwts-test/sdei-0001/test-0002.sh \ fwts-test/slic-0001/test-0001.sh \ fwts-test/slic-0001/test-0002.sh \ fwts-test/slit-0001/test-0001.sh \ diff --git a/fwts-test/sdei-0001/acpidump-0001.log b/fwts-test/sdei-0001/acpidump-0001.log new file mode 100644 index 0000000..09cdf56 --- /dev/null +++ b/fwts-test/sdei-0001/acpidump-0001.log @@ -0,0 +1,29 @@ +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 .... + +SDEI @ 0x0000000000000000 + 0000: 53 44 45 49 24 00 00 00 01 7c 41 52 4d 20 20 20 SDEI$....|ARM + 0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c TEMPLATE....INTL + 0020: 28 07 17 20 (.. diff --git a/fwts-test/sdei-0001/acpidump-0002.log b/fwts-test/sdei-0001/acpidump-0002.log new file mode 100644 index 0000000..09cdf56 --- /dev/null +++ b/fwts-test/sdei-0001/acpidump-0002.log @@ -0,0 +1,29 @@ +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 .... + +SDEI @ 0x0000000000000000 + 0000: 53 44 45 49 24 00 00 00 01 7c 41 52 4d 20 20 20 SDEI$....|ARM + 0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c TEMPLATE....INTL + 0020: 28 07 17 20 (.. diff --git a/fwts-test/sdei-0001/sdei-0001.log b/fwts-test/sdei-0001/sdei-0001.log new file mode 100644 index 0000000..1e4affc --- /dev/null +++ b/fwts-test/sdei-0001/sdei-0001.log @@ -0,0 +1,11 @@ +sdei sdei: SDEI Software Delegated Exception Interface Table +sdei test +sdei ---------------------------------------------------------- +sdei Test 1 of 1: Validate SDEI table. +sdei SDEI (Software Delegated Exception Interface) Table: +sdei PASSED: Test 1, No issues found in SDEI table. +sdei +sdei ========================================================== +sdei 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 +sdei info only. +sdei ========================================================== diff --git a/fwts-test/sdei-0001/sdei-0002.log b/fwts-test/sdei-0001/sdei-0002.log new file mode 100644 index 0000000..1e4affc --- /dev/null +++ b/fwts-test/sdei-0001/sdei-0002.log @@ -0,0 +1,11 @@ +sdei sdei: SDEI Software Delegated Exception Interface Table +sdei test +sdei ---------------------------------------------------------- +sdei Test 1 of 1: Validate SDEI table. +sdei SDEI (Software Delegated Exception Interface) Table: +sdei PASSED: Test 1, No issues found in SDEI table. +sdei +sdei ========================================================== +sdei 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 +sdei info only. +sdei ========================================================== diff --git a/fwts-test/sdei-0001/test-0001.sh b/fwts-test/sdei-0001/test-0001.sh new file mode 100755 index 0000000..3d78ba6 --- /dev/null +++ b/fwts-test/sdei-0001/test-0001.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# +TEST="Test acpitables against SDEI" +NAME=test-0001.sh +TMPLOG=$TMP/sdei.log.$$ + +$FWTS --show-tests | grep sdei > /dev/null +if [ $? -eq 1 ]; then + echo SKIP: $TEST, $NAME + exit 77 +fi + +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/sdei-0001/acpidump-0001.log sdei - | cut -c7- | grep "^sdei" > $TMPLOG +diff $TMPLOG $FWTSTESTDIR/sdei-0001/sdei-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/sdei-0001/test-0002.sh b/fwts-test/sdei-0001/test-0002.sh new file mode 100755 index 0000000..6bb0d9e --- /dev/null +++ b/fwts-test/sdei-0001/test-0002.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# +TEST="Test acpitables against invalid SDEI" +NAME=test-0001.sh +TMPLOG=$TMP/sdei.log.$$ + +$FWTS --show-tests | grep sdei > /dev/null +if [ $? -eq 1 ]; then + echo SKIP: $TEST, $NAME + exit 77 +fi + +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/sdei-0001/acpidump-0002.log sdei - | cut -c7- | grep "^sdei" > $TMPLOG +diff $TMPLOG $FWTSTESTDIR/sdei-0001/sdei-0002.log >> $FAILURE_LOG +ret=$? +if [ $ret -eq 0 ]; then + echo PASSED: $TEST, $NAME +else + echo FAILED: $TEST, $NAME +fi + +rm $TMPLOG +exit $ret