Skip to content

Added tinycc test script#146

Open
vidyalakshmir wants to merge 2 commits intomainfrom
add-tinycc-tests
Open

Added tinycc test script#146
vidyalakshmir wants to merge 2 commits intomainfrom
add-tinycc-tests

Conversation

@vidyalakshmir
Copy link
Copy Markdown
Contributor

@vidyalakshmir vidyalakshmir commented Mar 18, 2026

Added test script to test tinycc.
Total : 9 tests
All tests PASSED.

Tests added :

  • Standard Hello World
  • Arithmetic Logic
  • Floating point
  • Argument handling
  • Dynamic Memory (malloc/free)
  • File I/O
  • Bitwise Operations
  • Struct Padding and alignment

The tests are created within lindfs/tests/tinycc. They are compiled using lindfs/bin/tcc. The output i386 ELF binary is executed and its output is compared to see if it is expected one.

(Since tcc does not support cross-compilation, many of the original tests cannot be run with tcc.wasm)

Added tests from the tinycc test suite. Around 106 tests were executed. Observations from running the test suite:

  • tinycc does not support long double
  • Handling large arrays and structs
  • Some header files missing (linux/types.h and linux/limits.h)
  • out of bounds memory access (tests/tests2/101_cleanup.c)
  • tests/tests2/70_floating_point_literals.c

Steps to reproduce
Please run the following from tinycc build PR if it is not merged yet.

cd lind-wasm-apps
make tinycc
make install-tinycc

Then run the tests.

tinycc/run_tests.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant