ACK (with comment): [PATCH 1/2] Revert "lib: fwts_acpi_tables: add option for dump acpi table from sysfs"
Colin Ian King
colin.king at canonical.com
Wed Feb 3 09:11:51 UTC 2021
On 03/02/2021 05:50, Alex Hung wrote:
> This reverts commit 6f1a1ee8db790c89892ae207f0eb0da499af220c.
>
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
> src/lib/include/fwts_framework.h | 4 +---
> src/lib/src/fwts_acpi_tables.c | 18 ++++--------------
> src/lib/src/fwts_framework.c | 4 ----
> 3 files changed, 5 insertions(+), 21 deletions(-)
>
> diff --git a/src/lib/include/fwts_framework.h b/src/lib/include/fwts_framework.h
> index f3717861..31418a93 100644
> --- a/src/lib/include/fwts_framework.h
> +++ b/src/lib/include/fwts_framework.h
> @@ -64,9 +64,7 @@ typedef enum {
> FWTS_FLAG_TEST_COMPLIANCE_ACPI = 0x00800000,
> FWTS_FLAG_TEST_SBBR = 0x01000000,
> FWTS_FLAG_TEST_EBBR = 0x02000000,
> - FWTS_FLAG_TEST_XBBR = FWTS_FLAG_TEST_SBBR | FWTS_FLAG_TEST_EBBR,
> - FWTS_FLAG_DUMP_ACPI_FROM_SYSFS = 0x08000000,
> -
> + FWTS_FLAG_TEST_XBBR = FWTS_FLAG_TEST_SBBR | FWTS_FLAG_TEST_EBBR
> } fwts_framework_flags;
>
> #define FWTS_FLAG_TEST_MASK \
> diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
> index f2824cdf..82b7448d 100644
> --- a/src/lib/src/fwts_acpi_tables.c
> +++ b/src/lib/src/fwts_acpi_tables.c
> @@ -1244,22 +1244,12 @@ int fwts_acpi_load_tables(fwts_framework *fw)
> ret = fwts_acpi_load_tables_from_acpidump(fw);
> require_fixup = true;
> } else if (fwts_check_root_euid(fw, true) == FWTS_OK) {
> - if (!(fw->flags & FWTS_FLAG_DUMP_ACPI_FROM_SYSFS)) {
> - ret = fwts_acpi_load_tables_from_firmware(fw);
> + ret = fwts_acpi_load_tables_from_firmware(fw);
>
> - /* Load from memory failed (e.g. no /dev/mem), so try sysfs */
> - if (ret != FWTS_OK) {
> - ret = fwts_acpi_load_tables_from_sysfs(fw);
> - require_fixup = true;
> - }
> - } else {
> - /* Load from sysfs */
> + /* Load from memory failed (e.g. no /dev/mem), so try sysfs */
> + if (ret != FWTS_OK) {
> ret = fwts_acpi_load_tables_from_sysfs(fw);
> - if (ret != FWTS_OK) {
> - /* Load from sysfs failed, try from mem(e.g. /dev/mem) */
> - ret = fwts_acpi_load_tables_from_firmware(fw);
> - } else
> - require_fixup = true;
> + require_fixup = true;
> }
> } else {
> ret = FWTS_ERROR_NO_PRIV;
> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
> index 593c4171..b9b8db41 100644
> --- a/src/lib/src/fwts_framework.c
> +++ b/src/lib/src/fwts_framework.c
> @@ -139,7 +139,6 @@ static fwts_option fwts_framework_options[] = {
> { "ifv", "", 0, "Run tests in firmware-vendor modes." },
> { "clog", "", 1, "Specify a coreboot logfile dump" },
> { "ebbr", "", 0, "Run ARM EBBR tests." },
> - { "dump-acpi-from-sysfs","", 0, "Specify dumping acpi table log default from sysfs." },
> { NULL, NULL, 0, NULL }
> };
>
> @@ -1348,9 +1347,6 @@ int fwts_framework_options_handler(fwts_framework *fw, int argc, char * const ar
> case 49: /* --ebbr */
> fw->flags |= FWTS_FLAG_TEST_EBBR;
> break;
> - case 50: /* --dump-acpi-from-sysfs */
> - fw->flags |= FWTS_FLAG_DUMP_ACPI_FROM_SYSFS;
> - break;
> }
> break;
> case 'a': /* --all */
>
It is probably worth noting that the --dump-acpi-from-sysfs option has
been removed any why in the release notes.
Acked-by: Colin Ian King <colin.king at canonical.com>
More information about the fwts-devel
mailing list