[PATCH] acpi: remove standalone s3pt test
Ivan Hu
ivan.hu at canonical.com
Tue Nov 18 07:59:22 UTC 2025
S3PT is a subtable pointed to from FPDT, so drop the dedicated s3pt test/binary
and associated test data.
Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
---
Makefile.am | 2 -
fwts-test/s3pt-0001/acpidump-0001.log | 30 -------
fwts-test/s3pt-0001/acpidump-0002.log | 31 -------
fwts-test/s3pt-0001/s3pt-0001.log | 25 ------
fwts-test/s3pt-0001/s3pt-0002.log | 32 -------
fwts-test/s3pt-0001/test-0001.sh | 23 -----
fwts-test/s3pt-0001/test-0002.sh | 23 -----
src/Makefile.am | 1 -
src/acpi/s3pt/s3pt.c | 122 --------------------------
9 files changed, 289 deletions(-)
delete mode 100644 fwts-test/s3pt-0001/acpidump-0001.log
delete mode 100644 fwts-test/s3pt-0001/acpidump-0002.log
delete mode 100644 fwts-test/s3pt-0001/s3pt-0001.log
delete mode 100644 fwts-test/s3pt-0001/s3pt-0002.log
delete mode 100755 fwts-test/s3pt-0001/test-0001.sh
delete mode 100755 fwts-test/s3pt-0001/test-0002.sh
delete mode 100644 src/acpi/s3pt/s3pt.c
diff --git a/Makefile.am b/Makefile.am
index 00c7b17a..0d7389d0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -189,8 +189,6 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
fwts-test/rsdt-0001/test-0001.sh \
fwts-test/s0idle-0001/test-0001.sh \
fwts-test/s0idle-0001/test-0002.sh \
- fwts-test/s3pt-0001/test-0001.sh \
- fwts-test/s3pt-0001/test-0002.sh \
fwts-test/sbst-0001/test-0001.sh \
fwts-test/sbst-0001/test-0002.sh \
fwts-test/sdei-0001/test-0001.sh \
diff --git a/fwts-test/s3pt-0001/acpidump-0001.log b/fwts-test/s3pt-0001/acpidump-0001.log
deleted file mode 100644
index c7031dc1..00000000
--- a/fwts-test/s3pt-0001/acpidump-0001.log
+++ /dev/null
@@ -1,30 +0,0 @@
-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 ................
- 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 . ........... at ..
- 00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
- 00f0: 00 00 00 00 ....
-
-S3PT @ 0x00000000
- 0000: 53 33 50 54 34 00 00 00 00 00 18 01 00 00 00 00 S3PT4...........
- 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
- 0020: 01 00 14 01 00 00 00 00 00 00 00 00 00 00 00 00 ................
- 0030: 00 00 00 00 ....
diff --git a/fwts-test/s3pt-0001/acpidump-0002.log b/fwts-test/s3pt-0001/acpidump-0002.log
deleted file mode 100644
index 4a49ff4a..00000000
--- a/fwts-test/s3pt-0001/acpidump-0002.log
+++ /dev/null
@@ -1,31 +0,0 @@
-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 ................
- 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 . ........... at ..
- 00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
- 00f0: 00 00 00 00 ....
-
-S3PT @ 0x00000000
- 0000: 53 33 50 54 44 00 00 00 01 00 14 01 00 00 00 00 S3PT4...........
- 0010: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 14 01 ................
- 0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
- 0030: 02 00 14 01 00 00 00 00 00 00 00 00 00 00 00 00 ................
- 0040: 00 00 00 00 ............
diff --git a/fwts-test/s3pt-0001/s3pt-0001.log b/fwts-test/s3pt-0001/s3pt-0001.log
deleted file mode 100644
index 3108c5ef..00000000
--- a/fwts-test/s3pt-0001/s3pt-0001.log
+++ /dev/null
@@ -1,25 +0,0 @@
-s3pt s3pt: S3 Performance Table test.
-s3pt ----------------------------------------------------------
-s3pt Test 1 of 1: Validate S3PT table.
-s3pt S3 Performance Table:
-s3pt Basic S3 Resume Performance Record:
-s3pt Record Type: 0x0000
-s3pt Record Length: 0x18
-s3pt Revision: 0x01
-s3pt Resume Count: 0x00000000
-s3pt FullResume: 0x0000000000000000
-s3pt AverageResume: 0x0000000000000000
-s3pt
-s3pt Basic S3 Suspend Performance Record:
-s3pt Record Type: 0x0001
-s3pt Record Length: 0x14
-s3pt Revision: 0x01
-s3pt SuspendStart: 0x0000000000000000
-s3pt SuspendEnd: 0x0000000000000000
-s3pt
-s3pt PASSED: Test 1, No issues found in S3PT table.
-s3pt
-s3pt ==========================================================
-s3pt 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
-s3pt info only.
-s3pt ==========================================================
diff --git a/fwts-test/s3pt-0001/s3pt-0002.log b/fwts-test/s3pt-0001/s3pt-0002.log
deleted file mode 100644
index c16ae494..00000000
--- a/fwts-test/s3pt-0001/s3pt-0002.log
+++ /dev/null
@@ -1,32 +0,0 @@
-s3pt s3pt: S3 Performance Table test.
-s3pt ----------------------------------------------------------
-s3pt Test 1 of 1: Validate S3PT table.
-s3pt S3 Performance Table:
-s3pt Basic S3 Suspend Performance Record:
-s3pt Record Type: 0x0001
-s3pt Record Length: 0x14
-s3pt Revision: 0x01
-s3pt SuspendStart: 0x0000000000000000
-s3pt SuspendEnd: 0x0000000000000000
-s3pt
-s3pt Basic S3 Suspend Performance Record:
-s3pt Record Type: 0x0001
-s3pt Record Length: 0x14
-s3pt Revision: 0x01
-s3pt SuspendStart: 0x0000000000000000
-s3pt SuspendEnd: 0x0000000000000000
-s3pt
-s3pt FAILED [HIGH] S3PTPerformanceRecordTypeInvalid: Test 1,
-s3pt S3PT Performance Record Type is 2 which is invalid value.
-s3pt
-s3pt FAILED [HIGH] S3PTBadRecordTypeCount: Test 1, One of the
-s3pt basic S3 resume performance record type and only will be
-s3pt produced, but got 0
-s3pt FAILED [HIGH] S3PTBadRecordTypeCount: Test 1, Zero to one
-s3pt of the basic S3 suspend performance record type will be
-s3pt produced, but got 2
-s3pt
-s3pt ==========================================================
-s3pt 0 passed, 3 failed, 0 warning, 0 aborted, 0 skipped, 0
-s3pt info only.
-s3pt ==========================================================
diff --git a/fwts-test/s3pt-0001/test-0001.sh b/fwts-test/s3pt-0001/test-0001.sh
deleted file mode 100755
index 99c4666b..00000000
--- a/fwts-test/s3pt-0001/test-0001.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-#
-TEST="Test acpitables against S3PT"
-NAME=test-0001.sh
-TMPLOG=$TMP/s3pt.log.$$
-
-$FWTS --show-tests | grep s3pt > /dev/null
-if [ $? -eq 1 ]; then
- echo SKIP: $TEST, $NAME
- exit 77
-fi
-
-$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/s3pt-0001/acpidump-0001.log s3pt - | cut -c7- | grep "^s3pt" > $TMPLOG
-diff $TMPLOG $FWTSTESTDIR/s3pt-0001/s3pt-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/s3pt-0001/test-0002.sh b/fwts-test/s3pt-0001/test-0002.sh
deleted file mode 100755
index 282c8220..00000000
--- a/fwts-test/s3pt-0001/test-0002.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-#
-TEST="Test acpitables against invalid S3PT"
-NAME=test-0001.sh
-TMPLOG=$TMP/s3pt.log.$$
-
-$FWTS --show-tests | grep s3pt > /dev/null
-if [ $? -eq 1 ]; then
- echo SKIP: $TEST, $NAME
- exit 77
-fi
-
-$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/s3pt-0001/acpidump-0002.log s3pt - | cut -c7- | grep "^s3pt" > $TMPLOG
-diff $TMPLOG $FWTSTESTDIR/s3pt-0001/s3pt-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/src/Makefile.am b/src/Makefile.am
index aeb98d57..16d45f18 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -142,7 +142,6 @@ fwts_SOURCES = main.c \
sbbr/rsdp/rsdp.c \
acpi/rsdt/rsdt.c \
acpi/s3/s3.c \
- acpi/s3pt/s3pt.c \
acpi/s3power/s3power.c \
acpi/s4/s4.c \
acpi/sbst/sbst.c \
diff --git a/src/acpi/s3pt/s3pt.c b/src/acpi/s3pt/s3pt.c
deleted file mode 100644
index b9b83f3b..00000000
--- a/src/acpi/s3pt/s3pt.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (C) 2024-2025 Canonical
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-#include "fwts.h"
-
-#if defined(FWTS_HAS_ACPI)
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <inttypes.h>
-
-static fwts_acpi_table_info *table;
-acpi_table_init(S3PT, &table)
-
-static int s3pt_test1(fwts_framework *fw)
-{
-
- fwts_acpi_s3pt_record_hdr *hdr;
- fwts_acpi_s3pt_resume *resume_record;
- fwts_acpi_s3pt_suspend *suspend_record;
- bool passed = true;
- uint32_t offset;
- uint16_t resume_type_count = 0;
- uint16_t suspend_type_count = 0;
-
- offset = sizeof(fwts_acpi_table_s3pt_header);
- fwts_log_info_verbatim(fw, "S3 Performance Table:");
- while (offset < table->length) {
- hdr = (fwts_acpi_s3pt_record_hdr *)(table->data + offset);
- if ((offset + hdr->record_len) > table->length) {
- fwts_failed(fw, LOG_LEVEL_HIGH,
- "S3PTOutOfRangeOffset",
- "S3PT resume performance record offset is out of range.");
- passed = false;
- break;
- }
- switch(hdr->rt_perf_record_type) {
- case 0: /* Resume Performance Record Type */
- resume_record = (fwts_acpi_s3pt_resume *)(table->data + offset);
- fwts_log_info_verbatim(fw, " Basic S3 Resume Performance Record:");
- fwts_log_info_simp_int(fw, " Record Type: ", resume_record->header.rt_perf_record_type);
- fwts_log_info_simp_int(fw, " Record Length: ", resume_record->header.record_len);
- fwts_log_info_simp_int(fw, " Revision: ", resume_record->header.revision);
- fwts_log_info_simp_int(fw, " Resume Count: ", resume_record->resume_count);
- fwts_log_info_simp_int(fw, " FullResume: ", resume_record->full_resume);
- fwts_log_info_simp_int(fw, " AverageResume: ", resume_record->average_resume);
- resume_type_count++;
- break;
- case 1: /* Suspend Performance Record */
- suspend_record = (fwts_acpi_s3pt_suspend *)(table->data + offset);
- fwts_log_info_verbatim(fw, " Basic S3 Suspend Performance Record:");
- fwts_log_info_simp_int(fw, " Record Type: ", suspend_record->header.rt_perf_record_type);
- fwts_log_info_simp_int(fw, " Record Length: ", suspend_record->header.record_len);
- fwts_log_info_simp_int(fw, " Revision: ", suspend_record->header.revision);
- fwts_log_info_simp_int(fw, " SuspendStart: ", suspend_record->suspend_start);
- fwts_log_info_simp_int(fw, " SuspendEnd: ", suspend_record->suspend_end);
- suspend_type_count++;
- break;
- default:
- passed = false;
- fwts_failed(fw, LOG_LEVEL_HIGH,
- "S3PTPerformanceRecordTypeInvalid",
- "S3PT Performance Record Type is %" PRIu16
- " which is invalid value.",
- hdr->rt_perf_record_type);
- break;
- }
-
- offset += hdr->record_len;
- fwts_log_nl(fw);
- }
- if (resume_type_count != 1) {
- passed = false;
- fwts_failed(fw, LOG_LEVEL_HIGH,
- "S3PTBadRecordTypeCount",
- "One of the basic S3 resume performance "
- "record type and only will be produced, but got %"
- PRIu16, resume_type_count);
- }
-
- if (suspend_type_count > 1) {
- passed = false;
- fwts_failed(fw, LOG_LEVEL_HIGH,
- "S3PTBadRecordTypeCount",
- "Zero to one of the basic S3 suspend performance "
- "record type will be produced, but got %" PRIu16,
- suspend_type_count);
- }
-
- if (passed)
- fwts_passed(fw, "No issues found in S3PT table.");
-
- return FWTS_OK;
-}
-
-static fwts_framework_minor_test s3pt_tests[] = {
- { s3pt_test1, "Validate S3PT table." },
- { NULL, NULL }
-};
-
-static fwts_framework_ops s3pt_ops = {
- .description = "S3 Performance Table test.",
- .init = S3PT_init,
- .minor_tests = s3pt_tests
-};
-
-FWTS_REGISTER("s3pt", &s3pt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_ACPI)
-
-#endif
--
2.43.0
More information about the fwts-devel
mailing list