[2/2] fwts-test: Add regression test for SDEI

Message ID 1501886996-29373-2-git-send-email-alex.hung@canonical.com
State Accepted
Headers show

Commit Message

Alex Hung Aug. 4, 2017, 10:49 p.m.
Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 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

Comments

Colin King Aug. 22, 2017, 3:28 p.m. | #1
On 04/08/17 23:49, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  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
> 
Acked-by: Colin Ian King <colin.king@canonical.com>
ivanhu Aug. 23, 2017, 6:29 a.m. | #2
On 08/05/2017 06:49 AM, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>   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
> 

Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch

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