Add require test for missing models

This commit is contained in:
Rodrigo Arias 2023-11-13 10:26:32 +01:00
parent 58fe0d1b4b
commit 6b0b5bfbbd
5 changed files with 27 additions and 2 deletions

View File

@ -11,3 +11,5 @@ test_emu(switch-same-type.c)
test_emu(multiple-segment.c MP NPROC 4)
test_emu(task-pause-from-submit.c)
test_emu(same-subsystem.c)
test_emu(require-missing.c SHOULD_FAIL
REGEX "model nosv not enabled for event")

View File

@ -0,0 +1,23 @@
/* Copyright (c) 2023 Barcelona Supercomputing Center (BSC)
* SPDX-License-Identifier: GPL-3.0-or-later */
#include <ovni.h>
#include "instr_nosv.h"
/* Test the emulator aborts if a stream contains require models but they don't
* cover all the events (in this case nosv). */
int
main(void)
{
instr_start(0, 1);
/* Don't enable nosv model via instr_nosv_init() */
/* Emit a nosv event */
instr_nosv_type_create(666);
instr_end();
return 0;
}

View File

@ -18,6 +18,6 @@ test_emu(sort-cpus-by-loom.c MP)
test_emu(sort-cpus-by-rank.c MP)
test_emu(tracedir-subdir.c MP DRIVER "tracedir-subdir.driver.sh")
test_emu(empty-stream.c SHOULD_FAIL REGEX "model_ovni_finish: thread .* is not dead")
test_emu(require.c SHOULD_FAIL REGEX "unsupported ovni model version (want 666.66.6, have .*)")
test_emu(no-require.c REGEX "loading trace in compatibility mode")
test_emu(require-bad-version.c SHOULD_FAIL REGEX "unsupported ovni model version (want 666.66.6, have .*)")
test_emu(require-compat.c REGEX "loading trace in compatibility mode")
test_emu(thread-crash.c SHOULD_FAIL REGEX "incomplete stream")