Commit Graph

218 Commits

Author SHA1 Message Date
1930cc4fd6 Adjust the regex of spawn-task-external-bad test
Now the program fails in runtime directly as the stream is not
initialized when Nanos6 attempts to write events.
2023-12-20 12:08:47 +01:00
0439399f05 Fix ovni_thread_isready() after ovni_thread_free()
Until now, the value returned by ovni_thread_isready() was still
non-zero when the thread stream was destroyed in ovni_thread_free()
This was making it impossible to detect when a stream was destroyed.

This change makes it return 0 after ovni_thread_free() by using a new
finished flag. The flag keeps track on then the stream is destroyed,
preventing double initialization of a free stream.
2023-12-19 17:30:20 +01:00
1918ab6669 Always attempt to find Nanos6 and NODES
Causes the packages to always appear as found or not found in the
summary of cmake. Otherwise they were only checked if the compiler
supports the -fompss2 flag.
2023-12-15 11:06:41 +01:00
2b2a0eea8e Require nOS-V 2.0.0 for RT tests
We no longer need to detect support for instrumentation levels, as it is
included in 2.0.0.
2023-12-15 11:06:41 +01:00
ae7ef21014 Fix attach nOS-V RT test
The nosv_attach() function no longer needs a the type argument.
2023-12-15 11:06:41 +01:00
0a534f6c46 Simplify nanos6.toml config
Only the parts relevant to ovni are required.
2023-12-15 11:06:41 +01:00
6d584c646c Install ovniver with the runpath set
When running ovniver without LD_LIBRARY_PATH set, the loader couldn't
find any ovni installation and therefore was failing to start the
program. With this change we set the RUNPATH (not RPATH) of ovniver to
the installation libdir, so when no other libovni library is loaded via
LD_LIBRARY_PATH the one provided by the same source as ovniver is used.

The value of LD_LIBRARY_PATH is also printed so we can determine where
it may be loading libovni. Using LD_DEBUG=libs will give more
information of the search process.

Fixes: https://pm.bsc.es/gitlab/rarias/ovni/-/issues/163
2023-12-12 17:06:24 +01:00
0f7ccc89de Add -a flag in ovniemu to enable all models
The experimental flag -a is used to ease the transition to the usage of
ovni_thread_require(), as it may be posible to have traces in which not
all libraries have requested their model. The flag causes all emulation
models to be enabled. This flag is considered experimental and it may be
removed or renamed in future versions.
2023-12-11 14:29:40 +01:00
c424a3177d Test temporal directories are removed at the end 2023-11-16 12:39:15 +01:00
423e3b15d2 Test multiple calls to ovni_thread_require() 2023-11-16 12:39:14 +01:00
93fdfd51de Add flush-tmpdir test 2023-11-16 12:39:14 +01:00
6b0b5bfbbd Add require test for missing models 2023-11-16 12:39:14 +01:00
72b7eb8332 Mark the finalization of streams
The emulator will now check that all threads are properly finalyzed by
calling ovni_thread_free(), as required by the specification. For now
only a warning is issued, which is enough to determine the cause of
potential emulator panics.

The ovni model is now always enabled.
2023-11-16 12:39:14 +01:00
25cf46036d Add no-require emulation test 2023-11-16 12:39:14 +01:00
6f7ce4063f Enable all models if the require key is missing
Allows programs to update to a new libovni library without breaking the
instrumentation. Only until the first call to ovni_thread_require() the
models are enabled on demand.
2023-11-16 12:39:14 +01:00
d45041e00c Disable delayed connect 2023-11-16 12:39:14 +01:00
354f2f50eb Register emulation models only if required
Until now, emulation models were always being registered via probe(),
which causes the emulator to initialize all the channels. To reduce the
overhead, the channels were not connected or registered in the bay
until the first event of that model was received. This delayed connect
was causing issues in muxes where the newly connected model required
refreshing the touched channels. Which in turn was causing unexpected
PRV events.

By determining which models we need to enable, we can remove the delayed
connect mechanism and just enable those models at initialization time,
and connect the channels.
2023-11-16 12:39:05 +01:00
428e0b44b8 Add emu test for ovni_thread_require 2023-11-16 12:21:50 +01:00
c13d57f0f6 Fix for nOS-V with ovni.level=2
When running without all the subsystem events enabled in nOS-V, it is
possible to emit two consecutive VTx events, which would push twice the
same value ST_TASK_BODY into the subsystem channel. This change relaxes
the subsystem channel to accept duplicate stacked values. A regression
test is also added.

Reported-By: Raúl Peñacoba Veigas <raul.penacoba@bsc.es>
2023-11-14 17:26:43 +01:00
8de5f329d9 Add RT nOS-V tests for the ovni.level option
Only nOS-V versions higher than 1.1.0 have support for the "ovni.level"
option.
2023-11-08 15:58:50 +01:00
eda93acc49 Use pkg-config to find nOS-V 2023-11-08 15:58:46 +01:00
4b4f1bd218 Don't modify nOS-V subsystem state on task pause
In nOS-V, when a task was paused via the VTp event, two things were
happening: 1) the task state was set to pause and 2) the subsystem state
"Task: Running" was being popped.

This causes a problem when a task calls nosv_submit() in blocking mode,
as it will call nosv_pause() which will emit a VTp event from a
subsystem different than "Task: Running".

To solve this conflict, we handle the subsystems state and the task
state separately with the VTp and VTr events. The subsystem state "Task:
Running" no longer is connected to the state of the task and only shows
if we entered the body of the task or not. It has now been renamed to
"Task: In body".

The new state "Task: In body" represents that the task body has begun
the execution and is still in the stack, but the task may be paused. The
subsystem is not changed by the VTp (pause) or VTr (resume) events.

Fixes: https://pm.bsc.es/gitlab/rarias/ovni/-/issues/128
2023-10-23 11:26:17 +02:00
0df018cf5f Fix segfault reading empty streams
The check_clock_gate() was trying to access to the first event in all
streams. However, streams that are empty don't have any event, so they
cause a NULL dereference. Skipping not active streams avoids the
problem.
2023-10-23 10:07:44 +02:00
0db35980a0 Add a test for multiple values of OVNI_TRACEDIR 2023-10-23 07:49:28 +00:00
d1bf4e7520 Allow tests to run their own driver
Tests can now specify a DRIVER option pointing to a shell script that
will run instead of the default driver. It allows tests to run any
commands and run the emulator several times or with different
environment variables.

The full path of the test program is available in the OVNI_TEST_PATH
environment variable.
2023-10-23 07:49:28 +00:00
Kevin Sala
afb81172a7 Add MPI emu tests 2023-09-06 18:11:19 +02:00
Kevin Sala
1e2102c0a0 Add TAMPI emu tests 2023-08-22 18:13:29 +02:00
b1ee2e7143 Add taskloop test in Nanos6 and NODES 2023-07-28 18:15:28 +02:00
f8c6b7c7c0 Improve the version error message
Use the terminology want/got to determine which version the user is
requested and the version the library provides.
2023-07-25 19:55:51 +02:00
74557ab348 Don't rely on temporary directories
Use the current test directory instead.
2023-07-25 16:36:57 +02:00
c257405060 Define unit_test() macro with ovni_test()
This allows unit tests to be executed in a individual directory where
they can create new files in $PWD.
2023-07-25 16:26:25 +02:00
2b612166d7 Use dinamically linked ovni for tests
We rely on this library to override the libovni.so that other libraries
are using.
2023-07-07 12:20:41 +02:00
7c68922a95 Enable NODES rt instrumentation
The NODES_OVNI environment variable is now needed to enable the ovni
instrumentation.
2023-07-07 10:52:46 +02:00
48df02f102 Always use the project version
Don't duplicated versions so we avoid the problem of missing one
instance to be updated.
2023-07-07 10:42:40 +02:00
929af74d3f Add sort-flush test 2023-06-28 12:28:40 +02:00
f8a15df1b9 Fix Nanos6 and NODES rt tests 2023-05-31 19:16:18 +02:00
64c2d52a7a Always enable all tests for ovni-rt 2023-05-30 18:16:08 +02:00
f5a911485a Remove unused configuration options for nOS-V 2023-05-30 17:41:05 +02:00
d0a47783f2 Use the completion callback to wait
The memory allocated is freed after the spawned function is executed.
2023-05-08 19:23:42 +02:00
7d7c59bbf8 Fix bug in spawn task tests
The argument passed to nanos6_spawn_function() was being destroyed when
the parent function ends.
2023-05-02 20:04:29 +02:00
fb435842b2 Add nosv multiple-segment test 2023-04-25 17:00:42 +02:00
7089db0bd0 Remove the workdir in each test run
Ensures the scripts are also rebuilt.
2023-04-25 16:52:21 +02:00
ff340df5b5 Disable flush-overhead test 2023-04-19 10:57:10 +00:00
3a28e1c3d3 Avoid fmemopen() due to bug in old glibc 2023-04-19 10:57:10 +00:00
4a936dcb99 Add test to prevent re-running tasks in Nanos6
For now is disabled until we have a better instrumentation for task
states.
2023-04-17 15:58:19 +00:00
bc513832a5 Allow tests to be disabled
Ensure that we still build the tests but they don't run.
2023-04-17 15:58:19 +00:00
3c6c6ed230 Add taskiter NODES test 2023-04-17 15:58:19 +00:00
b16c30a5e6 Add Absorbing state to the idle view in Nanos6 2023-04-14 13:39:37 +00:00
6cafd347ce Add support for sponge subsystem state in Nanos6 2023-04-14 13:39:37 +00:00
676e30b4ca Order looms and processes by rank if given 2023-04-14 08:35:21 +00:00