On 09/02/16 01:32, Al Stone wrote:
Instead of disabling the compilation of all FADT tests on non-x86 machines, enable as much as possible, even if the tests do not yet make sense. In subsequent patches, we will modify the tests to acknowledge the specifics of a given target arch. This does not change functionality on x86, but it does allow us to start testing portions of the FADT on other architectures.
Signed-off-by: Al Stone al.stone@linaro.org
src/acpi/fadt/fadt.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/acpi/fadt/fadt.c b/src/acpi/fadt/fadt.c index 0f3739b..1a5560c 100644 --- a/src/acpi/fadt/fadt.c +++ b/src/acpi/fadt/fadt.c @@ -20,13 +20,18 @@ */ #include "fwts.h" -#ifdef FWTS_ARCH_INTEL
#include <stdlib.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> +#ifdef FWTS_ARCH_INTEL #include <sys/io.h> +#else +static inline int ioperm(int a, ...) +{
- return a * 0;
+} +#endif #include <unistd.h> #include <inttypes.h> #include <string.h> @@ -549,6 +554,7 @@ static fwts_framework_ops fadt_ops = { .minor_tests = fadt_tests }; -FWTS_REGISTER("fadt", &fadt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_ROOT_PRIV | FWTS_FLAG_TEST_ACPI) +FWTS_REGISTER("fadt", &fadt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH |
FWTS_FLAG_ROOT_PRIV | FWTS_FLAG_TEST_ACPI |
FWTS_FLAG_TEST_COMPLIANCE_ACPI)
-#endif
Acked-by: Colin Ian King colin.king@canonucal.com