aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/backend/sum.c
AgeCommit message (Collapse)AuthorFilesLines
2019-11-28testsuite: avoid standard includes in the testsLuc Van Oostenryck1-2/+1
These headers are often complex and full of implementation specificities. They have no place in the testsuite. So, remove these includes and replace them by the prototype of the function being used. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-11-22sparsei: add the --[no-]jit optionsRamsay Jones1-1/+1
On the cygwin platform, a 'sparsei' backend test, which uses the llvm 'lli' tool, fails due to a dynamic linking error: $ make check ... TEST sum from 1 to n (backend/sum.c) error: actual output text does not match expected output text. error: see backend/sum.c.output.* for further investigation. --- backend/sum.c.output.expected 2018-06-03 18:27:11.502760500 +0100 +++ backend/sum.c.output.got 2018-06-03 18:27:11.307670000 +0100 @@ -1,2 +0,0 @@ -15 -5050 error: actual error text does not match expected error text. error: see backend/sum.c.error.* for further investigation. --- backend/sum.c.error.expected 2018-06-03 18:27:11.562997400 +0100 +++ backend/sum.c.error.got 2018-06-03 18:27:11.481038800 +0100 @@ -0,0 +1 @@ +LLVM ERROR: Program used external function 'printf' which could not be resolved! error: Actual exit value does not match the expected one. error: expected 0, got 1. ... Out of 288 tests, 277 passed, 11 failed (10 of them are known to fail) make: *** [Makefile:236: check] Error 1 $ Note the 'LLVM ERROR' about the 'printf' external function which could not be resolved (linked). On Linux, it seems that the 'lli' tool (JIT compiler) can resolve the 'printf' symbol, with the help of the dynamic linker, since the tool itself is linked to the (dynamic) C library. On windows (hence also on cygwin), the 'lli' tool fails to resolve the external symbol, since it is not exported from the '.exe'. The 'lli' tool can be used as an interpreter, so that the JIT compiler is disabled, which also side-steps this external symbol linking problem. Add the --[no-]jit options to the 'sparsei' tool, which in turn uses (or not) the '-force-interpreter' option to 'lli'. In order to fix the failing test-case, simply pass the '--no-jit' option to 'sparsei'. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2017-05-28testsuite: remove unneeded './' before commandsLuc Van Oostenryck1-1/+1
Some testcase have their command specified as './<command name>' but the './' part is unneeded as all commands are first prefixed with '../' before being run. Furthermore, the possible presence of these './' force the use of 'basename' when filtering out the disabled commands. Change this by stripping the './' where is was used. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2013-05-18sparse, llvm: simplify function generationXi Wang1-0/+28
Remove repeated code, such as get_func_type() vs sym_func_type(), pseudo_type() vs symbol_type(). Fix generating variadic functions. Add a test case using printf(). Cc: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>