Re: [PATCH rt-tests 4/9] signaltest: drop unused tsnorm()

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

 




On Mon, 31 Aug 2015, Josh Cartwright wrote:

> tsnorm() is not used at all in signaltest.  Remove it.
> 
> Signed-off-by: Josh Cartwright <joshc@xxxxxx>
> ---
>  src/signaltest/signaltest.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/src/signaltest/signaltest.c b/src/signaltest/signaltest.c
> index 9454a26..c6d1cfd 100644
> --- a/src/signaltest/signaltest.c
> +++ b/src/signaltest/signaltest.c
> @@ -69,14 +69,6 @@ static int shutdown;
>  static int tracelimit = 0;
>  static int oldtrace = 0;
>  
> -static inline void tsnorm(struct timespec *ts)
> -{
> -	while (ts->tv_nsec >= NSEC_PER_SEC) {
> -		ts->tv_nsec -= NSEC_PER_SEC;
> -		ts->tv_sec++;
> -	}
> -}
> -
>  static inline long calcdiff(struct timespec t1, struct timespec t2)
>  {
>  	long diff;
> -- 
> 2.5.0
> 
> --

As you can see, many of the programs in this suite are modeled after 
cyclictest, but many of them don't unfortunately receive nearly the 
amount of testing that cyclictest does. Now the fact that this function 
was copied from cyclictest, but not used, sends off alarm bells in my 
head. We have various struct timespec in signaltest, could the fact that 
we are not calling tsnorm mean that there are some hidden potential 
defects? Rather than removing this function, I'd like to spend some time 
auditing the use of timespec here until I'm convinced.

Thanks

John
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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