summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/dsets.c10
-rw-r--r--test/th5s.c4
2 files changed, 9 insertions, 5 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 2fd5eb7..c18c24a 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -19,6 +19,7 @@
* Purpose: Tests the dataset interface (H5D)
*/
+#include <time.h>
#include "h5test.h"
/*
@@ -1091,7 +1092,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for (i=0; i<size[0]; i++) {
for (j=0; j<size[1]/2; j++) {
- points[i][j] = rand ();
+ points[i][j] = HDrandom ();
}
}
if (H5Dwrite (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, points)<0)
@@ -1197,7 +1198,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for (i=0; i<hs_size[0]; i++) {
for (j=0; j<hs_size[1]; j++) {
- points[hs_offset[0]+i][hs_offset[1]+j] = rand ();
+ points[hs_offset[0]+i][hs_offset[1]+j] = HDrandom();
}
}
if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, NULL, hs_size,
@@ -1823,7 +1824,7 @@ test_onebyte_shuffle(hid_t file)
for (i= 0;i< 10; i++)
for (j = 0; j < 20; j++)
- orig_data[i][j] = rand();
+ orig_data[i][j] = HDrandom();
PASSED();
#else
@@ -2650,6 +2651,9 @@ main(void)
}
#endif
+ /* Set the random # seed */
+ HDsrandom((unsigned long)time(NULL));
+
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
goto error;
diff --git a/test/th5s.c b/test/th5s.c
index 0239cc4..e8185db 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -154,12 +154,12 @@ test_h5s_basic(void)
* higher dimensionality than what the library can handle.
*
* If this test fails and the H5S_MAX_RANK variable has changed, follow
- * the instructions in space_overflow.c for regenating the th5s.h5 file.
+ * the instructions in space_overflow.c for regenerating the th5s.h5 file.
*/
{
char testfile[512]="";
char *srcdir = HDgetenv("srcdir");
- if (srcdir && ((HDstrlen(srcdir) + strlen(TESTFILE) + 1) < sizeof(testfile))){
+ if (srcdir && ((HDstrlen(srcdir) + HDstrlen(TESTFILE) + 1) < sizeof(testfile))){
HDstrcpy(testfile, srcdir);
HDstrcat(testfile, "/");
}