From patchwork Sun Apr 11 20:56:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 1464914 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FJPLK1rr4z9sWX for ; Mon, 12 Apr 2021 06:56:41 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lVh8I-0005zh-Ia; Sun, 11 Apr 2021 20:56:38 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lVh8F-0005zN-0P for fwts-devel@lists.ubuntu.com; Sun, 11 Apr 2021 20:56:35 +0000 Received: from [104.157.111.226] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lVh8E-0005Nx-CF; Sun, 11 Apr 2021 20:56:34 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH 3/3][V3] fwts-test: sync up with phat test Date: Sun, 11 Apr 2021 14:56:21 -0600 Message-Id: <20210411205621.116069-3-alex.hung@canonical.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210411205621.116069-1-alex.hung@canonical.com> References: <20210411205621.116069-1-alex.hung@canonical.com> MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" Signed-off-by: Alex Hung Acked-by: Colin Ian King Acked-by: Ivan Hu --- Makefile.am | 3 ++ fwts-test/phat-0001/acpidump-0001.log | 42 ++++++++++++++++++ fwts-test/phat-0001/acpidump-0002.log | 41 ++++++++++++++++++ fwts-test/phat-0001/acpidump-0003.log | 41 ++++++++++++++++++ fwts-test/phat-0001/phat-0001.log | 62 +++++++++++++++++++++++++++ fwts-test/phat-0001/phat-0002.log | 45 +++++++++++++++++++ fwts-test/phat-0001/phat-0003.log | 59 +++++++++++++++++++++++++ fwts-test/phat-0001/test-0001.sh | 23 ++++++++++ fwts-test/phat-0001/test-0002.sh | 23 ++++++++++ fwts-test/phat-0001/test-0003.sh | 23 ++++++++++ 10 files changed, 362 insertions(+) create mode 100644 fwts-test/phat-0001/acpidump-0001.log create mode 100644 fwts-test/phat-0001/acpidump-0002.log create mode 100644 fwts-test/phat-0001/acpidump-0003.log create mode 100644 fwts-test/phat-0001/phat-0001.log create mode 100644 fwts-test/phat-0001/phat-0002.log create mode 100644 fwts-test/phat-0001/phat-0003.log create mode 100755 fwts-test/phat-0001/test-0001.sh create mode 100755 fwts-test/phat-0001/test-0002.sh create mode 100755 fwts-test/phat-0001/test-0003.sh diff --git a/Makefile.am b/Makefile.am index d4eee175..9e141292 100644 --- a/Makefile.am +++ b/Makefile.am @@ -158,6 +158,9 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \ fwts-test/pcct-0001/test-0002.sh \ fwts-test/pdtt-0001/test-0001.sh \ fwts-test/pdtt-0001/test-0002.sh \ + fwts-test/phat-0001/test-0001.sh \ + fwts-test/phat-0001/test-0002.sh \ + fwts-test/phat-0001/test-0003.sh \ fwts-test/pmtt-0001/test-0001.sh \ fwts-test/pmtt-0001/test-0002.sh \ fwts-test/pptt-0001/test-0001.sh \ diff --git a/fwts-test/phat-0001/acpidump-0001.log b/fwts-test/phat-0001/acpidump-0001.log new file mode 100644 index 00000000..1a4a1f4a --- /dev/null +++ b/fwts-test/phat-0001/acpidump-0001.log @@ -0,0 +1,42 @@ +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 .... + +PHAT @ 0x0000000000000000 + 0000: 50 48 41 54 DA 00 00 00 01 20 49 4E 54 45 4C 20 PHAT..... INTEL + 0010: 54 65 6D 70 6C 61 74 65 01 00 00 00 49 4E 54 4C Template....INTL + 0020: 31 03 21 20 00 00 28 00 00 00 00 00 01 00 00 00 1.! ..(......... + 0030: 30 05 AF 91 86 5D 0E 47 A6 B0 0A 2D B9 40 82 49 0....].G...-.@.I + 0040: 08 07 06 05 04 03 02 01 0C 0B 0A 09 00 00 28 00 ..............(. + 0050: 00 00 00 00 01 00 00 00 3C 73 2E 1E 0D 79 44 46 ........ /dev/null +if [ $? -eq 1 ]; then + echo SKIP: $TEST, $NAME + exit 77 +fi + +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/phat-0001/acpidump-0001.log phat - | cut -c7- | grep "^phat" > $TMPLOG +diff $TMPLOG $FWTSTESTDIR/phat-0001/phat-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/phat-0001/test-0002.sh b/fwts-test/phat-0001/test-0002.sh new file mode 100755 index 00000000..f3813565 --- /dev/null +++ b/fwts-test/phat-0001/test-0002.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# +TEST="Test acpitables against invalid PHAT" +NAME=test-0001.sh +TMPLOG=$TMP/phat.log.$$ + +$FWTS --show-tests | grep phat > /dev/null +if [ $? -eq 1 ]; then + echo SKIP: $TEST, $NAME + exit 77 +fi + +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/phat-0001/acpidump-0002.log phat - | cut -c7- | grep "^phat" > $TMPLOG +diff $TMPLOG $FWTSTESTDIR/phat-0001/phat-0002.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/phat-0001/test-0003.sh b/fwts-test/phat-0001/test-0003.sh new file mode 100755 index 00000000..86187ccc --- /dev/null +++ b/fwts-test/phat-0001/test-0003.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# +TEST="Test acpitables against PHAT" +NAME=test-0003.sh +TMPLOG=$TMP/phat.log.$$ + +$FWTS --show-tests | grep phat > /dev/null +if [ $? -eq 1 ]; then + echo SKIP: $TEST, $NAME + exit 77 +fi + +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/phat-0001/acpidump-0003.log phat - | cut -c7- | grep "^phat" > $TMPLOG +diff $TMPLOG $FWTSTESTDIR/phat-0001/phat-0003.log >> $FAILURE_LOG +ret=$? +if [ $ret -eq 0 ]; then + echo PASSED: $TEST, $NAME +else + echo FAILED: $TEST, $NAME +fi + +rm $TMPLOG +exit $ret