summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am2
-rw-r--r--test/Makefile.in10
-rw-r--r--test/gen_bad_ohdr.c2
-rw-r--r--test/gen_bogus.c2
-rw-r--r--test/gen_deflate.c2
-rw-r--r--test/gen_noencoder.c2
-rw-r--r--test/lheap.c29
-rw-r--r--test/links.c2
-rw-r--r--test/ohdr.c2
-rw-r--r--test/stab.c3
-rw-r--r--test/tarray.c7
-rw-r--r--test/tattr.c1
-rw-r--r--test/tconfig.c9
-rw-r--r--test/th5s.c5
-rw-r--r--test/trefer.c3
15 files changed, 41 insertions, 40 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 3bb2b2b..f9207ef 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -90,7 +90,7 @@ timings _timings: testmeta
@for timing in $(TIMINGS) dummy; do \
if test $$timing != dummy; then \
echo "Running $$timing $(TEST_FLAGS)"; \
- $(RUNTEST) ./$$timing $(TEST_FLAGS) || exit 1; \
+ $(RUNEXEC) ./$$timing $(TEST_FLAGS) || exit 1; \
fi; \
done;
diff --git a/test/Makefile.in b/test/Makefile.in
index b8782e6..344e04d 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -610,12 +610,12 @@ CP = cp
# Some machines need a command to run executables; this is that command
# so that our tests will run.
-# We use RUNTESTS instead of RUNSERIAL directly because it may be that
+# We use RUNEXEC instead of RUNSERIAL directly because it may be that
# some tests need to be run with a different command. Older versions
# of the makefiles used the command
# $(LIBTOOL) --mode=execute
# in some directories, for instance.
-RUNTESTS = $(RUNSERIAL)
+RUNEXEC = $(RUNSERIAL)
# Libraries to link to while building
LIBHDF5 = $(top_builddir)/src/libhdf5.la
@@ -1340,7 +1340,7 @@ timings _timings: testmeta
@for timing in $(TIMINGS) dummy; do \
if test $$timing != dummy; then \
echo "Running $$timing $(TEST_FLAGS)"; \
- $(RUNTEST) ./$$timing $(TEST_FLAGS) || exit 1; \
+ $(RUNEXEC) ./$$timing $(TEST_FLAGS) || exit 1; \
fi; \
done;
@@ -1447,7 +1447,7 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
fi; \
echo "============================" >> $${log}; \
srcdir="$(srcdir)" \
- $(TIME) $(RUNTESTS) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
&& touch $(@:.chkexe_=.chkexe) || \
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
(cat $${log} && false) || exit 1; \
@@ -1518,7 +1518,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
$(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
- RUNTESTS="$(RUNPARALLEL)" || exit 1; \
+ RUNEXEC="$(RUNPARALLEL)" || exit 1; \
fi; \
done
@for test in $(TEST_SCRIPT_PARA) dummy; do \
diff --git a/test/gen_bad_ohdr.c b/test/gen_bad_ohdr.c
index d04996d..6d50230 100644
--- a/test/gen_bad_ohdr.c
+++ b/test/gen_bad_ohdr.c
@@ -28,10 +28,12 @@
#include "H5private.h"
#include "H5Oprivate.h"
+#ifdef H5O_ENABLE_BAD_MESG_COUNT
#define FILENAME "tbad_msg_count.h5"
#define GROUPNAME "Group"
#define ATTRNAME1 "Attribute #1"
#define ATTRNAME2 "Attribute #2"
+#endif /* H5O_ENABLE_BAD_MESG_COUNT */
#ifndef TRUE
#define TRUE 1
diff --git a/test/gen_bogus.c b/test/gen_bogus.c
index a8b88bf..7456ae6 100644
--- a/test/gen_bogus.c
+++ b/test/gen_bogus.c
@@ -25,7 +25,9 @@
#include "hdf5.h"
#include "H5Oprivate.h"
+#ifdef H5O_ENABLE_BOGUS
#define FILENAME "tbogus.h5"
+#endif /* H5O_ENABLE_BOGUS */
#ifndef TRUE
#define TRUE 1
diff --git a/test/gen_deflate.c b/test/gen_deflate.c
index 16de92e..2d0b746 100644
--- a/test/gen_deflate.c
+++ b/test/gen_deflate.c
@@ -66,7 +66,7 @@ main(void)
/* (Try for something easily compressible) */
for(i=0; i<SPACE_DIM1; i++)
for(j=0; j<SPACE_DIM2; j++)
- data[i][j]=j%5;
+ data[i][j] = (int)(j % 5);
/* Create the file */
file = H5Fcreate(TESTFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
diff --git a/test/gen_noencoder.c b/test/gen_noencoder.c
index 3266374..46a2036 100644
--- a/test/gen_noencoder.c
+++ b/test/gen_noencoder.c
@@ -79,5 +79,7 @@ main(void)
H5Dclose(dset_id);
H5Sclose(space_id);
H5Fclose(file_id);
+
+ return(0);
}
diff --git a/test/lheap.c b/test/lheap.c
index 537d42d..df41315 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -76,7 +76,7 @@ main(void)
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
goto error;
- if(NULL == (f = H5I_object(file))) {
+ if(NULL == (f = (H5F_t *)H5I_object(file))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -93,16 +93,18 @@ main(void)
}
for(i = 0; i < NOBJS; i++) {
sprintf(buf, "%03d-", i);
- for (j=4; j<i; j++) buf[j] = '0' + j%10;
- if (j>4) buf[j] = '\0';
+ for(j = 4; j < i; j++)
+ buf[j] = '0' + j % 10;
+ if(j > 4)
+ buf[j] = '\0';
- if ((size_t)(-1)==(obj[i]=H5HL_insert(f, H5P_DATASET_XFER_DEFAULT, heap, strlen(buf)+1, buf))) {
+ if((size_t)(-1) == (obj[i] = H5HL_insert(f, H5P_DATASET_XFER_DEFAULT, heap, strlen(buf) + 1, buf))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
}
}
- if (H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr) < 0) {
+ if(H5HL_unprotect(f, heap) < 0) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -116,16 +118,18 @@ main(void)
TESTING("local heap read");
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file=H5Fopen(filename, H5F_ACC_RDONLY, fapl))<0) goto error;
- if (NULL==(f=H5I_object(file))) {
+ if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) goto error;
+ if(NULL == (f = (H5F_t *)H5I_object(file))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
}
- for (i=0; i<NOBJS; i++) {
+ for(i = 0; i < NOBJS; i++) {
sprintf(buf, "%03d-", i);
- for (j=4; j<i; j++) buf[j] = '0' + j%10;
- if (j>4) buf[j] = '\0';
+ for(j = 4; j < i; j++)
+ buf[j] = '0' + j % 10;
+ if(j > 4)
+ buf[j] = '\0';
if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr, H5AC_READ))) {
H5_FAILED();
@@ -133,7 +137,7 @@ main(void)
goto error;
}
- if (NULL == (s = H5HL_offset_into(f, heap, obj[i]))) {
+ if (NULL == (s = (const char *)H5HL_offset_into(heap, obj[i]))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -147,7 +151,7 @@ main(void)
goto error;
}
- if (H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr) < 0) {
+ if(H5HL_unprotect(f, heap) < 0) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -168,3 +172,4 @@ main(void)
} H5E_END_TRY;
return 1;
}
+
diff --git a/test/links.c b/test/links.c
index e793b39..c2d9249 100644
--- a/test/links.c
+++ b/test/links.c
@@ -8951,7 +8951,7 @@ link_filters(hid_t fapl, hbool_t new_format)
|| filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED
| H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR
- if(H5Pget_filter2(gcpl2, 2, &flags_out, &cd_nelmts, &cd_value_out, (size_t)24,
+ if(H5Pget_filter2(gcpl2, nfilters - 1, &flags_out, &cd_nelmts, &cd_value_out, (size_t)24,
name_out, &filter_config_out) < 0)
TEST_ERROR
if(flags_out != 0 || cd_value_out != cd_value
diff --git a/test/ohdr.c b/test/ohdr.c
index 16ffc7c..f59dace 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -441,6 +441,8 @@ main(void)
/* Open the dataset with the "mark if unknown" message */
if((dset = H5Dopen2(file, "/Dataset3", H5P_DEFAULT)) < 0)
TEST_ERROR
+
+ /* Close the dataset */
if(H5Dclose(dset) < 0)
TEST_ERROR
diff --git a/test/stab.c b/test/stab.c
index c2655a8..cab0b1b 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -680,9 +680,6 @@ read_old(void)
/* Open copied file */
if((fid = H5Fopen(FILE_OLD_GROUPS_COPY, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) TEST_ERROR
- /* Open copied file */
- if((fid = H5Fopen(FILE_OLD_GROUPS_COPY, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) TEST_ERROR
-
/* Attempt to open "old" group */
if((gid = H5Gopen2(fid, "old", H5P_DEFAULT)) < 0) TEST_ERROR
diff --git a/test/tarray.c b/test/tarray.c
index cc0a0ca..590d48c 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -44,16 +44,9 @@
#define ARRAY3_DIM2 3
/* 1-D dataset with fixed dimensions */
-#define SPACE1_NAME "Space1"
#define SPACE1_RANK 1
#define SPACE1_DIM1 4
-/* 2-D dataset with fixed dimensions */
-#define SPACE2_NAME "Space2"
-#define SPACE2_RANK 2
-#define SPACE2_DIM1 10
-#define SPACE2_DIM2 10
-
/****************************************************************
**
** test_array_atomic_1d(): Test basic array datatype code.
diff --git a/test/tattr.c b/test/tattr.c
index 432db67..d84231e 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -57,7 +57,6 @@
#define CORDER_ITER_STOP 3
/* 3-D dataset with fixed dimensions */
-#define SPACE1_NAME "Space1"
#define SPACE1_RANK 3
#define SPACE1_DIM1 3
#define SPACE1_DIM2 15
diff --git a/test/tconfig.c b/test/tconfig.c
index 47eed64..189b7ba 100644
--- a/test/tconfig.c
+++ b/test/tconfig.c
@@ -61,7 +61,12 @@ void test_exit_definitions(void);
* September 25, 2001
*
* Modifications:
- *
+ * Raymond Lu
+ * 16 Dec 2009
+ * On Boeing's OpenVMS, the value of EXIT_FAILURE is 268435458.
+ * (The test is in test_exit_definitions.) Their document says
+ * it's supposed to be 2. I commented it out for further
+ * consideration.
*-------------------------------------------------------------------------
*/
void
@@ -70,7 +75,9 @@ test_configure(void)
/* Output message about test being performed */
MESSAGE(5, ("Testing configure definitions\n"));
test_config_ctypes();
+#ifndef H5_VMS
test_exit_definitions();
+#endif
}
diff --git a/test/th5s.c b/test/th5s.c
index 5bf7845..e21dee2 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -39,14 +39,12 @@
#define NULLATTR "null_attribute"
/* 3-D dataset with fixed dimensions */
-#define SPACE1_NAME "Space1"
#define SPACE1_RANK 3
#define SPACE1_DIM1 3
#define SPACE1_DIM2 15
#define SPACE1_DIM3 13
/* 4-D dataset with one unlimited dimension */
-#define SPACE2_NAME "Space2"
#define SPACE2_RANK 4
#define SPACE2_DIM1 0
#define SPACE2_DIM2 15
@@ -58,13 +56,10 @@
#define SPACE2_MAX4 23
/* Scalar dataset with simple datatype */
-#define SPACE3_NAME "Scalar1"
#define SPACE3_RANK 0
unsigned space3_data=65;
/* Scalar dataset with compound datatype */
-#define SPACE4_NAME "Scalar2"
-#define SPACE4_RANK 0
#define SPACE4_FIELDNAME1 "c1"
#define SPACE4_FIELDNAME2 "u"
#define SPACE4_FIELDNAME3 "f"
diff --git a/test/trefer.c b/test/trefer.c
index bf9692f..dbf12bc 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -30,18 +30,15 @@
#define FILE3 "trefer3.h5"
/* 1-D dataset with fixed dimensions */
-#define SPACE1_NAME "Space1"
#define SPACE1_RANK 1
#define SPACE1_DIM1 4
/* 2-D dataset with fixed dimensions */
-#define SPACE2_NAME "Space2"
#define SPACE2_RANK 2
#define SPACE2_DIM1 10
#define SPACE2_DIM2 10
/* Larger 1-D dataset with fixed dimensions */
-#define SPACE3_NAME "Space3"
#define SPACE3_RANK 1
#define SPACE3_DIM1 100