Age | Commit message (Collapse) | Author | Files | Lines |
|
UBSan:
libc/test/run-snprintf.c:123:9: runtime error: left shift of 268435456 by 4 places cannot be represented in type 'int'
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Acked-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Currently these exist for some parts of the source tree, but not all of it. They're nice if you are only modifing code in a one part of the tree as the full test suite can be a little slow.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This uses the dcbz instruction to clear cacheline at a time rather than
byte at a time. This means that even without high levels of optimization,
we *dramatically* improve boot performance with SKIBOOT_GCOV=1 and probably
ever so slightly speed things up for normal builds.
We currently just hard-code 128 as cacheline size as all CPUs that skiboot
currently boots on have 128 byte cachelines.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
The behaviour of atoi/atol on glibc (and according to the spec) is
to assume base 10, not to autodetect the base.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
When autodetecting the base, the code would strip hex prefixes twice.
Now the string is not modified in the detection stage.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This increases coverage of atoi, atol, strtol and strtoul to 100%.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Commit 16c80346 change included some reverts of previous commits, which
we need. This change reverts those reverts, leaving the original intent
of that change.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Was mentioned in linux as possibly being used by some external test
modules. It's harmless to make this official behaviour.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Fix the Makefile to clean up the coverage data files generated
through gcov.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Now it shows up as untested in lcov!
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Now it shows up as untested in lcov!
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This means that it shows up in lcov as untested.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Initial implementation and support for more libc test cases
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This way we get a true representation from the lcov coverage-report
about what firmware code we're testing (besides, test cases are always
going to only have 50% of branches hit - we're asserting the tests pass!)
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Can still get the details with V=1, just like normal make.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Instead of having individual rules to generate .d, add -MMD to
HOSTCC parameters, and just include the generated .d files.
This fixes a few weird dependency issues.
Also, make the mambo hello_kernel test depend on skiboot.lid
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
The core/test/ and libc/test/ Makefile.check files both contain:
-include core/test/*.d (or libc/test/*d)
which is incorrect, since that evaluates literally to a *.d file.
This results in each build trying to find that file, and creating
it when not found (in an incorrect way because of other problems in
the Makefile).
The correct way to specify it is:
-include $(wildcard core/test/*.d)
Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Add support in core/test/Makefile.check to build -gcov
binaries (with -lgcov and -fprofile-blah-blah) as well
as some targets for producing lcov HTML code coverage reports.
As part of this, I had to fix up an oddity in run-mem_region_init
where that due to running under Valgrind, we'd be malloc()ed a
heap with a small address, well inside the mem_regions we added but
when not running under valgrind (e.g. for code coverage reporting)
we would get a much larger address, outside this range and hit
an assert. So, after fiddling with the memory stuff for this test,
I think I have it right - it passes both under valgrind and not and
does produce code coverage data.
Currently, we're at this level of code coverage by unit tests:
Hit Total Coverage
Lines: 1936 2574 75.2 %
Functions: 177 225 78.7 %
Branches: 1243 2360 52.7 %
The totals should largely be ignored due to the only code being
counted is that linked into the unit tests (total LOC is ~50kLOC
according to sloccount... so unit tests currently cover < 5%)
Try the "make coverage-report" target, you'll get coverage-report
directory with a LCOV HTML report
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
There is no use for time, remove it.
Fixes the following error (and the warning once stdint.h was included):
libc/test/run-time.c:40:2: error: unknown type name ‘uint32_t’
uint32_t time;
libc/test/run-time.c:41:11: warning: unused variable ‘time’
[-Wunused-variable]
uint32_t time;
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Both the FSP RTC and the upcoming IPMI RTC implementation need to
manipulate time in various ways. Rather than re-implementing slightly
different versions of the calculations twice lets implement some
standard library functions (with tests) and use those.
This patch adds mktime and gmtime_r to the libc.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|