Commit Graph

269 Commits

Author SHA1 Message Date
676e30b4ca Order looms and processes by rank if given 2023-04-14 08:35:21 +00:00
602daabe23 Fix copyright years 2023-04-06 15:33:15 +00:00
c30a5d94b5 Add emu breakdown test for zero values 2023-04-06 15:33:15 +00:00
6711afdb58 Fix include headers following IWYU 2023-04-06 15:33:15 +00:00
acd63a915e Add breakdown switch option in tests 2023-04-06 15:33:15 +00:00
30812e134e Reduce test cases in sort_replace 2023-04-06 15:33:15 +00:00
467cc9aa7e Fix value_str() usage 2023-04-06 15:33:15 +00:00
35872354e0 Speedup the sort module
Improvements:

- Don't propagate values if they didn't change
- Use custom sort algorithm to speedup the sorting
- Allocate a contiguous array of channel outputs
2023-04-06 15:33:15 +00:00
70b29b6459 Add sort channel module
Sorts the N input values and writes them in the N outputs in order.
2023-04-06 15:33:15 +00:00
f848ddb37f Increase the flush overhead limit to 2 ms
The current CI disk is slower doing the flushes.
2023-04-05 15:35:37 +02:00
54527b0006 Fix shebang in regex match test scripts 2023-04-05 15:18:03 +02:00
080d1df3e1 Remove _DEFAULT_SOURCE from tests 2023-03-24 12:08:45 +00:00
848a1de963 Constraint _GNU_SOURCE in compat.c only 2023-03-24 12:08:45 +00:00
1e822c248e Remove duplicated _POSIX_C_SOURCE define 2023-03-24 12:08:45 +00:00
ddbb7dd9f4 Add include-what-you-use
Adds forwards declarations in headers and includes all headers in
sources, even if they are found by transitive includes.
2023-03-24 12:08:45 +00:00
f22d9084ba Ensure all looms have at least one CPU 2023-03-24 12:08:45 +00:00
81875450a8 Add unit tests for PRV_SKIPDUP and PRV_EMITDUP 2023-03-24 12:08:45 +00:00
c0afc79d4e Use OK() and ERR() in unit tests
Also remove prefixes and trailing new lines in err() and die()
2023-03-24 12:08:45 +00:00
9a4a4a0005 Remove bay_remove() 2023-03-24 12:08:45 +00:00
b42fb4d2f3 Check prv_* return values 2023-03-24 12:08:45 +00:00
6deef0308a Fix underflow in path_remove_trailing() 2023-03-24 12:08:45 +00:00
e625897766 Add CHAN_IGNORE_DUP to ignore duplicates 2023-03-24 12:08:45 +00:00
ab3e823134 Rename CHAN_DUPLICATES to CHAN_ALLOW_DUP 2023-03-24 12:08:45 +00:00
f61711047c Remove buffer argument from value_str()
Use a ring of buffers instead, so we can printf() up to 16 values in
the same call.
2023-03-24 12:08:45 +00:00
82f1cc287d Update copyright years to 2021-2023 2023-03-24 12:08:45 +00:00
eb8d10771b Indent #pragma statements 2023-03-24 12:08:45 +00:00
4c7b44510a Remove empty tests 2023-03-24 12:08:45 +00:00
a4452dee8c Use OK() and ERR() macros in cpu and loom tests
Some return checks were missing too.
2023-03-24 12:08:45 +00:00
78c4bba62e Match the PRV event in delayed-connect-ss test
Ensures the delayed connect of the CPU and thread muxes still causes the
output to be updated properly.
2023-03-24 12:08:45 +00:00
c57bef14a3 Add switch-same-type emu test for Nanos6 2023-03-24 12:08:45 +00:00
aab6808f4e Ensure the appid and the rank are emitted too 2023-03-24 12:08:45 +00:00
246e3cfeab Fail on first error in post scripts 2023-03-24 12:08:45 +00:00
34c9f34f04 Get the gid from nanos6 task types too 2023-03-24 12:08:45 +00:00
4aebe81940 Document ss-mismatch nanos6 test 2023-03-24 12:08:45 +00:00
97dac6e83b Add switch-same-type nosv test
Generates a script with the values of the delta clock, PRV type and
value to be matched in the .prv traces, to ensure the emulator emitted
the switching type event.
2023-03-24 12:08:45 +00:00
64360796b9 Run any script found in the test workdir
Allows the test to perform additional checks on the generated trace.
2023-03-24 12:08:45 +00:00
803945dbc8 Return the gid of the created type 2023-03-24 12:08:45 +00:00
864ce4222f Store the first and last clock of emu events
Allows the tests to know the relative clock that will appear in the PRV
trace (with one rank only).
2023-03-24 12:08:45 +00:00
0eb88af4b9 Use the CPU phyid for the name only
The logical index is used to change the affinity of the threads.
2023-03-24 12:08:45 +00:00
69506e5079 Update burst test regex 2023-03-24 12:08:45 +00:00
65ecc75afd Sort unit tests by name 2023-03-24 12:08:45 +00:00
98b698473d Remove unused unit tests 2023-03-24 12:08:45 +00:00
899b82c36f Update flush-overhead too 2023-03-24 12:08:45 +00:00
7b80aa6aaf Instrument running thread in sort and flush tests 2023-03-24 12:08:45 +00:00
9407616c2b Add Nanos6 spawn task rt tests 2023-03-24 12:08:45 +00:00
b98ccfe3ad Use row and type as identifiers in prv_register()
Prevents multiple channels from being accidentally set to the same row
with the same type.
2023-03-24 12:08:45 +00:00
1c90947f82 Remove unused select function from mux unit test 2023-03-24 12:08:45 +00:00
5b980734ed Add unit test cases for thread init 2023-03-24 12:08:45 +00:00
7bbd74cb17 Add common unit test macros 2023-03-24 12:08:45 +00:00
e06651bbb6 Disable hash speed test
We no longer use the hash for the mux inputs, so during emulation is not
a performance bottleneck.
2023-03-24 12:08:45 +00:00
7ba810fd4a Set the thread->proc in proc_add_thread() 2023-03-24 12:08:45 +00:00
3a4722a83e Add delayed connect unit test for mux 2023-03-24 12:08:45 +00:00
b265442b8c Mark select channel as dirty on mux_init()
Ensures that the select callback will be called on the propagation
phase, immediately setting the right output. Otherwise the mux won't be
updated until the select channel sets a new value.
2023-03-24 12:08:45 +00:00
4a1fba74f3 Update bay unit test 2023-03-24 12:08:45 +00:00
fe6db823a7 Index mux inputs by an integer 2023-03-24 12:08:45 +00:00
3da9e27190 Skip "loom." prefix from hostname 2023-03-24 12:08:45 +00:00
28517c2000 Add another subsystem between nested tasks 2023-03-24 12:08:45 +00:00
e3339fef3b Increase sort window 2023-03-24 12:08:45 +00:00
f76d160c69 Copy Paraver configs to output directory 2023-03-24 12:08:45 +00:00
451d4be386 Port ovnisort 2023-03-24 12:08:45 +00:00
cd39230089 Remove boilerplate from the models 2023-03-24 12:08:45 +00:00
02db4b6369 Add support for NODES 2023-03-24 12:08:45 +00:00
8727126551 Use .obs extension for ovni binary streams 2023-03-24 12:08:45 +00:00
0746d2a0ec Add CPU oversubscription test 2023-03-24 12:08:45 +00:00
a818795d88 Add support for nOS-V
Most of the model is taken from nanos6, we should refactor them.
2023-03-24 12:08:45 +00:00
e344044b43 Use OB. for flush overhead test 2023-03-24 12:08:45 +00:00
2ce91de173 Move mp-rank test to nOS-V group 2023-03-24 12:08:45 +00:00
c13e004c6f Disable sort and trace-dependent tests 2023-03-24 12:08:45 +00:00
f1b130eb39 Move paraver sources to pv/ 2023-03-24 12:08:45 +00:00
a91b1c554a Finish task types in PCF for nanos6 2023-03-24 12:08:45 +00:00
dbea90f525 Fail if the streams clock is too far apart
The current gate is set to 1 hour and it only checks the first event in
the stream. Added a test too.
2023-03-24 12:08:45 +00:00
e674c92f13 Enable emu and rt tests for nanos6 and ovni 2023-03-24 12:08:45 +00:00
8ed9063488 Remove emu prefix from trace and stream 2023-03-24 12:08:45 +00:00
0e8b23c918 Update prv_register in tests 2023-03-24 12:08:45 +00:00
524ccc4dd5 Begin porting nanos6 model 2023-03-24 12:08:45 +00:00
04029995be Begin porting the ovni model 2023-03-24 12:08:45 +00:00
12bfd3fe26 Add loom and proc 2023-03-24 12:08:45 +00:00
5de74f15cb Add emulator player to read events 2023-03-24 12:08:45 +00:00
5bd04d8435 Add emu_stream unit test 2023-03-24 12:08:45 +00:00
fe5f16bb7a Add clock offset parser 2023-03-24 12:08:45 +00:00
1024ce8ecd Link unit tests with emu 2023-03-24 12:08:45 +00:00
b3e6c21b7c Add unit tests for emu and emu_trace 2023-03-24 12:08:45 +00:00
183634c8c4 Pass the bay in the prv_register() function 2023-03-24 12:08:45 +00:00
b3b1164fed Add PRV trace support for patchbay channels 2023-03-24 12:08:45 +00:00
d394bb88c3 Fail when the return value is not used 2023-03-24 12:08:45 +00:00
e240937e58 Add multiple callback types in the patchbay 2023-03-24 12:08:45 +00:00
ecc07012c0 Reduce hash speed test duration to 200 ms 2023-03-24 12:08:45 +00:00
9928758f91 Test bay_find speed compared with direct access 2023-03-24 12:08:45 +00:00
36d0a44b57 Add bay_remove() 2023-03-24 12:08:45 +00:00
97b96801d1 Ensure mux channels are registered in the bay 2023-03-24 12:08:45 +00:00
227a2d91df Allow duplicates in the mux output channel 2023-03-24 12:08:45 +00:00
9cc563d0dd Add properties to channels and duplicate support 2023-03-24 12:08:45 +00:00
0944f84ac9 Allow dirty writes selectively 2023-03-24 12:08:45 +00:00
e1e0e9662d Pack the value structure to be hashable 2023-03-24 12:08:45 +00:00
1cea193ea3 Add support for patchbay and muxes 2023-03-24 12:08:45 +00:00
e6cbe67254 Redesign full ring test 2022-12-19 15:46:37 +01:00
730082024f Initialize last_phy in test mp-simple 2022-12-19 15:30:27 +01:00
ee462d92e8 Handle NULL version pointer 2022-12-16 13:34:31 +01:00
7c7ba729f5 Add unit test for the version parser 2022-12-16 13:34:31 +01:00
a9526ae663 Add support for unit tests 2022-12-16 13:34:31 +01:00
5404cc5e83 Split sources into src/emu and src/rt
The public includes are now in include/ and in internal includes in
src/include/. The ovni* tools are moved to emu/ovni*.c and liked with
the emu static library.
2022-12-16 13:31:31 +01:00
e47cf8fe22 Disable taskfor runtime test 2022-12-13 13:29:09 +01:00
b6ce54b7ee Add version check and soname for libovni
Adds ovni_version_check() to test the version at runtime, set the
SONAME to the major version and install a symlinks to the complete
version:

  libovni.so -> libovni.so.1
  libovni.so.1 -> libovni.so.1.0.0
  libovni.so.1.0.0
2022-12-13 13:11:44 +01:00
2017541a55 Update nanos6.toml file 2022-11-14 12:12:00 +01:00
a7097048f9 Prevent grep from closing stdin
The -q flag was causing grep to close the stdin as the first match is
found, causing the exit code of the programs in the pipe to return
non-zero, as stdout is closed.
2022-11-09 16:20:04 +01:00
b1b4f37032 Copy Paraver configs into the trace directory
Keeps the trace self-contained.
2022-11-09 16:09:33 +01:00
971e8c1891 Prevent early end maker OU] in sort test 2022-10-07 13:17:26 +02:00
bacf33450d Add burst stats test 2022-10-07 13:08:51 +02:00
3eac598e2c Add support to match regex in ok tests 2022-10-07 13:08:14 +02:00
239deed26d Add test to fill the ring buffer 2022-10-07 12:43:15 +02:00
6dda4e90dd Add tests for event sorting 2022-10-07 12:17:14 +02:00
190cd8b822 Sort NODES test traces too 2022-10-07 11:28:10 +02:00
f85826b093 Use same nOS-V config for NODES tests 2022-10-07 11:27:50 +02:00
5b4a9c7da4 Sort nOS-V test traces 2022-10-07 11:27:20 +02:00
a1e7dbb04e Add SORT support in tests 2022-10-07 11:26:32 +02:00
221f21b776 Use custom nOS-V shared memory name 2022-10-07 11:25:31 +02:00
07d9313064 Add sort step if needed in the test driver 2022-10-07 11:24:04 +02:00
03c299b7a8 Add NODES runtime tests
Also add Nanos6 and NODES package modules
2022-10-04 19:54:55 +02:00
08f0e14155 Add two nOS-V RT extra tests 2022-10-04 13:03:41 +02:00
99793dba10 Set continuation indent to 2 tabs 2022-09-30 10:25:09 +02:00
ca6d46698f Move sources to src 2022-09-29 16:52:30 +02:00
177429fabc Follow K&R coding style using clang-format 2022-09-29 16:52:28 +02:00
834b33af33 Use SPDX license identifiers 2022-09-29 14:16:47 +02:00
2feccc7ba0 Always enable RT tests if possible 2022-09-29 12:41:59 +02:00
273d4bcc80 Speed up several-tasks test 2022-09-29 12:34:45 +02:00
fcba4ddc87 Fix sched-add race condition
Wait until all tasks have set the handle and then unblock them all.
2022-09-29 12:32:56 +02:00
323933448a Test Nanos6 with multiple instrumentation levels 2022-09-27 15:43:04 +02:00
c82b95ff07 Fix emu tests for taskfor and task body events 2022-09-21 17:31:28 +02:00
cd2e949613 Fix nested-tasks emu test 2022-09-21 13:17:38 +02:00
1a67fa40d4 Add taskfor test 2022-09-21 13:16:53 +02:00
8cab61bc62 Always emit task body when running a task
The emulator now enforces that the subsystem state is task body when a task
begins, either a new task or a nested one.
2022-09-21 13:02:24 +02:00
a94a56a4ba Update Nanos6 events for tests 2022-09-20 10:30:36 +02:00
24cb5a37c2 Remove fake subsystem test.
It is now covered by the runtime tests.
2022-09-20 10:29:36 +02:00
b5e70b90a7 Reduce tasks in sched-add tests
Also remove unused printf and follow style.
2022-09-14 13:20:15 +02:00
09e11b28a4 Add nanos6 as library and sched-add test 2022-09-13 15:36:55 +02:00
3d39b8cc54 Update task create emulated events 2022-09-12 16:52:27 +02:00
4f1125818c Add ovni level config to nanos6.toml 2022-09-12 16:16:11 +02:00
7e8ec9ebc7 Reduce task duration 2022-09-12 16:16:11 +02:00
cc1f5d769f Add Nanos6 rt test with several tasks 2022-09-12 16:16:11 +02:00
666075e8cd Disable Nanos6 subsystem test for now 2022-09-12 16:16:10 +02:00
982bc39490 Move thread type events to another channel 2022-09-12 16:16:10 +02:00
ac1ae8e69d Use one event per blocking type in Nanos6 2022-09-12 16:16:10 +02:00
6551ba80b1 Compute test name from source file 2022-09-12 16:16:10 +02:00
7c6beb091a Add nanos6 rt tests and organize into folders 2022-09-12 16:16:10 +02:00
406e9bddcb Strict testing and improve bad test regexes 2022-09-12 16:16:10 +02:00
David Alvarez
080898363b Add Nanos6 tests 2022-09-12 16:16:10 +02:00
c3c7aa730e Add support for runtime tests 2022-09-12 15:57:07 +02:00
6538dbcdd9 Only run flush-overhead test on Release build 2022-06-21 15:26:51 +02:00
7471a70c60 Print flush times when the test fails 2022-06-21 15:03:13 +02:00
430333409c Fix nOS-V task pause and add regression test 2022-06-03 11:36:27 +02:00