summaryrefslogtreecommitdiffstats
path: root/src/H5Ftest.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2020-08-07 15:06:34 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2020-08-07 15:06:34 (GMT)
commita2340cec3b1ff84e991b4e8d54a5e358a38831fe (patch)
treebb49b22a1ea2e6edf8a379c4e13438d170937696 /src/H5Ftest.c
parent8fe3cece3c671453e4c49f22fde9d7635c08f031 (diff)
parent51ab52ad4298913d18d1f8c3be7e2c2a410c58a8 (diff)
downloadhdf5-a2340cec3b1ff84e991b4e8d54a5e358a38831fe.zip
hdf5-a2340cec3b1ff84e991b4e8d54a5e358a38831fe.tar.gz
hdf5-a2340cec3b1ff84e991b4e8d54a5e358a38831fe.tar.bz2
Merge remote-tracking branch 'origin/develop' into namespace_cleanup_01
Diffstat (limited to 'src/H5Ftest.c')
-rw-r--r--src/H5Ftest.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/H5Ftest.c b/src/H5Ftest.c
index 97c7e3e..50a31cf 100644
--- a/src/H5Ftest.c
+++ b/src/H5Ftest.c
@@ -267,3 +267,36 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__same_file_test() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5F__reparse_file_lock_variable_test
+ *
+ * Purpose: Re-parse the file locking environment variable.
+ *
+ * Since getenv(3) is fairly expensive, we only parse it once,
+ * when the library opens. This test function is used to
+ * re-parse the environment variable after we've changed it
+ * with setnev(3).
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Dana Robinson
+ * Summer 2020
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F__reparse_file_lock_variable_test(void)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_PACKAGE
+
+ /* Check the file locking environment variable */
+ if(H5F__parse_file_lock_env_var(&use_locks_env_g) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to parse file locking environment variable")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5F__reparse_file_lock_variable_test() */
+