diff mbox

[2/2] fwts-test: Add XENV table regression test

Message ID 1436167764-15467-3-git-send-email-alex.hung@canonical.com
State Accepted
Headers show

Commit Message

Alex Hung July 6, 2015, 7:29 a.m. UTC
Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 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

Comments

Colin Ian King July 6, 2015, 8:21 a.m. UTC | #1
On 06/07/15 08:29, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  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            ==========================================================
> 
Acked-by: Colin Ian King <colin.king@canonical.com>
Ivan Hu July 6, 2015, 9:18 a.m. UTC | #2
On 2015年07月06日 15:29, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>   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            ==========================================================
Acked-by: Ivan Hu<ivan.hu@canonical.com>
diff mbox

Patch

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            ==========================================================