[Skiboot] [PATCH 0/3] libc/stdlib tests

Daniel Axtens dja at axtens.net
Fri Feb 20 13:45:04 AEDT 2015


Hi,

I'm working on increasing coverage of the test suite. As a warm-up,
I've started with libc/stdlib, in particular atoi/strtol and
friends. I realise that this is not a particularly critical area, but
it's a nice place to start and it's nice to see any part of the LCOV
report go from red to green :)

Patch 2 fixes a minor bug with hex numbers, where 0x0xNNN would be
recognised as a valid hex number.

Patch 3 tweaks the behaviour of atoi/atol to match the spec and
behaviour under glibc.

Daniel Axtens (3):
  Test libc stdlib functions (atoi/strtol and friends)
  Don't recognise a double hex prefix (0x0xNN) as valid.
  atoi/atol should assume base 10, not autodetect base.

 libc/stdlib/atoi.c     |  2 +-
 libc/stdlib/atol.c     |  2 +-
 libc/stdlib/strtol.c   |  2 --
 libc/stdlib/strtoul.c  |  2 --
 libc/test/run-stdlib.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 64 insertions(+), 6 deletions(-)

-- 
2.1.4



More information about the Skiboot mailing list