From 423e3b15d27b8fb9c8aaca0b75afbadcf82fefb5 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Mon, 13 Nov 2023 15:02:51 +0100 Subject: [PATCH] Test multiple calls to ovni_thread_require() --- test/emu/ovni/CMakeLists.txt | 1 + test/emu/ovni/require-repeated.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 test/emu/ovni/require-repeated.c diff --git a/test/emu/ovni/CMakeLists.txt b/test/emu/ovni/CMakeLists.txt index d51944f..1841254 100644 --- a/test/emu/ovni/CMakeLists.txt +++ b/test/emu/ovni/CMakeLists.txt @@ -20,5 +20,6 @@ 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-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(require-repeated.c) test_emu(thread-crash.c SHOULD_FAIL REGEX "incomplete stream") test_emu(flush-tmpdir.c MP DRIVER "flush-tmpdir.driver.sh") diff --git a/test/emu/ovni/require-repeated.c b/test/emu/ovni/require-repeated.c new file mode 100644 index 0000000..2be87a3 --- /dev/null +++ b/test/emu/ovni/require-repeated.c @@ -0,0 +1,20 @@ +/* Copyright (c) 2023 Barcelona Supercomputing Center (BSC) + * SPDX-License-Identifier: GPL-3.0-or-later */ + +#include +#include "instr.h" + +/* Test multiple calls to ovni_thread_require() function */ + +int +main(void) +{ + instr_start(0, 1); + + instr_require("ovni"); + instr_require("ovni"); + + instr_end(); + + return 0; +}