summaryrefslogtreecommitdiffstats
path: root/test/ttsafe_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/ttsafe_error.c')
-rw-r--r--test/ttsafe_error.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c
index f92c65e..0b44958 100644
--- a/test/ttsafe_error.c
+++ b/test/ttsafe_error.c
@@ -72,7 +72,7 @@ tts_error(void)
/* Must initialize these at runtime */
expected_g[0].maj_num = H5E_DATASET;
- expected_g[0].min_num = H5E_CANTINIT;
+ expected_g[0].min_num = H5E_CANTCREATE;
expected_g[1].maj_num = H5E_VOL;
expected_g[1].min_num = H5E_CANTCREATE;
@@ -134,7 +134,8 @@ tts_error(void)
if (error_flag_g) {
TestErrPrintf(
"At least one thread reported a value that was different from the expected value\n");
- HDprintf("(Update this test if the error stack changed!)\n");
+ HDprintf(
+ "(Update the expected_g[] array in tts_error for this test if the error stack changed!)\n");
}
if (error_count_g != NUM_THREAD - 1)
@@ -241,7 +242,18 @@ walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void H5_ATTR_UNUSE
return SUCCEED;
}
+ /* Unexpected error stack entry, print some info and set flag */
+ HDfprintf(stderr, "Unexpected error stack entry!\n");
+ HDfprintf(stderr, "Stack entry: %d\n", n);
+ HDfprintf(stderr,
+ "Actual: maj_num = %" PRIxHID ", min_num = %" PRIxHID
+ ", line = %u, func = '%s', file = '%s', desc = '%s'\n",
+ err_desc->maj_num, err_desc->min_num, err_desc->line, err_desc->func_name, err_desc->file_name,
+ err_desc->desc);
+ HDfprintf(stderr, "Expected: maj_num = %" PRIxHID ", min_num = %" PRIxHID "\n", expected_g[n].maj_num,
+ expected_g[n].min_num);
error_flag_g = -1;
+
return SUCCEED;
}