xemu/tests/cris
Stefan Weil 2917dce477 tests/cris: Fix some errors and potential crashes
These errors were reported by cppcheck:

tests/cris/check_openpf1.c:30: error:
Mismatching allocation and deallocation: f

tests/cris/check_openpf2.c:13: error:
Mismatching allocation and deallocation: f

tests/cris/check_stat3.c:16: error:
Buffer overrun possible for long cmd-line args

tests/cris/check_stat4.c:18: error:
Buffer overrun possible for long cmd-line args

The first two are obvious coding errors (fopen needs fclose, not close).

The last two may seem less important (nobody will start test code
with an argument of more than 1022 characters which raises a buffer
overrun). Fixing them nevertheless helps with static code checks
like those done by cppcheck.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-04-03 21:58:38 +02:00
..
.gdbinit Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
check_abs.c Replace 'extern inline' with 'static inline' 2011-01-17 20:26:30 +00:00
check_addc.c Replace 'extern inline' with 'static inline' 2011-01-17 20:26:30 +00:00
check_addcm.c Replace 'extern inline' with 'static inline' 2011-01-17 20:26:30 +00:00
check_addi.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_addiv32.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_addm.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_addo.c cris: Correct ADDO and ADDOQ testcases. 2010-07-29 15:42:06 +02:00
check_addoq.c cris: Correct ADDO and ADDOQ testcases. 2010-07-29 15:42:06 +02:00
check_addq.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_addr.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_addxc.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_addxm.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_addxr.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_andc.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_andm.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_andq.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_andr.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_asr.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_ba.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_bas.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_bcc.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_bound.c Replace 'extern inline' with 'static inline' 2011-01-17 20:26:30 +00:00
check_boundc.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_boundr.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_btst.s CRIS: Make CCS related tests pass in system simulation by masking off flags not related to the tests. 2008-05-02 21:13:21 +00:00
check_clearfv32.s CRIS: Make CCS related tests pass in system simulation by masking off flags not related to the tests. 2008-05-02 21:13:21 +00:00
check_clrjmp1.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_cmp-2.s Add missing newline at the end of file 2008-12-14 08:50:18 +00:00
check_cmpc.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_cmpm.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_cmpq.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_cmpr.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_cmpxc.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_cmpxm.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_dstep.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_ftag.c Replace 'extern inline' with 'static inline' 2011-01-17 20:26:30 +00:00
check_gcctorture_pr28634-1.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_gcctorture_pr28634.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_glibc_kernelversion.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_hello.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_int64.c Replace 'extern inline' with 'static inline' 2011-01-17 20:26:30 +00:00
check_jsr.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_lapc.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_lsl.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_lsr.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_lz.c Replace 'extern inline' with 'static inline' 2011-01-17 20:26:30 +00:00
check_mapbrk.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_mcp.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_mmap1.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_mmap2.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_mmap3.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_movdelsr1.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_movecr.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_movei.s Increase the odds for the movei test to pass in system simulation. 2008-06-06 11:00:58 +00:00
check_movemr.s Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
check_movemrv32.s Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
check_moveq.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_mover.s Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
check_moverm.s CRIS: Correct typo in test for moverm. 2008-05-02 21:08:33 +00:00
check_movmp.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_movpmv32.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_movpr.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_movprv32.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_movscr.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_movsm.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_movsr.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_movucr.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_movum.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_movur.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_mulv32.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_mulx.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_neg.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_not.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_openpf1.c tests/cris: Fix some errors and potential crashes 2011-04-03 21:58:38 +02:00
check_openpf2.c tests/cris: Fix some errors and potential crashes 2011-04-03 21:58:38 +02:00
check_openpf3.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_openpf4.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_openpf5.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_orc.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_orm.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_orq.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_orr.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_ret.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_scc.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_settls1.c cris: Correct settls1 testcase. 2010-07-29 17:15:28 +02:00
check_sigalrm.c Add small testcase for ordinary signals. 2008-02-28 11:23:20 +00:00
check_stat1.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_stat2.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_stat3.c tests/cris: Fix some errors and potential crashes 2011-04-03 21:58:38 +02:00
check_stat4.c tests/cris: Fix some errors and potential crashes 2011-04-03 21:58:38 +02:00
check_subc.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_subm.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_subq.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_subr.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_swap.c Replace 'extern inline' with 'static inline' 2011-01-17 20:26:30 +00:00
check_time1.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_time2.c CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
check_xarith.s Add a testcase for broken x arithmetic sequences. 2008-06-06 11:05:18 +00:00
crisutils.h Replace 'extern inline' with 'static inline' 2011-01-17 20:26:30 +00:00
crt.s CRIS testsuite, based on the SIM testsuite, by Edgar E. Iglesias. 2007-10-08 13:32:20 +00:00
Makefile CRIS: Implement set_thread_area for CRIS. 2009-01-07 14:19:38 +00:00
README Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
sys.c Make the tests run when built with experimental gcc-cris 4.4. Prettify the logs. 2008-06-06 11:07:50 +00:00
sys.h Delete useless 'extern' qualifiers for functions 2011-01-23 16:21:20 +00:00
testutils.inc Make the tests run when built with experimental gcc-cris 4.4. Prettify the logs. 2008-06-06 11:07:50 +00:00

Test-suite for the cris port. Heavily based on the test-suite for the CRIS port of sim by Hans-Peter Nilsson.