From patchwork Mon Jul 6 07:29:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 491450 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 6F6B5140D5E; Mon, 6 Jul 2015 17:29:41 +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 1ZC0qS-0007r5-85; Mon, 06 Jul 2015 07:29:40 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1ZC0qN-0007qI-IL for fwts-devel@lists.ubuntu.com; Mon, 06 Jul 2015 07:29:35 +0000 Received: from [175.41.48.77] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ZC0qM-0006Xi-D9; Mon, 06 Jul 2015 07:29:35 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH 2/2] fwts-test: Add XENV table regression test Date: Mon, 6 Jul 2015 15:29:24 +0800 Message-Id: <1436167764-15467-3-git-send-email-alex.hung@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436167764-15467-1-git-send-email-alex.hung@canonical.com> References: <1436167764-15467-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 ++ .../arg-show-tests-0001/arg-show-tests-0001.log | 2 ++ .../arg-show-tests-full-0001.log | 6 ++++- fwts-test/xenv-0001/acpidump-0001.log | 30 ++++++++++++++++++++++ fwts-test/xenv-0001/acpidump-0002.log | 30 ++++++++++++++++++++++ fwts-test/xenv-0001/test-0001.sh | 17 ++++++++++++ fwts-test/xenv-0001/test-0002.sh | 17 ++++++++++++ fwts-test/xenv-0001/xenv-0001.log | 14 ++++++++++ fwts-test/xenv-0001/xenv-0002.log | 15 +++++++++++ 9 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 fwts-test/xenv-0001/acpidump-0001.log create mode 100644 fwts-test/xenv-0001/acpidump-0002.log create mode 100755 fwts-test/xenv-0001/test-0001.sh create mode 100755 fwts-test/xenv-0001/test-0002.sh create mode 100644 fwts-test/xenv-0001/xenv-0001.log create mode 100644 fwts-test/xenv-0001/xenv-0002.log diff --git a/Makefile.am b/Makefile.am index 9ce4540..7d5c1f0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -112,4 +112,6 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \ fwts-test/wmi-0001/test-0001.sh \ fwts-test/wmi-0001/test-0002.sh \ fwts-test/wmi-0001/test-0003.sh \ + fwts-test/xenv-0001/test-0001.sh \ + fwts-test/xenv-0001/test-0002.sh \ fwts-test/xsdt-0001/test-0001.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 b3287b7..bd388a6 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: tcpa Trusted Computing Platform Alliance Capabilities Table test. waet Windows ACPI Emulated Devices Table test. wmi Extract and analyse Windows Management Instrumentation (WMI). + xenv Xen Environment Table tests. xsdt XSDT Extended System Description Table test. Batch tests: @@ -106,6 +107,7 @@ Batch tests: waet Windows ACPI Emulated Devices Table test. wakealarm ACPI Wakealarm tests. wmi Extract and analyse Windows Management Instrumentation (WMI). + xenv Xen Environment Table tests. xsdt XSDT Extended System Description Table test. Interactive tests: 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 f6eb0ef..d81ebf0 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: Windows ACPI Emulated Devices Table test. wmi (1 test): Windows Management Instrumentation test. + xenv (1 test): + Validate XEVN table. xsdt (1 test): XSDT Extended System Description Table test. @@ -617,6 +619,8 @@ Batch tests: Multiple wakealarm firing tests. wmi (1 test): Windows Management Instrumentation test. + xenv (1 test): + Validate XEVN table. xsdt (1 test): XSDT Extended System Description Table test. @@ -808,4 +812,4 @@ UEFI tests: Test UEFI RT service query variable info interface stress test. Test UEFI RT service get variable interface, invalid parameters. -Total of 658 tests +Total of 660 tests diff --git a/fwts-test/xenv-0001/acpidump-0001.log b/fwts-test/xenv-0001/acpidump-0001.log new file mode 100644 index 0000000..ef18116 --- /dev/null +++ b/fwts-test/xenv-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@........... + 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 .... + +XENV @ 0x00000000 + 0000: 58 45 4E 56 39 00 00 00 01 35 58 65 6E 56 4D 4D XENV9....5XenVMM + 0010: 54 45 4D 50 4C 41 54 45 00 00 00 00 49 4E 54 4C TEMPLATE....INTL + 0020: 14 02 14 20 00 00 00 10 00 00 00 00 00 20 00 00 ... ......... .. + 0030: 00 00 00 00 00 00 00 25 03 .......%. diff --git a/fwts-test/xenv-0001/acpidump-0002.log b/fwts-test/xenv-0001/acpidump-0002.log new file mode 100644 index 0000000..7461d46 --- /dev/null +++ b/fwts-test/xenv-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@........... + 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 .... + +XENV @ 0x00000000 + 0000: 58 45 4E 56 39 00 00 00 01 31 58 65 6E 56 4D 4D XENV9....5XenVMM + 0010: 54 45 4D 50 4C 41 54 45 00 00 00 00 49 4E 54 4C TEMPLATE....INTL + 0020: 14 02 14 20 00 00 00 10 00 00 00 00 00 20 00 00 ... ......... .. + 0030: 00 00 00 00 00 00 00 25 07 .......%. diff --git a/fwts-test/xenv-0001/test-0001.sh b/fwts-test/xenv-0001/test-0001.sh new file mode 100755 index 0000000..cc4e935 --- /dev/null +++ b/fwts-test/xenv-0001/test-0001.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +TEST="Test table against XENV" +NAME=test-0001.sh +TMPLOG=$TMP/xenv.log.$$ + +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/xenv-0001/acpidump-0001.log xenv - | cut -c7- | grep "^xenv" > $TMPLOG +diff $TMPLOG $FWTSTESTDIR/xenv-0001/xenv-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/xenv-0001/test-0002.sh b/fwts-test/xenv-0001/test-0002.sh new file mode 100755 index 0000000..ef6b858 --- /dev/null +++ b/fwts-test/xenv-0001/test-0002.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +TEST="Test table against invalid XENV" +NAME=test-0001.sh +TMPLOG=$TMP/xenv.log.$$ + +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/xenv-0001/acpidump-0002.log xenv - | cut -c7- | grep "^xenv" > $TMPLOG +diff $TMPLOG $FWTSTESTDIR/xenv-0001/xenv-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/xenv-0001/xenv-0001.log b/fwts-test/xenv-0001/xenv-0001.log new file mode 100644 index 0000000..06e5313 --- /dev/null +++ b/fwts-test/xenv-0001/xenv-0001.log @@ -0,0 +1,14 @@ +xenv xenv: Xen Environment Table tests. +xenv ---------------------------------------------------------- +xenv Test 1 of 1: Validate XEVN table. +xenv XENV Table: +xenv GNT Start Address 0x0000000010000000 +xenv GNT Sizne 0x0000000000002000 +xenv Evtchn Intr: 0x25000000 +xenv Evtchn Intr Flags: 0x03 +xenv PASSED: Test 1, No issues found in XENV table. +xenv +xenv ========================================================== +xenv 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 +xenv info only. +xenv ========================================================== diff --git a/fwts-test/xenv-0001/xenv-0002.log b/fwts-test/xenv-0001/xenv-0002.log new file mode 100644 index 0000000..2810fd0 --- /dev/null +++ b/fwts-test/xenv-0001/xenv-0002.log @@ -0,0 +1,15 @@ +xenv xenv: Xen Environment Table tests. +xenv ---------------------------------------------------------- +xenv Test 1 of 1: Validate XEVN table. +xenv XENV Table: +xenv GNT Start Address 0x0000000010000000 +xenv GNT Sizne 0x0000000000002000 +xenv Evtchn Intr: 0x25000000 +xenv Evtchn Intr Flags: 0x07 +xenv FAILED [HIGH] XENVBadEvtchnIntrFlags: Test 1, XENV Evtchn +xenv Intr Flags was 0x07 and reserved bits [7:2] are not zero. +xenv +xenv ========================================================== +xenv 0 passed, 1 failed, 0 warning, 0 aborted, 0 skipped, 0 +xenv info only. +xenv ==========================================================