ACK: [PATCH 20/30] fwts-test: Add BERT test
ivanhu
ivan.hu at canonical.com
Wed Jun 24 06:57:00 UTC 2015
On 2015年06月18日 16:49, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Add two tests, one to check for a valid BERT and another to check
> an invalid BERT.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> Makefile.am | 4 ++-
> fwts-test/acpitables-0008/acpidump-0001.log | 5 ----
> fwts-test/acpitables-0008/acpitables-0001.log | 22 ----------------
> fwts-test/acpitables-0008/test-0001.sh | 17 ------------
> fwts-test/bert-0001/acpidump-0001.log | 29 +++++++++++++++++++++
> fwts-test/bert-0001/acpidump-0002.log | 29 +++++++++++++++++++++
> fwts-test/bert-0001/bert-0001.log | 16 ++++++++++++
> fwts-test/bert-0001/bert-0002.log | 15 +++++++++++
> fwts-test/bert-0001/test-0001.sh | 17 ++++++++++++
> fwts-test/bert-0001/test-0002.sh | 17 ++++++++++++
> fwts-test/rsdp-0001/acpidump-0001.log | 37 +++++++++++++++++++++++++++
> fwts-test/rsdp-0001/rsdp.log | 9 +++++++
> fwts-test/rsdp-0001/test-0001.sh | 17 ++++++++++++
> 13 files changed, 189 insertions(+), 45 deletions(-)
> delete mode 100644 fwts-test/acpitables-0008/acpidump-0001.log
> delete mode 100644 fwts-test/acpitables-0008/acpitables-0001.log
> delete mode 100755 fwts-test/acpitables-0008/test-0001.sh
> create mode 100644 fwts-test/bert-0001/acpidump-0001.log
> create mode 100644 fwts-test/bert-0001/acpidump-0002.log
> create mode 100644 fwts-test/bert-0001/bert-0001.log
> create mode 100644 fwts-test/bert-0001/bert-0002.log
> create mode 100755 fwts-test/bert-0001/test-0001.sh
> create mode 100755 fwts-test/bert-0001/test-0002.sh
> create mode 100644 fwts-test/rsdp-0001/acpidump-0001.log
> create mode 100644 fwts-test/rsdp-0001/rsdp.log
> create mode 100755 fwts-test/rsdp-0001/test-0001.sh
>
> diff --git a/Makefile.am b/Makefile.am
> index cf265e4..dd96e21 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -13,7 +13,6 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
> fwts-test/acpitables-0003/test-0001.sh \
> fwts-test/acpitables-0004/test-0001.sh \
> fwts-test/acpitables-0005/test-0001.sh \
> - fwts-test/acpitables-0008/test-0001.sh \
> fwts-test/apicinstance-0001/test-0001.sh \
> fwts-test/apicinstance-0001/test-0002.sh \
> fwts-test/arg-help-0001/test-0001.sh \
> @@ -53,6 +52,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
> fwts-test/arg-width-0001/test-0006.sh \
> fwts-test/arg-width-0001/test-0007.sh \
> fwts-test/arg-width-0001/test-0008.sh \
> + fwts-test/bert-0001/test-0001.sh \
> + fwts-test/bert-0001/test-0002.sh \
> fwts-test/checksum-0001/test-0001.sh \
> fwts-test/checksum-0001/test-0003.sh \
> fwts-test/checksum-0001/test-0004.sh \
> @@ -71,6 +72,7 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
> fwts-test/oops-0001/test-0003.sh \
> fwts-test/osilinux-0001/test-0001.sh \
> fwts-test/osilinux-0001/test-0002.sh \
> + fwts-test/rsdp-0001/test-0001.sh \
> fwts-test/rsdt-0001/test-0001.sh \
> fwts-test/syntaxcheck-0001/test-0001.sh \
> fwts-test/wmi-0001/test-0001.sh \
> diff --git a/fwts-test/acpitables-0008/acpidump-0001.log b/fwts-test/acpitables-0008/acpidump-0001.log
> deleted file mode 100644
> index 479a0d9..0000000
> --- a/fwts-test/acpitables-0008/acpidump-0001.log
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -RSD PTR @ 0xf7240
> - 0000: 52 53 44 20 50 54 52 20 c5 20 20 20 20 20 20 03 RSD PTR .
> - 0010: 94 87 6d bf 24 00 00 00 f0 87 6d bf 00 00 00 00 ..m.$.....m.....
> - 0020: 39 00 00 00 9...
> -
> diff --git a/fwts-test/acpitables-0008/acpitables-0001.log b/fwts-test/acpitables-0008/acpitables-0001.log
> deleted file mode 100644
> index fbdfc67..0000000
> --- a/fwts-test/acpitables-0008/acpitables-0001.log
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -acpitables acpitables: ACPI table settings sanity tests.
> -acpitables ----------------------------------------------------------
> -acpitables Test 1 of 2: Test ACPI tables.
> -acpitables Cannot find FACP.
> -acpitables Table APIC not present to check.
> -acpitables Table ECDT not present to check.
> -acpitables Table FACP not present to check.
> -acpitables Table GTDT not present to check.
> -acpitables Table HPET not present to check.
> -acpitables Table MCFG not present to check.
> -acpitables Table RSDT not present to check.
> -acpitables Table RSDP not present to check.
> -acpitables Table SBST not present to check.
> -acpitables Table XSDT not present to check.
> -acpitables
> -acpitables Test 2 of 2: Test ACPI headers.
> -acpitables ABORTED: Test 2, Cannot find any ACPI tables.
> -acpitables
> -acpitables ==========================================================
> -acpitables 0 passed, 0 failed, 0 warning, 1 aborted, 0 skipped, 0
> -acpitables info only.
> -acpitables ==========================================================
> diff --git a/fwts-test/acpitables-0008/test-0001.sh b/fwts-test/acpitables-0008/test-0001.sh
> deleted file mode 100755
> index 68e7c5a..0000000
> --- a/fwts-test/acpitables-0008/test-0001.sh
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -#!/bin/bash
> -#
> -TEST="Test apcitables against broken ACPI RSDP"
> -NAME=test-0001.sh
> -TMPLOG=$TMP/acpitables.log.$$
> -
> -$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/acpitables-0008/acpidump-0001.log acpitables - | grep "^[0-9]*[ ]*acpitables" | cut -c7- > $TMPLOG
> -diff $TMPLOG $FWTSTESTDIR/acpitables-0008/acpitables-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/bert-0001/acpidump-0001.log b/fwts-test/bert-0001/acpidump-0001.log
> new file mode 100644
> index 0000000..30e5849
> --- /dev/null
> +++ b/fwts-test/bert-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 at ...........
> + 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 ................
> + 0030: 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 . ........... at ..
> + 00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
> + 00f0: 00 00 00 00 ....
> +
> +BERT @ 0x00000000
> + 0000: 42 45 52 54 30 00 00 00 01 06 50 54 4c 20 20 20 BERT0.....PTL
> + 0010: 57 48 45 41 50 54 4c 20 00 00 04 06 50 54 4c 20 WHEAPTL ....PTL
> + 0020: 01 00 00 00 00 04 00 00 00 60 e9 af 00 00 00 00 .........`......
> diff --git a/fwts-test/bert-0001/acpidump-0002.log b/fwts-test/bert-0001/acpidump-0002.log
> new file mode 100644
> index 0000000..9c23cfd
> --- /dev/null
> +++ b/fwts-test/bert-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 at ...........
> + 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 ................
> + 0030: 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 . ........... at ..
> + 00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
> + 00f0: 00 00 00 00 ....
> +
> +BERT @ 0x00000000
> + 0000: 42 45 52 54 30 00 00 00 01 06 50 54 4c 20 20 20 BERT0.....PTL
> + 0010: 57 48 45 41 50 54 4c 20 00 00 04 06 50 54 4c 20 WHEAPTL ....PTL
> + 0020: 01 00 00 00 00 00 00 00 00 60 e9 af 00 00 00 00 .........`......
> diff --git a/fwts-test/bert-0001/bert-0001.log b/fwts-test/bert-0001/bert-0001.log
> new file mode 100644
> index 0000000..916258f
> --- /dev/null
> +++ b/fwts-test/bert-0001/bert-0001.log
> @@ -0,0 +1,16 @@
> +bert bert: BERT Boot Error Record Table test.
> +bert ----------------------------------------------------------
> +bert Test 1 of 1: BERT Boot Error Record Table test.
> +bert Boot Error Record Table:
> +bert Error Region Length 0x00000400
> +bert Error Region 0x00000000afe96000
> +bert
> +bert ACPI table loaded from file so fwts will not memory map
> +bert BERT boot error region 0x00000000afe96000, skipping boot
> +bert error region sanity checks.
> +bert PASSED: Test 1, No issues found in BERT table.
> +bert
> +bert ==========================================================
> +bert 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
> +bert info only.
> +bert ==========================================================
> diff --git a/fwts-test/bert-0001/bert-0002.log b/fwts-test/bert-0001/bert-0002.log
> new file mode 100644
> index 0000000..7a5bcdb
> --- /dev/null
> +++ b/fwts-test/bert-0001/bert-0002.log
> @@ -0,0 +1,15 @@
> +bert bert: BERT Boot Error Record Table test.
> +bert ----------------------------------------------------------
> +bert Test 1 of 1: BERT Boot Error Record Table test.
> +bert Boot Error Record Table:
> +bert Error Region Length 0x00000000
> +bert Error Region 0x00000000afe96000
> +bert
> +bert FAILED [HIGH] BERTBootErrorRegionDataLength: Test 1, BERT
> +bert Boot Error Region Length 0 is smaller than the minimum
> +bert allowed size of 20 bytes
> +bert
> +bert ==========================================================
> +bert 0 passed, 1 failed, 0 warning, 0 aborted, 0 skipped, 0
> +bert info only.
> +bert ==========================================================
> diff --git a/fwts-test/bert-0001/test-0001.sh b/fwts-test/bert-0001/test-0001.sh
> new file mode 100755
> index 0000000..cc06cb6
> --- /dev/null
> +++ b/fwts-test/bert-0001/test-0001.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test apcitables against BERT"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/bert.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/bert-0001/acpidump-0001.log bert - | cut -c7- | grep "^bert" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/bert-0001/bert-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/bert-0001/test-0002.sh b/fwts-test/bert-0001/test-0002.sh
> new file mode 100755
> index 0000000..267c38a
> --- /dev/null
> +++ b/fwts-test/bert-0001/test-0002.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test apcitables against invalid BERT"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/bert.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/bert-0001/acpidump-0002.log bert - | cut -c7- | grep "^bert" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/bert-0001/bert-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/rsdp-0001/acpidump-0001.log b/fwts-test/rsdp-0001/acpidump-0001.log
> new file mode 100644
> index 0000000..946409f
> --- /dev/null
> +++ b/fwts-test/rsdp-0001/acpidump-0001.log
> @@ -0,0 +1,37 @@
> +RSD @ 0x00000000000F0120
> + 0000: 52 53 44 20 50 54 52 20 7F 4C 45 4E 4F 56 4F 02 RSD PTR .LENOVO.
> + 0010: D4 E0 FF DA 24 00 00 00 70 E1 FF DA 00 00 00 00 ....$...p.......
> + 0020: B2 00 00 00 ....
> +
> +RSDT @ 0x00000000DAFFE0D4
> + 0000: 52 53 44 54 70 00 00 00 01 8C 4C 45 4E 4F 56 4F RSDTp.....LENOVO
> + 0010: 54 50 2D 47 32 20 20 20 10 11 00 00 50 54 4C 20 TP-G2 ....PTL
> + 0020: 02 00 00 00 00 50 FE DA 00 D0 FF DA 00 C0 FF DA .....P..........
> + 0030: 00 B0 FF DA 00 A0 FF DA 00 90 FF DA 00 40 FE DA ............. at ..
> + 0040: 00 30 FE DA 00 20 FE DA 00 10 FE DA 00 00 FE DA .0... ..........
> + 0050: 00 70 FE DA 00 F0 FD DA 00 E0 FD DA 00 D0 FD DA .p..............
> + 0060: 00 C0 FD DA 00 B0 FD DA 00 A0 FD DA 00 90 FD DA ................
> +
> +FACS @ 0x00000000DAF5A000
> + 0000: 46 41 43 53 40 00 00 00 00 A2 00 00 00 00 00 00 FACS at ...........
> + 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 ................
> +
> +FACP @ 0x00000000DAFE5000
> + 0000: 46 41 43 50 F4 00 00 00 04 50 4C 45 4E 4F 56 4F FACP.....PLENOVO
> + 0010: 54 50 2D 47 32 20 20 20 10 11 00 00 50 54 4C 20 TP-G2 ....PTL
> + 0020: 02 00 00 00 00 A0 F5 DA 00 80 FE DA 00 02 09 00 ................
> + 0030: B2 00 00 00 F2 F1 00 F3 00 04 00 00 00 00 00 00 ................
> + 0040: 04 04 00 00 00 00 00 00 50 04 00 00 08 04 00 00 ........P.......
> + 0050: 20 04 00 00 00 00 00 00 04 02 01 04 10 00 10 F4 ...............
> + 0060: 65 00 E9 03 00 00 00 00 01 03 0D 00 32 13 00 00 e...........2...
> + 0070: AD 46 00 00 01 08 00 00 F9 0C 00 00 00 00 00 00 .F..............
> + 0080: 06 00 00 00 00 A0 F5 DA 00 00 00 00 00 80 FE DA ................
> + 0090: 00 00 00 00 01 20 00 00 00 04 00 00 00 00 00 00 ..... ..........
> + 00A0: 01 00 00 00 00 00 00 00 00 00 00 00 01 10 00 00 ................
> + 00B0: 04 04 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
> + 00C0: 00 00 00 00 01 08 00 00 50 04 00 00 00 00 00 00 ........P.......
> + 00D0: 01 20 00 00 08 04 00 00 00 00 00 00 01 80 00 00 . ..............
> + 00E0: 20 04 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ...............
> + 00F0: 00 00 00 00 ....
> diff --git a/fwts-test/rsdp-0001/rsdp.log b/fwts-test/rsdp-0001/rsdp.log
> new file mode 100644
> index 0000000..6a3efec
> --- /dev/null
> +++ b/fwts-test/rsdp-0001/rsdp.log
> @@ -0,0 +1,9 @@
> +rsdp rsdp: RSDP Root System Description Pointer test.
> +rsdp ----------------------------------------------------------
> +rsdp Test 1 of 1: RSDP Root System Description Pointer test.
> +rsdp PASSED: Test 1, No issues found in RSDP table.
> +rsdp
> +rsdp ==========================================================
> +rsdp 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
> +rsdp info only.
> +rsdp ==========================================================
> diff --git a/fwts-test/rsdp-0001/test-0001.sh b/fwts-test/rsdp-0001/test-0001.sh
> new file mode 100755
> index 0000000..bbb4fb6
> --- /dev/null
> +++ b/fwts-test/rsdp-0001/test-0001.sh
> @@ -0,0 +1,17 @@
> +#!/bin/bash
> +#
> +TEST="Test apcitables against broken ACPI RSDP"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/rsdp.log.$$
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/rsdp-0001/acpidump-0001.log rsdp - | cut -c7- | grep "^rsdp" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/rsdp-0001/rsdp.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 at canonical.com>
More information about the fwts-devel
mailing list