struct child_thread_args {
struct helper *h;
const struct script_op *script;
+ const char *script_name;
int thread_idx;
CRYPTO_THREAD *t;
}
static int run_script_worker(struct helper *h, const struct script_op *script,
+ const char *script_name,
int thread_idx)
{
int testresult = 0;
}
#endif
- TEST_info("script finished on thread %d", thread_idx);
+ TEST_info("script \"%s\" finished on thread %d", script_name, thread_idx);
testresult = 1;
goto out;
for (i = 0; i < op->arg1; ++i) {
h->threads[i].h = h;
h->threads[i].script = op->arg0;
+ h->threads[i].script_name = script_name;
h->threads[i].thread_idx = i;
h->threads[i].m = ossl_crypto_mutex_new();
if (!testresult) {
size_t i;
- TEST_error("failed at script op %zu, thread %d\n",
- op_idx + 1, thread_idx);
+ TEST_error("failed in script \"%s\" at op %zu, thread %d\n",
+ script_name, op_idx + 1, thread_idx);
for (i = 0; i < repeat_stack_len; ++i)
TEST_info("while repeating, iteration %zu of %zu, starting at script op %zu",
return testresult;
}
-static int run_script(const struct script_op *script, int free_order)
+static int run_script(const struct script_op *script,
+ const char *script_name,
+ int free_order)
{
int testresult = 0;
struct helper h;
if (!TEST_true(helper_init(&h, free_order, 1)))
goto out;
- if (!TEST_true(run_script_worker(&h, script, -1)))
+ if (!TEST_true(run_script_worker(&h, script, script_name, -1)))
goto out;
#if defined(OPENSSL_THREADS)
struct child_thread_args *args = arg;
testresult = run_script_worker(args->h, args->script,
+ args->script_name,
args->thread_idx);
ossl_crypto_mutex_lock(args->m);
script_37,
script_38,
script_39,
+ script_40,
};
static int test_script(int idx)
{
int script_idx = idx >> 1;
int free_order = idx & 1;
+ char script_name[64];
+
+ snprintf(script_name, sizeof(script_name), "script %d", idx);
TEST_info("Running script %d (order=%d)", script_idx + 1, free_order);
- return run_script(scripts[script_idx], free_order);
+ return run_script(scripts[script_idx], script_name, free_order);
}
/* Dynamically generated tests. */
static ossl_unused int test_dyn_frame_types(int idx)
{
size_t i;
+ char script_name[64];
struct script_op *s = dyn_frame_types_script;
for (i = 0; i < OSSL_NELEM(dyn_frame_types_script); ++i)
s[i].arg2 = forbidden_frame_types[idx].expected_err;
}
- return run_script(dyn_frame_types_script, 0);
+ snprintf(script_name, sizeof(script_name),
+ "dyn script %d", idx);
+
+ return run_script(dyn_frame_types_script, script_name, 0);
}
OPT_TEST_DECLARE_USAGE("certfile privkeyfile\n")