Skip to content

Commit

Permalink
Sync testhdf5 files w/ develop
Browse files Browse the repository at this point in the history
  • Loading branch information
derobins committed Jul 27, 2023
1 parent 38e234b commit d8c9513
Show file tree
Hide file tree
Showing 21 changed files with 534 additions and 532 deletions.
4 changes: 2 additions & 2 deletions test/tarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,14 @@ test_array_funcs(void)
{
cset = H5Tget_cset(type);
}
H5E_END_TRY;
H5E_END_TRY
VERIFY(cset, FAIL, "H5Tget_cset");

H5E_BEGIN_TRY
{
strpad = H5Tget_strpad(type);
}
H5E_END_TRY;
H5E_END_TRY
VERIFY(strpad, FAIL, "H5Tget_strpad");

/* Close datatype */
Expand Down
497 changes: 249 additions & 248 deletions test/tattr.c

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions test/tcheck_version.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ void parse(int ac, char **av);
void abort_intercept(int H5_ATTR_UNUSED sig);

/* global variables */
unsigned major = H5_VERS_MAJOR;
unsigned minor = H5_VERS_MINOR;
unsigned release = H5_VERS_RELEASE;
static unsigned major = H5_VERS_MAJOR;
static unsigned minor = H5_VERS_MINOR;
static unsigned release = H5_VERS_RELEASE;

void
showhelp(void)
Expand Down
2 changes: 1 addition & 1 deletion test/tcoords.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

/* Data written to the dataset for single block test. Global variable
* for convenience. */
int da_buffer[2][3][6][2];
static int da_buffer[2][3][6][2];

/***********************************************************
**
Expand Down
14 changes: 7 additions & 7 deletions test/testframe.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const
if (HDstrlen(TheDescr) >= MAXTESTDESC) {
printf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n", TheDescr, MAXTESTDESC);
exit(EXIT_FAILURE);
} /* end if */
}
if (HDstrlen(TheName) >= MAXTESTNAME) {
printf("Test name too long, increase MAXTESTNAME(%d).\n", MAXTESTNAME);
exit(EXIT_FAILURE);
} /* end if */
}

/* Check for increasing the Test array size */
if (Index >= TestAlloc) {
Expand All @@ -87,12 +87,12 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const
printf("Out of memory for tests, Index = %u, TestAlloc = %u, newAlloc = %u\n", Index, TestAlloc,
newAlloc);
exit(EXIT_FAILURE);
} /* end if */
}

/* Update info */
Test = newTest;
TestAlloc = newAlloc;
} /* end if */
}

/* Set up test function */
HDstrcpy(Test[Index].Description, TheDescr);
Expand Down Expand Up @@ -212,7 +212,7 @@ TestParseCmdLine(int argc, char *argv[])
hbool_t skipped_all = FALSE;
int ret_code;

while (argv++, --argc > 0) {
while ((void)argv++, --argc > 0) {
if ((HDstrcmp(*argv, "-verbose") == 0) || (HDstrcmp(*argv, "-v") == 0)) {
if (argc > 0) {
--argc;
Expand Down Expand Up @@ -316,7 +316,7 @@ PerformTests(void)
}

Test_parameters = NULL; /* clear it. */
MESSAGE(2, ("\n\n"))
MESSAGE(2, ("\n\n"));

if (num_errs)
print_func("!!! %d Error(s) were detected !!!\n\n", (int)num_errs);
Expand Down Expand Up @@ -634,7 +634,7 @@ TestAlarmOn(void)

/* Get the alarm value from the environment variable, if set */
if (env_val != NULL)
alarm_sec = (unsigned)HDstrtoul(env_val, (char **)NULL, 10);
alarm_sec = (unsigned)strtoul(env_val, (char **)NULL, 10);

/* Set the number of seconds before alarm goes off */
alarm((unsigned)alarm_sec);
Expand Down
24 changes: 12 additions & 12 deletions test/testhdf5.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
} while (0)

#define CHECK_I(ret, where) \
{ \
do { \
if (VERBOSE_HI) { \
print_func(" Call to routine: %15s at line %4d in %s returned %ld\n", (where), (int)__LINE__, \
__FILE__, (long)(ret)); \
Expand All @@ -48,11 +48,11 @@
(int)__LINE__, __FILE__); \
H5Eprint2(H5E_DEFAULT, stdout); \
} \
}
} while (0)

/* Check that a pointer is valid (i.e.: not NULL) */
#define CHECK_PTR(ret, where) \
{ \
do { \
if (VERBOSE_HI) { \
print_func(" Call to routine: %15s at line %4d in %s returned %p\n", (where), (int)__LINE__, \
__FILE__, ((const void *)ret)); \
Expand All @@ -62,11 +62,11 @@
__FILE__); \
H5Eprint2(H5E_DEFAULT, stdout); \
} \
}
} while (0)

/* Check that a pointer is NULL */
#define CHECK_PTR_NULL(ret, where) \
{ \
do { \
if (VERBOSE_HI) { \
print_func(" Call to routine: %15s at line %4d in %s returned %p\n", (where), (int)__LINE__, \
__FILE__, ((const void *)ret)); \
Expand All @@ -76,11 +76,11 @@
(int)__LINE__, __FILE__); \
H5Eprint2(H5E_DEFAULT, stdout); \
} \
}
} while (0)

/* Check that two pointers are equal */
#define CHECK_PTR_EQ(ret, val, where) \
{ \
do { \
if (VERBOSE_HI) { \
print_func(" Call to routine: %15s at line %4d in %s returned %p\n", (where), (int)__LINE__, \
__FILE__, (const void *)(ret)); \
Expand All @@ -91,7 +91,7 @@
(where), (const void *)(ret), (const void *)(val), (int)__LINE__, __FILE__); \
H5Eprint2(H5E_DEFAULT, stdout); \
} \
}
} while (0)

/* Used to make certain a return value _is_ a value */
#define VERIFY(_x, _val, where) \
Expand Down Expand Up @@ -164,19 +164,19 @@
/* Used to document process through a test */
#if defined(H5_HAVE_PARALLEL) && defined(H5_PARALLEL_TEST)
#define MESSAGE(V, A) \
{ \
do { \
int mpi_rank; \
\
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); \
if (mpi_rank == 0 && HDGetTestVerbosity() > (V)) \
print_func A; \
}
} while (0)
#else /* H5_HAVE_PARALLEL */
#define MESSAGE(V, A) \
{ \
do { \
if (HDGetTestVerbosity() > (V)) \
print_func A; \
}
} while (0)
#endif /* H5_HAVE_PARALLEL */

/* Used to indicate an error that is complex to check for */
Expand Down
Loading

0 comments on commit d8c9513

Please sign in to comment.