[Skiboot] [PATCH] gard: Skip tests on FSP platform

Oliver O'Halloran oohall at gmail.com
Wed Aug 28 10:00:29 AEST 2019


On Tue, Aug 27, 2019 at 8:28 PM Vasant Hegde
<hegdevasant at linux.vnet.ibm.com> wrote:
>
> On 8/8/19 3:42 PM, Vasant Hegde wrote:
> > On 08/08/2019 12:52 PM, Oliver O'Halloran wrote:
> >> On Thu, Aug 8, 2019 at 4:44 PM Vasant Hegde
> >> <hegdevasant at linux.vnet.ibm.com> wrote:
> >>>
> >>> gard is supported on OpenPower platform only. Skip gard
> >>> tests on FSP based system.
> >>>
> >>> Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
> >>> ---
> >>>   external/gard/test/test-gard | 5 +++++
> >>>   1 file changed, 5 insertions(+)
> >>>
> >>> diff --git a/external/gard/test/test-gard b/external/gard/test/test-gard
> >>> index 10da35156..e577e0c16 100755
> >>> --- a/external/gard/test/test-gard
> >>> +++ b/external/gard/test/test-gard
> >>> @@ -1,5 +1,10 @@
> >>>   #! /bin/sh
> >>>
> >>> +
> >>> +if [ -d "/proc/device-tree/fsps" ] ; then
> >>> +       exit 0
> >>> +fi
> >>
> >> Doesn't this just run the units tests? They're self contained and
> >> shouldn't be touching the host PNOR even when run on an OpenPower
> >> system.
> >
> > But we have is_fsp() check inside main(). So its failing.
> >
> > Alternatively we can consider skipping is_fsp() check whenever user passes `-f`
> > option.
> > But then we have to re-arrange the code (parse command line argument first and then
> > check is_fsp()). This may results in output behaviour change.
>
> Oliver,
>    Are you ok with fixing test case (what this patch) -OR- do you prefer to skip
> is_fsp() check inside code itself?

We should check is_fsp() if we weren't given an explicit file
argument. If there's no file argument the default behaviour is to try
open the system's PNOR which is nonsensical on FSP systems. We want to
exit with a useful error in that case so we still need to do the check
in the default case.

>
> -Vasant
>


More information about the Skiboot mailing list