Re: [PATCH v1 3/5] selftests/nolibc: report: align passed, skipped and failed

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

 



On Thu, Jul 06, 2023 at 05:10:08PM +0800, Zhangjin Wu wrote:
> align the test values for different runs and different architectures.
> 
> Since the total number of tests is not bigger than 1000 currently, let's
> align them with "%03d".

%03d is not great for those who want to use them in scripts because it will
prepend zeroes. Better use %3d. Look for example:

  $ x=$(printf "%03d\n" 19)
  $ echo $x
  019
  $ echo $((x+1))
  -bash: 019: value too great for base (error token is "019")

Instead:

  $ printf "%3d\n" 19
   19
  $ x=$(printf "%3d\n" 19)
  $ echo $x
  19
  $ echo $((x+1))
  20

If you're fine with it I'll change your patch and commit message
accordingly.

Willy



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux