gard: Skip tests on FSP platform
diff mbox series

Message ID 20190808064353.8410-1-hegdevasant@linux.vnet.ibm.com
State New
Headers show
Series
  • gard: Skip tests on FSP platform
Related show

Checks

Context Check Description
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (0e1db80c70477d89a73c7f2a1a7e19c7d8292c5f)

Commit Message

Vasant Hegde Aug. 8, 2019, 6:43 a.m. UTC
gard is supported on OpenPower platform only. Skip gard
tests on FSP based system.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 external/gard/test/test-gard | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Oliver O'Halloran Aug. 8, 2019, 7:22 a.m. UTC | #1
On Thu, Aug 8, 2019 at 4:44 PM Vasant Hegde
<hegdevasant@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@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.

> +
>  . test/test.sh
>
>  run_tests "test/tests/*" "test/results"
> --
> 2.14.3
>
Vasant Hegde Aug. 8, 2019, 10:12 a.m. UTC | #2
On 08/08/2019 12:52 PM, Oliver O'Halloran wrote:
> On Thu, Aug 8, 2019 at 4:44 PM Vasant Hegde
> <hegdevasant@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@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.

-Vasant
Stewart Smith Aug. 9, 2019, 12:40 a.m. UTC | #3
On Thu, Aug 8, 2019, at 8:13 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@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@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.

My guess is we're also not running the gard tests as part of 'make check' then? Or we're ignoring the result.
Vasant Hegde Aug. 9, 2019, 5:15 a.m. UTC | #4
On 08/09/2019 06:10 AM, Stewart Smith wrote:
> On Thu, Aug 8, 2019, at 8:13 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@linux.vnet.ibm.com> wrote:
>>>>

.../...

> 
> My guess is we're also not running the gard tests as part of 'make check' then? Or we're ignoring the result.


I think we didn't run tests on FSP based system. It works fine on other systems.

-Vasant

Patch
diff mbox series

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
+
 . test/test.sh
 
 run_tests "test/tests/*" "test/results"