Re: [PATCH 5/6] rt-tests: cyclicdeadline: Print fail only if something failed

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

 




On Tue, 18 Jun 2019, Kurt Kanzenbach wrote:

> It is interesting to see what went wrong in case something did. However, the
> fail statement is printed always. That is confusing.
> 
> Furthermore, the fail value is always 1 when a failure happened. There is no
> need to print it.
> 
> Signed-off-by: Kurt Kanzenbach <kurt@xxxxxxxxxxxxx>
> ---
>  src/sched_deadline/cyclicdeadline.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c
> index 7cffe826b944..16d986a02244 100644
> --- a/src/sched_deadline/cyclicdeadline.c
> +++ b/src/sched_deadline/cyclicdeadline.c
> @@ -1204,10 +1204,11 @@ int main (int argc, char **argv)
>  	printf("main thread %d\n", gettid());
>  
>  	pthread_barrier_wait(&barrier);
> -	printf("fail 2 %d\n", fail);
>  
> -	if (fail)
> +	if (fail) {
> +		printf("fail 2\n");
>  		exit(-1);
> +	}
>  
>  	pthread_barrier_wait(&barrier);
>  
> -- 
> 2.11.0
> 
> 
Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>



[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