diff mbox

validation: system: fix return code for checks

Message ID 1454572173-4209-1-git-send-email-maxim.uvarov@linaro.org
State Accepted
Commit d0de4ce89a1e4875216fb7efee8956c6e4a904ed
Headers show

Commit Message

Maxim Uvarov Feb. 4, 2016, 7:49 a.m. UTC
From doc: "A return value of 0 meansinactive,
anything else is active.".

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 test/validation/system/system.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Hongbo Zhang Feb. 4, 2016, 9:11 a.m. UTC | #1
Reviewed-by: Hongbo Zhang <hongbo.zhang@linaro.org>

On 4 February 2016 at 15:49, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
> From doc: "A return value of 0 meansinactive,
> anything else is active.".
>
> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
> ---
>  test/validation/system/system.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/test/validation/system/system.c b/test/validation/system/system.c
> index 5b5a3f0..5d87b8b 100644
> --- a/test/validation/system/system.c
> +++ b/test/validation/system/system.c
> @@ -218,10 +218,10 @@ int system_check_odp_cpu_hz(void)
>  {
>         if (odp_cpu_hz() == 0) {
>                 fprintf(stderr, "odp_cpu_hz is not supported, skipping\n");
> -               return -1;
> +               return 0;
>         }
>
> -       return 0;
> +       return 1;
>  }
>
>  void system_test_odp_cpu_hz(void)
> @@ -250,12 +250,12 @@ int system_check_odp_cpu_hz_id(void)
>                         fprintf(stderr, "cpu %d does not support"
>                                 " odp_cpu_hz_id(),"
>                                 "skip that test\n", cpu);
> -                       return -1;
> +                       return 0;
>                 }
>                 cpu = odp_cpumask_next(&mask, cpu);
>         }
>
> -       return 0;
> +       return 1;
>  }
>
>  void system_test_odp_cpu_hz_id(void)
> --
> 1.9.1
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
Maxim Uvarov Feb. 4, 2016, 9:21 a.m. UTC | #2
Merged without waiting 24 hours as simple fix.

Maxim.

On 02/04/2016 12:11, Savolainen, Petri (Nokia - FI/Espoo) wrote:
> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
>
>> -----Original Message-----
>> From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of EXT
>> Maxim Uvarov
>> Sent: Thursday, February 04, 2016 9:50 AM
>> To: lng-odp@lists.linaro.org
>> Subject: [lng-odp] [PATCH] validation: system: fix return code for checks
>>
>>  From doc: "A return value of 0 meansinactive,
>> anything else is active.".
>>
>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
>> ---
>>   test/validation/system/system.c | 8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/test/validation/system/system.c
>> b/test/validation/system/system.c
>> index 5b5a3f0..5d87b8b 100644
>> --- a/test/validation/system/system.c
>> +++ b/test/validation/system/system.c
>> @@ -218,10 +218,10 @@ int system_check_odp_cpu_hz(void)
>>   {
>>   	if (odp_cpu_hz() == 0) {
>>   		fprintf(stderr, "odp_cpu_hz is not supported, skipping\n");
>> -		return -1;
>> +		return 0;
>>   	}
>>
>> -	return 0;
>> +	return 1;
>>   }
>>
>>   void system_test_odp_cpu_hz(void)
>> @@ -250,12 +250,12 @@ int system_check_odp_cpu_hz_id(void)
>>   			fprintf(stderr, "cpu %d does not support"
>>   				" odp_cpu_hz_id(),"
>>   				"skip that test\n", cpu);
>> -			return -1;
>> +			return 0;
>>   		}
>>   		cpu = odp_cpumask_next(&mask, cpu);
>>   	}
>>
>> -	return 0;
>> +	return 1;
>>   }
>>
>>   void system_test_odp_cpu_hz_id(void)
>> --
>> 1.9.1
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/test/validation/system/system.c b/test/validation/system/system.c
index 5b5a3f0..5d87b8b 100644
--- a/test/validation/system/system.c
+++ b/test/validation/system/system.c
@@ -218,10 +218,10 @@  int system_check_odp_cpu_hz(void)
 {
 	if (odp_cpu_hz() == 0) {
 		fprintf(stderr, "odp_cpu_hz is not supported, skipping\n");
-		return -1;
+		return 0;
 	}
 
-	return 0;
+	return 1;
 }
 
 void system_test_odp_cpu_hz(void)
@@ -250,12 +250,12 @@  int system_check_odp_cpu_hz_id(void)
 			fprintf(stderr, "cpu %d does not support"
 				" odp_cpu_hz_id(),"
 				"skip that test\n", cpu);
-			return -1;
+			return 0;
 		}
 		cpu = odp_cpumask_next(&mask, cpu);
 	}
 
-	return 0;
+	return 1;
 }
 
 void system_test_odp_cpu_hz_id(void)