Re: [PATCH rt-tests v3 27/33] pip_stress: Return failure code if test fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sat, 20 Mar 2021, Daniel Wagner wrote:

> Let the test return a failure code when the test fails.
> 
> Signed-off-by: Daniel Wagner <dwagner@xxxxxxx>
> ---
>  src/pi_tests/pip_stress.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/pi_tests/pip_stress.c b/src/pi_tests/pip_stress.c
> index 2c3288984202..ed034799da66 100644
> --- a/src/pi_tests/pip_stress.c
> +++ b/src/pi_tests/pip_stress.c
> @@ -160,11 +160,11 @@ int main(int argc, char *argv[])
>  		}
>  	}
>  
> -	if (statep->inversion)
> -		printf("Successfully used priority inheritance to handle an inversion\n");
> -	else
> +	if (!statep->inversion) {
>  		printf("No inversion incurred\n");
> -
> +		exit(1);
> +	}
> +	printf("Successfully used priority inheritance to handle an inversion\n");
>  	exit(0);
>  }
>  
> -- 
> 2.30.2
> 
> 

It isn't really an error if no priority inheritance occurs.
An error from this program would be something like mmap returning an error 
code.

I'm not sure this one is suitable for the json treatment, it's more of a 
demonstration of how to use priority inheritance with processes instead of 
threads. Thomas told me this was possible and I was curious to see if this 
was true, so I scratched that itch. Not sure if it is useful as a test.

Let's leave pip_stress alone for now please



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux