[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fwts-devel
Subject:    Re: [PATCH] V2 opal/prd_info: Add OPAL Processor Recovery Diagnostics
From:       "Deborah McLemore" <debmc () us ! ibm ! com>
Date:       2016-06-22 15:20:02
Message-ID: OF416C8DFC.97FC53DF-ON86257FDA.005430D9-86257FDA.00543B96 () notes ! na ! collabserv ! com
[Download RAW message or body]

[Attachment #2 (multipart/related)]

[Attachment #4 (multipart/alternative)]


Hi Ivan,

Yep, we can do it that way, I'll resubmit a patch based on this approach.

=====================================
Deb McLemore
IBM OpenPower - IBM Systems
(512) 286 9980

debmc@us.ibm.com
debmc@linux.vnet.ibm.com - (plain text)
=====================================



From:	ivanhu <ivan.hu@canonical.com>
To:	Deborah McLemore/Austin/IBM@IBMUS
Cc:	fwts-devel@lists.ubuntu.com
Date:	06/22/2016 09:59 AM
Subject:	Re: [PATCH] V2 opal/prd_info: Add OPAL Processor Recovery
            Diagnostics



Hi Deb,

Just wondering if it is possible to check with init function instead of
under Makefile. something like,

static fwts_framework_ops prd_info_ops = {
		 .description = "OPAL Processor Recovery Diagnostics Info",
		 .init        = prd_info_init,
		 .deinit      = prd_info_deinit,
		 .minor_tests = prd_info_tests
};

static int prd_info_init(fwts_framework *fw)
{

        /* check the opal-prd service existence */
		 if () {
		 		 fwts_log_info(fw, "Cannot detect opal-prd
service..Skip.");
		 		 return FWTS_SKIPPED;
		 }

		 return FWTS_OK;
}

Cheers,
Ivan

On 2016年06月22日 22:29, Deborah McLemore wrote:
> Hi Ivan,
>
> I think my comment was more on the scenario of say my x86_64 RHEL 7.2
> system where libfdt is not installed, it seems the dt_* cases fail there
> for make check currently as well.
>
> So the question I have is what architecture/process should be done to
> include/exclude the tests which are failing the make check on all
> platforms consistently ?
>
> =====================================
> Deb McLemore
> IBM OpenPower - IBM Systems
> (512) 286 9980
>
> debmc@us.ibm.com
> debmc@linux.vnet.ibm.com - (plain text)
> =====================================
>
> Inactive hide details for ivanhu ---06/22/2016 09:26:12 AM---On 2016年06
> 月22日 19:52, Deborah McLemore wrote: > Hi Ivan,ivanhu ---06/22/2016
> 09:26:12 AM---On 2016年06月22日 19:52, Deborah McLemore wrote: > Hi Ivan,
>
> From: ivanhu <ivan.hu@canonical.com>
> To: Deborah McLemore/Austin/IBM@IBMUS
> Cc: Deb McLemore <debmc@linux.vnet.ibm.com>, fwts-devel@lists.ubuntu.com
> Date: 06/22/2016 09:26 AM
> Subject: Re: [PATCH] V2 opal/prd_info: Add OPAL Processor Recovery
> Diagnostics
>
> ------------------------------------------------------------------------
>
>
>
>
>
> On 2016年06月22日 19:52, Deborah McLemore wrote:
>  > Hi Ivan,
>  >
>  > I think I'm going to need some assistance on this one, the same
>  > conditional build infrastructure was done for this patch as was done
for
>  > the dt_base and dt_sysinfo tests (these tests used the HAVE_LIBFDT)
>  > check, but same
>  > conditional type object code inclusion, so not sure how that passed
(if
>  > you did not have LIBFDT installed either).
>  >
> I believe we do install the LIBFDT
> you can check the commit a889d696e65a80089061bb43bec731210d05a75f
>
>  > FAIL: fwts-test/arg-show-progress-dialog-0001/test-0001.sh
>  > FAIL: fwts-test/arg-show-progress-dialog-0001/test-0002.s
>  > FAIL: fwts-test/arg-show-tests-0001/test-0001.sh
>  > FAIL: fwts-test/arg-show-tests-0001/test-0002.sh
>  > FAIL: fwts-test/arg-show-tests-full-0001/test-0001.sh
>  >
>  > fwts/src/Makefile.am
>  >
>  > if HAVE_LIBFDT
>  > dt_tests = \
>  > devicetree/dt_base/dt_base.c \
>  > devicetree/dt_sysinfo/dt_sysinfo.c
>  > endif
>  >
>  > if HAVE_ASM_OPAL_PRD_H
>  > opal_tests = \
>  > opal/prd_info.c
>  > endif
>  >
>  > =====================================
>  > Deb McLemore
>  > IBM OpenPower - IBM Systems
>  > (512) 286 9980
>  >
>  > debmc@us.ibm.com
>  > debmc@linux.vnet.ibm.com - (plain text)
>  > =====================================
>  >
>  > Inactive hide details for ivanhu ---06/22/2016 04:01:30 AM---Hi Deb,
>  > This patch failed the regression test "make check" on thosivanhu
>  > ---06/22/2016 04:01:30 AM---Hi Deb, This patch failed the regression
>  > test "make check" on those machines
>  >
>  > From: ivanhu <ivan.hu@canonical.com>
>  > To: Deb McLemore <debmc@linux.vnet.ibm.com>
>  > Cc: fwts-devel@lists.ubuntu.com
>  > Date: 06/22/2016 04:01 AM
>  > Subject: Re: [PATCH] V2 opal/prd_info: Add OPAL Processor Recovery
>  > Diagnostics
>  > Sent by: fwts-devel-bounces@lists.ubuntu.com
>  >
>  >
------------------------------------------------------------------------
>  >
>  >
>  >
>  > Hi Deb,
>  >
>  > This patch failed the regression test "make check" on those machines
>  > which don't have the header, asm/opal-prd.h, could you help to check
> that?
>  >
>  > Cheers,
>  > Ivan
>  >
>  > On 2016年06月21日 21:58, Deb McLemore wrote:
>  >  > We added a new capability to perform PRD integrity checks.
>  >  > The OPAL PRD firmware feature will be set when the device tree
>  >  > has the proper node configured.  Runtime checks will use the
>  >  > opal-prd service to query the version of the opal-prd service to
>  >  > confirm operational state.
>  >  >
>  >  > Signed-off-by: Deb McLemore <debmc@linux.vnet.ibm.com>
>  >  > ---
>  >  >   configure.ac                                       |   2 +
>  >  >   .../arg-show-tests-full-0001.log                   |   2 +
>  >  >   src/Makefile.am                                    |   8 +-
>  >  >   src/lib/include/fwts_firmware.h                    |  22 ++-
>  >  >   src/lib/include/fwts_pipeio.h                      |   1 +
>  >  >   src/lib/src/Makefile.am                            |   3 +-
>  >  >   src/lib/src/fwts_devicetree.c                      |  12 +-
>  >  >   src/lib/src/fwts_firmware.c                        |  25 ++-
>  >  >   src/lib/src/fwts_framework.c                       |   5 +-
>  >  >   src/lib/src/fwts_pipeio.c                          |  29 ++++
>  >  >   src/opal/prd_info.c                                | 188
>  > +++++++++++++++++++++
>  >  >   11 files changed, 277 insertions(+), 20 deletions(-)
>  >  >   create mode 100644 src/opal/prd_info.c
>  >  >
>  >  > diff --git a/configure.ac b/configure.ac
>  >  > index 6ada384..e3e7512 100644
>  >  > --- a/configure.ac
>  >  > +++ b/configure.ac
>  >  > @@ -63,6 +63,8 @@
>  >  >     AC_CHECK_HEADERS([json/json.h])
>  >  >     AC_CHECK_HEADERS([glib.h])
>  >  >     AC_CHECK_HEADERS([gio/gio.h])
>  >  > +   AC_CHECK_HEADERS([asm/opal-prd.h])
>  >  > +   AM_CONDITIONAL([HAVE_ASM_OPAL_PRD_H], [test
>  > "x$ac_cv_header_asm_opal_prd_h" = "xyes"])
>  >  >     #AC_CHECK_LIB(pcre, pcre_compile)
>  >  >     AC_SEARCH_LIBS([fdt_check_header], [fdt], [
>  >  >   AC_DEFINE([HAVE_LIBFDT], [1], [Define if we have libfdt])
>  >  > diff --git
>  > a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
>  > b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
>  >  > index 6784ed3..695c5d6 100644
>  >  > ---
a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
>  >  > +++
b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
>  >  > @@ -663,6 +663,8 @@ Batch tests:
>  >  >     PCI IRQ Routing Table test.
>  >  >    pnp             (1 test):
>  >  >     PnP BIOS Support Installation structure test.
>  >  > + prd_info        (1 test):
>  >  > +  OPAL Processor Recovery Diagnostics Info
>  >  >    rsdp            (1 test):
>  >  >     RSDP Root System Description Pointer test.
>  >  >    rsdt            (1 test):
>  >  > diff --git a/src/Makefile.am b/src/Makefile.am
>  >  > index 00cde32..b86fe52 100644
>  >  > --- a/src/Makefile.am
>  >  > +++ b/src/Makefile.am
>  >  > @@ -26,6 +26,11 @@ dt_tests = \
>  >  >   devicetree/dt_sysinfo/dt_sysinfo.c
>  >  >   endif
>  >  >
>  >  > +if HAVE_ASM_OPAL_PRD_H
>  >  > +opal_tests = \
>  >  > + opal/prd_info.c
>  >  > +endif
>  >  > +
>  >  >   #
>  >  >   #  fwts main + tests
>  >  >   #
>  >  > @@ -142,7 +147,8 @@ fwts_SOURCES = main.c \
>  >  >   uefi/uefirtauthvar/uefirtauthvar.c \
>  >  >   uefi/esrtdump/esrtdump.c \
>  >  >   uefi/esrt/esrt.c \
>  >  > - $(dt_tests)
>  >  > + $(dt_tests) \
>  >  > + $(opal_tests)
>  >  >
>  >  >   fwts_LDFLAGS = -lm `pkg-config --libs glib-2.0 gio-2.0`
>  >  >
>  >  > diff --git a/src/lib/include/fwts_firmware.h
>  > b/src/lib/include/fwts_firmware.h
>  >  > index 9221afc..fa8f621 100644
>  >  > --- a/src/lib/include/fwts_firmware.h
>  >  > +++ b/src/lib/include/fwts_firmware.h
>  >  > @@ -1,5 +1,6 @@
>  >  >   /*
>  >  >    * Copyright (C) 2010-2016 Canonical
>  >  > + * Some of this work - Copyright (C) 2016 IBM
>  >  >    *
>  >  >    * This program is free software; you can redistribute it and/or
>  >  >    * modify it under the terms of the GNU General Public License
>  >  > @@ -30,21 +31,24 @@ enum firmware_type {
>  >  >   };
>  >  >
>  >  >   enum firmware_feature {
>  >  > - FWTS_FW_FEATURE_ACPI = 0x1,
>  >  > - FWTS_FW_FEATURE_DEVICETREE = 0x2,
>  >  > - FWTS_FW_FEATURE_IPMI = 0x4,
>  >  > - FWTS_FW_FEATURE_ALL = FWTS_FW_FEATURE_ACPI |
>  >  > -   FWTS_FW_FEATURE_DEVICETREE |
>  >  > -   FWTS_FW_FEATURE_IPMI
>  >  > + FWTS_FW_FEATURE_ACPI = 0x1,
>  >  > + FWTS_FW_FEATURE_DEVICETREE = 0x2,
>  >  > + FWTS_FW_FEATURE_IPMI = 0x4,
>  >  > + FWTS_FW_FEATURE_OPAL_PRD = 0x8,
>  >  > + FWTS_FW_FEATURE_ALL = FWTS_FW_FEATURE_ACPI |
>  >  > + FWTS_FW_FEATURE_DEVICETREE |
>  >  > + FWTS_FW_FEATURE_IPMI |
>  >  > + FWTS_FW_FEATURE_OPAL_PRD
>  >  >   };
>  >  >
>  >  >   int fwts_firmware_detect(void);
>  >  > -int fwts_firmware_features(void);
>  >  > +int fwts_firmware_features(fwts_framework *fw);
>  >  >   const char *fwts_firmware_feature_string(const int features);
>  >  >
>  >  > -static inline bool fwts_firmware_has_features(const int features)
>  >  > +static inline bool fwts_firmware_has_features(fwts_framework *fw,
>  >  > + const int features)
>  >  >   {
>  >  > - return (fwts_firmware_features() & features) == features;
>  >  > + return (fwts_firmware_features(fw) & features) == features;
>  >  >   }
>  >  >
>  >  >   #endif
>  >  > diff --git a/src/lib/include/fwts_pipeio.h
>  > b/src/lib/include/fwts_pipeio.h
>  >  > index 9a874dd..8c1b664 100644
>  >  > --- a/src/lib/include/fwts_pipeio.h
>  >  > +++ b/src/lib/include/fwts_pipeio.h
>  >  > @@ -41,6 +41,7 @@ int   fwts_pipe_close(const int fd, const pid_t
> pid);
>  >  >   int   fwts_pipe_close2(const int in_fd, const int out_fd, const
>  > pid_t pid);
>  >  >   int   fwts_pipe_exec(const char *command, fwts_list **list, int
>  > *status);
>  >  >   int   fwts_exec(const char *command, int *status);
>  >  > +int   fwts_exec2(const char *command, char **output);
>  >  >   int   fwts_write_string_to_file(const fwts_framework *fw, FILE
>  > *file, const char *str);
>  >  >   int   fwts_write_string_file(const fwts_framework *fw, const char
>  > *file_name, const char *str);
>  >  >   int   fwts_read_file_first_line(const fwts_framework *fw, const
>  > char *file_name, char **line);
>  >  > diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
>  >  > index e96b75f..1b8fd74 100644
>  >  > --- a/src/lib/src/Makefile.am
>  >  > +++ b/src/lib/src/Makefile.am
>  >  > @@ -19,7 +19,8 @@ libfwts_la_LDFLAGS = \
>  >  >   libfwts_la_CPPFLAGS = $(AM_CPPFLAGS) -DACPI_DEBUG_OUTPUT
>  >  >
>  >  >   if HAVE_LIBFDT
>  >  > -dt_sources = fwts_devicetree.c
>  >  > +dt_sources = \
>  >  > + fwts_devicetree.c
>  >  >   endif
>  >  >
>  >  >   #
>  >  > diff --git a/src/lib/src/fwts_devicetree.c
>  > b/src/lib/src/fwts_devicetree.c
>  >  > index 5978ab9..0c62953 100644
>  >  > --- a/src/lib/src/fwts_devicetree.c
>  >  > +++ b/src/lib/src/fwts_devicetree.c
>  >  > @@ -20,7 +20,7 @@
>  >  >   #define _GNU_SOURCE
>  >  >
>  >  >   #include <stdio.h>
>  >  > -
>  >  > +#include <libfdt.h>
>  >  >   #include "fwts.h"
>  >  >
>  >  >   static const char *devicetree_fs_path =
>  > "/sys/firmware/devicetree/base";
>  >  > @@ -32,10 +32,12 @@ int fwts_devicetree_read(fwts_framework *fwts)
>  >  >   ssize_t len;
>  >  >   pid_t pid;
>  >  >
>  >  > - if (!fwts_firmware_has_features(FWTS_FW_FEATURE_DEVICETREE))
>  >  > + if (!fwts_firmware_has_features(fwts,
>  >  > + FWTS_FW_FEATURE_DEVICETREE))
>  >  >   return FWTS_OK;
>  >  >
>  >  > - rc = asprintf(&command, "dtc -I fs -O dtb %s",
devicetree_fs_path);
>  >  > + rc = asprintf(&command, "dtc -I fs -O dtb %s",
>  >  > + devicetree_fs_path);
>  >  >   if (rc < 0)
>  >  >   return FWTS_ERROR;
>  >  >
>  >  > @@ -55,7 +57,8 @@ int fwts_devicetree_read(fwts_framework *fwts)
>  >  >   status = fwts_pipe_close(fd, pid);
>  >  >
>  >  >   if (!WIFEXITED(status) || WEXITSTATUS(status) != 0 || len == 0) {
>  >  > - fprintf(stderr, "Cannot read devicetree data: dtc failed\n");
>  >  > + fprintf(stderr,
>  >  > + "Cannot read devicetree data: dtc failed\n");
>  >  >   free(data);
>  >  >   return FWTS_ERROR;
>  >  >   }
>  >  > @@ -64,4 +67,3 @@ int fwts_devicetree_read(fwts_framework *fwts)
>  >  >
>  >  >   return FWTS_OK;
>  >  >   }
>  >  > -
>  >  > diff --git a/src/lib/src/fwts_firmware.c
b/src/lib/src/fwts_firmware.c
>  >  > index 972303a..f0bde63 100644
>  >  > --- a/src/lib/src/fwts_firmware.c
>  >  > +++ b/src/lib/src/fwts_firmware.c
>  >  > @@ -1,5 +1,6 @@
>  >  >   /*
>  >  >    * Copyright (C) 2010-2016 Canonical
>  >  > + * Some of this work - Copyright (C) 2016 IBM
>  >  >    *
>  >  >    * This program is free software; you can redistribute it and/or
>  >  >    * modify it under the terms of the GNU General Public License
>  >  > @@ -23,6 +24,10 @@
>  >  >
>  >  >   #include "fwts.h"
>  >  >
>  >  > +#if defined HAVE_LIBFDT
>  >  > +#include <libfdt.h>
>  >  > +#endif
>  >  > +
>  >  >   static enum firmware_type firmware_type;
>  >  >   static bool firmware_type_valid;
>  >  >
>  >  > @@ -33,6 +38,7 @@ static struct {
>  >  >   { FWTS_FW_FEATURE_ACPI, "ACPI" },
>  >  >   { FWTS_FW_FEATURE_DEVICETREE, "devicetree" },
>  >  >   { FWTS_FW_FEATURE_IPMI, "IPMI" },
>  >  > + { FWTS_FW_FEATURE_OPAL_PRD, "OPAL PRD" },
>  >  >   };
>  >  >
>  >  >   /*
>  >  > @@ -60,7 +66,7 @@ int fwts_firmware_detect(void)
>  >  >   return firmware_type;
>  >  >   }
>  >  >
>  >  > -int fwts_firmware_features(void)
>  >  > +int fwts_firmware_features(fwts_framework *fw)
>  >  >   {
>  >  >   int features = 0;
>  >  >
>  >  > @@ -83,6 +89,21 @@ int fwts_firmware_features(void)
>  >  >   if (!stat("/dev/ipmi0", &ipmi_statbuf))
>  >  >   features |= FWTS_FW_FEATURE_IPMI;
>  >  >
>  >  > + if (fw->fdt) { /* condition suppresses compile to use fw parm */
>  >  > +#if defined HAVE_LIBFDT
>  >  > + /* conditionally check to make sure the timing has fdt set */
>  >  > + int node;
>  >  > + node = fdt_path_offset(fw->fdt,
>  >  > + "/ibm,opal/diagnostics");
>  >  > + if (node >= 0) {
>  >  > + if (!fdt_node_check_compatible(fw->fdt, node,
>  >  > + "ibm,opal-prd")) {
>  >  > + features |= FWTS_FW_FEATURE_OPAL_PRD;
>  >  > + }
>  >  > + }
>  >  > +#endif
>  >  > + }
>  >  > +
>  >  >   return features;
>  >  >   }
>  >  >
>  >  > @@ -90,7 +111,7 @@ const char *fwts_firmware_feature_string(const
int
>  > features)
>  >  >   {
>  >  >   const int n = FWTS_ARRAY_LEN(feature_names);
>  >  >   const char sep[] = ", ";
>  >  > - static char str[60];
>  >  > + static char str[70];
>  >  >   size_t len;
>  >  >   char *p;
>  >  >   int i;
>  >  > diff --git a/src/lib/src/fwts_framework.c
> b/src/lib/src/fwts_framework.c
>  >  > index c53306a..1e75085 100644
>  >  > --- a/src/lib/src/fwts_framework.c
>  >  > +++ b/src/lib/src/fwts_framework.c
>  >  > @@ -605,8 +605,9 @@ static int fwts_framework_run_test
(fwts_framework
>  > *fw, fwts_framework_test *test
>  >  >   goto done;
>  >  >   }
>  >  >
>  >  > - if (!fwts_firmware_has_features(test->fw_features)) {
>  >  > - int missing = test->fw_features & ~fwts_firmware_features();
>  >  > + if (!fwts_firmware_has_features(fw, test->fw_features)) {
>  >  > + int missing = test->fw_features &
>  >  > + ~fwts_firmware_features(fw);
>  >  >   fwts_log_info(fw, "Test skipped, missing features: %s",
>  >  >   fwts_firmware_feature_string(missing));
>  >  >   fw->current_major_test->results.skipped +=
>  >  > diff --git a/src/lib/src/fwts_pipeio.c b/src/lib/src/fwts_pipeio.c
>  >  > index b501f7b..f62621a 100644
>  >  > --- a/src/lib/src/fwts_pipeio.c
>  >  > +++ b/src/lib/src/fwts_pipeio.c
>  >  > @@ -321,6 +321,35 @@ int fwts_exec(const char *command, int
*status)
>  >  >   }
>  >  >
>  >  >   /*
>  >  > + * fwts_exec2()
>  >  > + * execute a command
>  >  > + * Return to the parent/caller the exit status from the command
>  >  > + * status is -1 if errors.
>  >  > + */
>  >  > +
>  >  > +int fwts_exec2(const char *command, char **output)
>  >  > +{
>  >  > + pid_t   pid;
>  >  > + int     status = -1, in_fd, out_fd;
>  >  > + ssize_t out_len;
>  >  > +
>  >  > + if (fwts_pipe_open_rw(command, &pid,
>  >  > + &in_fd, &out_fd) < 0) {
>  >  > + return -1;
>  >  > + }
>  >  > +
>  >  > + if (fwts_pipe_readwrite(in_fd,
>  >  > + command, sizeof(command),
>  >  > + out_fd, output, &out_len)) {
>  >  > + return -1;
>  >  > + }
>  >  > +
>  >  > + status = fwts_pipe_close2(in_fd, out_fd, pid);
>  >  > +
>  >  > + return status;
>  >  > +}
>  >  > +
>  >  > +/*
>  >  >    *  fwts_write_string_to_file()
>  >  >    * write a string to a file pointer
>  >  >    * Return FWTS_OK if writing worked, FWTS_ERROR if it failed.
>  >  > diff --git a/src/opal/prd_info.c b/src/opal/prd_info.c
>  >  > new file mode 100644
>  >  > index 0000000..2f12625
>  >  > --- /dev/null
>  >  > +++ b/src/opal/prd_info.c
>  >  > @@ -0,0 +1,188 @@
>  >  > +/*
>  >  > + * Copyright (C) 2010-2016 Canonical
>  >  > + * Some of this work - Copyright (C) 2016 IBM
>  >  > + *
>  >  > + * 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.
>  >  > + *
>  >  > + * You should have received a copy of the GNU General Public
License
>  >  > + * along with this program; if not, write to the Free Software
>  >  > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
>  > 02110-1301, USA.
>  >  > + *
>  >  > + */
>  >  > +
>  >  > +#include <fcntl.h>
>  >  > +#include <sys/ioctl.h>
>  >  > +
>  >  > +#include <asm/opal-prd.h>
>  >  > +
>  >  > +#include "fwts.h"
>  >  > +
>  >  > +static const char *prd_devnode = "/dev/opal-prd";
>  >  > +
>  >  > +bool prd_present(int fwts_prd_flags) {
>  >  > + return !access(prd_devnode, fwts_prd_flags);
>  >  > +}
>  >  > +
>  >  > +int prd_dev_query(fwts_framework *fw)
>  >  > +{
>  >  > +
>  >  > + int fd = 0;
>  >  > + struct opal_prd_info info;
>  >  > +
>  >  > + if ((fd = open(prd_devnode, O_RDWR)) < 0) {
>  >  > + fwts_failed(fw, LOG_LEVEL_CRITICAL, "OPAL PRD Info",
>  >  > + "Cannot get data from the OPAL PRD "
>  >  > + " device interface,"
>  >  > + " check if opal-prd daemon may be in use "
>  >  > + "or check your user privileges.");
>  >  > + return FWTS_ERROR;
>  >  > + }
>  >  > +
>  >  > + memset(&info, 0, sizeof(info));
>  >  > +
>  >  > + if (ioctl(fd, OPAL_PRD_GET_INFO, &info)) {
>  >  > + close(fd);
>  >  > + fwts_failed(fw, LOG_LEVEL_CRITICAL, "OPAL PRD Info",
>  >  > + "Cannot get data from the"
>  >  > + " OPAL PRD device interface.");
>  >  > + return FWTS_ERROR;
>  >  > + } else {
>  >  > + fwts_log_info(fw, "OPAL PRD Version is %lu",
>  >  > + info.version);
>  >  > + close(fd);
>  >  > + return FWTS_OK;
>  >  > + }
>  >  > +}
>  >  > +
>  >  > +static int prd_service_check(fwts_framework *fw, int *restart)
>  >  > +{
>  >  > + int rc = FWTS_OK, status = 0, stop_status = 0;
>  >  > + char *command = NULL;
>  >  > + char *output = NULL;
>  >  > +
>  >  > + command = "systemctl status opal-prd.service 2>&1";
>  >  > + status = fwts_exec2(command, &output);
>  >  > +
>  >  > + if (output)
>  >  > + free(output);
>  >  > +
>  >  > + switch (status) {
>  >  > + case -1: /* status when nothing was successful */
>  >  > + fwts_failed(fw, LOG_LEVEL_HIGH, "OPAL PRD Info",
>  >  > + "Attempt was made to stop the "
>  >  > + "opal-prd.service but was not "
>  >  > + "successful. Try to "
>  >  > + "\"sudo systemctl stop "
>  >  > + "opal-prd.service\" and retry.");
>  >  > + rc = FWTS_ERROR;
>  >  > + goto out;
>  >  > + case 0: /* "running" */
>  >  > + command = "systemctl stop opal-prd.service 2>&1";
>  >  > + stop_status = fwts_exec2(command, &output);
>  >  > +
>  >  > + if (output)
>  >  > + free(output);
>  >  > +
>  >  > + switch (stop_status) {
>  >  > + case 0:
>  >  > +                        *restart = 1;
>  >  > +                        break;
>  >  > + default:
>  >  > +                        fwts_failed(fw, LOG_LEVEL_HIGH, "OPAL PRD
> Info",
>  >  > +                                "Attempt was made to stop the "
>  >  > +                                "opal-prd.service but was not "
>  >  > +                                "successful. Try to "
>  >  > +                                "\"sudo systemctl stop "
>  >  > +                                "opal-prd.service\" and retry.");
>  >  > +                        rc = FWTS_ERROR;
>  >  > +                        goto out;
>  >  > + }
>  >  > + default:
>  >  > + break;
>  >  > + }
>  >  > +
>  >  > +out:
>  >  > + return rc;
>  >  > +}
>  >  > +
>  >  > +static int prd_restart(fwts_framework *fw)
>  >  > +{
>  >  > + int status = 0;
>  >  > + char *command = NULL;
>  >  > + char *output = NULL;
>  >  > +
>  >  > + command = "systemctl start opal-prd.service 2>&1";
>  >  > + status = fwts_exec2(command, &output);
>  >  > +
>  >  > + if (output)
>  >  > + free(output);
>  >  > +
>  >  > + if (status) {
>  >  > + fwts_log_info(fw, "OPAL PRD service (opal-prd.service)"
>  >  > + " was restarted after stopping it to allow "
>  >  > + "checks.  Please re-check since processing "
>  >  > + "was not able to be confirmed, "
>  >  > + "\"sudo systemctl status opal-prd.service\"");
>  >  > + } else {
>  >  > + fwts_log_info(fw, "OPAL PRD service (opal-prd.service)"
>  >  > + " was restarted after stopping it to allow "
>  >  > + "checks.  This is informational only, "
>  >  > + "no action needed.");
>  >  > + }
>  >  > +
>  >  > + return status; /* ignored by caller */
>  >  > +}
>  >  > +
>  >  > +static int prd_info_test1(fwts_framework *fw)
>  >  > +{
>  >  > +
>  >  > + int restart = 0;
>  >  > +
>  >  > + if (prd_service_check(fw, &restart)) {
>  >  > + /* failures logged in subroutine */
>  >  > + return FWTS_ERROR;
>  >  > + }
>  >  > +
>  >  > + if (!prd_present(R_OK | W_OK)) {
>  >  > + fwts_failed(fw, LOG_LEVEL_CRITICAL, "OPAL PRD Info",
>  >  > + "Cannot read and write to the OPAL PRD"
>  >  > + " device interface,"
>  >  > + " check your user privileges.");
>  >  > + return FWTS_ERROR;
>  >  > + }
>  >  > +
>  >  > + if (prd_dev_query(fw)) {
>  >  > + /* failures logged in subroutine */
>  >  > + return FWTS_ERROR;
>  >  > + }
>  >  > +
>  >  > + if (restart) {
>  >  > + prd_restart(fw); /* ignore rc */
>  >  > + }
>  >  > +
>  >  > + fwts_passed(fw, "OPAL PRD info passed.");
>  >  > +
>  >  > + return FWTS_OK;
>  >  > +}
>  >  > +
>  >  > +static fwts_framework_minor_test prd_info_tests[] = {
>  >  > + { prd_info_test1, "OPAL Processor Recovery Diagnostics Info" },
>  >  > + { NULL, NULL }
>  >  > +};
>  >  > +
>  >  > +static fwts_framework_ops prd_info_ops = {
>  >  > + .description = "OPAL Processor Recovery Diagnostics Info",
>  >  > + .minor_tests = prd_info_tests
>  >  > +};
>  >  > +
>  >  > +FWTS_REGISTER_FEATURES("prd_info", &prd_info_ops, FWTS_TEST_EARLY,
>  >  > + FWTS_FLAG_BATCH | FWTS_FLAG_ROOT_PRIV,
>  >  > + FWTS_FW_FEATURE_OPAL_PRD)
>  >  >
>  >
>  > --
>  > fwts-devel mailing list
>  > fwts-devel@lists.ubuntu.com
>  > Modify settings or unsubscribe at:
>  > https://lists.ubuntu.com/mailman/listinfo/fwts-devel
>  >
>  >
>  >
>
>
>
>




[Attachment #7 (text/html)]

<html><body><p>Hi Ivan,<br><br>Yep, we can do it that way, I'll resubmit a patch \
based on this approach.<br><br>=====================================<br>Deb \
McLemore<br>IBM OpenPower - IBM Systems<br>(512) 286 \
9980<br><br>debmc@us.ibm.com<br>debmc@linux.vnet.ibm.com - (plain \
text)<br>=====================================<br><br><img width="16" height="16" \
src="cid:1__=09BBF549DFC7B6498f9e8a93df938690918c09B@" border="0" alt="Inactive hide \
details for ivanhu ---06/22/2016 09:59:12 AM---Hi Deb, Just wondering if it is \
possible to check with init functi"><font color="#424282">ivanhu ---06/22/2016 \
09:59:12 AM---Hi Deb, Just wondering if it is possible to check with init function \
instead of</font><br><br><font size="2" color="#5F5F5F">From:        </font><font \
size="2">ivanhu &lt;ivan.hu@canonical.com&gt;</font><br><font size="2" \
color="#5F5F5F">To:        </font><font size="2">Deborah \
McLemore/Austin/IBM@IBMUS</font><br><font size="2" color="#5F5F5F">Cc:        \
</font><font size="2">fwts-devel@lists.ubuntu.com</font><br><font size="2" \
color="#5F5F5F">Date:        </font><font size="2">06/22/2016 09:59 \
AM</font><br><font size="2" color="#5F5F5F">Subject:        </font><font size="2">Re: \
[PATCH] V2 opal/prd_info: Add OPAL Processor Recovery Diagnostics</font><br><hr \
width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><tt>Hi \
Deb,<br><br>Just wondering if it is possible to check with init function instead \
of<br>under Makefile. something like,<br><br>static fwts_framework_ops prd_info_ops = \
{<br>                 .description = &quot;OPAL Processor Recovery Diagnostics \
Info&quot;,<br>                 .init &nbsp; &nbsp; &nbsp; &nbsp;= prd_info_init,<br> \
.deinit &nbsp; &nbsp; &nbsp;= prd_info_deinit,<br>                 .minor_tests = \
prd_info_tests<br>};<br><br>static int prd_info_init(fwts_framework *fw)<br>{<br><br> \
&nbsp; &nbsp; &nbsp; &nbsp;/* check the opal-prd service existence */<br>             \
if () {<br>                                  fwts_log_info(fw, &quot;Cannot detect \
opal-prd service..Skip.&quot;);<br>                                  return \
FWTS_SKIPPED;<br>                 }<br><br>                 return \
FWTS_OK;<br>}<br><br>Cheers,<br>Ivan<br><br>On 2016年06月22日 \
22:29, Deborah McLemore wrote:<br>&gt; Hi Ivan,<br>&gt; <br>&gt; I think my comment \
was more on the scenario of say my x86_64 RHEL 7.2 <br>&gt; system where libfdt is \
not installed, it seems the dt_* cases fail there <br>&gt; for make check currently \
as well.<br>&gt; <br>&gt; So the question I have is what architecture/process should \
be done to <br>&gt; include/exclude the tests which are failing the make check on all \
<br>&gt; platforms consistently ?<br>&gt; <br>&gt; \
=====================================<br>&gt; Deb McLemore<br>&gt; IBM OpenPower - \
IBM Systems<br>&gt; (512) 286 9980<br>&gt; <br>&gt; debmc@us.ibm.com<br>&gt; \
debmc@linux.vnet.ibm.com - (plain text)<br>&gt; \
=====================================<br>&gt; <br>&gt; Inactive hide details for \
ivanhu ---06/22/2016 09:26:12 AM---On 2016年06 <br>&gt; 月22日 \
19:52, Deborah McLemore wrote: &gt; Hi Ivan,ivanhu ---06/22/2016 <br>&gt; 09:26:12 \
AM---On 2016年06月22日 19:52, Deborah McLemore wrote: &gt; Hi \
Ivan,<br>&gt; <br>&gt; From: ivanhu &lt;ivan.hu@canonical.com&gt;<br>&gt; To: Deborah \
McLemore/Austin/IBM@IBMUS<br>&gt; Cc: Deb McLemore &lt;debmc@linux.vnet.ibm.com&gt;, \
fwts-devel@lists.ubuntu.com<br>&gt; Date: 06/22/2016 09:26 AM<br>&gt; Subject: Re: \
[PATCH] V2 opal/prd_info: Add OPAL Processor Recovery <br>&gt; Diagnostics<br>&gt; \
<br>&gt; ------------------------------------------------------------------------<br>&gt; \
<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; On 2016年06月22日 \
19:52, Deborah McLemore wrote:<br>&gt; &nbsp;&gt; Hi Ivan,<br>&gt; &nbsp;&gt;<br>&gt; \
&nbsp;&gt; I think I'm going to need some assistance on this one, the same<br>&gt; \
&nbsp;&gt; conditional build infrastructure was done for this patch as was done \
for<br>&gt; &nbsp;&gt; the dt_base and dt_sysinfo tests (these tests used the \
HAVE_LIBFDT)<br>&gt; &nbsp;&gt; check, but same<br>&gt; &nbsp;&gt; conditional type \
object code inclusion, so not sure how that passed (if<br>&gt; &nbsp;&gt; you did not \
have LIBFDT installed either).<br>&gt; &nbsp;&gt;<br>&gt; I believe we do install the \
LIBFDT<br>&gt; you can check the commit \
a889d696e65a80089061bb43bec731210d05a75f<br>&gt; <br>&gt; &nbsp;&gt; FAIL: \
fwts-test/arg-show-progress-dialog-0001/test-0001.sh<br>&gt; &nbsp;&gt; FAIL: \
fwts-test/arg-show-progress-dialog-0001/test-0002.s<br>&gt; &nbsp;&gt; FAIL: \
fwts-test/arg-show-tests-0001/test-0001.sh<br>&gt; &nbsp;&gt; FAIL: \
fwts-test/arg-show-tests-0001/test-0002.sh<br>&gt; &nbsp;&gt; FAIL: \
fwts-test/arg-show-tests-full-0001/test-0001.sh<br>&gt; &nbsp;&gt;<br>&gt; &nbsp;&gt; \
fwts/src/Makefile.am<br>&gt; &nbsp;&gt;<br>&gt; &nbsp;&gt; if HAVE_LIBFDT<br>&gt; \
&nbsp;&gt; dt_tests = \<br>&gt; &nbsp;&gt; devicetree/dt_base/dt_base.c \<br>&gt; \
&nbsp;&gt; devicetree/dt_sysinfo/dt_sysinfo.c<br>&gt; &nbsp;&gt; endif<br>&gt; \
&nbsp;&gt;<br>&gt; &nbsp;&gt; if HAVE_ASM_OPAL_PRD_H<br>&gt; &nbsp;&gt; opal_tests = \
\<br>&gt; &nbsp;&gt; opal/prd_info.c<br>&gt; &nbsp;&gt; endif<br>&gt; \
&nbsp;&gt;<br>&gt; &nbsp;&gt; =====================================<br>&gt; \
&nbsp;&gt; Deb McLemore<br>&gt; &nbsp;&gt; IBM OpenPower - IBM Systems<br>&gt; \
&nbsp;&gt; (512) 286 9980<br>&gt; &nbsp;&gt;<br>&gt; &nbsp;&gt; \
debmc@us.ibm.com<br>&gt; &nbsp;&gt; debmc@linux.vnet.ibm.com - (plain text)<br>&gt; \
&nbsp;&gt; =====================================<br>&gt; &nbsp;&gt;<br>&gt; \
&nbsp;&gt; Inactive hide details for ivanhu ---06/22/2016 04:01:30 AM---Hi \
Deb,<br>&gt; &nbsp;&gt; This patch failed the regression test &quot;make check&quot; \
on thosivanhu<br>&gt; &nbsp;&gt; ---06/22/2016 04:01:30 AM---Hi Deb, This patch \
failed the regression<br>&gt; &nbsp;&gt; test &quot;make check&quot; on those \
machines<br>&gt; &nbsp;&gt;<br>&gt; &nbsp;&gt; From: ivanhu \
&lt;ivan.hu@canonical.com&gt;<br>&gt; &nbsp;&gt; To: Deb McLemore \
&lt;debmc@linux.vnet.ibm.com&gt;<br>&gt; &nbsp;&gt; Cc: \
fwts-devel@lists.ubuntu.com<br>&gt; &nbsp;&gt; Date: 06/22/2016 04:01 AM<br>&gt; \
&nbsp;&gt; Subject: Re: [PATCH] V2 opal/prd_info: Add OPAL Processor Recovery<br>&gt; \
&nbsp;&gt; Diagnostics<br>&gt; &nbsp;&gt; Sent by: \
fwts-devel-bounces@lists.ubuntu.com<br>&gt; &nbsp;&gt;<br>&gt; &nbsp;&gt; \
------------------------------------------------------------------------<br>&gt; \
&nbsp;&gt;<br>&gt; &nbsp;&gt;<br>&gt; &nbsp;&gt;<br>&gt; &nbsp;&gt; Hi Deb,<br>&gt; \
&nbsp;&gt;<br>&gt; &nbsp;&gt; This patch failed the regression test &quot;make \
check&quot; on those machines<br>&gt; &nbsp;&gt; which don't have the header, \
asm/opal-prd.h, could you help to check <br>&gt; that?<br>&gt; &nbsp;&gt;<br>&gt; \
&nbsp;&gt; Cheers,<br>&gt; &nbsp;&gt; Ivan<br>&gt; &nbsp;&gt;<br>&gt; &nbsp;&gt; On \
2016年06月21日 21:58, Deb McLemore wrote:<br>&gt; &nbsp;&gt; \
&nbsp;&gt; We added a new capability to perform PRD integrity checks.<br>&gt; \
&nbsp;&gt; &nbsp;&gt; The OPAL PRD firmware feature will be set when the device \
tree<br>&gt; &nbsp;&gt; &nbsp;&gt; has the proper node configured. &nbsp;Runtime \
checks will use the<br>&gt; &nbsp;&gt; &nbsp;&gt; opal-prd service to query the \
version of the opal-prd service to<br>&gt; &nbsp;&gt; &nbsp;&gt; confirm operational \
state.<br>&gt; &nbsp;&gt; &nbsp;&gt;<br>&gt; &nbsp;&gt; &nbsp;&gt; Signed-off-by: Deb \
McLemore &lt;debmc@linux.vnet.ibm.com&gt;<br>&gt; &nbsp;&gt; &nbsp;&gt; ---<br>&gt; \
&nbsp;&gt; &nbsp;&gt; &nbsp; configure.ac &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; | &nbsp; 2 +<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; \
.../arg-show-tests-full-0001.log &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; | &nbsp; 2 +<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; src/Makefile.am \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; 8 +-<br>&gt; &nbsp;&gt; &nbsp;&gt; \
&nbsp; src/lib/include/fwts_firmware.h &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;| &nbsp;22 ++-<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; \
src/lib/include/fwts_pipeio.h &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;| &nbsp; 1 +<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; \
src/lib/src/Makefile.am &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; 3 +-<br>&gt; &nbsp;&gt; &nbsp;&gt; \
&nbsp; src/lib/src/fwts_devicetree.c &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;| &nbsp;12 +-<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; \
src/lib/src/fwts_firmware.c &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;| &nbsp;25 ++-<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; \
src/lib/src/fwts_framework.c &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; | &nbsp; 5 +-<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; \
src/lib/src/fwts_pipeio.c &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp;29 ++++<br>&gt; &nbsp;&gt; &nbsp;&gt; \
&nbsp; src/opal/prd_info.c &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| 188<br>&gt; &nbsp;&gt; \
+++++++++++++++++++++<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; 11 files changed, 277 \
insertions(+), 20 deletions(-)<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; create mode \
100644 src/opal/prd_info.c<br>&gt; &nbsp;&gt; &nbsp;&gt;<br>&gt; &nbsp;&gt; \
&nbsp;&gt; diff --git a/configure.ac b/configure.ac<br>&gt; &nbsp;&gt; &nbsp;&gt; \
index 6ada384..e3e7512 100644<br>&gt; &nbsp;&gt; &nbsp;&gt; --- \
a/configure.ac<br>&gt; &nbsp;&gt; &nbsp;&gt; +++ b/configure.ac<br>&gt; &nbsp;&gt; \
&nbsp;&gt; @@ -63,6 +63,8 @@<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; &nbsp; \
AC_CHECK_HEADERS([json/json.h])<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; &nbsp; \
AC_CHECK_HEADERS([glib.h])<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; &nbsp; \
AC_CHECK_HEADERS([gio/gio.h])<br>&gt; &nbsp;&gt; &nbsp;&gt; + &nbsp; \
AC_CHECK_HEADERS([asm/opal-prd.h])<br>&gt; &nbsp;&gt; &nbsp;&gt; + &nbsp; \
AM_CONDITIONAL([HAVE_ASM_OPAL_PRD_H], [test<br>&gt; &nbsp;&gt; \
&quot;x$ac_cv_header_asm_opal_prd_h&quot; = &quot;xyes&quot;])<br>&gt; &nbsp;&gt; \
&nbsp;&gt; &nbsp; &nbsp; #AC_CHECK_LIB(pcre, pcre_compile)<br>&gt; &nbsp;&gt; \
&nbsp;&gt; &nbsp; &nbsp; AC_SEARCH_LIBS([fdt_check_header], [fdt], [<br>&gt; \
&nbsp;&gt; &nbsp;&gt; &nbsp; AC_DEFINE([HAVE_LIBFDT], [1], [Define if we have \
libfdt])<br>&gt; &nbsp;&gt; &nbsp;&gt; diff --git<br>&gt; &nbsp;&gt; \
a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log<br>&gt; &nbsp;&gt; \
b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log<br>&gt; &nbsp;&gt; \
&nbsp;&gt; index 6784ed3..695c5d6 100644<br>&gt; &nbsp;&gt; &nbsp;&gt; --- \
a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log<br>&gt; &nbsp;&gt; \
&nbsp;&gt; +++ b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log<br>&gt; \
&nbsp;&gt; &nbsp;&gt; @@ -663,6 +663,8 @@ Batch tests:<br>&gt; &nbsp;&gt; &nbsp;&gt; \
&nbsp; &nbsp; PCI IRQ Routing Table test.<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; \
&nbsp;pnp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (1 test):<br>&gt; &nbsp;&gt; \
&nbsp;&gt; &nbsp; &nbsp; PnP BIOS Support Installation structure test.<br>&gt; \
&nbsp;&gt; &nbsp;&gt; + prd_info &nbsp; &nbsp; &nbsp; &nbsp;(1 test):<br>&gt; \
&nbsp;&gt; &nbsp;&gt; + &nbsp;OPAL Processor Recovery Diagnostics Info<br>&gt; \
&nbsp;&gt; &nbsp;&gt; &nbsp; &nbsp;rsdp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(1 \
test):<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; &nbsp; RSDP Root System Description \
Pointer test.<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; &nbsp;rsdt &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;(1 test):<br>&gt; &nbsp;&gt; &nbsp;&gt; diff --git \
a/src/Makefile.am b/src/Makefile.am<br>&gt; &nbsp;&gt; &nbsp;&gt; index \
00cde32..b86fe52 100644<br>&gt; &nbsp;&gt; &nbsp;&gt; --- a/src/Makefile.am<br>&gt; \
&nbsp;&gt; &nbsp;&gt; +++ b/src/Makefile.am<br>&gt; &nbsp;&gt; &nbsp;&gt; @@ -26,6 \
+26,11 @@ dt_tests = \<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; \
devicetree/dt_sysinfo/dt_sysinfo.c<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; endif<br>&gt; \
&nbsp;&gt; &nbsp;&gt;<br>&gt; &nbsp;&gt; &nbsp;&gt; +if HAVE_ASM_OPAL_PRD_H<br>&gt; \
&nbsp;&gt; &nbsp;&gt; +opal_tests = \<br>&gt; &nbsp;&gt; &nbsp;&gt; + \
opal/prd_info.c<br>&gt; &nbsp;&gt; &nbsp;&gt; +endif<br>&gt; &nbsp;&gt; &nbsp;&gt; \
+<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; #<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; # \
&nbsp;fwts main + tests<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; #<br>&gt; &nbsp;&gt; \
&nbsp;&gt; @@ -142,7 +147,8 @@ fwts_SOURCES = main.c \<br>&gt; &nbsp;&gt; &nbsp;&gt; \
&nbsp; uefi/uefirtauthvar/uefirtauthvar.c \<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; \
uefi/esrtdump/esrtdump.c \<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; uefi/esrt/esrt.c \
\<br>&gt; &nbsp;&gt; &nbsp;&gt; - $(dt_tests)<br>&gt; &nbsp;&gt; &nbsp;&gt; + \
$(dt_tests) \<br>&gt; &nbsp;&gt; &nbsp;&gt; + $(opal_tests)<br>&gt; &nbsp;&gt; \
&nbsp;&gt;<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; fwts_LDFLAGS = -lm `pkg-config --libs \
glib-2.0 gio-2.0`<br>&gt; &nbsp;&gt; &nbsp;&gt;<br>&gt; &nbsp;&gt; &nbsp;&gt; diff \
--git a/src/lib/include/fwts_firmware.h<br>&gt; &nbsp;&gt; \
b/src/lib/include/fwts_firmware.h<br>&gt; &nbsp;&gt; &nbsp;&gt; index \
9221afc..fa8f621 100644<br>&gt; &nbsp;&gt; &nbsp;&gt; --- \
a/src/lib/include/fwts_firmware.h<br>&gt; &nbsp;&gt; &nbsp;&gt; +++ \
b/src/lib/include/fwts_firmware.h<br>&gt; &nbsp;&gt; &nbsp;&gt; @@ -1,5 +1,6 \
@@<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; /*<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; \
&nbsp;* Copyright (C) 2010-2016 Canonical<br>&gt; &nbsp;&gt; &nbsp;&gt; + * Some of \
this work - Copyright (C) 2016 IBM<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; \
&nbsp;*<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; &nbsp;* This program is free software; \
you can redistribute it and/or<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; &nbsp;* modify it \
under the terms of the GNU General Public License<br>&gt; &nbsp;&gt; &nbsp;&gt; @@ \
-30,21 +31,24 @@ enum firmware_type {<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; };<br>&gt; \
&nbsp;&gt; &nbsp;&gt;<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; enum firmware_feature \
{<br>&gt; &nbsp;&gt; &nbsp;&gt; - FWTS_FW_FEATURE_ACPI = 0x1,<br>&gt; &nbsp;&gt; \
&nbsp;&gt; - FWTS_FW_FEATURE_DEVICETREE = 0x2,<br>&gt; &nbsp;&gt; &nbsp;&gt; - \
FWTS_FW_FEATURE_IPMI = 0x4,<br>&gt; &nbsp;&gt; &nbsp;&gt; - FWTS_FW_FEATURE_ALL = \
FWTS_FW_FEATURE_ACPI |<br>&gt; &nbsp;&gt; &nbsp;&gt; - &nbsp; \
FWTS_FW_FEATURE_DEVICETREE |<br>&gt; &nbsp;&gt; &nbsp;&gt; - &nbsp; \
FWTS_FW_FEATURE_IPMI<br>&gt; &nbsp;&gt; &nbsp;&gt; + FWTS_FW_FEATURE_ACPI = \
0x1,<br>&gt; &nbsp;&gt; &nbsp;&gt; + FWTS_FW_FEATURE_DEVICETREE = 0x2,<br>&gt; \
&nbsp;&gt; &nbsp;&gt; + FWTS_FW_FEATURE_IPMI = 0x4,<br>&gt; &nbsp;&gt; &nbsp;&gt; + \
FWTS_FW_FEATURE_OPAL_PRD = 0x8,<br>&gt; &nbsp;&gt; &nbsp;&gt; + FWTS_FW_FEATURE_ALL = \
FWTS_FW_FEATURE_ACPI |<br>&gt; &nbsp;&gt; &nbsp;&gt; + FWTS_FW_FEATURE_DEVICETREE \
|<br>&gt; &nbsp;&gt; &nbsp;&gt; + FWTS_FW_FEATURE_IPMI |<br>&gt; &nbsp;&gt; \
&nbsp;&gt; + FWTS_FW_FEATURE_OPAL_PRD<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; };<br>&gt; \
&nbsp;&gt; &nbsp;&gt;<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; int \
fwts_firmware_detect(void);<br>&gt; &nbsp;&gt; &nbsp;&gt; -int \
fwts_firmware_features(void);<br>&gt; &nbsp;&gt; &nbsp;&gt; +int \
fwts_firmware_features(fwts_framework *fw);<br>&gt; &nbsp;&gt; &nbsp;&gt; &nbsp; \
const char *fwts_firmware_feature_string(const int features);<br>&gt; &nbsp;&gt; \
&nbsp;&gt;<br>&gt; &nbsp;&gt; &nbsp;&gt; -static inline bool \
fwts_firmware_has_features(const int features)<br>&gt; &nbsp;&gt; &nbsp;&gt; +static \
inline bool fwts_firmware_has_features(fwts_framework *fw,<br>&gt; &nbsp;&gt; \
</body></html>


["graycol.gif" (image/gif)]

-- 
fwts-devel mailing list
fwts-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic