Commit Graph

26 Commits

Author SHA1 Message Date
Andrius Štikonas a950c3088b Adapt tests to M2libc changes. 2022-12-31 20:55:50 +00:00
Andrius Štikonas f7fcc0af6e Adapt to M2libc changes.
* Some test includes have changed.
* New GAS style amd64 defines.
* Make M2-Planet output position independent code on amd64.
2022-10-09 14:15:07 +01:00
Andrius Štikonas 823be93875 Enable riscv32 tests. 2021-12-03 21:33:55 +00:00
Andrius Štikonas 1e784f5afb Add riscv32 port. 2021-12-02 22:41:27 +00:00
Jeremiah Orians 7fb9d682ec
Update M2libc to enable RISC-V Development 2021-09-30 20:10:28 -04:00
Jeremiah Orians 163dab268c
Merge remote-tracking branch 'deesix/TMP' 2021-02-17 23:01:23 -05:00
Jeremiah Orians fc4c1998aa
Remove test/common_knight/ files and switch knight-posix to M2libc 2021-02-06 00:45:32 -05:00
deesix cb27e5314a @@@ remove scripts 2021-01-31 00:00:00 +01:00
deesix 05d962fcfc @@@ unify 64 bits archs (run_test.sh) 2021-01-31 00:00:00 +01:00
deesix fb5bae96ab @@@ tests: source new test/env.inc.sh
... which sets, given the ARCH, the following vars:

 BASE_ADDRESS
 ENDIANNESS_FLAG
2021-01-31 00:00:00 +01:00
deesix ab055a8823 @@@ tests: ARCH var in non-Knight scripts 2021-01-31 00:00:00 +01:00
deesix 548993a884 tests: use new-style mescc-tools flags
This completes the transition started in Knight scripts during their M2libc
migration at f2094a9e5b

from           : to

--BaseAddress  : --base-address
--BigEndian    : --big-endian
--LittleEndian : --little-endian

The plan for mescc-tools is to deprecate the old (pre-1.0.0) flags.

Note that test0101 compiles "hex2 0.3" and verifies that it works by
linking an example. This 0.3 version requires the old-style flags, so the
calls to test/results/test0101-*-binary are left unchanged.
2021-01-23 00:00:00 +01:00
deesix ae897dcfdb tests: no --exec_enable in hex2 calls because it's "Effectively a NOP"
hex2 in mescc-tools defaults to executable output file since 1.0.0.

See 0a553f720d39dae4231611671e4163a2d2422e0a there.

This completes the removal started in Knight scripts during their M2libc
migration at f2094a9e5b

Note that test0101 compiles "hex2 0.3" and verifies that it works by
linking an example. Calls to test/results/test0101-*-binary never used the
flag because we don't call the linked example (we just check its SHA-256).
2021-01-23 00:00:00 +01:00
Jeremiah Orians f2094a9e5b
Migrate knight-posix to M2libc 2021-01-22 00:35:43 -05:00
deesix 818784228c Use M2libc in all x86 tests < test1000 2021-01-21 00:00:00 +01:00
deesix e660caca73 Use M2libc in all armv7l tests < test1000 2021-01-21 00:00:00 +01:00
deesix 7860378b75 Use M2libc in all amd64 tests < test1000 2021-01-21 00:00:00 +01:00
deesix e9553d5f13 M2libc with standard architecture naming
Every AArch64 test script is affected because AArch64 -> aarch64. test0101
needs i386 -> x86 because it verifies the resulting AArch64 binary (hex2)
creating some x86 proof.

Also, a couple of x86 tests (test0000 and test0025) that are M2libc aware,
again because i386 -> x86 (hex2 ELF parts).
2021-01-16 00:00:00 +01:00
deesix 9f26dbcc68 tests: support for make -j
For any test there's a directory with a script for each architecture.

These scripts generate intermediate files in the dir during compilation,
with the same names no matter the arch. So if one tries to execute the
scripts in parallel they all fight for the files.

To allow for parallel testing, now we create a temporal dir named after
the arch to isolate the intermediate files. Scripts are patched
accordingly.

This also allows easier clean-up: now, removing the temporal dirs is
almost all that we need (and the per-test .gitignore files are replaced
with a couple of lines in test/.gitignore). A common script replaces
the per-test cleanup.sh. It gets the number of the test as an argument
and takes care of some minor special cases. The makefile is adapted to
use this new test/cleanup_test.sh script.

Those special files are created during the last stage of each test, but
only if the host arch matches the test. They're _not_ isolated here
because it's harder (due to how we do the checksum) and they cannot
collide unless emulation is used and several calls to make are made at
the same time.
2021-01-12 00:00:00 +01:00
deesix 3aa8327334 tests: prettier scripts
One line per flag for the major calls. This simplifies a bit the automated
patching for parallel testing that comes next.
2021-01-12 00:00:00 +01:00
Sanne Wouda b83086642e Use M2libc in nearly all AArch64 tests
- disables --bootstrap-mode where it was enabled, except for test1000
  which needs to build in bootstrap-mode to check that M2-Planet can be
  compiled by cc_*

- the only hold-out is test0021 which needs getcwd which is missing in
  M2libc

- note that test0106 needs a fix to fgetc or it will never notice it has
  reached the end of stdin
2021-01-10 22:02:29 +00:00
Jeremiah Orians 921cc86ce6
First generation implemention of typedef 2021-01-02 22:00:02 -05:00
Jeremiah Orians cc1a17a040
Revert "file.c: introduce output buffering for x86"
This reverts commit 5afeb0743e.
2021-01-01 15:28:30 -05:00
Michael Schierl 5afeb0743e file.c: introduce output buffering for x86
Note that this is a backwards incompatible change: Unlike POSIX, exit()
will not flush all open streams, so you are responsible for flushing or
closing all your streams before successful exit.

Also, file.c will now also require calloc.c (and malloc.c).

Updated the test cases accordingly.

Only implemented and tested for x86.
2020-12-21 16:57:17 +01:00
Michael Schierl 91bab2ef98 Close files that were fopen:ed 2020-12-21 16:57:17 +01:00
Jeremiah Orians 6343e48600
Major relocation of tests to better structure for future additions 2020-02-28 18:27:12 -05:00