From 59eaedb967ecea61992d000e513738f9e0226fa1 Mon Sep 17 00:00:00 2001 From: jhendersonHDF Date: Tue, 30 May 2023 15:37:11 -0500 Subject: [PATCH] Sync with API tests branch (#52) --- H5TSprivate.h | 74 +- H5private.h | 2345 +++++++++++++++------ H5win32defs.h | 188 +- README.md | 4 +- hdf5_test/tattr.c | 656 +++--- hdf5_test/testhdf5.c | 4 +- hdf5_test/testhdf5.h | 4 +- hdf5_test/tfile.c | 101 +- hdf5_test/th5s.c | 236 ++- hdf5_test/titerate.c | 879 ++++---- hdf5_test/tmisc.c | 45 +- hdf5_test/trefer.c | 131 +- hdf5_test/tvlstr.c | 113 +- hdf5_testpar/t_bigio.c | 12 +- hdf5_testpar/t_chunk_alloc.c | 4 +- hdf5_testpar/t_coll_chunk.c | 40 +- hdf5_testpar/t_coll_md_read.c | 16 +- hdf5_testpar/t_dset.c | 63 +- hdf5_testpar/t_file.c | 16 +- hdf5_testpar/t_file_image.c | 14 + hdf5_testpar/t_filter_read.c | 4 +- hdf5_testpar/t_mdset.c | 51 +- hdf5_testpar/t_pshutdown.c | 10 +- hdf5_testpar/t_shapesame.c | 21 +- hdf5_testpar/t_span_tree.c | 28 +- hdf5_testpar/testphdf5.c | 19 +- hdf5_testpar/testphdf5.h | 3 +- testpar.h | 32 +- vol_async_test.c | 900 ++++---- vol_async_test_parallel.c | 1029 ++++----- vol_attribute_test.c | 1468 ++++++------- vol_dataset_test.c | 2186 +++++++------------ vol_dataset_test.h | 40 - vol_dataset_test_parallel.c | 410 ++-- vol_datatype_test.c | 279 ++- vol_file_test.c | 234 +-- vol_file_test_parallel.c | 20 +- vol_group_test.c | 304 +-- vol_link_test.c | 3729 +++++++++++++++++---------------- vol_misc_test.c | 156 +- vol_object_test.c | 801 +++---- vol_test.c | 15 +- vol_test.h | 1 - vol_test_parallel.h | 3 +- vol_tests_disabled.h | 46 - 45 files changed, 8618 insertions(+), 8116 deletions(-) delete mode 100644 vol_tests_disabled.h diff --git a/H5TSprivate.h b/H5TSprivate.h index bb51030..e24c409 100644 --- a/H5TSprivate.h +++ b/H5TSprivate.h @@ -1,35 +1,29 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- * - * Created: H5TSprivate.h - * May 2 2000 - * Chee Wai LEE + * Created: H5TSprivate.h * - * Purpose: Private non-prototype header. - * - * Modifications: + * Purpose: Thread-safety abstractions used by the library * *------------------------------------------------------------------------- */ #ifndef H5TSprivate_H_ #define H5TSprivate_H_ -/* Public headers needed by this file */ -#ifdef LATER -#include "H5TSpublic.h" /*Public API prototypes */ -#endif /* LATER */ +#ifdef H5_HAVE_THREADSAFE +/* Include package's public headers */ +#include "H5TSdevelop.h" #ifdef H5_HAVE_WIN_THREADS @@ -39,6 +33,8 @@ typedef struct H5TS_mutex_struct { CRITICAL_SECTION CriticalSection; } H5TS_mutex_t; + +/* Portability wrappers around Windows Threads types */ typedef CRITICAL_SECTION H5TS_mutex_simple_t; typedef HANDLE H5TS_thread_t; typedef HANDLE H5TS_attr_t; @@ -51,7 +47,7 @@ typedef INIT_ONCE H5TS_once_t; #define H5TS_SCOPE_PROCESS 0 #define H5TS_CALL_CONV WINAPI -/* Functions */ +/* Portability function aliases */ #define H5TS_get_thread_local_value(key) TlsGetValue(key) #define H5TS_set_thread_local_value(key, value) TlsSetValue(key, value) #define H5TS_attr_init(attr_ptr) 0 @@ -68,6 +64,8 @@ H5_DLL void H5TS_win32_process_exit(void); H5_DLL herr_t H5TS_win32_thread_enter(void); H5_DLL herr_t H5TS_win32_thread_exit(void); +#define H5TS_thread_id() ((uint64_t)GetCurrentThreadId()) + #else /* H5_HAVE_WIN_THREADS */ /* Library level data structures */ @@ -78,7 +76,12 @@ typedef struct H5TS_mutex_struct { pthread_mutex_t atomic_lock; /* lock for atomicity of new mechanism */ pthread_cond_t cond_var; /* condition variable */ unsigned int lock_count; + + pthread_mutex_t atomic_lock2; /* lock for attempt_lock_count */ + unsigned int attempt_lock_count; } H5TS_mutex_t; + +/* Portability wrappers around pthread types */ typedef pthread_t H5TS_thread_t; typedef pthread_attr_t H5TS_attr_t; typedef pthread_mutex_t H5TS_mutex_simple_t; @@ -90,7 +93,7 @@ typedef pthread_once_t H5TS_once_t; #define H5TS_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS #define H5TS_CALL_CONV /* unused - Windows only */ -/* Functions */ +/* Portability function aliases */ #define H5TS_get_thread_local_value(key) pthread_getspecific(key) #define H5TS_set_thread_local_value(key, value) pthread_setspecific(key, value) #define H5TS_attr_init(attr_ptr) pthread_attr_init((attr_ptr)) @@ -101,27 +104,34 @@ typedef pthread_once_t H5TS_once_t; #define H5TS_mutex_lock_simple(mutex) pthread_mutex_lock(mutex) #define H5TS_mutex_unlock_simple(mutex) pthread_mutex_unlock(mutex) +/* Pthread-only routines */ +H5_DLL uint64_t H5TS_thread_id(void); +H5_DLL void H5TS_pthread_first_thread_init(void); + #endif /* H5_HAVE_WIN_THREADS */ -/* External global variables */ -extern H5TS_once_t H5TS_first_init_g; -extern H5TS_key_t H5TS_errstk_key_g; -extern H5TS_key_t H5TS_funcstk_key_g; -extern H5TS_key_t H5TS_apictx_key_g; - -#if defined c_plusplus || defined __cplusplus -extern "C" { -#endif /* c_plusplus || __cplusplus */ - -H5_DLL void H5TS_pthread_first_thread_init(void); -H5_DLL herr_t H5TS_mutex_lock(H5TS_mutex_t *mutex); -H5_DLL herr_t H5TS_mutex_unlock(H5TS_mutex_t *mutex); -H5_DLL herr_t H5TS_cancel_count_inc(void); -H5_DLL herr_t H5TS_cancel_count_dec(void); +/* Library-scope global variables */ +extern H5TS_once_t H5TS_first_init_g; /* Library initialization */ +extern H5TS_key_t H5TS_errstk_key_g; /* Error stacks */ +#ifdef H5_HAVE_CODESTACK +extern H5TS_key_t H5TS_funcstk_key_g; /* Function stacks */ +#endif /* H5_HAVE_CODESTACK */ +extern H5TS_key_t H5TS_apictx_key_g; /* API contexts */ + +/* Library-scope routines */ +/* (Only used within H5private.h macros) */ +H5_DLL herr_t H5TS_mutex_lock(H5TS_mutex_t *mutex); +H5_DLL herr_t H5TS_mutex_unlock(H5TS_mutex_t *mutex); +H5_DLL herr_t H5TS_cancel_count_inc(void); +H5_DLL herr_t H5TS_cancel_count_dec(void); + +/* Testing routines */ H5_DLL H5TS_thread_t H5TS_create_thread(void *(*func)(void *), H5TS_attr_t *attr, void *udata); -#if defined c_plusplus || defined __cplusplus -} -#endif /* c_plusplus || __cplusplus */ +#else /* H5_HAVE_THREADSAFE */ + +#define H5TS_thread_id() ((uint64_t)0) + +#endif /* H5_HAVE_THREADSAFE */ #endif /* H5TSprivate_H_ */ diff --git a/H5private.h b/H5private.h index a07e946..08cddc6 100644 --- a/H5private.h +++ b/H5private.h @@ -1,114 +1,68 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* Programmer: Robb Matzke - * Friday, October 30, 1998 - * - * Purpose: This file is included by all HDF5 library source files to - * define common things which are not defined in the HDF5 API. - * The configuration constants like H5_HAVE_UNISTD_H etc. are - * defined in H5config.h which is included by H5public.h. - * +/* + * Purpose: This file is included by all HDF5 library source files to + * define common things which are not defined in the HDF5 API. + * The configuration constants like H5_HAVE_UNISTD_H etc. are + * defined in H5config.h which is included by H5public.h. */ -#ifndef _H5private_H -#define _H5private_H +#ifndef H5private_H +#define H5private_H #include "H5public.h" /* Include Public Definitions */ -/* include the pthread header */ -#ifdef H5_HAVE_THREADSAFE -#ifdef H5_HAVE_WIN32_API -#ifndef H5_HAVE_WIN_THREADS -#ifdef H5_HAVE_PTHREAD_H -#include -#endif /* H5_HAVE_PTHREAD_H */ -#endif /* H5_HAVE_WIN_THREADS */ -#else /* H5_HAVE_WIN32_API */ -#ifdef H5_HAVE_PTHREAD_H -#include -#endif /* H5_HAVE_PTHREAD_H */ -#endif /* H5_HAVE_WIN32_API */ -#endif /* H5_HAVE_THREADSAFE */ - -/* - * Include ANSI-C header files. - */ #include #include #include #include #include -#include #include +#include #include #include #include #include +#include -/* - * If _POSIX_VERSION is defined in unistd.h then this system is Posix.1 - * compliant. Otherwise all bets are off. - */ +/* POSIX headers */ +#ifdef H5_HAVE_SYS_TIME_H +#include +#endif #ifdef H5_HAVE_UNISTD_H -#include #include #endif -#ifdef _POSIX_VERSION -#include +#ifdef H5_HAVE_PWD_H #include #endif - -/* - * C9x integer types - */ -#ifndef __cplusplus -#ifdef H5_HAVE_STDINT_H -#include +#ifdef H5_HAVE_WAITPID +#include #endif + +/* Include the Pthreads header, if necessary */ +#if defined(H5_HAVE_THREADSAFE) && defined(H5_HAVE_PTHREAD_H) +#include #endif /* - * The `struct stat' data type for stat() and fstat(). This is a Posix file - * but often apears on non-Posix systems also. The `struct stat' is required - * for hdf5 to compile, although only a few fields are actually used. + * The `struct stat' data type for stat() and fstat(). This is a POSIX file + * but often appears on non-POSIX systems also. The `struct stat' is required + * for HDF5 to compile, although only a few fields are actually used. */ #ifdef H5_HAVE_SYS_STAT_H #include #endif -/* - * If a program may include both `time.h' and `sys/time.h' then - * TIME_WITH_SYS_TIME is defined (see AC_HEADER_TIME in configure.ac). - * On some older systems, `sys/time.h' includes `time.h' but `time.h' is not - * protected against multiple inclusion, so programs should not explicitly - * include both files. This macro is useful in programs that use, for example, - * `struct timeval' or `struct timezone' as well as `struct tm'. It is best - * used in conjunction with `HAVE_SYS_TIME_H', whose existence is checked - * by `AC_CHECK_HEADERS(sys/time.h)' in configure.ac. - */ -#include -#ifdef H5_HAVE_SYS_TIME_H -#include -#endif - -/* - * Longjumps are used to detect alignment constrants - */ -#ifdef H5_HAVE_SETJMP_H -#include -#endif - /* * flock() in sys/file.h is used for the implementation of file locking. */ @@ -132,21 +86,6 @@ #include #endif -/* - * System information. These are needed on the DEC Alpha to turn off fixing - * of unaligned accesses by the operating system during detection of - * alignment constraints in H5detect.c:main(). - */ -#ifdef H5_HAVE_SYS_SYSINFO_H -#include -#endif -#ifdef H5_HAVE_SYS_PROC_H -#include -#endif -#ifdef H5_HAVE_IO_H -#include -#endif - /* * Dynamic library handling. These are needed for dynamically loading I/O * filters and VFDs. @@ -158,8 +97,14 @@ #include #endif -/* Define the default VFD for this platform. - * Since the removal of the Windows VFD, this is sec2 for all platforms. +/* Define the default VFD for this platform. Since the removal of the + * Windows VFD, this is sec2 for all platforms. + * + * Note well: if you change the default, then be sure to change + * H5_default_vfd_init() to call that default's initializer. Also, + * make sure that the initializer for each *non*-default VFD calls + * H5_init_library(); also, make sure that the initializer for default + * VFD does *not* call H5_init_library(). */ #define H5_DEFAULT_VFD H5FD_SEC2 @@ -167,52 +112,41 @@ #define H5_DEFAULT_VOL H5VL_NATIVE #ifdef H5_HAVE_WIN32_API + /* The following two defines must be before any windows headers are included */ #define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */ #define NOGDI /* Exclude Graphic Display Interface macros */ -#ifdef H5_HAVE_WINSOCK2_H -#include -#endif +#include + +#include /* For _getcwd() */ +#include /* POSIX I/O */ +#include /* For GetUserName() */ +#include /* For StrStrIA */ #ifdef H5_HAVE_THREADSAFE #include /* For _beginthread() */ #endif -#include -#include /* For _getcwd() */ - #endif /*H5_HAVE_WIN32_API*/ -/* Various ways that inline functions can be declared */ -#if defined(H5_HAVE___INLINE__) -/* GNU (alternative form) */ -#define H5_INLINE __inline__ -#elif defined(H5_HAVE___INLINE) -/* Visual Studio */ -#define H5_INLINE __inline -#elif defined(H5_HAVE_INLINE) -/* GNU, C++ - * Use "inline" as a last resort on the off-chance that there will - * be C++ problems. - */ -#define H5_INLINE inline -#else -#define H5_INLINE -#endif /* inline choices */ - #ifndef F_OK #define F_OK 00 #define W_OK 02 #define R_OK 04 #endif -/* - * dmalloc (debugging malloc) support +/* uthash is an external, header-only hash table implementation. + * + * We include the file directly in src/ and #define a few functions + * to use our internal memory calls. */ -#ifdef H5_HAVE_DMALLOC_H -#include "dmalloc.h" -#endif /* H5_HAVE_DMALLOC_H */ +#if 0 +#define uthash_malloc(sz) H5MM_malloc(sz) +#define uthash_free(ptr, sz) H5MM_free(ptr) /* Ignoring sz is intentional */ +#define HASH_NONFATAL_OOM 1 /* Don't abort() on out-of-memory */ +#include "uthash.h" +#endif /* * NT doesn't define SIGBUS, but since NT only runs on processors @@ -231,31 +165,105 @@ * Note that Solaris Studio supports attribute, but does not support the * attributes we use. * + * When using H5_ATTR_FALLTHROUGH, you should also include a comment that + * says FALLTHROUGH to reduce warnings on compilers that don't use + * attributes but do respect fall-through comments. + * * H5_ATTR_CONST is redefined in tools/h5repack/dynlib_rpk.c to quiet * gcc warnings (it has to use the public API and can't include this * file). Be sure to update that file if the #ifdefs change here. */ -#ifdef __cplusplus -#define H5_ATTR_FORMAT(X, Y, Z) /*void*/ -#define H5_ATTR_UNUSED /*void*/ -#define H5_ATTR_NORETURN /*void*/ -#define H5_ATTR_CONST /*void*/ -#define H5_ATTR_PURE /*void*/ -#else /* __cplusplus */ +/* clang-format off */ #if defined(H5_HAVE_ATTRIBUTE) && !defined(__SUNPRO_C) -#define H5_ATTR_FORMAT(X, Y, Z) __attribute__((format(X, Y, Z))) -#define H5_ATTR_UNUSED __attribute__((unused)) -#define H5_ATTR_NORETURN __attribute__((noreturn)) -#define H5_ATTR_CONST __attribute__((const)) -#define H5_ATTR_PURE __attribute__((pure)) +# define H5_ATTR_FORMAT(X, Y, Z) __attribute__((format(X, Y, Z))) +# define H5_ATTR_UNUSED __attribute__((unused)) + +# ifdef H5_HAVE_PARALLEL +# define H5_ATTR_PARALLEL_UNUSED __attribute__((unused)) +# define H5_ATTR_PARALLEL_USED /*void*/ +# else +# define H5_ATTR_PARALLEL_UNUSED /*void*/ +# define H5_ATTR_PARALLEL_USED __attribute__((unused)) +# endif + +# ifdef H5_NO_DEPRECATED_SYMBOLS +# define H5_ATTR_DEPRECATED_USED H5_ATTR_UNUSED +# else +# define H5_ATTR_DEPRECATED_USED /*void*/ +# endif + +# ifdef H5_DEBUG_API +# define H5_ATTR_DEBUG_API_USED /*void*/ +# else +# define H5_ATTR_DEBUG_API_USED H5_ATTR_UNUSED +# endif /* H5_DEBUG_API */ + +# ifndef NDEBUG +# define H5_ATTR_NDEBUG_UNUSED /*void*/ +# else +# define H5_ATTR_NDEBUG_UNUSED H5_ATTR_UNUSED +# endif + +# define H5_ATTR_NORETURN __attribute__((noreturn)) +# define H5_ATTR_CONST __attribute__((const)) +# define H5_ATTR_PURE __attribute__((pure)) + +# if defined(__clang__) || defined(__GNUC__) && __GNUC__ >= 7 && !defined(__INTEL_COMPILER) +# define H5_ATTR_FALLTHROUGH __attribute__((fallthrough)); +# else +# define H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ +# endif + +# if defined(__GNUC__) && !defined(__INTEL_COMPILER) +# define H5_ATTR_MALLOC __attribute__((malloc)) +# else +# define H5_ATTR_MALLOC /*void*/ +# endif + +/* Turns off optimizations for a function. Goes after the return type. + * Not generally needed in the library, but ancient versions of clang + * (7.3.3, possibly others) have trouble with some of the onion VFD decode + * functions and need the optimizer turned off. This macro can go away when + * we figure out what's going on and can engineer another solution. + */ +# if defined(__clang__) +# define H5_ATTR_NO_OPTIMIZE __attribute__((optnone)) +# else +# define H5_ATTR_NO_OPTIMIZE /*void*/ +# endif + #else -#define H5_ATTR_FORMAT(X, Y, Z) /*void*/ -#define H5_ATTR_UNUSED /*void*/ -#define H5_ATTR_NORETURN /*void*/ -#define H5_ATTR_CONST /*void*/ -#define H5_ATTR_PURE /*void*/ +# define H5_ATTR_FORMAT(X, Y, Z) /*void*/ +# define H5_ATTR_UNUSED /*void*/ +# define H5_ATTR_NDEBUG_UNUSED /*void*/ +# define H5_ATTR_DEBUG_API_USED /*void*/ +# define H5_ATTR_DEPRECATED_USED /*void*/ +# define H5_ATTR_PARALLEL_UNUSED /*void*/ +# define H5_ATTR_PARALLEL_USED /*void*/ +# define H5_ATTR_NORETURN /*void*/ +# define H5_ATTR_CONST /*void*/ +# define H5_ATTR_PURE /*void*/ +# define H5_ATTR_FALLTHROUGH /*void*/ +# define H5_ATTR_MALLOC /*void*/ +# define H5_ATTR_NO_OPTIMIZE /*void*/ +#endif +/* clang-format on */ + +/* + * Networking headers used by the mirror VFD and related tests and utilities. + */ +#ifdef H5_HAVE_ARPA_INET_H +#include +#endif +#ifdef H5_HAVE_NETDB_H +#include +#endif +#ifdef H5_HAVE_NETINET_IN_H +#include +#endif +#ifdef H5_HAVE_SYS_SOCKET_H +#include #endif -#endif /* __cplusplus */ /* * Status return values for the `herr_t' type. @@ -268,7 +276,14 @@ */ #define SUCCEED 0 #define FAIL (-1) -#define UFAIL (unsigned)(-1) + +/* The HDF5 library uses the symbol `ERR` frequently. So do + * header files for libraries such as curses(3), terminfo(3), etc. + * Remove its definition here to avoid clashes with HDF5. + */ +#ifdef ERR +#undef ERR +#endif /* number of members in an array */ #ifndef NELMTS @@ -309,6 +324,11 @@ /* Raise an integer to a power of 2 */ #define H5_EXP2(n) (1 << (n)) +/* Check if a read of size bytes starting at ptr would overflow past + * the last valid byte, pointed to by buffer_end. + */ +#define H5_IS_BUFFER_OVERFLOW(ptr, size, buffer_end) (((ptr) + (size)-1) > (buffer_end)) + /* * HDF Boolean type. */ @@ -320,96 +340,40 @@ #endif /* - * Numeric data types. Some of these might be defined in Posix.1g, otherwise - * we define them with the closest available type which is at least as large - * as the number of bits indicated in the type name. The `int8' types *must* - * be exactly one byte wide because we use it for pointer calculations to - * void* memory. - */ -#if H5_SIZEOF_INT8_T == 0 -typedef signed char int8_t; -#undef H5_SIZEOF_INT8_T -#define H5_SIZEOF_INT8_T H5_SIZEOF_CHAR -#elif H5_SIZEOF_INT8_T == 1 -#else -#error "the int8_t type must be 1 byte wide" -#endif - -#if H5_SIZEOF_UINT8_T == 0 -typedef unsigned char uint8_t; -#undef H5_SIZEOF_UINT8_T -#define H5_SIZEOF_UINT8_T H5_SIZEOF_CHAR -#elif H5_SIZEOF_UINT8_T == 1 -#else -#error "the uint8_t type must be 1 byte wide" -#endif - -#if H5_SIZEOF_INT16_T >= 2 -#elif H5_SIZEOF_SHORT >= 2 -typedef short int16_t; -#undef H5_SIZEOF_INT16_T -#define H5_SIZEOF_INT16_T H5_SIZEOF_SHORT -#elif H5_SIZEOF_INT >= 2 -typedef int int16_t; -#undef H5_SIZEOF_INT16_T -#define H5_SIZEOF_INT16_T H5_SIZEOF_INT -#else -#error "nothing appropriate for int16_t" -#endif - -#if H5_SIZEOF_UINT16_T >= 2 -#elif H5_SIZEOF_SHORT >= 2 -typedef unsigned short uint16_t; -#undef H5_SIZEOF_UINT16_T -#define H5_SIZEOF_UINT16_T H5_SIZEOF_SHORT -#elif H5_SIZEOF_INT >= 2 -typedef unsigned uint16_t; -#undef H5_SIZEOF_UINT16_T -#define H5_SIZEOF_UINT16_T H5_SIZEOF_INT -#else -#error "nothing appropriate for uint16_t" -#endif - -#if H5_SIZEOF_INT32_T >= 4 -#elif H5_SIZEOF_SHORT >= 4 -typedef short int32_t; -#undef H5_SIZEOF_INT32_T -#define H5_SIZEOF_INT32_T H5_SIZEOF_SHORT -#elif H5_SIZEOF_INT >= 4 -typedef int int32_t; -#undef H5_SIZEOF_INT32_T -#define H5_SIZEOF_INT32_T H5_SIZEOF_INT -#elif H5_SIZEOF_LONG >= 4 -typedef long int32_t; -#undef H5_SIZEOF_INT32_T -#define H5_SIZEOF_INT32_T H5_SIZEOF_LONG -#else -#error "nothing appropriate for int32_t" -#endif - -/* - * Maximum and minimum values. These should be defined in for the - * most part. + * The max value for ssize_t. + * + * Only needed where ssize_t isn't a thing (e.g., Windows) */ -#ifndef LLONG_MAX -#define LLONG_MAX ((long long)(((unsigned long long)1 << (8 * sizeof(long long) - 1)) - 1)) -#define LLONG_MIN ((long long)(-LLONG_MAX) - 1) -#endif -#ifndef ULLONG_MAX -#define ULLONG_MAX ((unsigned long long)((long long)(-1))) -#endif -#ifndef SIZET_MAX -#define SIZET_MAX ((size_t)(ssize_t)(-1)) -#define SSIZET_MAX ((ssize_t)(((size_t)1 << (8 * sizeof(ssize_t) - 1)) - 1)) +#ifndef SSIZE_MAX +#define SSIZE_MAX ((ssize_t)(((size_t)1 << (8 * sizeof(ssize_t) - 1)) - 1)) #endif /* - * Maximum & minimum values for our typedefs. + * Maximum & minimum values for HDF5 typedefs. */ #define HSIZET_MAX ((hsize_t)ULLONG_MAX) #define HSSIZET_MAX ((hssize_t)LLONG_MAX) #define HSSIZET_MIN (~(HSSIZET_MAX)) +#ifdef H5_HAVE_PARALLEL + +/* Define a type for safely sending size_t values with MPI */ +#if SIZE_MAX == UCHAR_MAX +#define H5_SIZE_T_AS_MPI_TYPE MPI_UNSIGNED_CHAR +#elif SIZE_MAX == USHRT_MAX +#define H5_SIZE_T_AS_MPI_TYPE MPI_UNSIGNED_SHORT +#elif SIZE_MAX == UINT_MAX +#define H5_SIZE_T_AS_MPI_TYPE MPI_UNSIGNED +#elif SIZE_MAX == ULONG_MAX +#define H5_SIZE_T_AS_MPI_TYPE MPI_UNSIGNED_LONG +#elif SIZE_MAX == ULLONG_MAX +#define H5_SIZE_T_AS_MPI_TYPE MPI_UNSIGNED_LONG_LONG +#else +#error "no suitable MPI type for size_t" +#endif + +#endif /* H5_HAVE_PARALLEL */ + /* * Types and max sizes for POSIX I/O. * OS X (Darwin) is odd since the max I/O size does not match the types. @@ -425,7 +389,7 @@ typedef long int32_t; #else #define h5_posix_io_t size_t #define h5_posix_io_ret_t ssize_t -#define H5_POSIX_MAX_IO_BYTES SSIZET_MAX +#define H5_POSIX_MAX_IO_BYTES SSIZE_MAX #endif /* POSIX I/O mode used as the third parameter to open/_open @@ -437,40 +401,11 @@ typedef long int32_t; #define H5_POSIX_CREATE_MODE_RW 0666 #endif -/* - * A macro to portably increment enumerated types. - */ -#ifndef H5_INC_ENUM -#define H5_INC_ENUM(TYPE, VAR) (VAR) = ((TYPE)((VAR) + 1)) -#endif - /* Represents an empty asynchronous request handle. * Used in the VOL code. */ #define H5_REQUEST_NULL NULL -/* - * A macro to portably decrement enumerated types. - */ -#ifndef H5_DEC_ENUM -#define H5_DEC_ENUM(TYPE, VAR) (VAR) = ((TYPE)((VAR)-1)) -#endif - -/* Double constant wrapper - * - * Quiets gcc warnings from -Wunsuffixed-float-constants. - * - * This is a really annoying warning since the standard specifies that - * constants of type double do NOT get a suffix so there's no way - * to specify a constant of type double. To quiet gcc, we specify floating - * point constants as type long double and cast to double. - * - * Note that this macro only needs to be used where using a double - * is important. For most code, suffixing constants with F will quiet the - * compiler and not produce erroneous code. - */ -#define H5_DOUBLE(S) ((double)S##L) - /* * Methods to compare the equality of floating-point values: * @@ -511,20 +446,90 @@ typedef long int32_t; #define LOCK_UN 0x08 #endif /* H5_HAVE_FLOCK */ -/* - * Data types and functions for timing certain parts of the library. +/* Macros for enabling/disabling particular GCC / clang warnings + * + * These are duplicated in H5FDmulti.c (we don't want to put them in the + * public header and the multi VFD can't use private headers). If you make + * changes here, be sure to update those as well. + * + * (see the following web-sites for more info: + * http://www.dbp-consulting.com/tutorials/SuppressingGCCWarnings.html + * http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas + */ +#define H5_DIAG_JOINSTR(x, y) x y +#define H5_DIAG_DO_PRAGMA(x) _Pragma(#x) +#define H5_DIAG_PRAGMA(x) H5_DIAG_DO_PRAGMA(GCC diagnostic x) + +#define H5_DIAG_OFF(x) H5_DIAG_PRAGMA(push) H5_DIAG_PRAGMA(ignored H5_DIAG_JOINSTR("-W", x)) +#define H5_DIAG_ON(x) H5_DIAG_PRAGMA(pop) + +/* Macros for enabling/disabling particular GCC-only warnings. + * These pragmas are only implemented usefully in gcc 4.6+ + */ +#if (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) +#define H5_GCC_DIAG_OFF(x) H5_DIAG_OFF(x) +#define H5_GCC_DIAG_ON(x) H5_DIAG_ON(x) +#else +#define H5_GCC_DIAG_OFF(x) +#define H5_GCC_DIAG_ON(x) +#endif + +/* Macros for enabling/disabling particular clang-only warnings. */ +#if defined(__clang__) +#define H5_CLANG_DIAG_OFF(x) H5_DIAG_OFF(x) +#define H5_CLANG_DIAG_ON(x) H5_DIAG_ON(x) +#else +#define H5_CLANG_DIAG_OFF(x) +#define H5_CLANG_DIAG_ON(x) +#endif + +/* Macros for enabling/disabling particular GCC / clang warnings. + * These macros should be used for warnings supported by both gcc and clang. + */ +#if (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) || defined(__clang__) +#define H5_GCC_CLANG_DIAG_OFF(x) H5_DIAG_OFF(x) +#define H5_GCC_CLANG_DIAG_ON(x) H5_DIAG_ON(x) +#else +#define H5_GCC_CLANG_DIAG_OFF(x) +#define H5_GCC_CLANG_DIAG_ON(x) +#endif + +/* Function pointer typedef for qsort */ +typedef int (*H5_sort_func_cb_t)(const void *, const void *); + +/* Typedefs and functions for timing certain parts of the library. */ + +/* A set of elapsed/user/system times emitted as a time point by the + * platform-independent timers. + */ +typedef struct { + double user; /* User time in seconds */ + double system; /* System time in seconds */ + double elapsed; /* Elapsed (wall clock) time in seconds */ +} H5_timevals_t; + +/* Timer structure for platform-independent timers */ typedef struct { - double utime; /*user time */ - double stime; /*system time */ - double etime; /*elapsed wall-clock time */ + H5_timevals_t initial; /* Current interval start time */ + H5_timevals_t final_interval; /* Last interval elapsed time */ + H5_timevals_t total; /* Total elapsed time for all intervals */ + hbool_t is_running; /* Whether timer is running */ } H5_timer_t; -H5_DLL void H5_timer_reset(H5_timer_t *timer); -H5_DLL void H5_timer_begin(H5_timer_t *timer); -H5_DLL void H5_timer_end(H5_timer_t *sum /*in,out*/, H5_timer_t *timer /*in,out*/); -H5_DLL void H5_bandwidth(char *buf /*out*/, double nbytes, double nseconds); -H5_DLL time_t H5_now(void); +/* Returns library bandwidth as a pretty string */ +H5_DLL void H5_bandwidth(char *buf /*out*/, size_t bufsize, double nbytes, double nseconds); + +/* Timer functionality */ +H5_DLL time_t H5_now(void); +H5_DLL uint64_t H5_now_usec(void); +H5_DLL herr_t H5_timer_init(H5_timer_t *timer /*in,out*/); +H5_DLL herr_t H5_timer_start(H5_timer_t *timer /*in,out*/); +H5_DLL herr_t H5_timer_stop(H5_timer_t *timer /*in,out*/); +H5_DLL herr_t H5_timer_get_times(H5_timer_t timer, H5_timevals_t *times /*in,out*/); +H5_DLL herr_t H5_timer_get_total_times(H5_timer_t timer, H5_timevals_t *times /*in,out*/); +H5_DLL char *H5_timer_get_time_string(double seconds); +H5_DLL char *H5_strcasestr(const char *haystack, const char *needle); /* Depth of object copy */ typedef enum { @@ -543,226 +548,236 @@ typedef struct { haddr_t addr; /* The unique address of the object's header in that file */ } H5_obj_t; -/* - * Redefine all the POSIX functions. We should never see a POSIX - * function (or any other non-HDF5 function) in the source! +#define H5_SIZEOF_H5_STAT_SIZE_T H5_SIZEOF_OFF_T + +/* Put all Windows-specific definitions in H5win32defs.h so we + * can (mostly) assume a POSIX platform. Not all of the POSIX calls + * will have a Windows equivalent so some #ifdef protection is still + * necessary (e.g., fork()). */ +#include "H5win32defs.h" -/* Put all platform-specific definitions in the following file */ -/* so that the following definitions are platform free. */ -#include "H5win32defs.h" /* For Windows-specific definitions */ +/* Platform-independent definitions for struct stat and off_t */ +#ifndef H5_HAVE_WIN32_API +/* These definitions differ in Windows and are defined in + * H5win32defs for that platform. + */ +typedef struct stat h5_stat_t; +typedef off_t h5_stat_size_t; +#define HDoff_t off_t +#endif + +/* Redefine all the POSIX and C functions. We should never see an + * undecorated POSIX or C function (or any other non-HDF5 function) + * in the source. + */ #ifndef HDabort #define HDabort() abort() -#endif /* HDabort */ +#endif #ifndef HDabs #define HDabs(X) abs(X) -#endif /* HDabs */ +#endif +#ifndef HDaccept +#define HDaccept(A, B, C) accept((A), (B), (C)) +#endif #ifndef HDaccess #define HDaccess(F, M) access(F, M) -#endif /* HDaccess */ +#endif #ifndef HDacos #define HDacos(X) acos(X) -#endif /* HDacos */ -#ifndef HDvasprintf -#ifdef H5_HAVE_VASPRINTF -#define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A) -#endif /* H5_HAVE_VASPRINTF */ -#endif /* HDvasprintf */ +#endif #ifndef HDalarm -#ifdef H5_HAVE_ALARM #define HDalarm(N) alarm(N) -#else /* H5_HAVE_ALARM */ -#define HDalarm(N) (0) -#endif /* H5_HAVE_ALARM */ -#endif /* HDalarm */ +#endif #ifndef HDasctime #define HDasctime(T) asctime(T) -#endif /* HDasctime */ +#endif #ifndef HDasin #define HDasin(X) asin(X) -#endif /* HDasin */ +#endif #ifndef HDasprintf #define HDasprintf asprintf /*varargs*/ -#endif /* HDasprintf */ +#endif #ifndef HDassert #define HDassert(X) assert(X) -#endif /* HDassert */ +#endif #ifndef HDatan #define HDatan(X) atan(X) -#endif /* HDatan */ +#endif #ifndef HDatan2 #define HDatan2(X, Y) atan2(X, Y) -#endif /* HDatan2 */ +#endif #ifndef HDatexit #define HDatexit(F) atexit(F) -#endif /* HDatexit */ +#endif #ifndef HDatof #define HDatof(S) atof(S) -#endif /* HDatof */ +#endif #ifndef HDatoi #define HDatoi(S) atoi(S) -#endif /* HDatoi */ +#endif #ifndef HDatol #define HDatol(S) atol(S) -#endif /* HDatol */ +#endif #ifndef HDatoll #define HDatoll(S) atoll(S) -#endif /* HDatol */ +#endif +#ifndef HDbind +#define HDbind(A, B, C) bind((A), (B), (C)) +#endif #ifndef HDbsearch #define HDbsearch(K, B, N, Z, F) bsearch(K, B, N, Z, F) -#endif /* HDbsearch */ +#endif #ifndef HDcalloc #define HDcalloc(N, Z) calloc(N, Z) -#endif /* HDcalloc */ +#endif #ifndef HDceil #define HDceil(X) ceil(X) -#endif /* HDceil */ +#endif #ifndef HDcfgetispeed #define HDcfgetispeed(T) cfgetispeed(T) -#endif /* HDcfgetispeed */ +#endif #ifndef HDcfgetospeed #define HDcfgetospeed(T) cfgetospeed(T) -#endif /* HDcfgetospeed */ +#endif #ifndef HDcfsetispeed #define HDcfsetispeed(T, S) cfsetispeed(T, S) -#endif /* HDcfsetispeed */ +#endif #ifndef HDcfsetospeed #define HDcfsetospeed(T, S) cfsetospeed(T, S) -#endif /* HDcfsetospeed */ +#endif #ifndef HDchdir #define HDchdir(S) chdir(S) -#endif /* HDchdir */ +#endif #ifndef HDchmod #define HDchmod(S, M) chmod(S, M) -#endif /* HDchmod */ +#endif #ifndef HDchown #define HDchown(S, O, G) chown(S, O, G) -#endif /* HDchown */ +#endif #ifndef HDclearerr #define HDclearerr(F) clearerr(F) -#endif /* HDclearerr */ +#endif #ifndef HDclock #define HDclock() clock() -#endif /* HDclock */ +#endif +#ifndef HDclock_gettime +#define HDclock_gettime(CID, TS) clock_gettime(CID, TS) +#endif #ifndef HDclose #define HDclose(F) close(F) -#endif /* HDclose */ +#endif #ifndef HDclosedir #define HDclosedir(D) closedir(D) -#endif /* HDclosedir */ +#endif +#ifndef HDconnect +#define HDconnect(A, B, C) connect((A), (B), (C)) +#endif #ifndef HDcos #define HDcos(X) cos(X) -#endif /* HDcos */ +#endif #ifndef HDcosh #define HDcosh(X) cosh(X) -#endif /* HDcosh */ +#endif #ifndef HDcreat #define HDcreat(S, M) creat(S, M) -#endif /* HDcreat */ +#endif #ifndef HDctermid #define HDctermid(S) ctermid(S) -#endif /* HDctermid */ +#endif #ifndef HDctime #define HDctime(T) ctime(T) -#endif /* HDctime */ +#endif #ifndef HDcuserid #define HDcuserid(S) cuserid(S) -#endif /* HDcuserid */ +#endif #ifndef HDdifftime -#ifdef H5_HAVE_DIFFTIME #define HDdifftime(X, Y) difftime(X, Y) -#else /* H5_HAVE_DIFFTIME */ -#define HDdifftime(X, Y) ((double)(X) - (double)(Y)) -#endif /* H5_HAVE_DIFFTIME */ -#endif /* HDdifftime */ +#endif #ifndef HDdiv #define HDdiv(X, Y) div(X, Y) -#endif /* HDdiv */ +#endif #ifndef HDdup #define HDdup(F) dup(F) -#endif /* HDdup */ +#endif #ifndef HDdup2 #define HDdup2(F, I) dup2(F, I) -#endif /* HDdup2 */ -/* execl() variable arguments */ -/* execle() variable arguments */ -/* execlp() variable arguments */ +#endif #ifndef HDexecv #define HDexecv(S, AV) execv(S, AV) -#endif /* HDexecv */ +#endif #ifndef HDexecve #define HDexecve(S, AV, E) execve(S, AV, E) -#endif /* HDexecve */ +#endif #ifndef HDexecvp #define HDexecvp(S, AV) execvp(S, AV) -#endif /* HDexecvp */ +#endif #ifndef HDexit #define HDexit(N) exit(N) -#endif /* HDexit */ +#endif #ifndef HD_exit #define HD_exit(N) _exit(N) -#endif /* HD_exit */ +#endif #ifndef HDexp #define HDexp(X) exp(X) -#endif /* HDexp */ +#endif #ifndef HDexp2 #define HDexp2(X) exp2(X) -#endif /* HDexp2 */ +#endif #ifndef HDfabs #define HDfabs(X) fabs(X) -#endif /* HDfabs */ -/* use ABS() because fabsf() fabsl() are not common yet. */ +#endif #ifndef HDfabsf -#define HDfabsf(X) ABS(X) -#endif /* HDfabsf */ +#define HDfabsf(X) fabsf(X) +#endif #ifndef HDfabsl -#define HDfabsl(X) ABS(X) -#endif /* HDfabsl */ +#define HDfabsl(X) fabsl(X) +#endif #ifndef HDfclose #define HDfclose(F) fclose(F) -#endif /* HDfclose */ -#ifdef H5_HAVE_FCNTL +#endif #ifndef HDfcntl #define HDfcntl(F, C, ...) fcntl(F, C, __VA_ARGS__) -#endif /* HDfcntl */ -#endif /* H5_HAVE_FCNTL */ +#endif #ifndef HDfdopen #define HDfdopen(N, S) fdopen(N, S) -#endif /* HDfdopen */ +#endif #ifndef HDfeof #define HDfeof(F) feof(F) -#endif /* HDfeof */ +#endif #ifndef HDferror #define HDferror(F) ferror(F) -#endif /* HDferror */ +#endif #ifndef HDfflush #define HDfflush(F) fflush(F) -#endif /* HDfflush */ +#endif #ifndef HDfgetc #define HDfgetc(F) fgetc(F) -#endif /* HDfgetc */ +#endif #ifndef HDfgetpos #define HDfgetpos(F, P) fgetpos(F, P) -#endif /* HDfgetpos */ +#endif #ifndef HDfgets #define HDfgets(S, N, F) fgets(S, N, F) -#endif /* HDfgets */ +#endif #ifndef HDfileno #define HDfileno(F) fileno(F) -#endif /* HDfileno */ +#endif + /* Since flock is so prevalent, always build these functions * when possible to avoid them becoming dead code. */ #ifdef H5_HAVE_FCNTL H5_DLL int Pflock(int fd, int operation); -#endif /* H5_HAVE_FCNTL */ +#endif H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation); + #ifndef HDflock /* NOTE: flock(2) is not present on all POSIX systems. * If it is not present, we try a flock() equivalent based on - * fcntl(2), then fall back to a function that always fails if - * it is not present at all (Windows uses a separate Wflock() + * fcntl(2), then fall back to a function that always succeeds + * if it is not present at all (Windows uses a separate Wflock() * function). */ #if defined(H5_HAVE_FLOCK) @@ -771,738 +786,853 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation); #define HDflock(F, L) Pflock(F, L) #else #define HDflock(F, L) Nflock(F, L) -#endif /* H5_HAVE_FLOCK */ +#endif + #endif /* HDflock */ + #ifndef HDfloor #define HDfloor(X) floor(X) -#endif /* HDfloor */ +#endif #ifndef HDfmod #define HDfmod(X, Y) fmod(X, Y) -#endif /* HDfmod */ +#endif #ifndef HDfopen #define HDfopen(S, M) fopen(S, M) -#endif /* HDfopen */ +#endif #ifndef HDfork #define HDfork() fork() -#endif /* HDfork */ +#endif #ifndef HDfprintf #define HDfprintf fprintf #endif #ifndef HDfpathconf #define HDfpathconf(F, N) fpathconf(F, N) -#endif /* HDfpathconf */ +#endif #ifndef HDfputc #define HDfputc(C, F) fputc(C, F) -#endif /* HDfputc */ +#endif #ifndef HDfputs #define HDfputs(S, F) fputs(S, F) -#endif /* HDfputs */ +#endif #ifndef HDfread #define HDfread(M, Z, N, F) fread(M, Z, N, F) -#endif /* HDfread */ +#endif #ifndef HDfree #define HDfree(M) free(M) -#endif /* HDfree */ +#endif #ifndef HDfreopen #define HDfreopen(S, M, F) freopen(S, M, F) -#endif /* HDfreopen */ +#endif #ifndef HDfrexp #define HDfrexp(X, N) frexp(X, N) -#endif /* HDfrexp */ -/* Check for Cray-specific 'frexpf()' and 'frexpl()' routines */ +#endif #ifndef HDfrexpf -#ifdef H5_HAVE_FREXPF #define HDfrexpf(X, N) frexpf(X, N) -#else /* H5_HAVE_FREXPF */ -#define HDfrexpf(X, N) frexp(X, N) -#endif /* H5_HAVE_FREXPF */ -#endif /* HDfrexpf */ +#endif #ifndef HDfrexpl -#ifdef H5_HAVE_FREXPL #define HDfrexpl(X, N) frexpl(X, N) -#else /* H5_HAVE_FREXPL */ -#define HDfrexpl(X, N) frexp(X, N) -#endif /* H5_HAVE_FREXPL */ -#endif /* HDfrexpl */ -/* fscanf() variable arguments */ +#endif +#ifndef HDfscanf +#define HDfscanf fscanf +#endif #ifndef HDfseek #define HDfseek(F, O, W) fseeko(F, O, W) -#endif /* HDfseek */ +#endif #ifndef HDfsetpos #define HDfsetpos(F, P) fsetpos(F, P) -#endif /* HDfsetpos */ +#endif #ifndef HDfstat #define HDfstat(F, B) fstat(F, B) -#endif /* HDfstat */ -#ifndef HDlstat -#define HDlstat(S, B) lstat(S, B) -#endif /* HDlstat */ -#ifndef HDstat -#define HDstat(S, B) stat(S, B) -#endif /* HDstat */ - -#ifndef H5_HAVE_WIN32_API -/* These definitions differ in Windows and are defined in - * H5win32defs for that platform. - */ -typedef struct stat h5_stat_t; -typedef off_t h5_stat_size_t; -#define HDoff_t off_t -#endif /* H5_HAVE_WIN32_API */ - -#define H5_SIZEOF_H5_STAT_SIZE_T H5_SIZEOF_OFF_T - +#endif #ifndef HDftell -#define HDftell(F) ftello(F) -#endif /* HDftell */ +#define HDftell(F) ftell(F) +#endif #ifndef HDftruncate #define HDftruncate(F, L) ftruncate(F, L) -#endif /* HDftruncate */ +#endif #ifndef HDfwrite #define HDfwrite(M, Z, N, F) fwrite(M, Z, N, F) -#endif /* HDfwrite */ +#endif #ifndef HDgetc #define HDgetc(F) getc(F) -#endif /* HDgetc */ +#endif #ifndef HDgetchar #define HDgetchar() getchar() -#endif /* HDgetchar */ +#endif #ifndef HDgetcwd #define HDgetcwd(S, Z) getcwd(S, Z) -#endif /* HDgetcwd */ +#endif #ifndef HDgetdcwd #define HDgetdcwd(D, S, Z) getcwd(S, Z) -#endif /* HDgetdcwd */ +#endif + +/* Windows only - set to zero on other systems */ #ifndef HDgetdrive #define HDgetdrive() 0 -#endif /* HDgetdrive */ +#endif + #ifndef HDgetegid #define HDgetegid() getegid() -#endif /* HDgetegid() */ +#endif #ifndef HDgetenv #define HDgetenv(S) getenv(S) -#endif /* HDgetenv */ +#endif #ifndef HDgeteuid #define HDgeteuid() geteuid() -#endif /* HDgeteuid */ +#endif #ifndef HDgetgid #define HDgetgid() getgid() -#endif /* HDgetgid */ +#endif #ifndef HDgetgrgid #define HDgetgrgid(G) getgrgid(G) -#endif /* HDgetgrgid */ +#endif #ifndef HDgetgrnam #define HDgetgrnam(S) getgrnam(S) -#endif /* HDgetgrnam */ +#endif #ifndef HDgetgroups #define HDgetgroups(Z, G) getgroups(Z, G) -#endif /* HDgetgroups */ +#endif +#ifndef HDgethostbyaddr +#define HDgethostbyaddr(A, B, C) gethostbyaddr((A), (B), (C)) +#endif #ifndef HDgethostname #define HDgethostname(N, L) gethostname(N, L) -#endif /* HDgetlogin */ -#ifndef HDgetlogin -#define HDgetlogin() getlogin() -#endif /* HDgetlogin */ +#endif #ifndef HDgetpgrp #define HDgetpgrp() getpgrp() -#endif /* HDgetpgrp */ +#endif #ifndef HDgetpid #define HDgetpid() getpid() -#endif /* HDgetpid */ +#endif #ifndef HDgetppid #define HDgetppid() getppid() -#endif /* HDgetppid */ +#endif #ifndef HDgetpwnam #define HDgetpwnam(S) getpwnam(S) -#endif /* HDgetpwnam */ +#endif #ifndef HDgetpwuid #define HDgetpwuid(U) getpwuid(U) -#endif /* HDgetpwuid */ +#endif #ifndef HDgetrusage #define HDgetrusage(X, S) getrusage(X, S) -#endif /* HDgetrusage */ -#ifndef HDgets -#define HDgets(S) gets(S) -#endif /* HDgets */ +#endif + +/* Don't define HDgets - gets() was deprecated in C99 and removed in C11 */ +#ifdef HDgets +#undef HDgets +#endif + #ifndef HDgettimeofday #define HDgettimeofday(S, P) gettimeofday(S, P) -#endif /* HDgettimeofday */ +#endif #ifndef HDgetuid #define HDgetuid() getuid() -#endif /* HDgetuid */ +#endif #ifndef HDgmtime #define HDgmtime(T) gmtime(T) -#endif /* HDgmtime */ +#endif +#ifndef HDhtonl +#define HDhtonl(X) htonl((X)) +#endif +#ifndef HDhtons +#define HDhtons(X) htons((X)) +#endif +#ifndef HDinet_addr +#define HDinet_addr(C) inet_addr((C)) +#endif +#ifndef HDinet_ntoa +#define HDinet_ntoa(C) inet_ntoa((C)) +#endif #ifndef HDisalnum -#define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/ -#endif /* HDisalnum */ +#define HDisalnum(C) isalnum((int)(C)) /* Cast for Solaris warning */ +#endif #ifndef HDisalpha -#define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/ -#endif /* HDisalpha */ +#define HDisalpha(C) isalpha((int)(C)) /* Cast for Solaris warning */ +#endif #ifndef HDisatty #define HDisatty(F) isatty(F) -#endif /* HDisatty */ +#endif #ifndef HDiscntrl -#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ -#endif /* HDiscntrl */ +#define HDiscntrl(C) iscntrl((int)(C)) /* Cast for solaris warning */ +#endif #ifndef HDisdigit -#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ -#endif /* HDisdigit */ +#define HDisdigit(C) isdigit((int)(C)) /* Cast for Solaris warning */ +#endif #ifndef HDisgraph -#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ -#endif /* HDisgraph */ +#define HDisgraph(C) isgraph((int)(C)) /* Cast for Solaris warning*/ +#endif #ifndef HDislower -#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ -#endif /* HDislower */ +#define HDislower(C) islower((int)(C)) /* Cast for Solaris warning */ +#endif +#ifndef HDisnan +#define HDisnan(X) isnan(X) +#endif #ifndef HDisprint -#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ -#endif /* HDisprint */ +#define HDisprint(C) isprint((int)(C)) /* Cast for Solaris warning */ +#endif #ifndef HDispunct -#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ -#endif /* HDispunct */ +#define HDispunct(C) ispunct((int)(C)) /* Cast for Solaris warning */ +#endif #ifndef HDisspace -#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ -#endif /* HDisspace */ +#define HDisspace(C) isspace((int)(C)) /* Cast for Solaris warning */ +#endif #ifndef HDisupper -#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ -#endif /* HDisupper */ +#define HDisupper(C) isupper((int)(C)) /* Cast for Solaris warning */ +#endif #ifndef HDisxdigit -#define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/ -#endif /* HDisxdigit */ +#define HDisxdigit(C) isxdigit((int)(C)) /* Cast for Solaris warning */ +#endif #ifndef HDkill #define HDkill(P, S) kill(P, S) -#endif /* HDkill */ +#endif #ifndef HDlabs #define HDlabs(X) labs(X) -#endif /* HDlabs */ +#endif #ifndef HDldexp #define HDldexp(X, N) ldexp(X, N) -#endif /* HDldexp */ +#endif #ifndef HDldiv #define HDldiv(X, Y) ldiv(X, Y) -#endif /* HDldiv */ +#endif #ifndef HDlink #define HDlink(OLD, NEW) link(OLD, NEW) -#endif /* HDlink */ +#endif +#ifndef HDlisten +#define HDlisten(A, B) listen((A), (B)) +#endif #ifndef HDllround #define HDllround(V) llround(V) -#endif /* HDround */ +#endif #ifndef HDllroundf #define HDllroundf(V) llroundf(V) -#endif /* HDllroundf */ +#endif #ifndef HDllroundl #define HDllroundl(V) llroundl(V) -#endif /* HDllroundl */ +#endif #ifndef HDlocaleconv #define HDlocaleconv() localeconv() -#endif /* HDlocaleconv */ +#endif #ifndef HDlocaltime #define HDlocaltime(T) localtime(T) -#endif /* HDlocaltime */ +#endif #ifndef HDlog #define HDlog(X) log(X) -#endif /* HDlog */ +#endif +#ifndef HDlog2 +#define HDlog2(X) log2(X) +#endif #ifndef HDlog10 #define HDlog10(X) log10(X) -#endif /* HDlog10 */ +#endif #ifndef HDlongjmp #define HDlongjmp(J, N) longjmp(J, N) -#endif /* HDlongjmp */ +#endif #ifndef HDlround #define HDlround(V) lround(V) -#endif /* HDround */ +#endif #ifndef HDlroundf #define HDlroundf(V) lroundf(V) -#endif /* HDlroundf */ +#endif #ifndef HDlroundl #define HDlroundl(V) lroundl(V) -#endif /* HDroundl */ +#endif #ifndef HDlseek #define HDlseek(F, O, W) lseek(F, O, W) -#endif /* HDlseek */ +#endif +#ifndef HDlstat +#define HDlstat(S, B) lstat(S, B) +#endif #ifndef HDmalloc #define HDmalloc(Z) malloc(Z) -#endif /* HDmalloc */ +#endif #ifndef HDposix_memalign #define HDposix_memalign(P, A, Z) posix_memalign(P, A, Z) -#endif /* HDposix_memalign */ +#endif #ifndef HDmblen #define HDmblen(S, N) mblen(S, N) -#endif /* HDmblen */ +#endif #ifndef HDmbstowcs #define HDmbstowcs(P, S, Z) mbstowcs(P, S, Z) -#endif /* HDmbstowcs */ +#endif #ifndef HDmbtowc #define HDmbtowc(P, S, Z) mbtowc(P, S, Z) -#endif /* HDmbtowc */ +#endif #ifndef HDmemchr #define HDmemchr(S, C, Z) memchr(S, C, Z) -#endif /* HDmemchr */ +#endif #ifndef HDmemcmp #define HDmemcmp(X, Y, Z) memcmp(X, Y, Z) -#endif /* HDmemcmp */ -/* - * The (char*) casts are required for the DEC when optimizations are turned - * on and the source and/or destination are not aligned. - */ +#endif #ifndef HDmemcpy -#define HDmemcpy(X, Y, Z) memcpy((char *)(X), (const char *)(Y), Z) -#endif /* HDmemcpy */ +#define HDmemcpy(X, Y, Z) memcpy(X, Y, Z) +#endif #ifndef HDmemmove #define HDmemmove(X, Y, Z) memmove((char *)(X), (const char *)(Y), Z) -#endif /* HDmemmove */ +#endif #ifndef HDmemset #define HDmemset(X, C, Z) memset(X, C, Z) -#endif /* HDmemset */ +#endif #ifndef HDmkdir #define HDmkdir(S, M) mkdir(S, M) -#endif /* HDmkdir */ +#endif #ifndef HDmkfifo #define HDmkfifo(S, M) mkfifo(S, M) -#endif /* HDmkfifo */ +#endif #ifndef HDmktime #define HDmktime(T) mktime(T) -#endif /* HDmktime */ +#endif #ifndef HDmodf #define HDmodf(X, Y) modf(X, Y) -#endif /* HDmodf */ +#endif #ifndef HDnanosleep #define HDnanosleep(N, O) nanosleep(N, O) -#endif /* HDnanosleep */ +#endif +#ifndef HDntohl +#define HDntohl(A) ntohl((A)) +#endif +#ifndef HDntohs +#define HDntohs(A) ntohs((A)) +#endif #ifndef HDopen #define HDopen(F, ...) open(F, __VA_ARGS__) -#endif /* HDopen */ +#endif #ifndef HDopendir #define HDopendir(S) opendir(S) -#endif /* HDopendir */ +#endif #ifndef HDpathconf #define HDpathconf(S, N) pathconf(S, N) -#endif /* HDpathconf */ +#endif #ifndef HDpause #define HDpause() pause() -#endif /* HDpause */ +#endif #ifndef HDperror #define HDperror(S) perror(S) -#endif /* HDperror */ +#endif #ifndef HDpipe #define HDpipe(F) pipe(F) -#endif /* HDpipe */ +#endif #ifndef HDpow #define HDpow(X, Y) pow(X, Y) -#endif /* HDpow */ +#endif #ifndef HDpowf #define HDpowf(X, Y) powf(X, Y) -#endif /* HDpowf */ +#endif #ifndef HDpread #define HDpread(F, B, C, O) pread(F, B, C, O) -#endif /* HDpread */ +#endif #ifndef HDprintf -#define HDprintf printf -#endif /* HDprintf */ +#define HDprintf printf /*varargs*/ +#endif #ifndef HDputc #define HDputc(C, F) putc(C, F) -#endif /* HDputc*/ +#endif #ifndef HDputchar #define HDputchar(C) putchar(C) -#endif /* HDputchar */ +#endif #ifndef HDputs #define HDputs(S) puts(S) -#endif /* HDputs */ +#endif #ifndef HDpwrite #define HDpwrite(F, B, C, O) pwrite(F, B, C, O) -#endif /* HDpwrite */ +#endif #ifndef HDqsort #define HDqsort(M, N, Z, F) qsort(M, N, Z, F) -#endif /* HDqsort*/ +#endif #ifndef HDraise #define HDraise(N) raise(N) -#endif /* HDraise */ +#endif +/* clang-format off */ #ifdef H5_HAVE_RAND_R -#ifndef HDrandom -#define HDrandom() HDrand() -#endif /* HDrandom */ -H5_DLL int HDrand(void); -#elif H5_HAVE_RANDOM -#ifndef HDrand -#define HDrand() random() -#endif /* HDrand */ -#ifndef HDrandom -#define HDrandom() random() -#endif /* HDrandom */ -#else /* H5_HAVE_RANDOM */ -#ifndef HDrand -#define HDrand() rand() -#endif /* HDrand */ -#ifndef HDrandom -#define HDrandom() rand() -#endif /* HDrandom */ -#endif /* H5_HAVE_RANDOM */ +# ifndef HDrandom +# define HDrandom() HDrand() +# endif + H5_DLL int HDrand(void); +# ifndef HDsrandom +# define HDsrandom(S) HDsrand(S) +# endif + H5_DLL void HDsrand(unsigned int seed); +#elif defined(H5_HAVE_RANDOM) +# ifndef HDrand +# define HDrand() random() +# endif +# ifndef HDrandom +# define HDrandom() random() +# endif +# ifndef HDsrand +# define HDsrand(S) srandom(S) +# endif +# ifndef HDsrandom +# define HDsrandom(S) srandom(S) +# endif +#else +# ifndef HDrand +# define HDrand() rand() +# endif +# ifndef HDrandom +# define HDrandom() rand() +# endif +# ifndef HDsrand +# define HDsrand(S) srand(S) +# endif +# ifndef HDsrandom +# define HDsrandom(S) srand(S) +# endif +#endif +/* clang-format on */ #ifndef HDread #define HDread(F, M, Z) read(F, M, Z) -#endif /* HDread */ +#endif #ifndef HDreaddir #define HDreaddir(D) readdir(D) -#endif /* HDreaddir */ +#endif #ifndef HDrealloc #define HDrealloc(M, Z) realloc(M, Z) -#endif /* HDrealloc */ +#endif #ifndef HDrealpath #define HDrealpath(F1, F2) realpath(F1, F2) -#endif /* HDrealloc */ +#endif #ifndef HDremove #define HDremove(S) remove(S) -#endif /* HDremove */ +#endif #ifndef HDrename #define HDrename(OLD, NEW) rename(OLD, NEW) -#endif /* HDrename */ +#endif #ifndef HDrewind #define HDrewind(F) rewind(F) -#endif /* HDrewind */ +#endif #ifndef HDrewinddir #define HDrewinddir(D) rewinddir(D) -#endif /* HDrewinddir */ +#endif #ifndef HDround #define HDround(V) round(V) -#endif /* HDround */ +#endif #ifndef HDroundf #define HDroundf(V) roundf(V) -#endif /* HDroundf */ +#endif #ifndef HDroundl #define HDroundl(V) roundl(V) -#endif /* HDroundl */ +#endif #ifndef HDrmdir #define HDrmdir(S) rmdir(S) -#endif /* HDrmdir */ -/* scanf() variable arguments */ +#endif +#ifndef HDscanf +#define HDscanf scanf /*varargs*/ +#endif #ifndef HDselect #define HDselect(N, RD, WR, ER, T) select(N, RD, WR, ER, T) -#endif /* HDsetbuf */ +#endif #ifndef HDsetbuf #define HDsetbuf(F, S) setbuf(F, S) -#endif /* HDsetbuf */ +#endif #ifndef HDsetenv #define HDsetenv(N, V, O) setenv(N, V, O) -#endif /* HDsetenv */ +#endif #ifndef HDsetgid #define HDsetgid(G) setgid(G) -#endif /* HDsetgid */ +#endif #ifndef HDsetjmp #define HDsetjmp(J) setjmp(J) -#endif /* HDsetjmp */ +#endif #ifndef HDsetlocale #define HDsetlocale(N, S) setlocale(N, S) -#endif /* HDsetlocale */ +#endif #ifndef HDsetpgid #define HDsetpgid(P, PG) setpgid(P, PG) -#endif /* HDsetpgid */ +#endif #ifndef HDsetsid #define HDsetsid() setsid() -#endif /* HDsetsid */ +#endif +#ifndef HDsetsockopt +#define HDsetsockopt(A, B, C, D, E) setsockopt((A), (B), (C), (D), (E)) +#endif #ifndef HDsetuid #define HDsetuid(U) setuid(U) -#endif /* HDsetuid */ +#endif #ifndef HDsetvbuf #define HDsetvbuf(F, S, M, Z) setvbuf(F, S, M, Z) -#endif /* HDsetvbuf */ +#endif +#ifndef HDshutdown +#define HDshutdown(A, B) shutdown((A), (B)) +#endif +#ifndef HDsigaction +#define HDsigaction(S, A, O) sigaction((S), (A), (O)) +#endif #ifndef HDsigaddset #define HDsigaddset(S, N) sigaddset(S, N) -#endif /* HDsigaddset */ +#endif #ifndef HDsigdelset #define HDsigdelset(S, N) sigdelset(S, N) -#endif /* HDsigdelset */ +#endif #ifndef HDsigemptyset #define HDsigemptyset(S) sigemptyset(S) -#endif /* HDsigemptyset */ +#endif #ifndef HDsigfillset #define HDsigfillset(S) sigfillset(S) -#endif /* HDsigfillset */ +#endif #ifndef HDsigismember #define HDsigismember(S, N) sigismember(S, N) -#endif /* HDsigismember */ +#endif #ifndef HDsiglongjmp #define HDsiglongjmp(J, N) siglongjmp(J, N) -#endif /* HDsiglongjmp */ +#endif #ifndef HDsignal #define HDsignal(N, F) signal(N, F) -#endif /* HDsignal */ +#endif #ifndef HDsigpending #define HDsigpending(S) sigpending(S) -#endif /* HDsigpending */ +#endif #ifndef HDsigprocmask #define HDsigprocmask(H, S, O) sigprocmask(H, S, O) -#endif /* HDsigprocmask */ +#endif #ifndef HDsigsetjmp #define HDsigsetjmp(J, N) sigsetjmp(J, N) -#endif /* HDsigsetjmp */ +#endif #ifndef HDsigsuspend #define HDsigsuspend(S) sigsuspend(S) -#endif /* HDsigsuspend */ +#endif #ifndef HDsin #define HDsin(X) sin(X) -#endif /* HDsin */ +#endif #ifndef HDsinh #define HDsinh(X) sinh(X) -#endif /* HDsinh */ +#endif #ifndef HDsleep #define HDsleep(N) sleep(N) -#endif /* HDsleep */ +#endif #ifndef HDsnprintf #define HDsnprintf snprintf /*varargs*/ -#endif /* HDsnprintf */ +#endif +#ifndef HDsocket +#define HDsocket(A, B, C) socket((A), (B), (C)) +#endif #ifndef HDsprintf #define HDsprintf sprintf /*varargs*/ -#endif /* HDsprintf */ +#endif #ifndef HDsqrt #define HDsqrt(X) sqrt(X) -#endif /* HDsqrt */ -#ifdef H5_HAVE_RAND_R -H5_DLL void HDsrand(unsigned int seed); -#ifndef HDsrandom -#define HDsrandom(S) HDsrand(S) -#endif /* HDsrandom */ -#elif H5_HAVE_RANDOM -#ifndef HDsrand -#define HDsrand(S) srandom(S) -#endif /* HDsrand */ -#ifndef HDsrandom -#define HDsrandom(S) srandom(S) -#endif /* HDsrandom */ -#else /* H5_HAVE_RAND_R */ -#ifndef HDsrand -#define HDsrand(S) srand(S) -#endif /* HDsrand */ -#ifndef HDsrandom -#define HDsrandom(S) srand(S) -#endif /* HDsrandom */ -#endif /* H5_HAVE_RAND_R */ +#endif #ifndef HDsscanf -#define HDsscanf(S, FMT, ...) sscanf(S, FMT, __VA_ARGS__) -#endif /* HDsscanf */ +#define HDsscanf sscanf /*varargs*/ +#endif +#ifndef HDstat +#define HDstat(S, B) stat(S, B) +#endif #ifndef HDstrcat #define HDstrcat(X, Y) strcat(X, Y) -#endif /* HDstrcat */ +#endif +#ifndef HDstrcasestr +#if defined(H5_HAVE_STRCASESTR) +#define HDstrcasestr(X, Y) strcasestr(X, Y) +#else +#define HDstrcasestr(X, Y) H5_strcasestr(X, Y) +#endif +#endif #ifndef HDstrchr #define HDstrchr(S, C) strchr(S, C) -#endif /* HDstrchr */ +#endif #ifndef HDstrcmp #define HDstrcmp(X, Y) strcmp(X, Y) -#endif /* HDstrcmp */ +#endif #ifndef HDstrcasecmp #define HDstrcasecmp(X, Y) strcasecmp(X, Y) -#endif /* HDstrcasecmp */ +#endif #ifndef HDstrcoll #define HDstrcoll(X, Y) strcoll(X, Y) -#endif /* HDstrcoll */ +#endif #ifndef HDstrcpy #define HDstrcpy(X, Y) strcpy(X, Y) -#endif /* HDstrcpy */ +#endif #ifndef HDstrcspn #define HDstrcspn(X, Y) strcspn(X, Y) -#endif /* HDstrcspn */ +#endif +#ifndef HDstrdup +#define HDstrdup(S) strdup(S) +#endif #ifndef HDstrerror #define HDstrerror(N) strerror(N) -#endif /* HDstrerror */ +#endif #ifndef HDstrftime #define HDstrftime(S, Z, F, T) strftime(S, Z, F, T) -#endif /* HDstrftime */ +#endif #ifndef HDstrlen #define HDstrlen(S) strlen(S) -#endif /* HDstrlen */ +#endif +#ifndef HDstrnlen +#define HDstrnlen(S, L) strnlen(S, L) +#endif #ifndef HDstrncat #define HDstrncat(X, Y, Z) strncat(X, Y, Z) -#endif /* HDstrncat */ +#endif #ifndef HDstrncmp #define HDstrncmp(X, Y, Z) strncmp(X, Y, Z) -#endif /* HDstrncmp */ +#endif #ifndef HDstrncpy #define HDstrncpy(X, Y, Z) strncpy(X, Y, Z) -#endif /* HDstrncpy */ +#endif +#ifndef HDstrndup +#define HDstrndup(S, N) strndup(S, N) +#endif #ifndef HDstrpbrk #define HDstrpbrk(X, Y) strpbrk(X, Y) -#endif /* HDstrpbrk */ +#endif #ifndef HDstrrchr #define HDstrrchr(S, C) strrchr(S, C) -#endif /* HDstrrchr */ +#endif #ifndef HDstrspn #define HDstrspn(X, Y) strspn(X, Y) -#endif /* HDstrspn */ +#endif #ifndef HDstrstr #define HDstrstr(X, Y) strstr(X, Y) -#endif /* HDstrstr */ +#endif #ifndef HDstrtod #define HDstrtod(S, R) strtod(S, R) -#endif /* HDstrtod */ +#endif #ifndef HDstrtok #define HDstrtok(X, Y) strtok(X, Y) -#endif /* HDstrtok */ +#endif #ifndef HDstrtok_r #define HDstrtok_r(X, Y, Z) strtok_r(X, Y, Z) -#endif /* HDstrtok */ +#endif #ifndef HDstrtol #define HDstrtol(S, R, N) strtol(S, R, N) -#endif /* HDstrtol */ +#endif #ifndef HDstrtoll -#ifdef H5_HAVE_STRTOLL #define HDstrtoll(S, R, N) strtoll(S, R, N) -#else -H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base); -#endif /* H5_HAVE_STRTOLL */ -#endif /* HDstrtoll */ +#endif #ifndef HDstrtoul #define HDstrtoul(S, R, N) strtoul(S, R, N) -#endif /* HDstrtoul */ +#endif #ifndef HDstrtoull #define HDstrtoull(S, R, N) strtoull(S, R, N) -#endif /* HDstrtoul */ +#endif +#ifndef HDstrtoumax +#define HDstrtoumax(S, R, N) strtoumax(S, R, N) +#endif #ifndef HDstrxfrm #define HDstrxfrm(X, Y, Z) strxfrm(X, Y, Z) -#endif /* HDstrxfrm */ -#ifdef H5_HAVE_SYMLINK +#endif #ifndef HDsymlink #define HDsymlink(F1, F2) symlink(F1, F2) -#endif /* HDsymlink */ -#endif /* H5_HAVE_SYMLINK */ +#endif #ifndef HDsysconf #define HDsysconf(N) sysconf(N) -#endif /* HDsysconf */ +#endif #ifndef HDsystem #define HDsystem(S) system(S) -#endif /* HDsystem */ +#endif #ifndef HDtan #define HDtan(X) tan(X) -#endif /* HDtan */ +#endif #ifndef HDtanh #define HDtanh(X) tanh(X) -#endif /* HDtanh */ +#endif #ifndef HDtcdrain #define HDtcdrain(F) tcdrain(F) -#endif /* HDtcdrain */ +#endif #ifndef HDtcflow #define HDtcflow(F, A) tcflow(F, A) -#endif /* HDtcflow */ +#endif #ifndef HDtcflush #define HDtcflush(F, N) tcflush(F, N) -#endif /* HDtcflush */ +#endif #ifndef HDtcgetattr #define HDtcgetattr(F, T) tcgetattr(F, T) -#endif /* HDtcgetattr */ +#endif #ifndef HDtcgetpgrp #define HDtcgetpgrp(F) tcgetpgrp(F) -#endif /* HDtcgetpgrp */ +#endif #ifndef HDtcsendbreak #define HDtcsendbreak(F, N) tcsendbreak(F, N) -#endif /* HDtcsendbreak */ +#endif #ifndef HDtcsetattr #define HDtcsetattr(F, O, T) tcsetattr(F, O, T) -#endif /* HDtcsetattr */ +#endif #ifndef HDtcsetpgrp #define HDtcsetpgrp(F, N) tcsetpgrp(F, N) -#endif /* HDtcsetpgrp */ +#endif #ifndef HDtime #define HDtime(T) time(T) -#endif /* HDtime */ +#endif #ifndef HDtimes #define HDtimes(T) times(T) -#endif /* HDtimes*/ +#endif #ifndef HDtmpfile #define HDtmpfile() tmpfile() -#endif /* HDtmpfile */ +#endif #ifndef HDtmpnam #define HDtmpnam(S) tmpnam(S) -#endif /* HDtmpnam */ +#endif #ifndef HDtolower #define HDtolower(C) tolower(C) -#endif /* HDtolower */ +#endif #ifndef HDtoupper #define HDtoupper(C) toupper(C) -#endif /* HDtoupper */ +#endif #ifndef HDttyname #define HDttyname(F) ttyname(F) -#endif /* HDttyname */ +#endif #ifndef HDtzset #define HDtzset() tzset() -#endif /* HDtzset */ +#endif #ifndef HDumask #define HDumask(N) umask(N) -#endif /* HDumask */ +#endif #ifndef HDuname #define HDuname(S) uname(S) -#endif /* HDuname */ +#endif #ifndef HDungetc #define HDungetc(C, F) ungetc(C, F) -#endif /* HDungetc */ +#endif #ifndef HDunlink #define HDunlink(S) unlink(S) -#endif /* HDunlink */ +#endif +#ifndef HDunsetenv +#define HDunsetenv(S) unsetenv(S) +#endif #ifndef HDutime #define HDutime(S, T) utime(S, T) -#endif /* HDutime */ +#endif + +#ifndef HDvasprintf +#ifdef H5_HAVE_VASPRINTF +#define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A) +#else +H5_DLL int HDvasprintf(char **bufp, const char *fmt, va_list _ap); +#endif +#endif + #ifndef HDva_arg #define HDva_arg(A, T) va_arg(A, T) -#endif /* HDva_arg */ +#endif #ifndef HDva_copy #define HDva_copy(D, S) va_copy(D, S) -#endif /* HDva_copy */ +#endif #ifndef HDva_end #define HDva_end(A) va_end(A) -#endif /* HDva_end */ +#endif #ifndef HDva_start #define HDva_start(A, P) va_start(A, P) -#endif /* HDva_start */ +#endif #ifndef HDvfprintf #define HDvfprintf(F, FMT, A) vfprintf(F, FMT, A) -#endif /* HDvfprintf */ +#endif #ifndef HDvprintf #define HDvprintf(FMT, A) vprintf(FMT, A) -#endif /* HDvprintf */ +#endif #ifndef HDvsprintf #define HDvsprintf(S, FMT, A) vsprintf(S, FMT, A) -#endif /* HDvsprintf */ +#endif #ifndef HDvsnprintf #define HDvsnprintf(S, N, FMT, A) vsnprintf(S, N, FMT, A) -#endif /* HDvsnprintf */ +#endif #ifndef HDwait #define HDwait(W) wait(W) -#endif /* HDwait */ +#endif #ifndef HDwaitpid #define HDwaitpid(P, W, O) waitpid(P, W, O) -#endif /* HDwaitpid */ +#endif #ifndef HDwcstombs #define HDwcstombs(S, P, Z) wcstombs(S, P, Z) -#endif /* HDwcstombs */ +#endif #ifndef HDwctomb #define HDwctomb(S, C) wctomb(S, C) -#endif /* HDwctomb */ +#endif #ifndef HDwrite #define HDwrite(F, M, Z) write(F, M, Z) -#endif /* HDwrite */ +#endif + +/* Macro for "stringizing" an integer in the C preprocessor (use H5_TOSTRING) */ +/* (use H5_TOSTRING, H5_STRINGIZE is just part of the implementation) */ +#define H5_STRINGIZE(x) #x +#define H5_TOSTRING(x) H5_STRINGIZE(x) + +/* Macro for "glueing" together items, for re-scanning macros */ +#define H5_GLUE(x, y) x##y +#define H5_GLUE3(x, y, z) x##y##z +#define H5_GLUE4(w, x, y, z) w##x##y##z /* - * And now for a couple non-Posix functions... Watch out for systems that - * define these in terms of macros. + * A macro for detecting over/under-flow when casting between types */ -#if !defined strdup && !defined H5_HAVE_STRDUP -extern char *strdup(const char *s); -#endif +#ifndef NDEBUG +#define H5_CHECK_OVERFLOW(var, vartype, casttype) \ + { \ + casttype _tmp_overflow = (casttype)(var); \ + HDassert((var) == (vartype)_tmp_overflow); \ + } +#else /* NDEBUG */ +#define H5_CHECK_OVERFLOW(var, vartype, casttype) +#endif /* NDEBUG */ -#ifndef HDstrdup -#define HDstrdup(S) strdup(S) -#endif /* HDstrdup */ +/* + * A macro for detecting over/under-flow when assigning between types + */ +#ifndef NDEBUG +#define ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype) \ + { \ + srctype _tmp_src = (srctype)(src); \ + dsttype _tmp_dst = (dsttype)(_tmp_src); \ + HDassert(_tmp_src == (srctype)_tmp_dst); \ + (dst) = _tmp_dst; \ + } -#ifndef HDpthread_self -#define HDpthread_self() pthread_self() -#endif /* HDpthread_self */ +#define ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype) (dst) = (dsttype)(src); -/* Use this version of pthread_self for printing the thread ID */ -#ifndef HDpthread_self_ulong -#define HDpthread_self_ulong() ((unsigned long)pthread_self()) -#endif /* HDpthread_self_ulong */ +#define ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype) \ + { \ + srctype _tmp_src = (srctype)(src); \ + dsttype _tmp_dst = (dsttype)(_tmp_src); \ + HDassert(_tmp_src >= 0); \ + HDassert(_tmp_src == (srctype)_tmp_dst); \ + (dst) = _tmp_dst; \ + } + +#define ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype) (dst) = (dsttype)(src); + +#define ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype) \ + { \ + srctype _tmp_src = (srctype)(src); \ + dsttype _tmp_dst = (dsttype)(_tmp_src); \ + HDassert(_tmp_dst >= 0); \ + HDassert(_tmp_src == (srctype)_tmp_dst); \ + (dst) = _tmp_dst; \ + } + +#define ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype) \ + { \ + srctype _tmp_src = (srctype)(src); \ + dsttype _tmp_dst = (dsttype)(_tmp_src); \ + HDassert(_tmp_src >= 0); \ + HDassert(_tmp_src == (srctype)_tmp_dst); \ + (dst) = _tmp_dst; \ + } + +#define ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype) (dst) = (dsttype)(src); /* Include the generated overflow header file */ #include "H5overflow.h" +/* Assign a variable to one of a different size (think safer dst = (dsttype)src"). + * The code generated by the macro checks for overflows. + * + * Use w##x##y##z instead of H5_GLUE4(w, x, y, z) because srctype + * or dsttype on some systems (e.g., NetBSD 8 and earlier) may + * supply some standard types using a macro---e.g., + * #define uint8_t __uint8_t. The preprocessor will expand the + * macros before it evaluates H5_GLUE4(), and that will generate + * an unexpected name such as ASSIGN___uint8_t_TO___uint16_t. + * The preprocessor does not expand macros in w##x##y##z, so + * that will always generate the expected name. + */ +#define H5_CHECKED_ASSIGN(dst, dsttype, src, srctype) \ + ASSIGN_##srctype##_TO_##dsttype(dst, dsttype, src, srctype) + +#else /* NDEBUG */ +#define H5_CHECKED_ASSIGN(dst, dsttype, src, srctype) (dst) = (dsttype)(src); +#endif /* NDEBUG */ + #if defined(H5_HAVE_WINDOW_PATH) /* directory delimiter for Windows: slash and backslash are acceptable on Windows */ @@ -1538,20 +1668,901 @@ extern char *strdup(const char *s); #endif /* H5_HAVE_WINDOW_PATH */ +#define H5_COLON_SEPC ':' + +/* + * These macros check whether debugging has been requested for a certain + * package at run-time. Code for debugging is conditionally compiled by + * defining constants like `H5X_DEBUG'. In order to see the output though + * the code must be enabled at run-time with an environment variable + * HDF5_DEBUG which is a list of packages to debug. + * + * Note: If you add/remove items from this enum then be sure to update the + * information about the package in H5_init_library(). + */ +typedef enum { + H5_PKG_A, /* Attributes */ + H5_PKG_AC, /* Metadata cache */ + H5_PKG_B, /* B-trees */ + H5_PKG_D, /* Datasets */ + H5_PKG_E, /* Error handling */ + H5_PKG_F, /* Files */ + H5_PKG_G, /* Groups */ + H5_PKG_HG, /* Global heaps */ + H5_PKG_HL, /* Local heaps */ + H5_PKG_I, /* IDs */ + H5_PKG_M, /* Maps */ + H5_PKG_MF, /* File memory management */ + H5_PKG_MM, /* Core memory management */ + H5_PKG_O, /* Object headers */ + H5_PKG_P, /* Property lists */ + H5_PKG_S, /* Dataspaces */ + H5_PKG_T, /* Datatypes */ + H5_PKG_V, /* Vector functions */ + H5_PKG_VL, /* VOL functions */ + H5_PKG_Z, /* Raw data filters */ + H5_NPKGS /* Must be last */ +} H5_pkg_t; + +typedef struct H5_debug_open_stream_t { + FILE *stream; /* Open output stream */ + struct H5_debug_open_stream_t *next; /* Next open output stream */ +} H5_debug_open_stream_t; + +typedef struct H5_debug_t { + FILE *trace; /*API trace output stream */ + hbool_t ttop; /*Show only top-level calls? */ + hbool_t ttimes; /*Show trace event times? */ + struct { + const char *name; /*package name */ + FILE *stream; /*output stream or NULL */ + } pkg[H5_NPKGS]; + H5_debug_open_stream_t *open_stream; /* Stack of open output streams */ +} H5_debug_t; + +#ifdef H5_HAVE_PARALLEL + +/* + * Check that the MPI library version is at least version + * `mpi_version` and subversion `mpi_subversion` + */ +#define H5_CHECK_MPI_VERSION(mpi_version, mpi_subversion) \ + ((MPI_VERSION > (mpi_version)) || \ + ((MPI_VERSION == (mpi_version)) && (MPI_SUBVERSION >= (mpi_subversion)))) + +extern hbool_t H5_coll_api_sanity_check_g; +#endif /* H5_HAVE_PARALLEL */ + +extern H5_debug_t H5_debug_g; +#define H5DEBUG(X) (H5_debug_g.pkg[H5_PKG_##X].stream) +/* Do not use const else AIX strings does not show it. */ +extern char H5libhdf5_settings[]; /* embedded library information */ + +/*------------------------------------------------------------------------- + * Purpose: These macros are inserted automatically just after the + * FUNC_ENTER() macro of API functions and are used to trace + * application program execution. Unless H5_DEBUG_API has been + * defined they are no-ops. + * + * Arguments: R - Return type encoded as a string + * T - Argument types encoded as a string + * A0-An - Arguments. The number at the end of the macro name + * indicates the number of arguments. + * + *------------------------------------------------------------------------- + */ +#ifdef H5_DEBUG_API + +#define H5TRACE_DECL \ + const char *RTYPE = NULL; \ + double CALLTIME; + +#define H5TRACE0(R, T) \ + RTYPE = R; \ + CALLTIME = H5_trace(NULL, __func__, T) +#define H5TRACE1(R, T, A0) \ + RTYPE = R; \ + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0) +#define H5TRACE2(R, T, A0, A1) \ + RTYPE = R; \ + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1) +#define H5TRACE3(R, T, A0, A1, A2) \ + RTYPE = R; \ + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2) +#define H5TRACE4(R, T, A0, A1, A2, A3) \ + RTYPE = R; \ + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3) +#define H5TRACE5(R, T, A0, A1, A2, A3, A4) \ + RTYPE = R; \ + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4) +#define H5TRACE6(R, T, A0, A1, A2, A3, A4, A5) \ + RTYPE = R; \ + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5) +#define H5TRACE7(R, T, A0, A1, A2, A3, A4, A5, A6) \ + RTYPE = R; \ + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6) +#define H5TRACE8(R, T, A0, A1, A2, A3, A4, A5, A6, A7) \ + RTYPE = R; \ + CALLTIME = \ + H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, #A7, A7) +#define H5TRACE9(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8) \ + RTYPE = R; \ + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, \ + #A7, A7, #A8, A8) +#define H5TRACE10(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9) \ + RTYPE = R; \ + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, \ + #A7, A7, #A8, A8, #A9, A9) +#define H5TRACE11(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) \ + RTYPE = R; \ + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, \ + #A7, A7, #A8, A8, #A9, A9, #A10, A10) +#define H5TRACE12(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) \ + RTYPE = R; \ + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, \ + #A7, A7, #A8, A8, #A9, A9, #A10, A10, #A11, A11) + +#define H5TRACE_RETURN(V) \ + if (RTYPE) { \ + H5_trace(&CALLTIME, __func__, RTYPE, NULL, V); \ + RTYPE = NULL; \ + } +#else +#define H5TRACE_DECL /*void*/ +#define H5TRACE0(R, T) /*void*/ +#define H5TRACE1(R, T, A0) /*void*/ +#define H5TRACE2(R, T, A0, A1) /*void*/ +#define H5TRACE3(R, T, A0, A1, A2) /*void*/ +#define H5TRACE4(R, T, A0, A1, A2, A3) /*void*/ +#define H5TRACE5(R, T, A0, A1, A2, A3, A4) /*void*/ +#define H5TRACE6(R, T, A0, A1, A2, A3, A4, A5) /*void*/ +#define H5TRACE7(R, T, A0, A1, A2, A3, A4, A5, A6) /*void*/ +#define H5TRACE8(R, T, A0, A1, A2, A3, A4, A5, A6, A7) /*void*/ +#define H5TRACE9(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8) /*void*/ +#define H5TRACE10(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9) /*void*/ +#define H5TRACE11(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) /*void*/ +#define H5TRACE12(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) /*void*/ +#define H5TRACE_RETURN(V) /*void*/ +#endif /* H5_DEBUG_API */ + +/* Argument tracing macros (defined all the time) */ +#define H5ARG_TRACE0(C, T) C, T +#define H5ARG_TRACE1(C, T, A0) C, T, #A0, A0 +#define H5ARG_TRACE2(C, T, A0, A1) C, T, #A0, A0, #A1, A1 +#define H5ARG_TRACE3(C, T, A0, A1, A2) C, T, #A0, A0, #A1, A1, #A2, A2 +#define H5ARG_TRACE4(C, T, A0, A1, A2, A3) C, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3 +#define H5ARG_TRACE5(C, T, A0, A1, A2, A3, A4) C, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4 +#define H5ARG_TRACE6(C, T, A0, A1, A2, A3, A4, A5) C, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5 +#define H5ARG_TRACE7(C, T, A0, A1, A2, A3, A4, A5, A6) \ + C, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6 +#define H5ARG_TRACE8(C, T, A0, A1, A2, A3, A4, A5, A6, A7) \ + C, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, #A7, A7 +#define H5ARG_TRACE9(C, T, A0, A1, A2, A3, A4, A5, A6, A7, A8) \ + C, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, #A7, A7, #A8, A8 +#define H5ARG_TRACE10(C, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9) \ + C, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, #A7, A7, #A8, A8, #A9, A9 +#define H5ARG_TRACE11(C, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) \ + C, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, #A7, A7, #A8, A8, #A9, A9, #A10, A10 +#define H5ARG_TRACE12(C, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) \ + C, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, #A7, A7, #A8, A8, #A9, A9, #A10, \ + A10, #A11, A11 + +struct H5RS_str_t; +H5_DLL double H5_trace(const double *calltime, const char *func, const char *type, ...); +H5_DLL herr_t H5_trace_args(struct H5RS_str_t *rs, const char *type, va_list ap); + +/*------------------------------------------------------------------------- + * Purpose: Register function entry for library initialization and code + * profiling. + * + * Notes: Every file must have a file-scope variable called + * `initialize_interface_g' of type hbool_t which is initialized + * to FALSE. + * + * Don't use local variable initializers which contain + * calls to other library functions since the initializer + * would happen before the FUNC_ENTER() gets called. Don't + * use initializers that require special cleanup code to + * execute if FUNC_ENTER() fails since a failing FUNC_ENTER() + * returns immediately without branching to the `done' label. + *------------------------------------------------------------------------- + */ + +/* `S' is the name of a function which is being tested to check if it's + * an API function. + * + * BADNESS: + * - Underscore at positions 2 or 3 (0-indexed string). Handles + * H5_ and H5X_. + * - Underscore at position 4 if position 3 is uppercase or a digit. + * Handles H5XY_. + */ +#define H5_IS_API(S) \ + ('_' != ((const char *)S)[2] /* underscore at position 2 */ \ + && '_' != ((const char *)S)[3] /* underscore at position 3 */ \ + && !( /* NOT */ \ + ((const char *)S)[4] /* pos 4 exists */ \ + && (HDisupper(S[3]) || HDisdigit(S[3])) /* pos 3 dig | uc */ \ + && '_' == ((const char *)S)[4] /* pos 4 underscore */ \ + )) + +/* `S' is the name of a function which is being tested to check if it's */ +/* a public API function */ +#define H5_IS_PUB(S) \ + (((HDisdigit(S[1]) || HDisupper(S[1])) && HDislower(S[2])) || \ + ((HDisdigit(S[2]) || HDisupper(S[2])) && HDislower(S[3])) || \ + (!S[4] || ((HDisdigit(S[3]) || HDisupper(S[3])) && HDislower(S[4])))) + +/* `S' is the name of a function which is being tested to check if it's */ +/* a private library function */ +#define H5_IS_PRIV(S) \ + (((HDisdigit(S[1]) || HDisupper(S[1])) && '_' == S[2] && HDislower(S[3])) || \ + ((HDisdigit(S[2]) || HDisupper(S[2])) && '_' == S[3] && HDislower(S[4])) || \ + ((HDisdigit(S[3]) || HDisupper(S[3])) && '_' == S[4] && HDislower(S[5]))) + +/* `S' is the name of a function which is being tested to check if it's */ +/* a package private function */ +#define H5_IS_PKG(S) \ + (((HDisdigit(S[1]) || HDisupper(S[1])) && '_' == S[2] && '_' == S[3] && HDislower(S[4])) || \ + ((HDisdigit(S[2]) || HDisupper(S[2])) && '_' == S[3] && '_' == S[4] && HDislower(S[5])) || \ + ((HDisdigit(S[3]) || HDisupper(S[3])) && '_' == S[4] && '_' == S[5] && HDislower(S[6]))) + +/* global library version information string */ +extern char H5_lib_vers_info_g[]; + +#include "H5TSprivate.h" + +/* Lock headers */ +#ifdef H5_HAVE_THREADSAFE + +/* replacement structure for original global variable */ +typedef struct H5_api_struct { + H5TS_mutex_t init_lock; /* API entrance mutex */ + hbool_t H5_libinit_g; /* Has the library been initialized? */ + hbool_t H5_libterm_g; /* Is the library being shutdown? */ +} H5_api_t; + +/* Macros for accessing the global variables */ +#define H5_INIT_GLOBAL (H5_g.H5_libinit_g) +#define H5_TERM_GLOBAL (H5_g.H5_libterm_g) + +/* Macro for first thread initialization */ +#ifdef H5_HAVE_WIN_THREADS +#define H5_FIRST_THREAD_INIT InitOnceExecuteOnce(&H5TS_first_init_g, H5TS_win32_process_enter, NULL, NULL); +#else +#define H5_FIRST_THREAD_INIT pthread_once(&H5TS_first_init_g, H5TS_pthread_first_thread_init); +#endif + +/* Macros for threadsafe HDF5 Phase I locks */ +#define H5_API_LOCK H5TS_mutex_lock(&H5_g.init_lock); +#define H5_API_UNLOCK H5TS_mutex_unlock(&H5_g.init_lock); + +/* Macros for thread cancellation-safe mechanism */ +#define H5_API_UNSET_CANCEL H5TS_cancel_count_inc(); + +#define H5_API_SET_CANCEL H5TS_cancel_count_dec(); + +extern H5_api_t H5_g; + +#else /* H5_HAVE_THREADSAFE */ + +/* disable any first thread init mechanism */ +#define H5_FIRST_THREAD_INIT + +/* disable locks (sequential version) */ +#define H5_API_LOCK +#define H5_API_UNLOCK + +/* disable cancellability (sequential version) */ +#define H5_API_UNSET_CANCEL +#define H5_API_SET_CANCEL + +/* extern global variables */ +extern hbool_t H5_libinit_g; /* Has the library been initialized? */ +extern hbool_t H5_libterm_g; /* Is the library being shutdown? */ + +/* Macros for accessing the global variables */ +#define H5_INIT_GLOBAL (H5_libinit_g) +#define H5_TERM_GLOBAL (H5_libterm_g) + +#endif /* H5_HAVE_THREADSAFE */ + +#ifdef H5_HAVE_CODESTACK + +/* Include required function stack header */ +#include "H5CSprivate.h" + +#define H5_PUSH_FUNC H5CS_push(__func__); +#define H5_POP_FUNC H5CS_pop(); +#else /* H5_HAVE_CODESTACK */ +#define H5_PUSH_FUNC /* void */ +#define H5_POP_FUNC /* void */ +#endif /* H5_HAVE_CODESTACK */ + /* Forward declaration of H5CXpush() / H5CXpop() */ /* (Including H5CXprivate.h creates bad circular dependencies - QAK, 3/18/2018) */ H5_DLL herr_t H5CX_push(void); -H5_DLL herr_t H5CX_pop(void); +H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); + +#ifndef NDEBUG +#define FUNC_ENTER_CHECK_NAME(asrt) \ + { \ + static hbool_t func_check = FALSE; \ + \ + if (!func_check) { \ + /* Check function naming status */ \ + HDassert(asrt && \ + "Function naming conventions are incorrect - check H5_IS_API|PUB|PRIV|PKG macros in " \ + "H5private.h (this is usually due to an incorrect number of underscores)"); \ + \ + /* Don't check again */ \ + func_check = TRUE; \ + } /* end if */ \ + } /* end scope */ +#else /* NDEBUG */ +#define FUNC_ENTER_CHECK_NAME(asrt) +#endif /* NDEBUG */ + +#define FUNC_ENTER_COMMON(asrt) \ + hbool_t err_occurred = FALSE; \ + \ + FUNC_ENTER_CHECK_NAME(asrt); + +#define FUNC_ENTER_COMMON_NOERR(asrt) FUNC_ENTER_CHECK_NAME(asrt); + +/* Threadsafety initialization code for API routines */ +#define FUNC_ENTER_API_THREADSAFE \ + /* Initialize the thread-safe code */ \ + H5_FIRST_THREAD_INIT \ + \ + /* Grab the mutex for the library */ \ + H5_API_UNSET_CANCEL \ + H5_API_LOCK + +/* Local variables for API routines */ +#define FUNC_ENTER_API_VARS H5TRACE_DECL + +#define FUNC_ENTER_API_COMMON \ + FUNC_ENTER_API_VARS \ + FUNC_ENTER_COMMON(H5_IS_API(__func__)); \ + FUNC_ENTER_API_THREADSAFE; + +#define FUNC_ENTER_API_INIT(err) \ + /* Initialize the library */ \ + if (!H5_INIT_GLOBAL && !H5_TERM_GLOBAL) { \ + if (H5_init_library() < 0) \ + HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, err, "library initialization failed") \ + } + +#define FUNC_ENTER_API_PUSH(err) \ + /* Push the name of this function on the function stack */ \ + H5_PUSH_FUNC \ + \ + /* Push the API context */ \ + if (H5CX_push() < 0) \ + HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, err, "can't set API context") \ + else \ + api_ctx_pushed = TRUE; + +/* Use this macro for all "normal" API functions */ +#define FUNC_ENTER_API(err) \ + { \ + { \ + hbool_t api_ctx_pushed = FALSE; \ + \ + FUNC_ENTER_API_COMMON \ + FUNC_ENTER_API_INIT(err); \ + FUNC_ENTER_API_PUSH(err); \ + /* Clear thread error stack entering public functions */ \ + H5E_clear_stack(NULL); \ + { + +/* + * Use this macro for API functions that shouldn't clear the error stack + * like H5Eprint and H5Ewalk. + */ +#define FUNC_ENTER_API_NOCLEAR(err) \ + { \ + { \ + hbool_t api_ctx_pushed = FALSE; \ + \ + FUNC_ENTER_API_COMMON \ + FUNC_ENTER_API_INIT(err); \ + FUNC_ENTER_API_PUSH(err); \ + { + +/* + * Use this macro for API functions that shouldn't perform _any_ initialization + * of the library or an interface, just perform tracing, etc. Examples + * are: H5allocate_memory, H5is_library_threadsafe, public VOL callback + * wrappers (e.g. H5VLfile_create, H5VLdataset_read, etc.), etc. + * + */ +#define FUNC_ENTER_API_NOINIT \ + { \ + { \ + { \ + FUNC_ENTER_API_COMMON \ + H5_PUSH_FUNC \ + { + +/* + * Use this macro for API functions that shouldn't perform _any_ initialization + * of the library or an interface or push themselves on the function + * stack, just perform tracing, etc. Examples + * are: H5close, H5check_version, etc. + * + */ +#define FUNC_ENTER_API_NOINIT_NOERR_NOFS \ + { \ + { \ + { \ + { \ + FUNC_ENTER_API_VARS \ + FUNC_ENTER_COMMON_NOERR(H5_IS_API(__func__)); \ + FUNC_ENTER_API_THREADSAFE; \ + { + +/* + * Use this macro for API functions that should only perform initialization + * of the library or an interface, but not push any state (API context, + * function name, etc.) examples are: H5open. + * + */ +#define FUNC_ENTER_API_NOPUSH(err) \ + { \ + { \ + { \ + { \ + { \ + FUNC_ENTER_COMMON(H5_IS_API(__func__)); \ + FUNC_ENTER_API_THREADSAFE; \ + FUNC_ENTER_API_INIT(err); \ + { + +/* + * Use this macro for API functions that shouldn't perform _any_ initialization + * of the library or an interface, or push themselves on the function + * stack, or perform tracing, etc. This macro _only_ sanity checks the + * API name itself. Examples are: H5TSmutex_acquire, + * + */ +#define FUNC_ENTER_API_NAMECHECK_ONLY \ + { \ + { \ + { \ + { \ + { \ + { \ + FUNC_ENTER_COMMON_NOERR(H5_IS_API(__func__)); \ + { + +/* Use this macro for all "normal" non-API functions */ +#define FUNC_ENTER_NOAPI(err) \ + { \ + FUNC_ENTER_COMMON(!H5_IS_API(__func__)); \ + H5_PUSH_FUNC \ + { + +/* Use this macro for all non-API functions, which propagate errors, but don't issue them */ +#define FUNC_ENTER_NOAPI_NOERR \ + { \ + FUNC_ENTER_COMMON_NOERR(!H5_IS_API(__func__)); \ + H5_PUSH_FUNC \ + { + +/* + * Use this macro for non-API functions which fall into these categories: + * - static functions, since they must be called from a function in the + * interface, the library and interface must already be + * initialized. + * - functions which are called during library shutdown, since we don't + * want to re-initialize the library. + */ +#define FUNC_ENTER_NOAPI_NOINIT \ + { \ + FUNC_ENTER_COMMON(!H5_IS_API(__func__)); \ + H5_PUSH_FUNC \ + { + +/* + * Use this macro for non-API functions which fall into these categories: + * - static functions, since they must be called from a function in the + * interface, the library and interface must already be + * initialized. + * - functions which are called during library shutdown, since we don't + * want to re-initialize the library. + * - functions that propagate, but don't issue errors + */ +#define FUNC_ENTER_NOAPI_NOINIT_NOERR \ + { \ + FUNC_ENTER_COMMON_NOERR(!H5_IS_API(__func__)); \ + H5_PUSH_FUNC \ + { + +/* + * Use this macro for non-API functions which fall into these categories: + * - functions which shouldn't push their name on the function stack + * (so far, just the H5CS routines themselves) + * + */ +#define FUNC_ENTER_NOAPI_NOFS \ + { \ + FUNC_ENTER_COMMON(!H5_IS_API(__func__)); \ + \ + { + +/* + * Use this macro for non-API functions which fall into these categories: + * - functions which shouldn't push their name on the function stack + * (so far, just the H5CS routines themselves) + * + * This macro is used for functions which fit the above categories _and_ + * also don't use the 'FUNC' variable (i.e. don't push errors on the error stack) + * + */ +#define FUNC_ENTER_NOAPI_NOERR_NOFS \ + { \ + FUNC_ENTER_COMMON_NOERR(!H5_IS_API(__func__)); \ + { + +/* + * Use this macro for non-API functions that shouldn't perform _any_ initialization + * of the library or an interface, or push themselves on the function + * stack, or perform tracing, etc. This macro _only_ sanity checks the + * API name itself. Examples are private routines in the H5TS package. + * + */ +#define FUNC_ENTER_NOAPI_NAMECHECK_ONLY \ + { \ + FUNC_ENTER_COMMON_NOERR(!H5_IS_API(__func__)); + +/* Use the following two macros as replacements for the FUNC_ENTER_NOAPI + * and FUNC_ENTER_NOAPI_NOINIT macros when the function needs to set + * up a metadata tag. */ +#define FUNC_ENTER_NOAPI_TAG(tag, err) \ + { \ + haddr_t prev_tag = HADDR_UNDEF; \ + \ + FUNC_ENTER_COMMON(!H5_IS_API(__func__)); \ + H5AC_tag(tag, &prev_tag); \ + H5_PUSH_FUNC \ + { + +#define FUNC_ENTER_NOAPI_NOINIT_TAG(tag) \ + { \ + haddr_t prev_tag = HADDR_UNDEF; \ + \ + FUNC_ENTER_COMMON(!H5_IS_API(__func__)); \ + H5AC_tag(tag, &prev_tag); \ + H5_PUSH_FUNC \ + { + +/* Use this macro for all "normal" package-level functions */ +#define FUNC_ENTER_PACKAGE \ + { \ + FUNC_ENTER_COMMON(H5_IS_PKG(__func__)); \ + H5_PUSH_FUNC \ + { + +/* Use this macro for package-level functions which propgate errors, but don't issue them */ +#define FUNC_ENTER_PACKAGE_NOERR \ + { \ + FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(__func__)); \ + H5_PUSH_FUNC \ + { + +/* Use the following macro as replacement for the FUNC_ENTER_PACKAGE + * macro when the function needs to set up a metadata tag. */ +#define FUNC_ENTER_PACKAGE_TAG(tag) \ + { \ + haddr_t prev_tag = HADDR_UNDEF; \ + \ + FUNC_ENTER_COMMON(H5_IS_PKG(__func__)); \ + H5AC_tag(tag, &prev_tag); \ + H5_PUSH_FUNC \ + { + +/* Use this macro for staticly-scoped functions which propgate errors, but don't issue them */ +/* And that shouldn't push their name on the function stack */ +#define FUNC_ENTER_PACKAGE_NOERR_NOFS \ + { \ + FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(__func__)); \ + { + +/* + * Use this macro for non-API functions that shouldn't perform _any_ initialization + * of the library or an interface, or push themselves on the function + * stack, or perform tracing, etc. This macro _only_ sanity checks the + * API name itself. Examples are static routines in the H5TS package. + * + */ +#define FUNC_ENTER_PACKAGE_NAMECHECK_ONLY \ + { \ + FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(__func__)); + +/*------------------------------------------------------------------------- + * Purpose: Register function exit for code profiling. This should be + * the last statement executed by a function. + *------------------------------------------------------------------------- + */ +/* Threadsafety termination code for API routines */ +#define FUNC_LEAVE_API_THREADSAFE \ + H5_API_UNLOCK \ + H5_API_SET_CANCEL + +#define FUNC_LEAVE_API_COMMON(ret_value) H5TRACE_RETURN(ret_value); + +#define FUNC_LEAVE_API(ret_value) \ + ; \ + } /*end scope from end of FUNC_ENTER*/ \ + FUNC_LEAVE_API_COMMON(ret_value); \ + if (api_ctx_pushed) { \ + (void)H5CX_pop(TRUE); \ + api_ctx_pushed = FALSE; \ + } \ + H5_POP_FUNC \ + if (err_occurred) \ + (void)H5E_dump_api_stack(TRUE); \ + FUNC_LEAVE_API_THREADSAFE \ + return (ret_value); \ + } \ + } /*end scope from beginning of FUNC_ENTER*/ + +/* Use this macro to match the FUNC_ENTER_API_NOINIT macro */ +#define FUNC_LEAVE_API_NOINIT(ret_value) \ + ; \ + } /*end scope from end of FUNC_ENTER*/ \ + FUNC_LEAVE_API_COMMON(ret_value); \ + H5_POP_FUNC \ + if (err_occurred) \ + (void)H5E_dump_api_stack(TRUE); \ + FUNC_LEAVE_API_THREADSAFE \ + return (ret_value); \ + } \ + } \ + } /*end scope from beginning of FUNC_ENTER*/ + +/* Use this macro to match the FUNC_ENTER_API_NOINIT_NOERR_NOFS macro */ +#define FUNC_LEAVE_API_NOFS(ret_value) \ + ; \ + } /*end scope from end of FUNC_ENTER*/ \ + FUNC_LEAVE_API_COMMON(ret_value); \ + FUNC_LEAVE_API_THREADSAFE \ + return (ret_value); \ + } \ + } \ + } \ + } /*end scope from beginning of FUNC_ENTER*/ + +/* Use this macro to match the FUNC_ENTER_API_NOPUSH macro */ +#define FUNC_LEAVE_API_NOPUSH(ret_value) \ + ; \ + } /*end scope from end of FUNC_ENTER*/ \ + if (err_occurred) \ + (void)H5E_dump_api_stack(TRUE); \ + FUNC_LEAVE_API_THREADSAFE \ + return (ret_value); \ + } \ + } \ + } \ + } \ + } /*end scope from beginning of FUNC_ENTER*/ + +/* Use this macro to match the FUNC_ENTER_API_NAMECHECK_ONLY macro */ +#define FUNC_LEAVE_API_NAMECHECK_ONLY(ret_value) \ + ; \ + } /*end scope from end of FUNC_ENTER*/ \ + return (ret_value); \ + } \ + } \ + } \ + } \ + } \ + } /*end scope from beginning of FUNC_ENTER*/ + +#define FUNC_LEAVE_NOAPI(ret_value) \ + ; \ + } /*end scope from end of FUNC_ENTER*/ \ + H5_POP_FUNC \ + return (ret_value); \ + } /*end scope from beginning of FUNC_ENTER*/ + +#define FUNC_LEAVE_NOAPI_VOID \ + ; \ + } /*end scope from end of FUNC_ENTER*/ \ + H5_POP_FUNC \ + return; \ + } /*end scope from beginning of FUNC_ENTER*/ + +/* + * Use this macro for non-API functions which fall into these categories: + * - functions which didn't push their name on the function stack + * (so far, just the H5CS routines themselves) + */ +#define FUNC_LEAVE_NOAPI_NOFS(ret_value) \ + ; \ + } /*end scope from end of FUNC_ENTER*/ \ + return (ret_value); \ + } /*end scope from beginning of FUNC_ENTER*/ + +/* Use these macros to match the FUNC_ENTER_NOAPI_NAMECHECK_ONLY macro */ +#define FUNC_LEAVE_NOAPI_NAMECHECK_ONLY(ret_value) \ + return (ret_value); \ + } /*end scope from beginning of FUNC_ENTER*/ +#define FUNC_LEAVE_NOAPI_VOID_NAMECHECK_ONLY \ + return; \ + } /*end scope from beginning of FUNC_ENTER*/ + +/* Use this macro when exiting a function that set up a metadata tag */ +#define FUNC_LEAVE_NOAPI_TAG(ret_value) \ + ; \ + } /*end scope from end of FUNC_ENTER*/ \ + H5AC_tag(prev_tag, NULL); \ + H5_POP_FUNC \ + return (ret_value); \ + } /*end scope from beginning of FUNC_ENTER*/ + +/* Macro to begin/end tagging (when FUNC_ENTER_*TAG macros are insufficient). + * Make sure to use HGOTO_ERROR_TAG and HGOTO_DONE_TAG between these macros! */ +#define H5_BEGIN_TAG(tag) \ + { \ + haddr_t prv_tag = HADDR_UNDEF; \ + H5AC_tag(tag, &prv_tag); + +#define H5_END_TAG \ + H5AC_tag(prv_tag, NULL); \ + } /* Compile-time "assert" macro */ #define HDcompile_assert(e) ((void)sizeof(char[!!(e) ? 1 : -1])) +/* Variants that are correct, but generate compile-time warnings in some circumstances: + #define HDcompile_assert(e) do { enum { compile_assert__ = 1 / (e) }; } while(0) + #define HDcompile_assert(e) do { typedef struct { unsigned int b: (e); } x; } while(0) +*/ + +/* Private typedefs */ + +/* Union for const/non-const pointer for use by functions that manipulate + * pointers but do not write to their targets or return pointers to const + * specified locations. Also used for I/O functions that work for read and + * write - these functions are expected to never write to these locations in the + * write case. This helps us avoid compiler warnings. */ +typedef union { + void *vp; + const void *cvp; +} H5_flexible_const_ptr_t; + +/* Private functions, not part of the publicly documented API */ +H5_DLL herr_t H5_init_library(void); +H5_DLL void H5_term_library(void); + +/* Functions to terminate interfaces */ +H5_DLL int H5A_term_package(void); +H5_DLL int H5A_top_term_package(void); +H5_DLL int H5AC_term_package(void); +H5_DLL int H5CX_term_package(void); +H5_DLL int H5D_term_package(void); +H5_DLL int H5D_top_term_package(void); +H5_DLL int H5E_term_package(void); +H5_DLL int H5ES_term_package(void); +H5_DLL int H5F_term_package(void); +H5_DLL int H5FD_term_package(void); +H5_DLL int H5FL_term_package(void); +H5_DLL int H5FS_term_package(void); +H5_DLL int H5G_term_package(void); +H5_DLL int H5G_top_term_package(void); +H5_DLL int H5I_term_package(void); +H5_DLL int H5L_term_package(void); +H5_DLL int H5M_term_package(void); +H5_DLL int H5M_top_term_package(void); +H5_DLL int H5P_term_package(void); +H5_DLL int H5PL_term_package(void); +H5_DLL int H5R_term_package(void); +H5_DLL int H5R_top_term_package(void); +H5_DLL int H5S_term_package(void); +H5_DLL int H5S_top_term_package(void); +H5_DLL int H5SL_term_package(void); +H5_DLL int H5T_term_package(void); +H5_DLL int H5T_top_term_package(void); +H5_DLL int H5VL_term_package(void); +H5_DLL int H5Z_term_package(void); /* Checksum functions */ H5_DLL uint32_t H5_checksum_fletcher32(const void *data, size_t len); H5_DLL uint32_t H5_checksum_crc(const void *data, size_t len); H5_DLL uint32_t H5_checksum_lookup3(const void *data, size_t len, uint32_t initval); +H5_DLL uint32_t H5_checksum_metadata(const void *data, size_t len, uint32_t initval); +H5_DLL uint32_t H5_hash_string(const char *str); /* Time related routines */ +H5_DLL time_t H5_make_time(struct tm *tm); +H5_DLL void H5_nanosleep(uint64_t nanosec); H5_DLL double H5_get_time(void); -#endif /* _H5private_H */ +/* Functions for building paths, etc. */ +H5_DLL herr_t H5_build_extpath(const char *name, char **extpath /*out*/); +H5_DLL herr_t H5_combine_path(const char *path1, const char *path2, char **full_name /*out*/); +H5_DLL herr_t H5_dirname(const char *path, char **dirname /*out*/); +H5_DLL herr_t H5_basename(const char *path, char **basename /*out*/); + +/* getopt(3) equivalent that papers over the lack of long options on BSD + * and lack of Windows support. + */ +H5_DLLVAR int H5_opterr; /* get_option prints errors if this is on */ +H5_DLLVAR int H5_optind; /* token pointer */ +H5_DLLVAR const char *H5_optarg; /* flag argument (or value) */ + +enum h5_arg_level { + no_arg = 0, /* doesn't take an argument */ + require_arg, /* requires an argument */ + optional_arg /* argument is optional */ +}; + +/* + * get_option determines which options are specified on the command line and + * returns a pointer to any arguments possibly associated with the option in + * the ``H5_optarg'' variable. get_option returns the shortname equivalent of + * the option. The long options are specified in the following way: + * + * struct h5_long_options foo[] = { + * { "filename", require_arg, 'f' }, + * { "append", no_arg, 'a' }, + * { "width", require_arg, 'w' }, + * { NULL, 0, 0 } + * }; + * + * Long named options can have arguments specified as either: + * + * ``--param=arg'' or ``--param arg'' + * + * Short named options can have arguments specified as either: + * + * ``-w80'' or ``-w 80'' + * + * and can have more than one short named option specified at one time: + * + * -aw80 + * + * in which case those options which expect an argument need to come at the + * end. + */ +struct h5_long_options { + const char *name; /* Name of the long option */ + enum h5_arg_level has_arg; /* Whether we should look for an arg */ + char shortval; /* The shortname equivalent of long arg + * this gets returned from get_option + */ +}; + +H5_DLL int H5_get_option(int argc, const char *const *argv, const char *opt, + const struct h5_long_options *l_opt); + +#ifdef H5_HAVE_PARALLEL +/* Generic MPI functions */ +H5_DLL hsize_t H5_mpi_set_bigio_count(hsize_t new_count); +H5_DLL hsize_t H5_mpi_get_bigio_count(void); +H5_DLL herr_t H5_mpi_comm_dup(MPI_Comm comm, MPI_Comm *comm_new); +H5_DLL herr_t H5_mpi_info_dup(MPI_Info info, MPI_Info *info_new); +H5_DLL herr_t H5_mpi_comm_free(MPI_Comm *comm); +H5_DLL herr_t H5_mpi_info_free(MPI_Info *info); +H5_DLL herr_t H5_mpi_comm_cmp(MPI_Comm comm1, MPI_Comm comm2, int *result); +H5_DLL herr_t H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result); +H5_DLL herr_t H5_mpio_create_large_type(hsize_t num_elements, MPI_Aint stride_bytes, MPI_Datatype old_type, + MPI_Datatype *new_type); +H5_DLL herr_t H5_mpio_gatherv_alloc(void *send_buf, int send_count, MPI_Datatype send_type, + const int recv_counts[], const int displacements[], + MPI_Datatype recv_type, hbool_t allgather, int root, MPI_Comm comm, + int mpi_rank, int mpi_size, void **out_buf, size_t *out_buf_num_entries); +H5_DLL herr_t H5_mpio_gatherv_alloc_simple(void *send_buf, int send_count, MPI_Datatype send_type, + MPI_Datatype recv_type, hbool_t allgather, int root, MPI_Comm comm, + int mpi_rank, int mpi_size, void **out_buf, + size_t *out_buf_num_entries); +H5_DLL herr_t H5_mpio_get_file_sync_required(MPI_File fh, hbool_t *file_sync_required); +#endif /* H5_HAVE_PARALLEL */ + +/* Functions for debugging */ +H5_DLL herr_t H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf, const uint8_t *marker, + size_t buf_offset, size_t buf_size); + +#endif /* H5private_H */ diff --git a/H5win32defs.h b/H5win32defs.h index 40ebbed..a1299b1 100644 --- a/H5win32defs.h +++ b/H5win32defs.h @@ -1,71 +1,68 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* Programmer: Scott Wegner - * June 3, 2008 - * - * Purpose: This file is used to map HDF macros to Windows functions. This +/* Purpose: This file is used to map HDF macros to Windows functions. This * should get included H5private mappings, so as to override them. * Any macro not mapped here, however, will receive a similar mapping * inside H5private.h * */ -#ifndef H5_HAVE_INTTYPES_H -#define PRId8 "d" -#define PRIo8 "o" -#define PRIu8 "u" -#define PRIx8 "x" -#define PRIX8 "X" -#define PRId16 "d" -#define PRIo16 "o" -#define PRIu16 "u" -#define PRIx16 "x" -#define PRIX16 "X" -#define PRId32 "d" -#define PRIo32 "o" -#define PRIu32 "u" -#define PRIx32 "x" -#define PRIX32 "X" -#endif -/* - * _MSC_VER = 1900 VS2015 - * _MSC_VER = 1800 VS2013 - * _MSC_VER = 1700 VS2012 +/* _MSC_VER = 192x VS2019 + * _MSC_VER = 191x VS2017 + * _MSC_VER = 1900 VS2015 + * _MSC_VER = 1800 VS2013 + * _MSC_VER = 1700 VS2012 */ #ifdef H5_HAVE_WIN32_API +/* __int64 is the correct type for the st_size field of the _stati64 struct. + * MSDN isn't very clear about this. + */ typedef struct _stati64 h5_stat_t; typedef __int64 h5_stat_size_t; -#define HDaccess(F, M) _access(F, M) -#define HDchdir(S) _chdir(S) -#define HDclose(F) _close(F) -#define HDcreat(S, M) Wopen_utf8(S, O_CREAT | O_TRUNC | O_RDWR, M) -#define HDdup(F) _dup(F) -#define HDfdopen(N, S) _fdopen(N, S) -#define HDfileno(F) _fileno(F) -#define HDfstat(F, B) _fstati64(F, B) -#define HDisatty(F) _isatty(F) +#ifdef H5_HAVE_VISUAL_STUDIO + +struct timezone { + int tz_minuteswest; + int tz_dsttime; +}; -#define HDgetcwd(S, Z) _getcwd(S, Z) -#define HDgetdcwd(D, S, Z) _getdcwd(D, S, Z) -#define HDgetdrive() _getdrive() -#define HDlseek(F, O, W) _lseeki64(F, O, W) -#define HDlstat(S, B) _lstati64(S, B) -#define HDmkdir(S, M) _mkdir(S) -#define HDnanosleep(N, O) Wnanosleep(N, O) -#define HDoff_t __int64 +#endif /* H5_HAVE_VISUAL_STUDIO */ + +#define HDaccess(F, M) _access(F, M) +#define HDchdir(S) _chdir(S) +#define HDclose(F) _close(F) +#define HDcreat(S, M) Wopen_utf8(S, O_CREAT | O_TRUNC | O_RDWR, M) +#define HDdup(F) _dup(F) +#define HDfdopen(N, S) _fdopen(N, S) +#define HDfileno(F) _fileno(F) +#define HDflock(F, L) Wflock(F, L) +#define HDfstat(F, B) _fstati64(F, B) +#define HDgetcwd(S, Z) _getcwd(S, Z) +#define HDgetdcwd(D, S, Z) _getdcwd(D, S, Z) +#define HDgetdrive() _getdrive() +#define HDgettimeofday(V, Z) Wgettimeofday(V, Z) +#define HDisatty(F) _isatty(F) +#define HDlseek(F, O, W) _lseeki64(F, O, W) +#define HDlstat(S, B) _lstati64(S, B) +#define HDmkdir(S, M) _mkdir(S) + +/* off_t exists on Windows, but is always a 32-bit long, even on 64-bit Windows, + * so we define HDoff_t to be __int64, which is the type of the st_size field + * of the _stati64 struct. + */ +#define HDoff_t __int64 /* Note that the variadic HDopen macro is using a VC++ extension * where the comma is dropped if nothing is passed to the ellipsis. @@ -75,109 +72,42 @@ typedef __int64 h5_stat_size_t; #else #define HDopen(S, F, ...) Wopen_utf8(S, F, ##__VA_ARGS__) #endif + #define HDread(F, M, Z) _read(F, M, Z) #define HDremove(S) Wremove_utf8(S) #define HDrmdir(S) _rmdir(S) +#define HDsetenv(N, V, O) Wsetenv(N, V, O) #define HDsetvbuf(F, S, M, Z) setvbuf(F, S, M, (Z > 1 ? Z : 2)) #define HDsleep(S) Sleep(S * 1000) #define HDstat(S, B) _stati64(S, B) #define HDstrcasecmp(A, B) _stricmp(A, B) -#define HDstrdup(S) _strdup(S) +#define HDstrcasestr(A, B) StrStrIA(A, B) +#define HDstrndup(S, N) H5_strndup(S, N) #define HDstrtok_r(X, Y, Z) strtok_s(X, Y, Z) #define HDtzset() _tzset() #define HDunlink(S) _unlink(S) +#define HDunsetenv(N) Wsetenv(N, "", 1) #define HDwrite(F, M, Z) _write(F, M, Z) -#ifdef H5_HAVE_VISUAL_STUDIO - -#if (_MSC_VER < 1800) -#ifndef H5_HAVE_STRTOLL -#define HDstrtoll(S, R, N) _strtoi64(S, R, N) -#endif /* H5_HAVE_STRTOLL */ -#ifndef H5_HAVE_STRTOULL -#define HDstrtoull(S, R, N) _strtoui64(S, R, N) -#endif /* H5_HAVE_STRTOULL */ -/* va_copy() does not exist on pre-2013 Visual Studio. Since va_lists are - * just pointers into the stack in those CRTs, the usual work-around - * is to just define the operation as a pointer copy. - */ -#define HDva_copy(D, S) ((D) = (S)) -#endif /* MSC_VER < 1800 */ - -/* - * The (void*) cast just avoids a compiler warning in H5_HAVE_VISUAL_STUDIO - */ -#define HDmemset(X, C, Z) memset((void *)(X), C, Z) - -struct timezone { - int tz_minuteswest; - int tz_dsttime; -}; - -/* time.h before VS2015 does not include timespec */ -#if (_MSC_VER < 1900) -struct timespec { - time_t tv_sec; /* Seconds - >= 0 */ - long tv_nsec; /* Nanoseconds - [0, 999999999] */ -}; -#endif /* MSC_VER < 1900 */ - -#if (_MSC_VER <= 1700) -/* The isnan function needs underscore in VS2012 and earlier */ -#define HDisnan(X) _isnan(X) -/* The round functions do not exist in VS2012 and earlier */ -#define HDllround(V) Wllround(V) -#define HDllroundf(V) Wllroundf(V) -#define HDlround(V) Wlround(V) -#define HDlroundf(V) Wlroundf(V) -#define HDround(V) Wround(V) -#define HDroundf(V) Wroundf(V) -#endif /* MSC_VER < 1700 */ - -#endif /* H5_HAVE_VISUAL_STUDIO */ +#ifndef H5_HAVE_MINGW +#define HDftruncate(F, L) _chsize_s(F, L) +#define HDfseek(F, O, W) _fseeki64(F, O, W) +#endif /* H5_HAVE_MINGW */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz); -H5_DLL int Wsetenv(const char *name, const char *value, int overwrite); -H5_DLL int Wflock(int fd, int operation); -H5_DLL char *Wgetlogin(void); -H5_DLL int c99_snprintf(char *str, size_t size, const char *format, ...); -H5_DLL int c99_vsnprintf(char *str, size_t size, const char *format, va_list ap); -H5_DLL int Wnanosleep(const struct timespec *req, struct timespec *rem); -H5_DLL herr_t H5_expand_windows_env_vars(char **env_var); -H5_DLL const wchar_t *H5_get_utf16_str(const char *s); -H5_DLL int Wopen_utf8(const char *path, int oflag, ...); -H5_DLL int Wremove_utf8(const char *path); - -/* Round functions only needed for VS2012 and earlier. - * They are always built to ensure they don't go stale and - * can be deleted (along with their #defines, above) when we - * drop VS2012 support. - */ -H5_DLL long long Wllround(double arg); -H5_DLL long long Wllroundf(float arg); -H5_DLL long Wlround(double arg); -H5_DLL long Wlroundf(float arg); -H5_DLL double Wround(double arg); -H5_DLL float Wroundf(float arg); +H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz); +H5_DLL int Wsetenv(const char *name, const char *value, int overwrite); +H5_DLL int Wflock(int fd, int operation); +H5_DLL herr_t H5_expand_windows_env_vars(char **env_var); +H5_DLL wchar_t *H5_get_utf16_str(const char *s); +H5_DLL int Wopen_utf8(const char *path, int oflag, ...); +H5_DLL int Wremove_utf8(const char *path); +H5_DLL int H5_get_win32_times(H5_timevals_t *tvs); +H5_DLL char *H5_strndup(const char *s, size_t n); #ifdef __cplusplus } #endif /* __cplusplus */ -#define HDgettimeofday(V, Z) Wgettimeofday(V, Z) -#define HDsetenv(N, V, O) Wsetenv(N, V, O) -#define HDflock(F, L) Wflock(F, L) -#define HDgetlogin() Wgetlogin() -#define HDsnprintf c99_snprintf /*varargs*/ -#define HDvsnprintf c99_vsnprintf /*varargs*/ - -/* Non-POSIX functions */ - -#ifndef H5_HAVE_MINGW -#define HDftruncate(F, L) _chsize_s(F, L) -#define HDfseek(F, O, W) _fseeki64(F, O, W) -#endif /* H5_HAVE_MINGW */ - #endif /* H5_HAVE_WIN32_API */ diff --git a/README.md b/README.md index c459218..501cae2 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ public API and serve as regression tests for HDF5 [VOL Connectors](https://porta The following are required to build the HDF5 VOL tests: - CMake 2.8.12.2 or newer -- HDF5 1.12.0 or newer +- HDF5 1.14.0 or newer Note: The HDF5 VOL tests project is currently unsupported for building on Windows. @@ -58,7 +58,7 @@ and will contain `hdf5-config.cmake`, among other files. `HDF5_VOL_TEST_ENABLE_PARALLEL` (Default: OFF) - This option enables parallel HDF5 tests and requires that the HDF5 installation used is built with the parallel library enabled. -`HDF5_VOL_TEST_ENABLE_ASYNC` (Default: OFF) - This option enables tests that use HDF5's asynchronous API routines. To enable these tests, the HDF5 installation used must be version 1.13 or newer. +`HDF5_VOL_TEST_ENABLE_ASYNC` (Default: OFF) - This option enables tests that use HDF5's asynchronous API routines. `HDF5_VOL_TEST_ENABLE_PART` (Default: OFF) - This option enables building of the main test executable, `h5vl_test`, as a set of individual executables, one per HDF5 'interface', rather than as a single executable. diff --git a/hdf5_test/tattr.c b/hdf5_test/tattr.c index d006eb8..0e01134 100644 --- a/hdf5_test/tattr.c +++ b/hdf5_test/tattr.c @@ -201,10 +201,8 @@ test_attr_basic_write(hid_t fapl) hsize_t dims3[] = {ATTR2_DIM1, ATTR2_DIM2}; int read_data1[ATTR1_DIM1] = {0}; /* Buffer for reading 1st attribute */ int i; -#ifndef NO_PREVENT_CREATE_SAME_ATTRIBUTE_TWICE - hid_t ret_id; /* Generic hid_t return value */ -#endif - herr_t ret; /* Generic return value */ + hid_t ret_id; /* Generic hid_t return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Scalar Attribute Writing Functions\n")); @@ -252,15 +250,17 @@ test_attr_basic_write(hid_t fapl) /* Create an attribute for the dataset */ attr = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT); CHECK(attr, FAIL, "H5Acreate2"); -#ifndef NO_PREVENT_CREATE_SAME_ATTRIBUTE_TWICE - /* Try to create the same attribute again (should fail) */ - H5E_BEGIN_TRY - { - ret_id = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT); + + if (vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) { + /* Try to create the same attribute again (should fail) */ + H5E_BEGIN_TRY + { + ret_id = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(ret_id, FAIL, "H5Acreate2"); } - H5E_END_TRY; - VERIFY(ret_id, FAIL, "H5Acreate2"); -#endif + /* Write attribute information */ ret = H5Awrite(attr, H5T_NATIVE_INT, attr_data1); CHECK(ret, FAIL, "H5Awrite"); @@ -398,15 +398,17 @@ test_attr_basic_write(hid_t fapl) attr_size = H5Aget_storage_size(attr); VERIFY(attr_size, (ATTR2_DIM1 * ATTR2_DIM2 * sizeof(int)), "H5Aget_storage_size"); #endif -#ifndef NO_PREVENT_CREATE_SAME_ATTRIBUTE_TWICE - /* Try to create the same attribute again (should fail) */ - H5E_BEGIN_TRY - { - ret_id = H5Acreate2(group, ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT); + + if (vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) { + /* Try to create the same attribute again (should fail) */ + H5E_BEGIN_TRY + { + ret_id = H5Acreate2(group, ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(ret_id, FAIL, "H5Acreate2"); } - H5E_END_TRY; - VERIFY(ret_id, FAIL, "H5Acreate2"); -#endif + /* Write attribute information */ ret = H5Awrite(attr, H5T_NATIVE_INT, attr_data2); CHECK(ret, FAIL, "H5Awrite"); @@ -555,24 +557,28 @@ test_attr_flush(hid_t fapl) att = H5Acreate2(set, ATTR1_NAME, H5T_NATIVE_DOUBLE, spc, H5P_DEFAULT, H5P_DEFAULT); CHECK(att, FAIL, "H5Acreate2"); -#ifndef NO_ATTR_FILL_VALUE_SUPPORT - ret = H5Aread(att, H5T_NATIVE_DOUBLE, &rdata); - CHECK(ret, FAIL, "H5Aread"); - if (!H5_DBL_ABS_EQUAL(rdata, 0.0)) - TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, 0.0); + if ((vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) && (vol_cap_flags_g & H5VL_CAP_FLAG_FILL_VALUES) && + (vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE)) { + ret = H5Aread(att, H5T_NATIVE_DOUBLE, &rdata); + CHECK(ret, FAIL, "H5Aread"); - ret = H5Fflush(fil, H5F_SCOPE_GLOBAL); - CHECK(ret, FAIL, "H5Fflush"); + if (!H5_DBL_ABS_EQUAL(rdata, 0.0)) + TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, 0.0); - ret = H5Aread(att, H5T_NATIVE_DOUBLE, &rdata); - CHECK(ret, FAIL, "H5Awrite"); + ret = H5Fflush(fil, H5F_SCOPE_GLOBAL); + CHECK(ret, FAIL, "H5Fflush"); + + ret = H5Aread(att, H5T_NATIVE_DOUBLE, &rdata); + CHECK(ret, FAIL, "H5Awrite"); + + if (!H5_DBL_ABS_EQUAL(rdata, 0.0)) + TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, 0.0); + } + else { + HDprintf("** SKIPPED attribute pre-read due to fill values not being supported **\n"); + } - if (!H5_DBL_ABS_EQUAL(rdata, 0.0)) - TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, 0.0); -#else - HDprintf("** SKIPPED attribute pre-read temporarily until attribute fill values supported **\n"); -#endif ret = H5Awrite(att, H5T_NATIVE_DOUBLE, &wdata); CHECK(ret, FAIL, "H5Awrite"); @@ -731,10 +737,8 @@ test_attr_compound_write(hid_t fapl) hid_t attr; /* Attribute ID */ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; hsize_t dims2[] = {ATTR4_DIM1, ATTR4_DIM2}; -#ifndef NO_PREVENT_CREATE_SAME_ATTRIBUTE_TWICE - hid_t ret_id; /* Generic hid_t return value */ -#endif - herr_t ret; /* Generic return value */ + hid_t ret_id; /* Generic hid_t return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Multiple Attribute Functions\n")); @@ -775,15 +779,17 @@ test_attr_compound_write(hid_t fapl) /* Create complex attribute for the dataset */ attr = H5Acreate2(dataset, ATTR4_NAME, tid1, sid2, H5P_DEFAULT, H5P_DEFAULT); CHECK(attr, FAIL, "H5Acreate2"); -#ifndef NO_PREVENT_CREATE_SAME_ATTRIBUTE_TWICE - /* Try to create the same attribute again (should fail) */ - H5E_BEGIN_TRY - { - ret_id = H5Acreate2(dataset, ATTR4_NAME, tid1, sid2, H5P_DEFAULT, H5P_DEFAULT); + + if (vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) { + /* Try to create the same attribute again (should fail) */ + H5E_BEGIN_TRY + { + ret_id = H5Acreate2(dataset, ATTR4_NAME, tid1, sid2, H5P_DEFAULT, H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(ret_id, FAIL, "H5Acreate2"); } - H5E_END_TRY; - VERIFY(ret_id, FAIL, "H5Acreate2"); -#endif + /* Write complex attribute data */ ret = H5Awrite(attr, tid1, attr_data4); CHECK(ret, FAIL, "H5Awrite"); @@ -975,10 +981,8 @@ test_attr_scalar_write(hid_t fapl) hid_t sid1, sid2; /* Dataspace ID */ hid_t attr; /* Attribute ID */ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; -#ifndef NO_PREVENT_CREATE_SAME_ATTRIBUTE_TWICE - hid_t ret_id; /* Generic hid_t return value */ -#endif - herr_t ret; /* Generic return value */ + hid_t ret_id; /* Generic hid_t return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Basic Attribute Functions\n")); @@ -1002,15 +1006,17 @@ test_attr_scalar_write(hid_t fapl) /* Create an attribute for the dataset */ attr = H5Acreate2(dataset, ATTR5_NAME, H5T_NATIVE_FLOAT, sid2, H5P_DEFAULT, H5P_DEFAULT); CHECK(attr, FAIL, "H5Acreate2"); -#ifndef NO_PREVENT_CREATE_SAME_ATTRIBUTE_TWICE - /* Try to create the same attribute again (should fail) */ - H5E_BEGIN_TRY - { - ret_id = H5Acreate2(dataset, ATTR5_NAME, H5T_NATIVE_FLOAT, sid2, H5P_DEFAULT, H5P_DEFAULT); + + if (vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) { + /* Try to create the same attribute again (should fail) */ + H5E_BEGIN_TRY + { + ret_id = H5Acreate2(dataset, ATTR5_NAME, H5T_NATIVE_FLOAT, sid2, H5P_DEFAULT, H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(ret_id, FAIL, "H5Acreate2"); } - H5E_END_TRY; - VERIFY(ret_id, FAIL, "H5Acreate2"); -#endif + /* Write attribute information */ ret = H5Awrite(attr, H5T_NATIVE_FLOAT, &attr_data5); CHECK(ret, FAIL, "H5Awrite"); @@ -1120,10 +1126,8 @@ test_attr_mult_write(hid_t fapl) hsize_t dims2[] = {ATTR1_DIM1}; hsize_t dims3[] = {ATTR2_DIM1, ATTR2_DIM2}; hsize_t dims4[] = {ATTR3_DIM1, ATTR3_DIM2, ATTR3_DIM3}; -#ifndef NO_PREVENT_CREATE_SAME_ATTRIBUTE_TWICE - hid_t ret_id; /* Generic hid_t return value */ -#endif - herr_t ret; /* Generic return value */ + hid_t ret_id; /* Generic hid_t return value */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Multiple Attribute Functions\n")); @@ -1151,15 +1155,17 @@ test_attr_mult_write(hid_t fapl) /* Create 1st attribute for the dataset */ attr = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT); CHECK(attr, FAIL, "H5Acreate2"); -#ifndef NO_PREVENT_CREATE_SAME_ATTRIBUTE_TWICE - /* Try to create the same attribute again (should fail) */ - H5E_BEGIN_TRY - { - ret_id = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT); + + if (vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) { + /* Try to create the same attribute again (should fail) */ + H5E_BEGIN_TRY + { + ret_id = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(ret_id, FAIL, "H5Acreate2"); } - H5E_END_TRY; - VERIFY(ret_id, FAIL, "H5Acreate2"); -#endif + /* Write 1st attribute data */ ret = H5Awrite(attr, H5T_NATIVE_INT, attr_data1); CHECK(ret, FAIL, "H5Awrite"); @@ -1179,15 +1185,17 @@ test_attr_mult_write(hid_t fapl) /* Create 2nd attribute for the dataset */ attr = H5Acreate2(dataset, ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT); CHECK(attr, FAIL, "H5Acreate2"); -#ifndef NO_PREVENT_CREATE_SAME_ATTRIBUTE_TWICE - /* Try to create the same attribute again (should fail) */ - H5E_BEGIN_TRY - { - ret_id = H5Acreate2(dataset, ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT); + + if (vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) { + /* Try to create the same attribute again (should fail) */ + H5E_BEGIN_TRY + { + ret_id = H5Acreate2(dataset, ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(ret_id, FAIL, "H5Acreate2"); } - H5E_END_TRY; - VERIFY(ret_id, FAIL, "H5Acreate2"); -#endif + /* Write 2nd attribute information */ ret = H5Awrite(attr, H5T_NATIVE_INT, attr_data2); CHECK(ret, FAIL, "H5Awrite"); @@ -1207,15 +1215,17 @@ test_attr_mult_write(hid_t fapl) /* Create 3rd attribute for the dataset */ attr = H5Acreate2(dataset, ATTR3_NAME, H5T_NATIVE_DOUBLE, sid2, H5P_DEFAULT, H5P_DEFAULT); CHECK(attr, FAIL, "H5Acreate2"); -#ifndef NO_PREVENT_CREATE_SAME_ATTRIBUTE_TWICE - /* Try to create the same attribute again (should fail) */ - H5E_BEGIN_TRY - { - ret_id = H5Acreate2(dataset, ATTR3_NAME, H5T_NATIVE_DOUBLE, sid2, H5P_DEFAULT, H5P_DEFAULT); + + if (vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) { + /* Try to create the same attribute again (should fail) */ + H5E_BEGIN_TRY + { + ret_id = H5Acreate2(dataset, ATTR3_NAME, H5T_NATIVE_DOUBLE, sid2, H5P_DEFAULT, H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(ret_id, FAIL, "H5Acreate2"); } - H5E_END_TRY; - VERIFY(ret_id, FAIL, "H5Acreate2"); -#endif + /* Write 3rd attribute information */ ret = H5Awrite(attr, H5T_NATIVE_DOUBLE, attr_data3); CHECK(ret, FAIL, "H5Awrite"); @@ -1605,15 +1615,17 @@ test_attr_delete(hid_t fapl) ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info3"); VERIFY(oinfo.num_attrs, 3, "H5Oget_info3"); -#ifndef NO_DELETE_NONEXISTENT_ATTRIBUTE - /* Try to delete bogus attribute */ - H5E_BEGIN_TRY - { - ret = H5Adelete(dataset, "Bogus"); + + if (vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) { + /* Try to delete bogus attribute */ + H5E_BEGIN_TRY + { + ret = H5Adelete(dataset, "Bogus"); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Adelete"); } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Adelete"); -#endif + /* Verify the correct number of attributes */ ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info3"); @@ -1709,7 +1721,6 @@ test_attr_delete(hid_t fapl) static void test_attr_dtype_shared(hid_t fapl) { -#ifndef NO_SHARED_DATATYPES hid_t file_id; /* File ID */ hid_t dset_id; /* Dataset ID */ hid_t space_id; /* Dataspace ID for dataset & attribute */ @@ -1723,164 +1734,162 @@ test_attr_dtype_shared(hid_t fapl) h5_stat_size_t filesize; /* Size of file after modifications */ #endif herr_t ret; /* Generic return value */ -#else - (void)fapl; -#endif + /* Output message about test being performed */ - MESSAGE(5, ("Testing Shared Datatypes with Attributes - SKIPPED for now due to no support for shared " - "datatypes\n")); -#ifndef NO_SHARED_DATATYPES - /* Create a file */ - file_id = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - CHECK(file_id, FAIL, "H5Fopen"); + MESSAGE(5, ("Testing Shared Datatypes with Attributes\n")); - /* Close file */ - ret = H5Fclose(file_id); - CHECK(ret, FAIL, "H5Fclose"); + if ((vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) && (vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) { + /* Create a file */ + file_id = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + CHECK(file_id, FAIL, "H5Fopen"); + + /* Close file */ + ret = H5Fclose(file_id); + CHECK(ret, FAIL, "H5Fclose"); #if 0 - /* Get size of file */ - empty_filesize = h5_get_file_size(FILENAME, fapl); - if (empty_filesize < 0) - TestErrPrintf("Line %d: file size wrong!\n", __LINE__); + /* Get size of file */ + empty_filesize = h5_get_file_size(FILENAME, fapl); + if (empty_filesize < 0) + TestErrPrintf("Line %d: file size wrong!\n", __LINE__); #endif - /* Re-open file */ - file_id = H5Fopen(FILENAME, H5F_ACC_RDWR, fapl); - CHECK(file_id, FAIL, "H5Fopen"); + /* Re-open file */ + file_id = H5Fopen(FILENAME, H5F_ACC_RDWR, fapl); + CHECK(file_id, FAIL, "H5Fopen"); - /* Create a datatype to commit and use */ - type_id = H5Tcopy(H5T_NATIVE_INT); - CHECK(type_id, FAIL, "H5Tcopy"); + /* Create a datatype to commit and use */ + type_id = H5Tcopy(H5T_NATIVE_INT); + CHECK(type_id, FAIL, "H5Tcopy"); - /* Commit datatype to file */ - ret = H5Tcommit2(file_id, TYPE1_NAME, type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Tcommit2"); + /* Commit datatype to file */ + ret = H5Tcommit2(file_id, TYPE1_NAME, type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); - /* Check reference count on named datatype */ - ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info_by_name3"); - VERIFY(oinfo.rc, 1, "H5Oget_info_by_name3"); + /* Check reference count on named datatype */ + ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name3"); + VERIFY(oinfo.rc, 1, "H5Oget_info_by_name3"); - /* Create dataspace for dataset */ - space_id = H5Screate(H5S_SCALAR); - CHECK(space_id, FAIL, "H5Screate"); + /* Create dataspace for dataset */ + space_id = H5Screate(H5S_SCALAR); + CHECK(space_id, FAIL, "H5Screate"); - /* Create dataset */ - dset_id = H5Dcreate2(file_id, DSET1_NAME, type_id, space_id, H5P_DEFAULT, dcpl_g, H5P_DEFAULT); - CHECK(dset_id, FAIL, "H5Dcreate2"); + /* Create dataset */ + dset_id = H5Dcreate2(file_id, DSET1_NAME, type_id, space_id, H5P_DEFAULT, dcpl_g, H5P_DEFAULT); + CHECK(dset_id, FAIL, "H5Dcreate2"); - /* Check reference count on named datatype */ - ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info_by_name3"); - VERIFY(oinfo.rc, 2, "H5Oget_info_by_name3"); + /* Check reference count on named datatype */ + ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name3"); + VERIFY(oinfo.rc, 2, "H5Oget_info_by_name3"); - /* Create attribute on dataset */ - attr_id = H5Acreate2(dset_id, ATTR1_NAME, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT); - CHECK(attr_id, FAIL, "H5Acreate2"); + /* Create attribute on dataset */ + attr_id = H5Acreate2(dset_id, ATTR1_NAME, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT); + CHECK(attr_id, FAIL, "H5Acreate2"); - /* Check reference count on named datatype */ - ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info_by_name3"); - VERIFY(oinfo.rc, 3, "H5Oget_info_by_name3"); + /* Check reference count on named datatype */ + ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name3"); + VERIFY(oinfo.rc, 3, "H5Oget_info_by_name3"); - /* Close attribute */ - ret = H5Aclose(attr_id); - CHECK(ret, FAIL, "H5Aclose"); + /* Close attribute */ + ret = H5Aclose(attr_id); + CHECK(ret, FAIL, "H5Aclose"); - /* Delete attribute */ - ret = H5Adelete(dset_id, ATTR1_NAME); - CHECK(ret, FAIL, "H5Adelete"); + /* Delete attribute */ + ret = H5Adelete(dset_id, ATTR1_NAME); + CHECK(ret, FAIL, "H5Adelete"); - /* Check reference count on named datatype */ - ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info_by_name3"); - VERIFY(oinfo.rc, 2, "H5Oget_info_by_name3"); + /* Check reference count on named datatype */ + ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name3"); + VERIFY(oinfo.rc, 2, "H5Oget_info_by_name3"); - /* Create attribute on dataset */ - attr_id = H5Acreate2(dset_id, ATTR1_NAME, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT); - CHECK(attr_id, FAIL, "H5Acreate2"); + /* Create attribute on dataset */ + attr_id = H5Acreate2(dset_id, ATTR1_NAME, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT); + CHECK(attr_id, FAIL, "H5Acreate2"); - /* Check reference count on named datatype */ - ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info_by_name3"); - VERIFY(oinfo.rc, 3, "H5Oget_info_by_name3"); + /* Check reference count on named datatype */ + ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name3"); + VERIFY(oinfo.rc, 3, "H5Oget_info_by_name3"); - /* Write data into the attribute */ - ret = H5Awrite(attr_id, H5T_NATIVE_INT, &data); - CHECK(ret, FAIL, "H5Awrite"); + /* Write data into the attribute */ + ret = H5Awrite(attr_id, H5T_NATIVE_INT, &data); + CHECK(ret, FAIL, "H5Awrite"); - /* Close attribute */ - ret = H5Aclose(attr_id); - CHECK(ret, FAIL, "H5Aclose"); + /* Close attribute */ + ret = H5Aclose(attr_id); + CHECK(ret, FAIL, "H5Aclose"); - /* Close dataset */ - ret = H5Dclose(dset_id); - CHECK(ret, FAIL, "H5Dclose"); + /* Close dataset */ + ret = H5Dclose(dset_id); + CHECK(ret, FAIL, "H5Dclose"); - /* Close dataspace */ - ret = H5Sclose(space_id); - CHECK(ret, FAIL, "H5Sclose"); + /* Close dataspace */ + ret = H5Sclose(space_id); + CHECK(ret, FAIL, "H5Sclose"); - /* Close datatype */ - ret = H5Tclose(type_id); - CHECK(ret, FAIL, "H5Tclose"); + /* Close datatype */ + ret = H5Tclose(type_id); + CHECK(ret, FAIL, "H5Tclose"); - /* Close file */ - ret = H5Fclose(file_id); - CHECK(ret, FAIL, "H5Fclose"); + /* Close file */ + ret = H5Fclose(file_id); + CHECK(ret, FAIL, "H5Fclose"); - /* Re-open file */ - file_id = H5Fopen(FILENAME, H5F_ACC_RDWR, fapl); - CHECK(file_id, FAIL, "H5Fopen"); + /* Re-open file */ + file_id = H5Fopen(FILENAME, H5F_ACC_RDWR, fapl); + CHECK(file_id, FAIL, "H5Fopen"); - /* Open dataset */ - dset_id = H5Dopen2(file_id, DSET1_NAME, H5P_DEFAULT); - CHECK(dset_id, FAIL, "H5Dopen2"); + /* Open dataset */ + dset_id = H5Dopen2(file_id, DSET1_NAME, H5P_DEFAULT); + CHECK(dset_id, FAIL, "H5Dopen2"); - /* Open attribute */ - attr_id = H5Aopen(dset_id, ATTR1_NAME, H5P_DEFAULT); - CHECK(attr_id, FAIL, "H5Aopen"); + /* Open attribute */ + attr_id = H5Aopen(dset_id, ATTR1_NAME, H5P_DEFAULT); + CHECK(attr_id, FAIL, "H5Aopen"); - /* Read data from the attribute */ - ret = H5Aread(attr_id, H5T_NATIVE_INT, &rdata); - CHECK(ret, FAIL, "H5Aread"); - VERIFY(data, rdata, "H5Aread"); + /* Read data from the attribute */ + ret = H5Aread(attr_id, H5T_NATIVE_INT, &rdata); + CHECK(ret, FAIL, "H5Aread"); + VERIFY(data, rdata, "H5Aread"); - /* Close attribute */ - ret = H5Aclose(attr_id); - CHECK(ret, FAIL, "H5Aclose"); + /* Close attribute */ + ret = H5Aclose(attr_id); + CHECK(ret, FAIL, "H5Aclose"); - /* Close dataset */ - ret = H5Dclose(dset_id); - CHECK(ret, FAIL, "H5Dclose"); + /* Close dataset */ + ret = H5Dclose(dset_id); + CHECK(ret, FAIL, "H5Dclose"); - /* Check reference count on named datatype */ - ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info_by_name3"); - VERIFY(oinfo.rc, 3, "H5Oget_info_by_name3"); + /* Check reference count on named datatype */ + ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name3"); + VERIFY(oinfo.rc, 3, "H5Oget_info_by_name3"); - /* Unlink the dataset */ - ret = H5Ldelete(file_id, DSET1_NAME, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Ldelete"); + /* Unlink the dataset */ + ret = H5Ldelete(file_id, DSET1_NAME, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Ldelete"); - /* Check reference count on named datatype */ - ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info_by_name3"); - VERIFY(oinfo.rc, 1, "H5Oget_info_by_name3"); + /* Check reference count on named datatype */ + ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name3"); + VERIFY(oinfo.rc, 1, "H5Oget_info_by_name3"); - /* Unlink the named datatype */ - ret = H5Ldelete(file_id, TYPE1_NAME, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Ldelete"); + /* Unlink the named datatype */ + ret = H5Ldelete(file_id, TYPE1_NAME, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Ldelete"); - /* Close file */ - ret = H5Fclose(file_id); - CHECK(ret, FAIL, "H5Fclose"); + /* Close file */ + ret = H5Fclose(file_id); + CHECK(ret, FAIL, "H5Fclose"); #if 0 - /* Check size of file */ - filesize = h5_get_file_size(FILENAME, fapl); - VERIFY(filesize, empty_filesize, "h5_get_file_size"); -#endif + /* Check size of file */ + filesize = h5_get_file_size(FILENAME, fapl); + VERIFY(filesize, empty_filesize, "h5_get_file_size"); #endif + } } /* test_attr_dtype_shared() */ /**************************************************************** @@ -2313,15 +2322,17 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl) /* Close attribute */ ret = H5Aclose(attr); CHECK(ret, FAIL, "H5Aclose"); -#ifndef NO_PREVENT_CREATE_SAME_ATTRIBUTE_TWICE - /* Attempt to add attribute again, which should fail */ - H5E_BEGIN_TRY - { - attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT); + + if (vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) { + /* Attempt to add attribute again, which should fail */ + H5E_BEGIN_TRY + { + attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(attr, FAIL, "H5Acreate2"); } - H5E_END_TRY; - VERIFY(attr, FAIL, "H5Acreate2"); -#endif + /* Close dataspace */ ret = H5Sclose(sid); CHECK(ret, FAIL, "H5Sclose"); @@ -5911,11 +5922,10 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us if (HDstrcmp(attrname, tmpname) != 0) TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__); - /* Don't test "native" order queries on link name order, since there's not - * a good way to easily predict the order of the links in the name index. - */ + /* Don't test "native" order queries on link name order, since there's not + * a good way to easily predict the order of the links in the name index. + */ -#ifndef NO_DECREASING_ALPHA_ITER_ORDER /* Verify the information for first attribute, in decreasing name order */ HDmemset(&ainfo, 0, sizeof(ainfo)); ret = H5Aget_info_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, n, &ainfo, H5P_DEFAULT); @@ -5935,7 +5945,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us CHECK(ret, FAIL, "H5Aget_name_by_idx"); if (HDstrcmp(attrname, tmpname) != 0) TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__); -#endif + /* Retrieve current # of errors */ if (old_nerrs == nerrors) return (0); @@ -6463,6 +6473,11 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) MESSAGE(5, ("Testing Deleting Attribute By Index\n")) + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + MESSAGE(5, (" SKIPPED\n")) + return; + } + /* Create dataspace for dataset & attributes */ sid = H5Screate(H5S_SCALAR); CHECK(sid, FAIL, "H5Screate"); @@ -6516,18 +6531,14 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) "Creation Order Index\n")) } /* end if */ else { -#ifndef NO_DECREASING_ALPHA_ITER_ORDER if (use_index) MESSAGE(5, ("Testing Deleting Attribute By Name Index in Decreasing Order " "w/Creation Order Index\n")) else MESSAGE(5, ("Testing Deleting Attribute By Name Index in Decreasing Order w/o " "Creation Order Index\n")) -#else - continue; -#endif - } /* end else */ - } /* end else */ + } + } /* end else */ /* Create file */ fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl); @@ -7096,7 +7107,6 @@ attr_iterate1_cb(hid_t loc_id, const char *attr_name, void *_op_data) #endif /* H5_NO_DEPRECATED_SYMBOLS */ #endif -#ifndef NO_ITERATION_RESTART /*------------------------------------------------------------------------- * Function: attr_iterate2_fail_cb * @@ -7148,6 +7158,13 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx /* Retrieve the current # of reported errors */ old_nerrs = nerrors; + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { + SKIPPED(); + HDprintf(" API functions for iterate aren't " + "supported with this connector\n"); + return 1; + } + /* Iterate over attributes on object */ iter_info->nskipped = (unsigned)(skip = 0); iter_info->order = order; @@ -7425,7 +7442,6 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx else return (-1); } /* end attr_iterate_check() */ -#endif /**************************************************************** ** @@ -7451,19 +7467,21 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl) hsize_t name_count; /* # of records in name index */ hsize_t corder_count; /* # of records in creation order index */ #endif - H5_index_t idx_type; /* Type of index to operate on */ - H5_iter_order_t order; /* Order within in the index */ - attr_iter_info_t iter_info; /* Iterator info */ - hbool_t *visited = NULL; /* Array of flags for visiting links */ -#ifndef NO_ITERATION_RESTART - hsize_t idx; /* Start index for iteration */ -#endif - unsigned use_index; /* Use index on creation order values */ - const char *dsetname; /* Name of dataset for attributes */ - char attrname[NAME_BUF_SIZE]; /* Name of attribute */ - unsigned curr_dset; /* Current dataset to work on */ - unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ + H5_index_t idx_type; /* Type of index to operate on */ + H5_iter_order_t order; /* Order within in the index */ + attr_iter_info_t iter_info; /* Iterator info */ + hbool_t *visited = NULL; /* Array of flags for visiting links */ + hsize_t idx; /* Start index for iteration */ + unsigned use_index; /* Use index on creation order values */ + const char *dsetname; /* Name of dataset for attributes */ + char attrname[NAME_BUF_SIZE]; /* Name of attribute */ + unsigned curr_dset; /* Current dataset to work on */ + unsigned u; /* Local index variable */ + herr_t ret; /* Generic return value */ + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + return; + } /* Create dataspace for dataset & attributes */ sid = H5Screate(H5S_SCALAR); @@ -7524,16 +7542,12 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl) "w/o Creation Order Index\n")) } /* end if */ else { -#ifndef NO_DECREASING_ALPHA_ITER_ORDER if (use_index) MESSAGE(5, ("Testing Iterating over Attributes By Name Index in Decreasing Order " "w/Creation Order Index\n")) else MESSAGE(5, ("Testing Iterating over Attributes By Name Index in Decreasing Order " "w/o Creation Order Index\n")) -#else - continue; -#endif } /* end else */ } /* end else */ @@ -7626,38 +7640,39 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl) is_dense = H5O__is_attr_dense_test(my_dataset); VERIFY(is_dense, FALSE, "H5O__is_attr_dense_test"); #endif -#ifndef NO_ITERATION_RESTART - /* Check for out of bound iteration */ - idx = u; - H5E_BEGIN_TRY - { - ret = H5Aiterate2(my_dataset, idx_type, order, &idx, attr_iterate2_cb, NULL); - } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Aiterate2"); - idx = u; - H5E_BEGIN_TRY - { - ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &idx, attr_iterate2_cb, NULL, - H5P_DEFAULT); + if (vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) { + /* Check for out of bound iteration */ + idx = u; + H5E_BEGIN_TRY + { + ret = H5Aiterate2(my_dataset, idx_type, order, &idx, attr_iterate2_cb, NULL); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Aiterate2"); + + idx = u; + H5E_BEGIN_TRY + { + ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &idx, attr_iterate2_cb, + NULL, H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Aiterate_by_name"); + + idx = u; + H5E_BEGIN_TRY + { + ret = H5Aiterate_by_name(my_dataset, ".", idx_type, order, &idx, attr_iterate2_cb, + NULL, H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Aiterate_by_name"); + + /* Test iteration over attributes stored compactly */ + ret = attr_iterate_check(fid, dsetname, my_dataset, idx_type, order, u, &iter_info); + CHECK(ret, FAIL, "attr_iterate_check"); } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Aiterate_by_name"); - - idx = u; - H5E_BEGIN_TRY - { - ret = H5Aiterate_by_name(my_dataset, ".", idx_type, order, &idx, attr_iterate2_cb, - NULL, H5P_DEFAULT); - } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Aiterate_by_name"); - - /* Test iteration over attributes stored compactly */ - ret = attr_iterate_check(fid, dsetname, my_dataset, idx_type, order, u, &iter_info); - CHECK(ret, FAIL, "attr_iterate_check"); -#endif } /* end for */ /* Work on all the datasets */ @@ -7725,41 +7740,42 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl) if (use_index) VERIFY(name_count, corder_count, "H5O__attr_dense_info_test"); VERIFY(name_count, (max_compact * 2), "H5O__attr_dense_info_test"); - } /* end if */ -#endif -#ifndef NO_ITERATION_RESTART - /* Check for out of bound iteration */ - idx = u; - H5E_BEGIN_TRY - { - ret = H5Aiterate2(my_dataset, idx_type, order, &idx, attr_iterate2_cb, NULL); - } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Aiterate2"); - - idx = u; - H5E_BEGIN_TRY - { - ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &idx, attr_iterate2_cb, NULL, - H5P_DEFAULT); } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Aiterate_by_name"); +#endif - idx = u; - H5E_BEGIN_TRY - { - ret = H5Aiterate_by_name(my_dataset, ".", idx_type, order, &idx, attr_iterate2_cb, - NULL, H5P_DEFAULT); + if (vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) { + /* Check for out of bound iteration */ + idx = u; + H5E_BEGIN_TRY + { + ret = H5Aiterate2(my_dataset, idx_type, order, &idx, attr_iterate2_cb, NULL); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Aiterate2"); + + idx = u; + H5E_BEGIN_TRY + { + ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &idx, attr_iterate2_cb, + NULL, H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Aiterate_by_name"); + + idx = u; + H5E_BEGIN_TRY + { + ret = H5Aiterate_by_name(my_dataset, ".", idx_type, order, &idx, attr_iterate2_cb, + NULL, H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Aiterate_by_name"); + + /* Test iteration over attributes stored densely */ + ret = attr_iterate_check(fid, dsetname, my_dataset, idx_type, order, u, &iter_info); + CHECK(ret, FAIL, "attr_iterate_check"); } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Aiterate_by_name"); - - /* Test iteration over attributes stored densely */ - ret = attr_iterate_check(fid, dsetname, my_dataset, idx_type, order, u, &iter_info); - CHECK(ret, FAIL, "attr_iterate_check"); -#endif - } /* end for */ + } /* Close Datasets */ ret = H5Dclose(dset1); @@ -7879,6 +7895,10 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) hid_t ret_id; /* Generic hid_t return value */ herr_t ret; /* Generic return value */ + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + return; + } + /* Create dataspace for dataset & attributes */ sid = H5Screate(H5S_SCALAR); CHECK(sid, FAIL, "H5Screate"); @@ -7932,16 +7952,12 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) "Creation Order Index\n")) } /* end if */ else { -#ifndef NO_DECREASING_ALPHA_ITER_ORDER if (use_index) MESSAGE(5, ("Testing Opening Attributes By Name Index in Decreasing Order " "w/Creation Order Index\n")) else MESSAGE(5, ("Testing Opening Attributes By Name Index in Decreasing Order w/o " "Creation Order Index\n")) -#else - continue; -#endif } /* end else */ } /* end else */ diff --git a/hdf5_test/testhdf5.c b/hdf5_test/testhdf5.c index 2f31475..e4dc0b6 100644 --- a/hdf5_test/testhdf5.c +++ b/hdf5_test/testhdf5.c @@ -41,6 +41,8 @@ char *paraprefix = NULL; /* for command line option para-prefix */ /* Length of multi-file VFD filename buffers */ #define H5TEST_MULTI_FILENAME_LEN 1024 +uint64_t vol_cap_flags_g = H5VL_CAP_FLAG_NONE; + /* * This routine is designed to provide equivalent functionality to 'printf' * and allow easy replacement for environments which don't have stdin/stdout @@ -96,7 +98,7 @@ TestErrPrintf(const char *format, ...) * further calls to getenv_all take place. * * Return: pointer to a string containing the value of the environment variable - * NULL if the varialbe doesn't exist in task 'root's environment. + * NULL if the variable doesn't exist in task 'root's environment. * * Programmer: Leon Arber * 4/4/05 diff --git a/hdf5_test/testhdf5.h b/hdf5_test/testhdf5.h index c9e1b0d..3d945f8 100644 --- a/hdf5_test/testhdf5.h +++ b/hdf5_test/testhdf5.h @@ -21,7 +21,6 @@ /* #include "h5test.h" */ #include "hdf5.h" #include "H5private.h" -#include "vol_tests_disabled.h" #define VERBO_NONE 0 /* None */ #define VERBO_DEF 3 /* Default */ @@ -343,6 +342,9 @@ void cleanup_sohm(void); void cleanup_misc(void); void cleanup_unicode(void); +/* Extern global variables */ +extern uint64_t vol_cap_flags_g; + #ifdef __cplusplus } #endif diff --git a/hdf5_test/tfile.c b/hdf5_test/tfile.c index bc0f18e..c0b2921 100644 --- a/hdf5_test/tfile.c +++ b/hdf5_test/tfile.c @@ -258,18 +258,20 @@ test_file_create(void) /* Create with H5F_ACC_EXCL */ fid1 = H5Fcreate(FILE1, H5F_ACC_EXCL, H5P_DEFAULT, H5P_DEFAULT); CHECK(fid1, FAIL, "H5Fcreate"); -#ifndef NO_TRUNCATE_OPEN_FILE - /* - * try to create the same file with H5F_ACC_TRUNC. This should fail - * because fid1 is the same file and is currently open. - */ - H5E_BEGIN_TRY - { - fid2 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + if (vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) { + /* + * try to create the same file with H5F_ACC_TRUNC. This should fail + * because fid1 is the same file and is currently open. + */ + H5E_BEGIN_TRY + { + fid2 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(fid2, FAIL, "H5Fcreate"); } - H5E_END_TRY; - VERIFY(fid2, FAIL, "H5Fcreate"); -#endif + /* Close all files */ ret = H5Fclose(fid1); CHECK(ret, FAIL, "H5Fclose"); @@ -295,18 +297,20 @@ test_file_create(void) /* Test create with H5F_ACC_TRUNC. This will truncate the existing file. */ fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); CHECK(fid1, FAIL, "H5Fcreate"); -#ifndef NO_TRUNCATE_OPEN_FILE - /* - * Try to truncate first file again. This should fail because fid1 is the - * same file and is currently open. - */ - H5E_BEGIN_TRY - { - fid2 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + if (vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) { + /* + * Try to truncate first file again. This should fail because fid1 is the + * same file and is currently open. + */ + H5E_BEGIN_TRY + { + fid2 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(fid2, FAIL, "H5Fcreate"); } - H5E_END_TRY; - VERIFY(fid2, FAIL, "H5Fcreate"); -#endif + /* * Try with H5F_ACC_EXCL. This should fail too because the file already * exists. @@ -1283,30 +1287,31 @@ test_get_obj_ids(void) /* Close the file first */ H5Fclose(fid); -#ifndef WRONG_DATATYPE_OBJ_COUNT - /* Get the number of all opened objects */ - oid_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL); - CHECK(oid_count, FAIL, "H5Fget_obj_count"); - VERIFY(oid_count, NDSETS, "H5Fget_obj_count"); - oid_list = (hid_t *)HDcalloc((size_t)oid_count, sizeof(hid_t)); - CHECK_PTR(oid_list, "HDcalloc"); + if (vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE) { + /* Get the number of all opened objects */ + oid_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL); + CHECK(oid_count, FAIL, "H5Fget_obj_count"); + VERIFY(oid_count, NDSETS, "H5Fget_obj_count"); - /* Get the list of all opened objects */ - ret_count = H5Fget_obj_ids((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL, (size_t)oid_count, oid_list); - CHECK(ret_count, FAIL, "H5Fget_obj_ids"); - VERIFY(ret_count, NDSETS, "H5Fget_obj_ids"); + oid_list = (hid_t *)HDcalloc((size_t)oid_count, sizeof(hid_t)); + CHECK_PTR(oid_list, "HDcalloc"); - H5E_BEGIN_TRY - { - /* Close all open objects with H5Oclose */ - for (n = 0; n < oid_count; n++) - H5Oclose(oid_list[n]); - } - H5E_END_TRY; + /* Get the list of all opened objects */ + ret_count = H5Fget_obj_ids((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL, (size_t)oid_count, oid_list); + CHECK(ret_count, FAIL, "H5Fget_obj_ids"); + VERIFY(ret_count, NDSETS, "H5Fget_obj_ids"); - HDfree(oid_list); -#endif + H5E_BEGIN_TRY + { + /* Close all open objects with H5Oclose */ + for (n = 0; n < oid_count; n++) + H5Oclose(oid_list[n]); + } + H5E_END_TRY; + + HDfree(oid_list); + } } /**************************************************************** @@ -2342,11 +2347,13 @@ test_file_open_overlap(void) /* Create dataset in group w/first file ID */ did1 = H5Dcreate2(gid, DSET1, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(did1, FAIL, "H5Dcreate2"); -#ifndef WRONG_DATATYPE_OBJ_COUNT - /* Check number of objects opened in first file */ - nobjs = H5Fget_obj_count(fid1, H5F_OBJ_LOCAL | H5F_OBJ_ALL); - VERIFY(nobjs, 3, "H5Fget_obj_count"); /* 3 == file, dataset & group */ -#endif + + if (vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE) { + /* Check number of objects opened in first file */ + nobjs = H5Fget_obj_count(fid1, H5F_OBJ_LOCAL | H5F_OBJ_ALL); + VERIFY(nobjs, 3, "H5Fget_obj_count"); /* 3 == file, dataset & group */ + } + /* Close dataset */ ret = H5Dclose(did1); CHECK(ret, FAIL, "H5Dclose"); diff --git a/hdf5_test/th5s.c b/hdf5_test/th5s.c index cb1c899..f09cfeb 100644 --- a/hdf5_test/th5s.c +++ b/hdf5_test/th5s.c @@ -115,13 +115,11 @@ struct space4_struct { static void test_h5s_basic(void) { - hid_t fid1; /* HDF5 File IDs */ - hid_t sid1, sid2; /* Dataspace ID */ - hid_t dset1; /* Dataset ID */ -#ifndef NO_VALIDATE_DATASPACE - hid_t aid1; /* Attribute ID */ -#endif - int rank; /* Logical rank of dataspace */ + hid_t fid1; /* HDF5 File IDs */ + hid_t sid1, sid2; /* Dataspace ID */ + hid_t dset1; /* Dataset ID */ + hid_t aid1; /* Attribute ID */ + int rank; /* Logical rank of dataspace */ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; hsize_t dims2[] = {SPACE2_DIM1, SPACE2_DIM2, SPACE2_DIM3, SPACE2_DIM4}; hsize_t dims3[H5S_MAX_RANK + 1]; @@ -254,15 +252,18 @@ test_h5s_basic(void) CHECK(sid1, FAIL, "H5Screate"); sid2 = H5Screate_simple(1, dims1, dims1); CHECK(sid2, FAIL, "H5Screate"); -#ifndef NO_VALIDATE_DATASPACE - /* This dataset's space has no extent; it should not be created */ - H5E_BEGIN_TRY - { - dset1 = H5Dcreate2(fid1, BASICDATASET, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + if (vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) { + /* This dataset's space has no extent; it should not be created */ + H5E_BEGIN_TRY + { + dset1 = + H5Dcreate2(fid1, BASICDATASET, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + } + H5E_END_TRY + VERIFY(dset1, FAIL, "H5Dcreate2"); } - H5E_END_TRY - VERIFY(dset1, FAIL, "H5Dcreate2"); -#endif + dset1 = H5Dcreate2(fid1, BASICDATASET2, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(dset1, FAIL, "H5Dcreate2"); @@ -273,21 +274,23 @@ test_h5s_basic(void) } H5E_END_TRY VERIFY(ret, FAIL, "H5Dwrite"); -#ifndef NO_VALIDATE_DATASPACE - H5E_BEGIN_TRY - { - ret = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, sid1, H5P_DEFAULT, &n); - } - H5E_END_TRY - VERIFY(ret, FAIL, "H5Dwrite"); - H5E_BEGIN_TRY - { - ret = H5Dwrite(dset1, H5T_NATIVE_INT, sid1, sid1, H5P_DEFAULT, &n); + if (vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) { + H5E_BEGIN_TRY + { + ret = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, sid1, H5P_DEFAULT, &n); + } + H5E_END_TRY + VERIFY(ret, FAIL, "H5Dwrite"); + + H5E_BEGIN_TRY + { + ret = H5Dwrite(dset1, H5T_NATIVE_INT, sid1, sid1, H5P_DEFAULT, &n); + } + H5E_END_TRY + VERIFY(ret, FAIL, "H5Dwrite"); } - H5E_END_TRY - VERIFY(ret, FAIL, "H5Dwrite"); -#endif + /* Try to iterate using the bad dataspace */ H5E_BEGIN_TRY { @@ -303,15 +306,17 @@ test_h5s_basic(void) } H5E_END_TRY VERIFY(ret, FAIL, "H5Dfill"); -#ifndef NO_VALIDATE_DATASPACE - /* Now use the bad dataspace as the space for an attribute */ - H5E_BEGIN_TRY - { - aid1 = H5Acreate2(dset1, BASICATTR, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT); + + if ((vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) && (vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { + /* Now use the bad dataspace as the space for an attribute */ + H5E_BEGIN_TRY + { + aid1 = H5Acreate2(dset1, BASICATTR, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT); + } + H5E_END_TRY + VERIFY(aid1, FAIL, "H5Acreate2"); } - H5E_END_TRY - VERIFY(aid1, FAIL, "H5Acreate2"); -#endif + /* Make sure that dataspace reads using the bad dataspace fail */ H5E_BEGIN_TRY { @@ -319,21 +324,23 @@ test_h5s_basic(void) } H5E_END_TRY VERIFY(ret, FAIL, "H5Dread"); -#ifndef NO_VALIDATE_DATASPACE - H5E_BEGIN_TRY - { - ret = H5Dread(dset1, H5T_NATIVE_INT, H5S_ALL, sid1, H5P_DEFAULT, &n); - } - H5E_END_TRY - VERIFY(ret, FAIL, "H5Dread"); - H5E_BEGIN_TRY - { - ret = H5Dread(dset1, H5T_NATIVE_INT, sid1, sid1, H5P_DEFAULT, &n); + if (vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) { + H5E_BEGIN_TRY + { + ret = H5Dread(dset1, H5T_NATIVE_INT, H5S_ALL, sid1, H5P_DEFAULT, &n); + } + H5E_END_TRY + VERIFY(ret, FAIL, "H5Dread"); + + H5E_BEGIN_TRY + { + ret = H5Dread(dset1, H5T_NATIVE_INT, sid1, sid1, H5P_DEFAULT, &n); + } + H5E_END_TRY + VERIFY(ret, FAIL, "H5Dread"); } - H5E_END_TRY - VERIFY(ret, FAIL, "H5Dread"); -#endif + /* Clean up */ ret = H5Dclose(dset1); CHECK(ret, FAIL, "H5Dclose"); @@ -577,35 +584,33 @@ test_h5s_null(void) static void test_h5s_zero_dim(void) { - hid_t fid1; /* HDF5 File IDs */ - hid_t sid1, attr_sid; /* Dataspace ID */ - hid_t sid_chunk; /* Dataspace ID for chunked dataset */ - hid_t dset1; /* Dataset ID */ - hid_t plist_id; /* Dataset creation property list */ - hid_t attr; /* Attribute ID */ - int rank; /* Logical rank of dataspace */ - hsize_t dims1[] = {0, SPACE1_DIM2, SPACE1_DIM3}; - hsize_t max_dims[] = {SPACE1_DIM1 + 1, SPACE1_DIM2, SPACE1_DIM3}; - hsize_t extend_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; - hsize_t chunk_dims[] = {SPACE1_DIM1, SPACE1_DIM2 / 3, SPACE1_DIM3}; - hsize_t tdims[SPACE1_RANK]; /* Dimension array to test with */ - int wdata[SPACE1_DIM2][SPACE1_DIM3]; - int rdata[SPACE1_DIM2][SPACE1_DIM3]; - short wdata_short[SPACE1_DIM2][SPACE1_DIM3]; - short rdata_short[SPACE1_DIM2][SPACE1_DIM3]; - int wdata_real[SPACE1_DIM1][SPACE1_DIM2][SPACE1_DIM3]; - int rdata_real[SPACE1_DIM1][SPACE1_DIM2][SPACE1_DIM3]; -#ifndef NO_CHECK_SELECTION_BOUNDS - int val = 3; - hsize_t start[] = {0, 0, 0}; - hsize_t count[] = {3, 15, 13}; - hsize_t coord[1][3]; /* Coordinates for point selection */ -#endif - hssize_t nelem; /* Number of elements */ - H5S_sel_type sel_type; /* Type of selection currently */ - H5S_class_t stype; /* dataspace type */ - H5D_alloc_time_t alloc_time; /* Space allocation time */ - herr_t ret; /* Generic return value */ + hid_t fid1; /* HDF5 File IDs */ + hid_t sid1, attr_sid; /* Dataspace ID */ + hid_t sid_chunk; /* Dataspace ID for chunked dataset */ + hid_t dset1; /* Dataset ID */ + hid_t plist_id; /* Dataset creation property list */ + hid_t attr; /* Attribute ID */ + int rank; /* Logical rank of dataspace */ + hsize_t dims1[] = {0, SPACE1_DIM2, SPACE1_DIM3}; + hsize_t max_dims[] = {SPACE1_DIM1 + 1, SPACE1_DIM2, SPACE1_DIM3}; + hsize_t extend_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; + hsize_t chunk_dims[] = {SPACE1_DIM1, SPACE1_DIM2 / 3, SPACE1_DIM3}; + hsize_t tdims[SPACE1_RANK]; /* Dimension array to test with */ + int wdata[SPACE1_DIM2][SPACE1_DIM3]; + int rdata[SPACE1_DIM2][SPACE1_DIM3]; + short wdata_short[SPACE1_DIM2][SPACE1_DIM3]; + short rdata_short[SPACE1_DIM2][SPACE1_DIM3]; + int wdata_real[SPACE1_DIM1][SPACE1_DIM2][SPACE1_DIM3]; + int rdata_real[SPACE1_DIM1][SPACE1_DIM2][SPACE1_DIM3]; + int val = 3; + hsize_t start[] = {0, 0, 0}; + hsize_t count[] = {3, 15, 13}; + hsize_t coord[1][3]; /* Coordinates for point selection */ + hssize_t nelem; /* Number of elements */ + H5S_sel_type sel_type; /* Type of selection currently */ + H5S_class_t stype; /* dataspace type */ + H5D_alloc_time_t alloc_time; /* Space allocation time */ + herr_t ret; /* Generic return value */ unsigned int i, j, k; /* Output message about test being performed */ @@ -743,38 +748,42 @@ test_h5s_zero_dim(void) } } } -#ifndef NO_CHECK_SELECTION_BOUNDS - /* Select a hyperslab beyond its current dimension sizes, then try to write - * the data. It should fail. */ - ret = H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, NULL, count, NULL); - CHECK(ret, FAIL, "H5Sselect_hyperslab"); - H5E_BEGIN_TRY - { - ret = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, sid1, H5P_DEFAULT, wdata); + if (vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) { + /* Select a hyperslab beyond its current dimension sizes, then try to write + * the data. It should fail. */ + ret = H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, NULL, count, NULL); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + + H5E_BEGIN_TRY + { + ret = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, sid1, H5P_DEFAULT, wdata); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Dwrite"); } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Dwrite"); -#endif + /* Change to "none" selection */ ret = H5Sselect_none(sid1); CHECK(ret, FAIL, "H5Sselect_none"); -#ifndef NO_CHECK_SELECTION_BOUNDS - /* Select a point beyond the dimension size, then try to write the data. - * It should fail. */ - coord[0][0] = 2; - coord[0][1] = 5; - coord[0][2] = 3; - ret = H5Sselect_elements(sid1, H5S_SELECT_SET, (size_t)1, (const hsize_t *)coord); - CHECK(ret, FAIL, "H5Sselect_elements"); - H5E_BEGIN_TRY - { - ret = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, sid1, H5P_DEFAULT, &val); + if (vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) { + /* Select a point beyond the dimension size, then try to write the data. + * It should fail. */ + coord[0][0] = 2; + coord[0][1] = 5; + coord[0][2] = 3; + ret = H5Sselect_elements(sid1, H5S_SELECT_SET, (size_t)1, (const hsize_t *)coord); + CHECK(ret, FAIL, "H5Sselect_elements"); + + H5E_BEGIN_TRY + { + ret = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, sid1, H5P_DEFAULT, &val); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Dwrite"); } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Dwrite"); -#endif + /* Restore the selection to all */ ret = H5Sselect_all(sid1); CHECK(ret, FAIL, "H5Sselect_all"); @@ -864,17 +873,18 @@ test_h5s_zero_dim(void) HDprintf("element [%d][%d] is %d but should have been 7\n", i, j, rdata[i][j]); } } -#ifndef NO_CHECK_SELECTION_BOUNDS - /* Now extend the first dimension size of the dataset to SPACE1_DIM1*3 past the maximal size. - * It is supposed to fail. */ - extend_dims[0] = SPACE1_DIM1 * 3; - H5E_BEGIN_TRY - { - ret = H5Dset_extent(dset1, extend_dims); + if ((vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) && + (vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { + /* Now extend the first dimension size of the dataset to SPACE1_DIM1*3 past the maximal size. + * It is supposed to fail. */ + extend_dims[0] = SPACE1_DIM1 * 3; + H5E_BEGIN_TRY + { + ret = H5Dset_extent(dset1, extend_dims); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Dset_extent"); } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Dset_extent"); -#endif ret = H5Pclose(plist_id); CHECK(ret, FAIL, "H5Pclose"); diff --git a/hdf5_test/titerate.c b/hdf5_test/titerate.c index 6cbebbd..6d86130 100644 --- a/hdf5_test/titerate.c +++ b/hdf5_test/titerate.c @@ -60,13 +60,11 @@ typedef struct searched_err_t { static int find_err_msg_cb(unsigned n, const H5E_error2_t *err_desc, void *_client_data); #endif /* Local functions */ -int iter_strcmp(const void *s1, const void *s2); -int iter_strcmp2(const void *s1, const void *s2); -#ifndef NO_ITERATION_RESTART +int iter_strcmp(const void *s1, const void *s2); +int iter_strcmp2(const void *s1, const void *s2); static herr_t liter_cb(hid_t group, const char *name, const H5L_info2_t *info, void *op_data); static herr_t liter_cb2(hid_t group, const char *name, const H5L_info2_t *info, void *op_data); -#endif -herr_t aiter_cb(hid_t group, const char *name, const H5A_info_t *ainfo, void *op_data); +herr_t aiter_cb(hid_t group, const char *name, const H5A_info_t *ainfo, void *op_data); /**************************************************************** ** @@ -84,7 +82,6 @@ iter_strcmp(const void *s1, const void *s2) ** liter_cb(): Custom link iteration callback routine. ** ****************************************************************/ -#ifndef NO_ITERATION_RESTART static herr_t liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR_UNUSED *link_info, void *op_data) @@ -93,6 +90,13 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR static int count = 0; static int count2 = 0; + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { + SKIPPED(); + HDprintf(" API functions for iterate aren't " + "supported with this connector\n"); + return 1; + } + HDstrcpy(info->name, name); switch (info->command) { @@ -115,7 +119,6 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR return (-1); } /* end switch */ } /* end liter_cb() */ -#endif /**************************************************************** ** @@ -125,7 +128,6 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR static void test_iter_group(hid_t fapl, hbool_t new_format) { -#ifndef NO_ITERATION_RESTART hid_t file; /* File ID */ hid_t dataset; /* Dataset ID */ hid_t datatype; /* Common datatype ID */ @@ -139,249 +141,248 @@ test_iter_group(hid_t fapl, hbool_t new_format) iter_info info; /* Custom iteration information */ H5G_info_t ginfo; /* Buffer for querying object's info */ herr_t ret; /* Generic return value */ -#else - (void)fapl; - (void)new_format; -#endif /* Output message about test being performed */ - MESSAGE( - 5, ("Testing Group Iteration Functionality - SKIPPED for now due to no iteration restart support\n")); -#ifndef NO_ITERATION_RESTART - /* Create the test file with the datasets */ - file = H5Fcreate(DATAFILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - CHECK(file, FAIL, "H5Fcreate"); - - /* Test iterating over empty group */ - info.command = RET_ZERO; - idx = 0; - ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info); - VERIFY(ret, SUCCEED, "H5Literate2"); + MESSAGE(5, ("Testing Group Iteration Functionality\n")); - datatype = H5Tcopy(H5T_NATIVE_INT); - CHECK(datatype, FAIL, "H5Tcopy"); + if ((vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) && (vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) && + (vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) && (vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) && + (vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) && (vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) && + (vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE)) { + /* Create the test file with the datasets */ + file = H5Fcreate(DATAFILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + CHECK(file, FAIL, "H5Fcreate"); - filespace = H5Screate(H5S_SCALAR); - CHECK(filespace, FAIL, "H5Screate"); + /* Test iterating over empty group */ + info.command = RET_ZERO; + idx = 0; + ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info); + VERIFY(ret, SUCCEED, "H5Literate2"); - for (i = 0; i < NDATASETS; i++) { - HDsnprintf(name, sizeof(name), "Dataset %d", i); - dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - CHECK(dataset, FAIL, "H5Dcreate2"); + datatype = H5Tcopy(H5T_NATIVE_INT); + CHECK(datatype, FAIL, "H5Tcopy"); - /* Keep a copy of the dataset names around for later */ - lnames[i] = HDstrdup(name); - CHECK_PTR(lnames[i], "strdup"); + filespace = H5Screate(H5S_SCALAR); + CHECK(filespace, FAIL, "H5Screate"); - ret = H5Dclose(dataset); - CHECK(ret, FAIL, "H5Dclose"); - } /* end for */ + for (i = 0; i < NDATASETS; i++) { + HDsnprintf(name, sizeof(name), "Dataset %d", i); + dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(dataset, FAIL, "H5Dcreate2"); - /* Create a group and named datatype under root group for testing */ - grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Gcreate2"); + /* Keep a copy of the dataset names around for later */ + lnames[i] = HDstrdup(name); + CHECK_PTR(lnames[i], "strdup"); - lnames[NDATASETS] = HDstrdup("grp"); - CHECK_PTR(lnames[NDATASETS], "strdup"); + ret = H5Dclose(dataset); + CHECK(ret, FAIL, "H5Dclose"); + } /* end for */ - ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Tcommit2"); + /* Create a group and named datatype under root group for testing */ + grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Gcreate2"); - lnames[NDATASETS + 1] = HDstrdup("dtype"); - CHECK_PTR(lnames[NDATASETS], "strdup"); + lnames[NDATASETS] = HDstrdup("grp"); + CHECK_PTR(lnames[NDATASETS], "strdup"); - /* Close everything up */ - ret = H5Tclose(datatype); - CHECK(ret, FAIL, "H5Tclose"); + ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); - ret = H5Gclose(grp); - CHECK(ret, FAIL, "H5Gclose"); + lnames[NDATASETS + 1] = HDstrdup("dtype"); + CHECK_PTR(lnames[NDATASETS], "strdup"); - ret = H5Sclose(filespace); - CHECK(ret, FAIL, "H5Sclose"); + /* Close everything up */ + ret = H5Tclose(datatype); + CHECK(ret, FAIL, "H5Tclose"); - ret = H5Fclose(file); - CHECK(ret, FAIL, "H5Fclose"); + ret = H5Gclose(grp); + CHECK(ret, FAIL, "H5Gclose"); - /* Sort the dataset names */ - HDqsort(lnames, (size_t)(NDATASETS + 2), sizeof(char *), iter_strcmp); + ret = H5Sclose(filespace); + CHECK(ret, FAIL, "H5Sclose"); - /* Iterate through the datasets in the root group in various ways */ - file = H5Fopen(DATAFILE, H5F_ACC_RDONLY, fapl); - CHECK(file, FAIL, "H5Fopen"); + ret = H5Fclose(file); + CHECK(ret, FAIL, "H5Fclose"); - /* These two functions, H5Oget_info_by_idx and H5Lget_name_by_idx, actually - * iterate through B-tree for group members in internal library design. - */ - root_group = H5Gopen2(file, "/", H5P_DEFAULT); - CHECK(root_group, FAIL, "H5Gopen2"); + /* Sort the dataset names */ + HDqsort(lnames, (size_t)(NDATASETS + 2), sizeof(char *), iter_strcmp); - ret = H5Gget_info(root_group, &ginfo); - CHECK(ret, FAIL, "H5Gget_info"); - VERIFY(ginfo.nlinks, (NDATASETS + 2), "H5Gget_info"); + /* Iterate through the datasets in the root group in various ways */ + file = H5Fopen(DATAFILE, H5F_ACC_RDONLY, fapl); + CHECK(file, FAIL, "H5Fopen"); - for (i = 0; i < (int)ginfo.nlinks; i++) { - H5O_info2_t oinfo; /* Object info */ + /* These two functions, H5Oget_info_by_idx and H5Lget_name_by_idx, actually + * iterate through B-tree for group members in internal library design. + */ + root_group = H5Gopen2(file, "/", H5P_DEFAULT); + CHECK(root_group, FAIL, "H5Gopen2"); - ret = (herr_t)H5Lget_name_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, - dataset_name, (size_t)NAMELEN, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Lget_name_by_idx"); + ret = H5Gget_info(root_group, &ginfo); + CHECK(ret, FAIL, "H5Gget_info"); + VERIFY(ginfo.nlinks, (NDATASETS + 2), "H5Gget_info"); - //! [H5Oget_info_by_idx3_snip] + for (i = 0; i < (int)ginfo.nlinks; i++) { + H5O_info2_t oinfo; /* Object info */ - ret = H5Oget_info_by_idx3(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, - H5O_INFO_BASIC, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info_by_idx"); + ret = (herr_t)H5Lget_name_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, + dataset_name, (size_t)NAMELEN, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Lget_name_by_idx"); - //! [H5Oget_info_by_idx3_snip] + //! [H5Oget_info_by_idx3_snip] - } /* end for */ + ret = H5Oget_info_by_idx3(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, + H5O_INFO_BASIC, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_idx"); - H5E_BEGIN_TRY - { - ret = - (herr_t)H5Lget_name_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)(NDATASETS + 3), - dataset_name, (size_t)NAMELEN, H5P_DEFAULT); - } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Lget_name_by_idx"); + //! [H5Oget_info_by_idx3_snip] - ret = H5Gclose(root_group); - CHECK(ret, FAIL, "H5Gclose"); + } /* end for */ - /* These two functions, H5Oget_info_by_idx and H5Lget_name_by_idx, actually - * iterate through B-tree for group members in internal library design. - * (Same as test above, but with the file ID instead of opening the root group) - */ - ret = H5Gget_info(file, &ginfo); - CHECK(ret, FAIL, "H5Gget_info"); - VERIFY(ginfo.nlinks, NDATASETS + 2, "H5Gget_info"); + H5E_BEGIN_TRY + { + ret = (herr_t)H5Lget_name_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, + (hsize_t)(NDATASETS + 3), dataset_name, (size_t)NAMELEN, + H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Lget_name_by_idx"); - for (i = 0; i < (int)ginfo.nlinks; i++) { - H5O_info2_t oinfo; /* Object info */ + ret = H5Gclose(root_group); + CHECK(ret, FAIL, "H5Gclose"); - ret = (herr_t)H5Lget_name_by_idx(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, dataset_name, - (size_t)NAMELEN, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Lget_name_by_idx"); + /* These two functions, H5Oget_info_by_idx and H5Lget_name_by_idx, actually + * iterate through B-tree for group members in internal library design. + * (Same as test above, but with the file ID instead of opening the root group) + */ + ret = H5Gget_info(file, &ginfo); + CHECK(ret, FAIL, "H5Gget_info"); + VERIFY(ginfo.nlinks, NDATASETS + 2, "H5Gget_info"); - ret = H5Oget_info_by_idx3(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5O_INFO_BASIC, - H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info_by_idx3"); - } /* end for */ + for (i = 0; i < (int)ginfo.nlinks; i++) { + H5O_info2_t oinfo; /* Object info */ - H5E_BEGIN_TRY - { - ret = (herr_t)H5Lget_name_by_idx(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)(NDATASETS + 3), - dataset_name, (size_t)NAMELEN, H5P_DEFAULT); - } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Lget_name_by_idx"); + ret = (herr_t)H5Lget_name_by_idx(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, dataset_name, + (size_t)NAMELEN, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Lget_name_by_idx"); - /* Test invalid indices for starting iteration */ - info.command = RET_ZERO; - idx = (hsize_t)-1; - H5E_BEGIN_TRY - { - ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info); - } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Literate2"); + ret = H5Oget_info_by_idx3(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, + H5O_INFO_BASIC, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_idx3"); + } /* end for */ + + H5E_BEGIN_TRY + { + ret = (herr_t)H5Lget_name_by_idx(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)(NDATASETS + 3), + dataset_name, (size_t)NAMELEN, H5P_DEFAULT); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Lget_name_by_idx"); + + /* Test invalid indices for starting iteration */ + info.command = RET_ZERO; + idx = (hsize_t)-1; + H5E_BEGIN_TRY + { + ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Literate2"); + + /* Test skipping exactly as many entries as in the group */ + idx = NDATASETS + 2; + H5E_BEGIN_TRY + { + ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Literate2"); + + /* Test skipping more entries than are in the group */ + idx = NDATASETS + 3; + H5E_BEGIN_TRY + { + ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Literate2"); + + /* Test all objects in group, when callback always returns 0 */ + info.command = RET_ZERO; + idx = 0; + if ((ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info)) > 0) + TestErrPrintf("Group iteration function didn't return zero correctly!\n"); + + /* Test all objects in group, when callback always returns 1 */ + /* This also tests the "restarting" ability, because the index changes */ + info.command = RET_TWO; + i = 0; + idx = 0; + memset(info.name, 0, NAMELEN); + while ((ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info)) > 0) { + /* Verify return value from iterator gets propagated correctly */ + VERIFY(ret, 2, "H5Literate2"); + + /* Increment the number of times "2" is returned */ + i++; + + /* Verify that the index is the correct value */ + VERIFY(idx, (hsize_t)i, "H5Literate2"); + if (idx != (hsize_t)i) + break; + if (idx > (NDATASETS + 2)) + TestErrPrintf("Group iteration function walked too far!\n"); - /* Test skipping exactly as many entries as in the group */ - idx = NDATASETS + 2; - H5E_BEGIN_TRY - { - ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info); - } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Literate2"); + /* Verify that the correct name is retrieved */ + if (HDstrncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0) + TestErrPrintf( + "Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n", + (unsigned)(idx - 1), lnames[(size_t)(idx - 1)]); + } /* end while */ + VERIFY(ret, -1, "H5Literate2"); + + if (i != (NDATASETS + 2)) + TestErrPrintf("%u: Group iteration function didn't perform multiple iterations correctly!\n", + __LINE__); + + /* Test all objects in group, when callback changes return value */ + /* This also tests the "restarting" ability, because the index changes */ + info.command = new_format ? RET_CHANGE2 : RET_CHANGE; + i = 0; + idx = 0; + memset(info.name, 0, NAMELEN); + while ((ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info)) >= 0) { + /* Verify return value from iterator gets propagated correctly */ + VERIFY(ret, 1, "H5Literate2"); + + /* Increment the number of times "1" is returned */ + i++; + + /* Verify that the index is the correct value */ + VERIFY(idx, (hsize_t)(i + 10), "H5Literate2"); + if (idx != (hsize_t)(i + 10)) + break; + if (idx > (NDATASETS + 2)) + TestErrPrintf("Group iteration function walked too far!\n"); - /* Test skipping more entries than are in the group */ - idx = NDATASETS + 3; - H5E_BEGIN_TRY - { - ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info); + /* Verify that the correct name is retrieved */ + if (HDstrncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0) + TestErrPrintf( + "Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n", + (unsigned)(idx - 1), lnames[(size_t)(idx - 1)]); + } /* end while */ + VERIFY(ret, -1, "H5Literate2"); + + if (i != 42 || idx != 52) + TestErrPrintf("%u: Group iteration function didn't perform multiple iterations correctly!\n", + __LINE__); + + ret = H5Fclose(file); + CHECK(ret, FAIL, "H5Fclose"); + + /* Free the dataset names */ + for (i = 0; i < (NDATASETS + 2); i++) + HDfree(lnames[i]); } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Literate2"); - - /* Test all objects in group, when callback always returns 0 */ - info.command = RET_ZERO; - idx = 0; - if ((ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info)) > 0) - TestErrPrintf("Group iteration function didn't return zero correctly!\n"); - - /* Test all objects in group, when callback always returns 1 */ - /* This also tests the "restarting" ability, because the index changes */ - info.command = RET_TWO; - i = 0; - idx = 0; - memset(info.name, 0, NAMELEN); - while ((ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info)) > 0) { - /* Verify return value from iterator gets propagated correctly */ - VERIFY(ret, 2, "H5Literate2"); - - /* Increment the number of times "2" is returned */ - i++; - - /* Verify that the index is the correct value */ - VERIFY(idx, (hsize_t)i, "H5Literate2"); - if (idx != (hsize_t)i) - break; - if (idx > (NDATASETS + 2)) - TestErrPrintf("Group iteration function walked too far!\n"); - - /* Verify that the correct name is retrieved */ - if (HDstrncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0) - TestErrPrintf( - "Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n", - (unsigned)(idx - 1), lnames[(size_t)(idx - 1)]); - } /* end while */ - VERIFY(ret, -1, "H5Literate2"); - - if (i != (NDATASETS + 2)) - TestErrPrintf("%u: Group iteration function didn't perform multiple iterations correctly!\n", - __LINE__); - - /* Test all objects in group, when callback changes return value */ - /* This also tests the "restarting" ability, because the index changes */ - info.command = new_format ? RET_CHANGE2 : RET_CHANGE; - i = 0; - idx = 0; - memset(info.name, 0, NAMELEN); - while ((ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info)) >= 0) { - /* Verify return value from iterator gets propagated correctly */ - VERIFY(ret, 1, "H5Literate2"); - - /* Increment the number of times "1" is returned */ - i++; - - /* Verify that the index is the correct value */ - VERIFY(idx, (hsize_t)(i + 10), "H5Literate2"); - if (idx != (hsize_t)(i + 10)) - break; - if (idx > (NDATASETS + 2)) - TestErrPrintf("Group iteration function walked too far!\n"); - - /* Verify that the correct name is retrieved */ - if (HDstrncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0) - TestErrPrintf( - "Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n", - (unsigned)(idx - 1), lnames[(size_t)(idx - 1)]); - } /* end while */ - VERIFY(ret, -1, "H5Literate2"); - - if (i != 42 || idx != 52) - TestErrPrintf("%u: Group iteration function didn't perform multiple iterations correctly!\n", - __LINE__); - - ret = H5Fclose(file); - CHECK(ret, FAIL, "H5Fclose"); - - /* Free the dataset names */ - for (i = 0; i < (NDATASETS + 2); i++) - HDfree(lnames[i]); -#endif } /* test_iter_group() */ /**************************************************************** @@ -427,7 +428,6 @@ aiter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5A_info_t H5_ATTR_ static void test_iter_attr(hid_t fapl, hbool_t new_format) { -#ifndef NO_ITERATION_RESTART hid_t file; /* File ID */ hid_t dataset; /* Common Dataset ID */ hid_t filespace; /* Common dataspace ID */ @@ -438,161 +438,160 @@ test_iter_attr(hid_t fapl, hbool_t new_format) char *anames[NATTR]; /* Names of the attributes created */ iter_info info; /* Custom iteration information */ herr_t ret; /* Generic return value */ -#else - (void)fapl; - (void)new_format; -#endif /* Output message about test being performed */ - MESSAGE( - 5, - ("Testing Attribute Iteration Functionality - SKIPPED for no due to no iteration restart support\n")); -#ifndef NO_ITERATION_RESTART - HDmemset(&info, 0, sizeof(iter_info)); - - /* Create the test file with the datasets */ - file = H5Fcreate(DATAFILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - CHECK(file, FAIL, "H5Fcreate"); - - filespace = H5Screate(H5S_SCALAR); - CHECK(filespace, FAIL, "H5Screate"); - - dataset = H5Dcreate2(file, "Dataset", H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - CHECK(dataset, FAIL, "H5Dcreate2"); - - for (i = 0; i < NATTR; i++) { - HDsnprintf(name, sizeof(name), "Attribute %02d", i); - attribute = H5Acreate2(dataset, name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT); - CHECK(attribute, FAIL, "H5Acreate2"); + MESSAGE(5, ("Testing Attribute Iteration Functionality\n")); - /* Keep a copy of the attribute names around for later */ - anames[i] = HDstrdup(name); - CHECK_PTR(anames[i], "strdup"); + if ((vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) && (vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) && + (vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) && (vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { + HDmemset(&info, 0, sizeof(iter_info)); - ret = H5Aclose(attribute); - CHECK(ret, FAIL, "H5Aclose"); - } /* end for */ + /* Create the test file with the datasets */ + file = H5Fcreate(DATAFILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + CHECK(file, FAIL, "H5Fcreate"); - /* Close everything up */ - ret = H5Dclose(dataset); - CHECK(ret, FAIL, "H5Dclose"); + filespace = H5Screate(H5S_SCALAR); + CHECK(filespace, FAIL, "H5Screate"); - ret = H5Sclose(filespace); - CHECK(ret, FAIL, "H5Sclose"); - - ret = H5Fclose(file); - CHECK(ret, FAIL, "H5Fclose"); + dataset = + H5Dcreate2(file, "Dataset", H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(dataset, FAIL, "H5Dcreate2"); - /* Iterate through the attributes on the dataset in various ways */ - file = H5Fopen(DATAFILE, H5F_ACC_RDONLY, fapl); - CHECK(file, FAIL, "H5Fopen"); + for (i = 0; i < NATTR; i++) { + HDsnprintf(name, sizeof(name), "Attribute %02d", i); + attribute = H5Acreate2(dataset, name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT); + CHECK(attribute, FAIL, "H5Acreate2"); - dataset = H5Dopen2(file, "Dataset", H5P_DEFAULT); - CHECK(dataset, FAIL, "H5Dopen2"); + /* Keep a copy of the attribute names around for later */ + anames[i] = HDstrdup(name); + CHECK_PTR(anames[i], "strdup"); - /* Test invalid indices for starting iteration */ - info.command = RET_ZERO; + ret = H5Aclose(attribute); + CHECK(ret, FAIL, "H5Aclose"); + } /* end for */ - /* Test skipping exactly as many attributes as there are */ - idx = NATTR; - H5E_BEGIN_TRY - { - ret = H5Aiterate2(dataset, H5_INDEX_NAME, H5_ITER_INC, &idx, aiter_cb, &info); - } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Aiterate2"); + /* Close everything up */ + ret = H5Dclose(dataset); + CHECK(ret, FAIL, "H5Dclose"); - /* Test skipping more attributes than there are */ - idx = NATTR + 1; - H5E_BEGIN_TRY - { - ret = H5Aiterate2(dataset, H5_INDEX_NAME, H5_ITER_INC, &idx, aiter_cb, &info); - } - H5E_END_TRY; - VERIFY(ret, FAIL, "H5Aiterate2"); - - /* Test all attributes on dataset, when callback always returns 0 */ - info.command = RET_ZERO; - idx = 0; - if ((ret = H5Aiterate2(dataset, H5_INDEX_NAME, H5_ITER_INC, &idx, aiter_cb, &info)) > 0) - TestErrPrintf("Attribute iteration function didn't return zero correctly!\n"); - - /* Test all attributes on dataset, when callback always returns 2 */ - /* This also tests the "restarting" ability, because the index changes */ - info.command = RET_TWO; - i = 0; - idx = 0; - while ((ret = H5Aiterate2(dataset, H5_INDEX_NAME, H5_ITER_INC, &idx, aiter_cb, &info)) > 0) { - /* Verify return value from iterator gets propagated correctly */ - VERIFY(ret, 2, "H5Aiterate2"); - - /* Increment the number of times "2" is returned */ - i++; - - /* Verify that the index is the correct value */ - VERIFY(idx, (unsigned)i, "H5Aiterate2"); - - /* Don't check name when new format is used */ - if (!new_format) { - /* Verify that the correct name is retrieved */ - if (idx > 0) { - if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0) - TestErrPrintf("%u: Attribute iteration function didn't set names correctly, info.name = " - "'%s', anames[%u] = '%s'!\n", - __LINE__, info.name, (unsigned)(idx - 1), anames[(size_t)idx - 1]); + ret = H5Sclose(filespace); + CHECK(ret, FAIL, "H5Sclose"); + + ret = H5Fclose(file); + CHECK(ret, FAIL, "H5Fclose"); + + /* Iterate through the attributes on the dataset in various ways */ + file = H5Fopen(DATAFILE, H5F_ACC_RDONLY, fapl); + CHECK(file, FAIL, "H5Fopen"); + + dataset = H5Dopen2(file, "Dataset", H5P_DEFAULT); + CHECK(dataset, FAIL, "H5Dopen2"); + + /* Test invalid indices for starting iteration */ + info.command = RET_ZERO; + + /* Test skipping exactly as many attributes as there are */ + idx = NATTR; + H5E_BEGIN_TRY + { + ret = H5Aiterate2(dataset, H5_INDEX_NAME, H5_ITER_INC, &idx, aiter_cb, &info); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Aiterate2"); + + /* Test skipping more attributes than there are */ + idx = NATTR + 1; + H5E_BEGIN_TRY + { + ret = H5Aiterate2(dataset, H5_INDEX_NAME, H5_ITER_INC, &idx, aiter_cb, &info); + } + H5E_END_TRY; + VERIFY(ret, FAIL, "H5Aiterate2"); + + /* Test all attributes on dataset, when callback always returns 0 */ + info.command = RET_ZERO; + idx = 0; + if ((ret = H5Aiterate2(dataset, H5_INDEX_NAME, H5_ITER_INC, &idx, aiter_cb, &info)) > 0) + TestErrPrintf("Attribute iteration function didn't return zero correctly!\n"); + + /* Test all attributes on dataset, when callback always returns 2 */ + /* This also tests the "restarting" ability, because the index changes */ + info.command = RET_TWO; + i = 0; + idx = 0; + while ((ret = H5Aiterate2(dataset, H5_INDEX_NAME, H5_ITER_INC, &idx, aiter_cb, &info)) > 0) { + /* Verify return value from iterator gets propagated correctly */ + VERIFY(ret, 2, "H5Aiterate2"); + + /* Increment the number of times "2" is returned */ + i++; + + /* Verify that the index is the correct value */ + VERIFY(idx, (unsigned)i, "H5Aiterate2"); + + /* Don't check name when new format is used */ + if (!new_format) { + /* Verify that the correct name is retrieved */ + if (idx > 0) { + if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0) + TestErrPrintf( + "%u: Attribute iteration function didn't set names correctly, info.name = " + "'%s', anames[%u] = '%s'!\n", + __LINE__, info.name, (unsigned)(idx - 1), anames[(size_t)idx - 1]); + } /* end if */ + else + TestErrPrintf("%u: 'idx' was not set correctly!\n", __LINE__); } /* end if */ - else - TestErrPrintf("%u: 'idx' was not set correctly!\n", __LINE__); - } /* end if */ - } /* end while */ - VERIFY(ret, -1, "H5Aiterate2"); - if (i != 50 || idx != 50) - TestErrPrintf("%u: Attribute iteration function didn't perform multiple iterations correctly!\n", - __LINE__); - - /* Test all attributes on dataset, when callback changes return value */ - /* This also tests the "restarting" ability, because the index changes */ - info.command = new_format ? RET_CHANGE2 : RET_CHANGE; - i = 0; - idx = 0; - while ((ret = H5Aiterate2(dataset, H5_INDEX_NAME, H5_ITER_INC, &idx, aiter_cb, &info)) > 0) { - /* Verify return value from iterator gets propagated correctly */ - VERIFY(ret, 1, "H5Aiterate2"); - - /* Increment the number of times "1" is returned */ - i++; - - /* Verify that the index is the correct value */ - VERIFY(idx, (unsigned)i + 10, "H5Aiterate2"); - - /* Don't check name when new format is used */ - if (!new_format) { - /* Verify that the correct name is retrieved */ - if (idx > 0) { - if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0) - TestErrPrintf("%u: Attribute iteration function didn't set names correctly, info.name = " - "'%s', anames[%u] = '%s'!\n", - __LINE__, info.name, (unsigned)(idx - 1), anames[(size_t)idx - 1]); - } - else - TestErrPrintf("%u: 'idx' was not set correctly!\n", __LINE__); - } /* end if */ - } /* end while */ - VERIFY(ret, -1, "H5Aiterate2"); - if (i != 40 || idx != 50) - TestErrPrintf("%u: Attribute iteration function didn't perform multiple iterations correctly!\n", - __LINE__); + } /* end while */ + VERIFY(ret, -1, "H5Aiterate2"); + if (i != 50 || idx != 50) + TestErrPrintf("%u: Attribute iteration function didn't perform multiple iterations correctly!\n", + __LINE__); + + /* Test all attributes on dataset, when callback changes return value */ + /* This also tests the "restarting" ability, because the index changes */ + info.command = new_format ? RET_CHANGE2 : RET_CHANGE; + i = 0; + idx = 0; + while ((ret = H5Aiterate2(dataset, H5_INDEX_NAME, H5_ITER_INC, &idx, aiter_cb, &info)) > 0) { + /* Verify return value from iterator gets propagated correctly */ + VERIFY(ret, 1, "H5Aiterate2"); + + /* Increment the number of times "1" is returned */ + i++; + + /* Verify that the index is the correct value */ + VERIFY(idx, (unsigned)i + 10, "H5Aiterate2"); + + /* Don't check name when new format is used */ + if (!new_format) { + /* Verify that the correct name is retrieved */ + if (idx > 0) { + if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0) + TestErrPrintf( + "%u: Attribute iteration function didn't set names correctly, info.name = " + "'%s', anames[%u] = '%s'!\n", + __LINE__, info.name, (unsigned)(idx - 1), anames[(size_t)idx - 1]); + } + else + TestErrPrintf("%u: 'idx' was not set correctly!\n", __LINE__); + } /* end if */ + } /* end while */ + VERIFY(ret, -1, "H5Aiterate2"); + if (i != 40 || idx != 50) + TestErrPrintf("%u: Attribute iteration function didn't perform multiple iterations correctly!\n", + __LINE__); - ret = H5Fclose(file); - CHECK(ret, FAIL, "H5Fclose"); + ret = H5Fclose(file); + CHECK(ret, FAIL, "H5Fclose"); - ret = H5Dclose(dataset); - CHECK(ret, FAIL, "H5Dclose"); + ret = H5Dclose(dataset); + CHECK(ret, FAIL, "H5Dclose"); - /* Free the attribute names */ - for (i = 0; i < NATTR; i++) - HDfree(anames[i]); -#endif + /* Free the attribute names */ + for (i = 0; i < NATTR; i++) + HDfree(anames[i]); + } } /* test_iter_attr() */ /**************************************************************** @@ -611,7 +610,6 @@ iter_strcmp2(const void *s1, const void *s2) ** liter_cb2(): Custom link iteration callback routine. ** ****************************************************************/ -#ifndef NO_ITERATION_RESTART static herr_t liter_cb2(hid_t loc_id, const char *name, const H5L_info2_t H5_ATTR_UNUSED *link_info, void *opdata) { @@ -619,6 +617,13 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info2_t H5_ATTR_UNUSED *link H5O_info2_t oinfo; herr_t ret; /* Generic return value */ + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC)) { + SKIPPED(); + HDprintf(" API functions for iterate and basic links aren't " + "supported with this connector\n"); + return 1; + } + if (HDstrcmp(name, test_info->name) != 0) { TestErrPrintf("name = '%s', test_info = '%s'\n", name, test_info->name); return (H5_ITER_ERROR); @@ -637,7 +642,6 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info2_t H5_ATTR_UNUSED *link return (H5_ITER_STOP); } /* liter_cb2() */ -#endif /**************************************************************** ** @@ -648,7 +652,6 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info2_t H5_ATTR_UNUSED *link static void test_iter_group_large(hid_t fapl) { -#ifndef NO_ITERATION_RESTART hid_t file; /* HDF5 File IDs */ hid_t dataset; /* Dataset ID */ hid_t group; /* Group ID */ @@ -671,102 +674,102 @@ test_iter_group_large(hid_t fapl) /* Allocate & initialize array */ names = (iter_info *)HDcalloc(sizeof(iter_info), (ITER_NGROUPS + 2)); CHECK_PTR(names, "HDcalloc"); -#else - (void)fapl; -#endif - /* Output message about test being performed */ - MESSAGE(5, ("Testing Large Group Iteration Functionality - SKIPPED for now due to no iteration restart " - "support\n")); -#ifndef NO_ITERATION_RESTART - /* Create file */ - file = H5Fcreate(DATAFILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); - CHECK(file, FAIL, "H5Fcreate"); - - /* Create dataspace for datasets */ - sid = H5Screate_simple(SPACE1_RANK, dims, NULL); - CHECK(sid, FAIL, "H5Screate_simple"); - /* Create a bunch of groups */ - for (i = 0; i < ITER_NGROUPS; i++) { - HDsnprintf(gname, sizeof(gname), "Group_%d", i); + /* Output message about test being performed */ + MESSAGE(5, ("Testing Large Group Iteration Functionality\n")); + + if ((vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) && (vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) && + (vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) && (vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) && + (vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) { + /* Create file */ + file = H5Fcreate(DATAFILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + CHECK(file, FAIL, "H5Fcreate"); + + /* Create dataspace for datasets */ + sid = H5Screate_simple(SPACE1_RANK, dims, NULL); + CHECK(sid, FAIL, "H5Screate_simple"); + + /* Create a bunch of groups */ + for (i = 0; i < ITER_NGROUPS; i++) { + HDsnprintf(gname, sizeof(gname), "Group_%d", i); + + /* Add the name to the list of objects in the root group */ + HDstrcpy(names[i].name, gname); + names[i].type = H5O_TYPE_GROUP; + + /* Create a group */ + group = H5Gcreate2(file, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(group, FAIL, "H5Gcreate2"); + + /* Close a group */ + ret = H5Gclose(group); + CHECK(ret, FAIL, "H5Gclose"); + } /* end for */ + + /* Create a dataset */ + dataset = H5Dcreate2(file, "Dataset1", H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(dataset, FAIL, "H5Dcreate2"); /* Add the name to the list of objects in the root group */ - HDstrcpy(names[i].name, gname); - names[i].type = H5O_TYPE_GROUP; - - /* Create a group */ - group = H5Gcreate2(file, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - CHECK(group, FAIL, "H5Gcreate2"); - - /* Close a group */ - ret = H5Gclose(group); - CHECK(ret, FAIL, "H5Gclose"); - } /* end for */ + HDstrcpy(names[ITER_NGROUPS].name, "Dataset1"); + names[ITER_NGROUPS].type = H5O_TYPE_DATASET; - /* Create a dataset */ - dataset = H5Dcreate2(file, "Dataset1", H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - CHECK(dataset, FAIL, "H5Dcreate2"); - - /* Add the name to the list of objects in the root group */ - HDstrcpy(names[ITER_NGROUPS].name, "Dataset1"); - names[ITER_NGROUPS].type = H5O_TYPE_DATASET; - - /* Close Dataset */ - ret = H5Dclose(dataset); - CHECK(ret, FAIL, "H5Dclose"); - - /* Close Dataspace */ - ret = H5Sclose(sid); - CHECK(ret, FAIL, "H5Sclose"); + /* Close Dataset */ + ret = H5Dclose(dataset); + CHECK(ret, FAIL, "H5Dclose"); - /* Create a datatype */ - tid = H5Tcreate(H5T_COMPOUND, sizeof(s1_t)); - CHECK(tid, FAIL, "H5Tcreate"); + /* Close Dataspace */ + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); - /* Insert fields */ - ret = H5Tinsert(tid, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT); - CHECK(ret, FAIL, "H5Tinsert"); + /* Create a datatype */ + tid = H5Tcreate(H5T_COMPOUND, sizeof(s1_t)); + CHECK(tid, FAIL, "H5Tcreate"); - ret = H5Tinsert(tid, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT); - CHECK(ret, FAIL, "H5Tinsert"); + /* Insert fields */ + ret = H5Tinsert(tid, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT); + CHECK(ret, FAIL, "H5Tinsert"); - ret = H5Tinsert(tid, "c", HOFFSET(s1_t, c), H5T_NATIVE_FLOAT); - CHECK(ret, FAIL, "H5Tinsert"); + ret = H5Tinsert(tid, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT); + CHECK(ret, FAIL, "H5Tinsert"); - /* Save datatype for later */ - ret = H5Tcommit2(file, "Datatype1", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Tcommit2"); + ret = H5Tinsert(tid, "c", HOFFSET(s1_t, c), H5T_NATIVE_FLOAT); + CHECK(ret, FAIL, "H5Tinsert"); - /* Add the name to the list of objects in the root group */ - HDstrcpy(names[ITER_NGROUPS + 1].name, "Datatype1"); - names[ITER_NGROUPS + 1].type = H5O_TYPE_NAMED_DATATYPE; + /* Save datatype for later */ + ret = H5Tcommit2(file, "Datatype1", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Tcommit2"); - /* Close datatype */ - ret = H5Tclose(tid); - CHECK(ret, FAIL, "H5Tclose"); + /* Add the name to the list of objects in the root group */ + HDstrcpy(names[ITER_NGROUPS + 1].name, "Datatype1"); + names[ITER_NGROUPS + 1].type = H5O_TYPE_NAMED_DATATYPE; - /* Need to sort the names in the root group, cause that's what the library does */ - HDqsort(names, (size_t)(ITER_NGROUPS + 2), sizeof(iter_info), iter_strcmp2); + /* Close datatype */ + ret = H5Tclose(tid); + CHECK(ret, FAIL, "H5Tclose"); - /* Iterate through the file to see members of the root group */ - curr_name = &names[0]; - ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, NULL, liter_cb2, curr_name); - CHECK(ret, FAIL, "H5Literate2"); - for (i = 1; i < 100; i++) { - hsize_t idx = (hsize_t)i; + /* Need to sort the names in the root group, cause that's what the library does */ + HDqsort(names, (size_t)(ITER_NGROUPS + 2), sizeof(iter_info), iter_strcmp2); - curr_name = &names[i]; - ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb2, curr_name); + /* Iterate through the file to see members of the root group */ + curr_name = &names[0]; + ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, NULL, liter_cb2, curr_name); CHECK(ret, FAIL, "H5Literate2"); - } /* end for */ + for (i = 1; i < 100; i++) { + hsize_t idx = (hsize_t)i; - /* Close file */ - ret = H5Fclose(file); - CHECK(ret, FAIL, "H5Fclose"); + curr_name = &names[i]; + ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb2, curr_name); + CHECK(ret, FAIL, "H5Literate2"); + } /* end for */ - /* Release memory */ - HDfree(names); -#endif + /* Close file */ + ret = H5Fclose(file); + CHECK(ret, FAIL, "H5Fclose"); + + /* Release memory */ + HDfree(names); + } } /* test_iterate_group_large() */ /**************************************************************** diff --git a/hdf5_test/tmisc.c b/hdf5_test/tmisc.c index 976ce49..d57dd0d 100644 --- a/hdf5_test/tmisc.c +++ b/hdf5_test/tmisc.c @@ -4175,15 +4175,11 @@ test_misc23(void) hsize_t dims[] = {10}; hid_t file_id = 0, group_id = 0, type_id = 0, space_id = 0, tmp_id = 0, create_id = H5P_DEFAULT, access_id = H5P_DEFAULT; -#ifndef NO_OBJECT_GET_NAME - char objname[MISC23_NAME_BUF_SIZE]; /* Name of object */ -#endif + char objname[MISC23_NAME_BUF_SIZE]; /* Name of object */ H5O_info2_t oinfo; htri_t tri_status; -#ifndef NO_OBJECT_GET_NAME - ssize_t namelen; -#endif - herr_t status; + ssize_t namelen; + herr_t status; /* Output message about test being performed */ MESSAGE(5, ("Testing intermediate group creation\n")); @@ -4269,12 +4265,12 @@ test_misc23(void) tmp_id = H5Gcreate2(file_id, "/A/B01/grp", create_id, H5P_DEFAULT, access_id); CHECK(tmp_id, FAIL, "H5Gcreate2"); -#ifndef NO_OBJECT_GET_NAME + /* Query that the name of the new group is correct */ namelen = H5Iget_name(tmp_id, objname, (size_t)MISC23_NAME_BUF_SIZE); CHECK(namelen, FAIL, "H5Iget_name"); VERIFY_STR(objname, "/A/B01/grp", "H5Iget_name"); -#endif + status = H5Gclose(tmp_id); CHECK(status, FAIL, "H5Gclose"); @@ -4484,24 +4480,29 @@ test_misc23(void) /********************************************************************** * test H5Lcreate_external() **********************************************************************/ -#ifndef NO_EXTERNAL_LINKS - status = H5Lcreate_external("fake_filename", "fake_path", file_id, "/A/B20/grp", create_id, access_id); - CHECK(status, FAIL, "H5Lcreate_external"); - tri_status = H5Lexists(file_id, "/A/B20/grp", access_id); - VERIFY(tri_status, TRUE, "H5Lexists"); -#endif + if (vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) { + status = + H5Lcreate_external("fake_filename", "fake_path", file_id, "/A/B20/grp", create_id, access_id); + CHECK(status, FAIL, "H5Lcreate_external"); + + tri_status = H5Lexists(file_id, "/A/B20/grp", access_id); + VERIFY(tri_status, TRUE, "H5Lexists"); + } + /********************************************************************** * test H5Lcreate_ud() **********************************************************************/ -#ifndef NO_USER_DEFINED_LINKS - status = - H5Lcreate_ud(file_id, "/A/B21/grp", H5L_TYPE_EXTERNAL, "file\0obj", (size_t)9, create_id, access_id); - CHECK(status, FAIL, "H5Lcreate_ud"); - tri_status = H5Lexists(file_id, "/A/B21/grp", access_id); - VERIFY(tri_status, TRUE, "H5Lexists"); -#endif + if (vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS) { + status = H5Lcreate_ud(file_id, "/A/B21/grp", H5L_TYPE_EXTERNAL, "file\0obj", (size_t)9, create_id, + access_id); + CHECK(status, FAIL, "H5Lcreate_ud"); + + tri_status = H5Lexists(file_id, "/A/B21/grp", access_id); + VERIFY(tri_status, TRUE, "H5Lexists"); + } + /********************************************************************** * close **********************************************************************/ diff --git a/hdf5_test/trefer.c b/hdf5_test/trefer.c index af0b11b..c09b586 100644 --- a/hdf5_test/trefer.c +++ b/hdf5_test/trefer.c @@ -2018,7 +2018,6 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high) static void test_reference_obj_deleted(void) { -#ifndef NO_REFERENCE_TO_DELETED hid_t fid1; /* HDF5 File IDs */ hid_t dataset, /* Dataset ID */ dset2; /* Dereferenced dataset ID */ @@ -2026,88 +2025,90 @@ test_reference_obj_deleted(void) H5R_ref_t oref; /* Object Reference to test */ H5O_type_t obj_type; /* Object type */ herr_t ret; /* Generic return value */ -#endif - MESSAGE(5, ("Testing References to Deleted Objects - SKIPPED for now due to no support\n")); -#ifndef NO_REFERENCE_TO_DELETED - /* Create file */ - fid1 = H5Fcreate(FILE_REF_OBJ_DEL, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - CHECK(fid1, H5I_INVALID_HID, "H5Fcreate"); - /* Create scalar dataspace for datasets */ - sid1 = H5Screate_simple(0, NULL, NULL); - CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple"); + MESSAGE(5, ("Testing References to Deleted Objects\n")); - /* Create a dataset to reference (deleted later) */ - dataset = H5Dcreate2(fid1, "Dataset1", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2"); + if ((vol_cap_flags_g & H5VL_CAP_FLAG_REF_BASIC) && (vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) && + (vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) && (vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC)) { + /* Create file */ + fid1 = H5Fcreate(FILE_REF_OBJ_DEL, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + CHECK(fid1, H5I_INVALID_HID, "H5Fcreate"); - /* Close Dataset */ - ret = H5Dclose(dataset); - CHECK(ret, FAIL, "H5Dclose"); + /* Create scalar dataspace for datasets */ + sid1 = H5Screate_simple(0, NULL, NULL); + CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple"); - /* Create a dataset */ - dataset = H5Dcreate2(fid1, "Dataset2", H5T_STD_REF, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2"); + /* Create a dataset to reference (deleted later) */ + dataset = H5Dcreate2(fid1, "Dataset1", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2"); - /* Create reference to dataset */ - ret = H5Rcreate_object(fid1, "/Dataset1", H5P_DEFAULT, &oref); - CHECK(ret, FAIL, "H5Rcreate_object"); - ret = H5Rget_obj_type3(&oref, H5P_DEFAULT, &obj_type); - CHECK(ret, FAIL, "H5Rget_obj_type3"); - VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3"); + /* Close Dataset */ + ret = H5Dclose(dataset); + CHECK(ret, FAIL, "H5Dclose"); - /* Write selection to disk */ - ret = H5Dwrite(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, &oref); - CHECK(ret, FAIL, "H5Dwrite"); + /* Create a dataset */ + dataset = H5Dcreate2(fid1, "Dataset2", H5T_STD_REF, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2"); - /* Close Dataset */ - ret = H5Dclose(dataset); - CHECK(ret, FAIL, "H5Dclose"); + /* Create reference to dataset */ + ret = H5Rcreate_object(fid1, "/Dataset1", H5P_DEFAULT, &oref); + CHECK(ret, FAIL, "H5Rcreate_object"); + ret = H5Rget_obj_type3(&oref, H5P_DEFAULT, &obj_type); + CHECK(ret, FAIL, "H5Rget_obj_type3"); + VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3"); - /* Delete referenced dataset */ - ret = H5Ldelete(fid1, "/Dataset1", H5P_DEFAULT); - CHECK(ret, FAIL, "H5Ldelete"); + /* Write selection to disk */ + ret = H5Dwrite(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, &oref); + CHECK(ret, FAIL, "H5Dwrite"); - /* Close disk dataspace */ - ret = H5Sclose(sid1); - CHECK(ret, FAIL, "H5Sclose"); + /* Close Dataset */ + ret = H5Dclose(dataset); + CHECK(ret, FAIL, "H5Dclose"); - /* Close file */ - ret = H5Fclose(fid1); - CHECK(ret, FAIL, "H5Fclose"); + /* Delete referenced dataset */ + ret = H5Ldelete(fid1, "/Dataset1", H5P_DEFAULT); + CHECK(ret, FAIL, "H5Ldelete"); - /* Destroy reference */ - ret = H5Rdestroy(&oref); - CHECK(ret, FAIL, "H5Rdestroy"); + /* Close disk dataspace */ + ret = H5Sclose(sid1); + CHECK(ret, FAIL, "H5Sclose"); - /* Re-open the file */ - fid1 = H5Fopen(FILE_REF_OBJ_DEL, H5F_ACC_RDWR, H5P_DEFAULT); - CHECK(fid1, H5I_INVALID_HID, "H5Fopen"); + /* Close file */ + ret = H5Fclose(fid1); + CHECK(ret, FAIL, "H5Fclose"); - /* Open the dataset */ - dataset = H5Dopen2(fid1, "/Dataset2", H5P_DEFAULT); - CHECK(ret, H5I_INVALID_HID, "H5Dopen2"); + /* Destroy reference */ + ret = H5Rdestroy(&oref); + CHECK(ret, FAIL, "H5Rdestroy"); - /* Read selection from disk */ - ret = H5Dread(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, &oref); - CHECK(ret, FAIL, "H5Dread"); + /* Re-open the file */ + fid1 = H5Fopen(FILE_REF_OBJ_DEL, H5F_ACC_RDWR, H5P_DEFAULT); + CHECK(fid1, H5I_INVALID_HID, "H5Fopen"); - /* Open deleted dataset object */ - dset2 = H5Ropen_object(&oref, H5P_DEFAULT, H5P_DEFAULT); - VERIFY(dset2, H5I_INVALID_HID, "H5Ropen_object"); + /* Open the dataset */ + dataset = H5Dopen2(fid1, "/Dataset2", H5P_DEFAULT); + CHECK(ret, H5I_INVALID_HID, "H5Dopen2"); - /* Close Dataset */ - ret = H5Dclose(dataset); - CHECK(ret, FAIL, "H5Dclose"); + /* Read selection from disk */ + ret = H5Dread(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, &oref); + CHECK(ret, FAIL, "H5Dread"); - /* Close file */ - ret = H5Fclose(fid1); - CHECK(ret, FAIL, "H5Fclose"); + /* Open deleted dataset object */ + dset2 = H5Ropen_object(&oref, H5P_DEFAULT, H5P_DEFAULT); + VERIFY(dset2, H5I_INVALID_HID, "H5Ropen_object"); - /* Destroy reference */ - ret = H5Rdestroy(&oref); - CHECK(ret, FAIL, "H5Rdestroy"); -#endif + /* Close Dataset */ + ret = H5Dclose(dataset); + CHECK(ret, FAIL, "H5Dclose"); + + /* Close file */ + ret = H5Fclose(fid1); + CHECK(ret, FAIL, "H5Fclose"); + + /* Destroy reference */ + ret = H5Rdestroy(&oref); + CHECK(ret, FAIL, "H5Rdestroy"); + } } /* test_reference_obj_deleted() */ /**************************************************************** diff --git a/hdf5_test/tvlstr.c b/hdf5_test/tvlstr.c index b05ff66..35d5358 100644 --- a/hdf5_test/tvlstr.c +++ b/hdf5_test/tvlstr.c @@ -871,7 +871,6 @@ test_vl_rewrite(void) static void test_write_same_element(void) { -#ifndef NO_WRITE_SAME_ELEMENT_TWICE hid_t file1, dataset1; hid_t mspace, fspace, dtype; hsize_t fdim[] = {SPACE1_DIM1}; @@ -880,86 +879,84 @@ test_write_same_element(void) hsize_t marray[] = {NUMP}; hsize_t coord[SPACE1_RANK][NUMP]; herr_t ret; -#endif - MESSAGE( - 5, - ("Testing writing to same element of VL string dataset twice - SKIPPED for now due to no support\n")); -#ifndef NO_WRITE_SAME_ELEMENT_TWICE - file1 = H5Fcreate(DATAFILE3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - CHECK(file1, FAIL, "H5Fcreate"); + MESSAGE(5, ("Testing writing to same element of VL string dataset twice\n")); - dtype = H5Tcopy(H5T_C_S1); - CHECK(dtype, FAIL, "H5Tcopy"); + if ((vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) && (vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) { + file1 = H5Fcreate(DATAFILE3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + CHECK(file1, FAIL, "H5Fcreate"); - ret = H5Tset_size(dtype, H5T_VARIABLE); - CHECK(ret, FAIL, "H5Tset_size"); + dtype = H5Tcopy(H5T_C_S1); + CHECK(dtype, FAIL, "H5Tcopy"); - fspace = H5Screate_simple(SPACE1_RANK, fdim, NULL); - CHECK(fspace, FAIL, "H5Screate_simple"); + ret = H5Tset_size(dtype, H5T_VARIABLE); + CHECK(ret, FAIL, "H5Tset_size"); - dataset1 = H5Dcreate2(file1, DATASET, dtype, fspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - CHECK(dataset1, FAIL, "H5Dcreate"); + fspace = H5Screate_simple(SPACE1_RANK, fdim, NULL); + CHECK(fspace, FAIL, "H5Screate_simple"); - ret = H5Dwrite(dataset1, dtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - CHECK(ret, FAIL, "H5Dwrite"); + dataset1 = H5Dcreate2(file1, DATASET, dtype, fspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(dataset1, FAIL, "H5Dcreate"); - ret = H5Dclose(dataset1); - CHECK(ret, FAIL, "H5Dclose"); + ret = H5Dwrite(dataset1, dtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); + CHECK(ret, FAIL, "H5Dwrite"); - ret = H5Tclose(dtype); - CHECK(ret, FAIL, "H5Tclose"); + ret = H5Dclose(dataset1); + CHECK(ret, FAIL, "H5Dclose"); - ret = H5Sclose(fspace); - CHECK(ret, FAIL, "H5Sclose"); + ret = H5Tclose(dtype); + CHECK(ret, FAIL, "H5Tclose"); - ret = H5Fclose(file1); - CHECK(ret, FAIL, "H5Fclose"); + ret = H5Sclose(fspace); + CHECK(ret, FAIL, "H5Sclose"); - /* - * Open the file. Select the same points, write values to those point locations. - */ - file1 = H5Fopen(DATAFILE3, H5F_ACC_RDWR, H5P_DEFAULT); - CHECK(file1, FAIL, "H5Fopen"); + ret = H5Fclose(file1); + CHECK(ret, FAIL, "H5Fclose"); - dataset1 = H5Dopen2(file1, DATASET, H5P_DEFAULT); - CHECK(dataset1, FAIL, "H5Dopen"); + /* + * Open the file. Select the same points, write values to those point locations. + */ + file1 = H5Fopen(DATAFILE3, H5F_ACC_RDWR, H5P_DEFAULT); + CHECK(file1, FAIL, "H5Fopen"); - fspace = H5Dget_space(dataset1); - CHECK(fspace, FAIL, "H5Dget_space"); + dataset1 = H5Dopen2(file1, DATASET, H5P_DEFAULT); + CHECK(dataset1, FAIL, "H5Dopen"); - dtype = H5Dget_type(dataset1); - CHECK(dtype, FAIL, "H5Dget_type"); + fspace = H5Dget_space(dataset1); + CHECK(fspace, FAIL, "H5Dget_space"); - mspace = H5Screate_simple(1, marray, NULL); - CHECK(mspace, FAIL, "H5Screate_simple"); + dtype = H5Dget_type(dataset1); + CHECK(dtype, FAIL, "H5Dget_type"); - coord[0][0] = 0; - coord[0][1] = 2; - coord[0][2] = 2; - coord[0][3] = 0; + mspace = H5Screate_simple(1, marray, NULL); + CHECK(mspace, FAIL, "H5Screate_simple"); - ret = H5Sselect_elements(fspace, H5S_SELECT_SET, NUMP, (const hsize_t *)&coord); - CHECK(ret, FAIL, "H5Sselect_elements"); + coord[0][0] = 0; + coord[0][1] = 2; + coord[0][2] = 2; + coord[0][3] = 0; - ret = H5Dwrite(dataset1, dtype, mspace, fspace, H5P_DEFAULT, val); - CHECK(ret, FAIL, "H5Dwrite"); + ret = H5Sselect_elements(fspace, H5S_SELECT_SET, NUMP, (const hsize_t *)&coord); + CHECK(ret, FAIL, "H5Sselect_elements"); - ret = H5Tclose(dtype); - CHECK(ret, FAIL, "H5Tclose"); + ret = H5Dwrite(dataset1, dtype, mspace, fspace, H5P_DEFAULT, val); + CHECK(ret, FAIL, "H5Dwrite"); - ret = H5Dclose(dataset1); - CHECK(ret, FAIL, "H5Dclose"); + ret = H5Tclose(dtype); + CHECK(ret, FAIL, "H5Tclose"); - ret = H5Sclose(fspace); - CHECK(ret, FAIL, "H5Dclose"); + ret = H5Dclose(dataset1); + CHECK(ret, FAIL, "H5Dclose"); - ret = H5Sclose(mspace); - CHECK(ret, FAIL, "H5Sclose"); + ret = H5Sclose(fspace); + CHECK(ret, FAIL, "H5Dclose"); - ret = H5Fclose(file1); - CHECK(ret, FAIL, "H5Fclose"); -#endif + ret = H5Sclose(mspace); + CHECK(ret, FAIL, "H5Sclose"); + + ret = H5Fclose(file1); + CHECK(ret, FAIL, "H5Fclose"); + } } /* test_write_same_element */ /**************************************************************** diff --git a/hdf5_testpar/t_bigio.c b/hdf5_testpar/t_bigio.c index f81688c..4da006e 100644 --- a/hdf5_testpar/t_bigio.c +++ b/hdf5_testpar/t_bigio.c @@ -9,6 +9,8 @@ /* FILENAME and filenames must have the same number of names */ const char *FILENAME[3] = {"bigio_test.h5", "single_rank_independent_io.h5", NULL}; +uint64_t vol_cap_flags_g; + /* Constants definitions */ #define MAX_ERR_REPORT 10 /* Maximum number of errors reported */ @@ -47,8 +49,6 @@ static int mpi_size_g, mpi_rank_g; hsize_t space_dim1 = SPACE_DIM1 * 256; // 4096 hsize_t space_dim2 = SPACE_DIM2; -uint64_t vol_cap_flags; - static void coll_chunktest(const char *filename, int chunk_factor, int select_factor, int api_option, int file_selection, int mem_selection, int mode); @@ -1879,7 +1879,7 @@ main(int argc, char **argv) acc_plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); /* Get the capability flag of the VOL connector being used */ - if (H5Pget_vol_cap_flags(acc_plist, &vol_cap_flags) < 0) { + if (H5Pget_vol_cap_flags(acc_plist, &vol_cap_flags_g) < 0) { if (MAIN_PROCESS) HDprintf("Failed to get the capability flag of the VOL connector being used\n"); @@ -1888,10 +1888,10 @@ main(int argc, char **argv) } /* Make sure the connector supports the API functions being tested. This test only - * uses a few VOL functions, such as H5Fcreate/open/close/delete, H5Dcreate/write/read/close, + * uses a few API functions, such as H5Fcreate/open/close/delete, H5Dcreate/write/read/close, * and H5Dget_space. */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAIN_PROCESS) HDprintf( "API functions for basic file, dataset basic or more aren't supported with this connector\n"); diff --git a/hdf5_testpar/t_chunk_alloc.c b/hdf5_testpar/t_chunk_alloc.c index 86fc536..dd78225 100644 --- a/hdf5_testpar/t_chunk_alloc.c +++ b/hdf5_testpar/t_chunk_alloc.c @@ -468,8 +468,8 @@ test_chunk_alloc(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset, or dataset more aren't supported with this " diff --git a/hdf5_testpar/t_coll_chunk.c b/hdf5_testpar/t_coll_chunk.c index ca866ca..57ee605 100644 --- a/hdf5_testpar/t_coll_chunk.c +++ b/hdf5_testpar/t_coll_chunk.c @@ -77,8 +77,8 @@ coll_chunk1(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset or dataset more aren't supported with this " @@ -144,8 +144,8 @@ coll_chunk2(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset or dataset more aren't supported with this " @@ -214,8 +214,8 @@ coll_chunk3(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset or dataset more aren't supported with this " @@ -282,8 +282,8 @@ coll_chunk4(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset or dataset more aren't supported with this " @@ -350,8 +350,8 @@ coll_chunk5(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset or dataset more aren't supported with this " @@ -420,8 +420,8 @@ coll_chunk6(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset or dataset more aren't supported with this " @@ -488,8 +488,8 @@ coll_chunk7(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset or dataset more aren't supported with this " @@ -556,8 +556,8 @@ coll_chunk8(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset or dataset more aren't supported with this " @@ -624,8 +624,8 @@ coll_chunk9(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset or dataset more aren't supported with this " @@ -692,8 +692,8 @@ coll_chunk10(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset or dataset more aren't supported with this " diff --git a/hdf5_testpar/t_coll_md_read.c b/hdf5_testpar/t_coll_md_read.c index 24ab6c4..f6f99bf 100644 --- a/hdf5_testpar/t_coll_md_read.c +++ b/hdf5_testpar/t_coll_md_read.c @@ -86,8 +86,8 @@ test_partial_no_selection_coll_md_read(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_FLUSH_REFRESH)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset or file flush aren't supported with this " @@ -281,8 +281,8 @@ test_multi_chunk_io_addrmap_issue(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_FLUSH_REFRESH)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset or file flush aren't supported with this " @@ -441,8 +441,8 @@ test_link_chunk_io_sort_chunk_issue(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_FLUSH_REFRESH)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset or file flush aren't supported with this " @@ -597,8 +597,8 @@ test_collective_global_heap_write(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_FLUSH_REFRESH)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset or file flush aren't supported with this " diff --git a/hdf5_testpar/t_dset.c b/hdf5_testpar/t_dset.c index 855064a..d19323f 100644 --- a/hdf5_testpar/t_dset.c +++ b/hdf5_testpar/t_dset.c @@ -303,8 +303,8 @@ dataset_writeInd(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, basic dataset, or more aren't supported with this " @@ -454,8 +454,8 @@ dataset_readInd(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, basic dataset, or more aren't supported with this " @@ -597,8 +597,8 @@ dataset_writeAll(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, basic dataset, or more aren't supported with this " @@ -1126,8 +1126,8 @@ dataset_readAll(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, basic dataset, or more aren't supported with this " @@ -1553,8 +1553,8 @@ extend_writeInd(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, basic dataset, or more aren't supported with this " @@ -1781,8 +1781,8 @@ extend_writeInd2(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, basic dataset, or more aren't supported with this " @@ -1956,8 +1956,8 @@ extend_readInd(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, basic dataset, or more aren't supported with this " @@ -2150,8 +2150,8 @@ extend_writeAll(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, basic dataset, or more aren't supported with this " @@ -2400,8 +2400,8 @@ extend_readAll(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, basic dataset, or more aren't supported with this " @@ -2616,7 +2616,7 @@ compress_readAll(void) MPI_Comm_rank(comm, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file or dataset aren't supported with this connector\n"); @@ -2819,7 +2819,7 @@ none_selection_chunk(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file or dataset aren't supported with this connector\n"); @@ -3117,7 +3117,7 @@ test_actual_io_mode(int selection_mode) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file or dataset aren't supported with this connector\n"); @@ -3636,6 +3636,19 @@ test_no_collective_cause_mode(int selection_mode) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); + /* Make sure the connector supports the API functions being tested */ + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { + if (MAINPROCESS) { + puts("SKIPPED"); + printf(" API functions for basic file, dataset, or dataset more aren't supported with this " + "connector\n"); + fflush(stdout); + } + + return; + } + MPI_Barrier(MPI_COMM_WORLD); HDassert(mpi_size >= 1); @@ -3957,8 +3970,8 @@ dataset_atomicity(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, basic dataset, or more aren't supported with this " @@ -4280,8 +4293,8 @@ test_dense_attr(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_ATTR_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, group, dataset, or attribute aren't supported with " diff --git a/hdf5_testpar/t_file.c b/hdf5_testpar/t_file.c index 0b68fda..a96f593 100644 --- a/hdf5_testpar/t_file.c +++ b/hdf5_testpar/t_file.c @@ -78,7 +78,7 @@ test_split_comm_access(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file aren't supported with this connector\n"); @@ -796,7 +796,7 @@ test_file_properties(void) VRFY((mpi_ret >= 0), "MPI_Comm_rank succeeded"); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file aren't supported with this connector\n"); @@ -994,6 +994,18 @@ test_delete(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); + /* Make sure the connector supports the API functions being tested */ + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE)) { + if (MAINPROCESS) { + puts("SKIPPED"); + printf(" API functions for basic file or file more aren't supported with this " + "connector\n"); + fflush(stdout); + } + + return; + } + /* setup file access plist */ fapl_id = H5Pcreate(H5P_FILE_ACCESS); VRFY((fapl_id != H5I_INVALID_HID), "H5Pcreate"); diff --git a/hdf5_testpar/t_file_image.c b/hdf5_testpar/t_file_image.c index 4f4fa96..8edf065 100644 --- a/hdf5_testpar/t_file_image.c +++ b/hdf5_testpar/t_file_image.c @@ -85,6 +85,20 @@ file_image_daisy_chain_test(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); + /* Make sure the connector supports the API functions being tested */ + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { + if (MAINPROCESS) { + puts("SKIPPED"); + printf(" API functions for basic file, dataset, or dataset more aren't supported with this " + "connector\n"); + fflush(stdout); + } + + return; + } + /* setup file name */ HDsnprintf(file_name, 1024, "file_image_daisy_chain_test_%05d.h5", (int)mpi_rank); diff --git a/hdf5_testpar/t_filter_read.c b/hdf5_testpar/t_filter_read.c index 2cb1f65..b9136cd 100644 --- a/hdf5_testpar/t_filter_read.c +++ b/hdf5_testpar/t_filter_read.c @@ -303,8 +303,8 @@ test_filter_read(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_FILTERS)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_FILTERS)) { if (MAINPROCESS) { puts("SKIPPED"); printf( diff --git a/hdf5_testpar/t_mdset.c b/hdf5_testpar/t_mdset.c index 32ede54..c53ec2c 100644 --- a/hdf5_testpar/t_mdset.c +++ b/hdf5_testpar/t_mdset.c @@ -89,7 +89,7 @@ zero_dim_dset(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file or dataset aren't supported with this connector\n"); @@ -175,7 +175,7 @@ multiple_dset_write(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file or dataset aren't supported with this connector\n"); @@ -265,7 +265,7 @@ compact_dataset(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file or dataset aren't supported with this connector\n"); @@ -398,8 +398,8 @@ null_dataset(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_ATTR_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset, or attribute aren't supported with this " @@ -518,7 +518,7 @@ big_dataset(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file or dataset aren't supported with this connector\n"); @@ -665,7 +665,7 @@ dataset_fillvalue(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file or dataset aren't supported with this connector\n"); @@ -928,8 +928,8 @@ collective_group_write(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf( @@ -1037,6 +1037,19 @@ independent_group_read(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); + /* Make sure the connector supports the API functions being tested */ + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { + if (MAINPROCESS) { + puts("SKIPPED"); + printf( + " API functions for basic file, group, or dataset aren't supported with this connector\n"); + fflush(stdout); + } + + return; + } + plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); H5Pset_all_coll_metadata_ops(plist, FALSE); @@ -1162,8 +1175,8 @@ multiple_group_write(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_ATTR_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, group, dataset, or attribute aren't supported with " @@ -1334,8 +1347,8 @@ multiple_group_read(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_ATTR_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, group, dataset, or attribute aren't supported with " @@ -1667,8 +1680,8 @@ io_mode_confusion(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset, or dataset more aren't supported with this " @@ -1929,9 +1942,9 @@ rr_obj_hdr_flush_confusion(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_FLUSH_REFRESH) || !(vol_cap_flags & H5VL_CAP_FLAG_ATTR_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_ATTR_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file, dataset, attribute, dataset more, attribute more, or " @@ -2735,7 +2748,7 @@ chunk_align_bug_1(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file or dataset aren't supported with this connector\n"); diff --git a/hdf5_testpar/t_pshutdown.c b/hdf5_testpar/t_pshutdown.c index 6ebe3a6..b973529 100644 --- a/hdf5_testpar/t_pshutdown.c +++ b/hdf5_testpar/t_pshutdown.c @@ -27,9 +27,9 @@ int nerrors = 0; /* errors count */ -const char *FILENAME[] = {"shutdown.h5", NULL}; +uint64_t vol_cap_flags_g; -uint64_t vol_cap_flags; +const char *FILENAME[] = {"shutdown.h5", NULL}; int main(int argc, char **argv) @@ -64,12 +64,12 @@ main(int argc, char **argv) VRFY((fapl >= 0), "H5Pcreate succeeded"); /* Get the capability flag of the VOL connector being used */ - ret = H5Pget_vol_cap_flags(fapl, &vol_cap_flags); + ret = H5Pget_vol_cap_flags(fapl, &vol_cap_flags_g); VRFY((ret >= 0), "H5Pget_vol_cap_flags succeeded"); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); HDprintf( diff --git a/hdf5_testpar/t_shapesame.c b/hdf5_testpar/t_shapesame.c index d69ae9a..d2f9196 100644 --- a/hdf5_testpar/t_shapesame.c +++ b/hdf5_testpar/t_shapesame.c @@ -28,6 +28,10 @@ #include "hdf5.h" #include "testphdf5.h" +#ifndef PATH_MAX +#define PATH_MAX 512 +#endif + /* FILENAME and filenames must have the same number of names. * Use PARATESTFILE in general and use a separated filename only if the file * created in one test is accessed by a different test. @@ -37,7 +41,8 @@ const char *FILENAME[NFILENAME] = {"ShapeSameTest.h5", NULL}; char filenames[NFILENAME][PATH_MAX]; hid_t fapl; /* file access property list */ -uint64_t vol_cap_flags; + +uint64_t vol_cap_flags_g; /* On Lustre (and perhaps other parallel file systems?), we have severe * slow downs if two or more processes attempt to access the same file system @@ -3968,12 +3973,6 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type) * Main driver of the Parallel HDF5 tests */ -#include "testphdf5.h" - -#ifndef PATH_MAX -#define PATH_MAX 512 -#endif /* !PATH_MAX */ - /* global variables */ int dim0; int dim1; @@ -4346,7 +4345,7 @@ main(int argc, char **argv) fapl = H5Pcreate(H5P_FILE_ACCESS); /* Get the capability flag of the VOL connector being used */ - if (H5Pget_vol_cap_flags(fapl, &vol_cap_flags) < 0) { + if (H5Pget_vol_cap_flags(fapl, &vol_cap_flags_g) < 0) { if (MAINPROCESS) HDprintf("Failed to get the capability flag of the VOL connector being used\n"); @@ -4355,9 +4354,9 @@ main(int argc, char **argv) } /* Make sure the connector supports the API functions being tested. This test only - * uses a few VOL functions, such as H5Fcreate/close/delete, H5Dcreate/write/read/close, + * uses a few API functions, such as H5Fcreate/close/delete, H5Dcreate/write/read/close, */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) HDprintf("API functions for basic file and dataset aren't supported with this connector\n"); @@ -4389,7 +4388,7 @@ main(int argc, char **argv) "===================================\n"); } - /* Shape Same tests using contigous hyperslab */ + /* Shape Same tests using contiguous hyperslab */ #if 0 AddTest("sscontig1", sscontig1, NULL, "Cntg hslab, ind IO, cntg dsets", filenames[0]); diff --git a/hdf5_testpar/t_span_tree.c b/hdf5_testpar/t_span_tree.c index f6f8362..5aafb0b 100644 --- a/hdf5_testpar/t_span_tree.c +++ b/hdf5_testpar/t_span_tree.c @@ -65,8 +65,8 @@ coll_irregular_cont_write(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file dataset, or dataset more aren't supported with this " @@ -103,8 +103,8 @@ coll_irregular_cont_read(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file dataset, or dataset more aren't supported with this " @@ -141,8 +141,8 @@ coll_irregular_simple_chunk_write(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file dataset, or dataset more aren't supported with this " @@ -179,8 +179,8 @@ coll_irregular_simple_chunk_read(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file dataset, or dataset more aren't supported with this " @@ -217,8 +217,8 @@ coll_irregular_complex_chunk_write(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file dataset, or dataset more aren't supported with this " @@ -255,8 +255,8 @@ coll_irregular_complex_chunk_read(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_MORE)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file dataset, or dataset more aren't supported with this " @@ -2391,7 +2391,7 @@ lower_dim_size_comp_test(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file or dataset aren't supported with this connector\n"); @@ -2480,7 +2480,7 @@ link_chunk_collective_io_test(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags & H5VL_CAP_FLAG_DATASET_BASIC)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); printf(" API functions for basic file or dataset aren't supported with this connector\n"); diff --git a/hdf5_testpar/testphdf5.c b/hdf5_testpar/testphdf5.c index 23a77e5..e709732 100644 --- a/hdf5_testpar/testphdf5.c +++ b/hdf5_testpar/testphdf5.c @@ -26,13 +26,14 @@ int dim0; int dim1; int chunkdim0; int chunkdim1; -int nerrors = 0; /* errors count */ -int ndatasets = 300; /* number of datasets to create*/ -int ngroups = 512; /* number of groups to create in root - * group. */ -int facc_type = FACC_MPIO; /*Test file access type */ -int dxfer_coll_type = DXFER_COLLECTIVE_IO; -uint64_t vol_cap_flags; +int nerrors = 0; /* errors count */ +int ndatasets = 300; /* number of datasets to create*/ +int ngroups = 512; /* number of groups to create in root + * group. */ +int facc_type = FACC_MPIO; /*Test file access type */ +int dxfer_coll_type = DXFER_COLLECTIVE_IO; + +uint64_t vol_cap_flags_g; H5E_auto2_t old_func; /* previous error handler */ void *old_client_data; /* previous error handler arg.*/ @@ -366,10 +367,10 @@ main(int argc, char **argv) fapl = H5Pcreate(H5P_FILE_ACCESS); VRFY((fapl >= 0), "H5Pcreate succeeded"); - vol_cap_flags = 0L; + vol_cap_flags_g = H5VL_CAP_FLAG_NONE; /* Get the capability flag of the VOL connector being used */ - ret = H5Pget_vol_cap_flags(fapl, &vol_cap_flags); + ret = H5Pget_vol_cap_flags(fapl, &vol_cap_flags_g); VRFY((ret >= 0), "H5Pget_vol_cap_flags succeeded"); /* Initialize testing framework */ diff --git a/hdf5_testpar/testphdf5.h b/hdf5_testpar/testphdf5.h index e291936..11b9c2b 100644 --- a/hdf5_testpar/testphdf5.h +++ b/hdf5_testpar/testphdf5.h @@ -17,7 +17,6 @@ #include "H5private.h" #include "testpar.h" -#include "vol_tests_disabled.h" /* * Define parameters for various tests since we do not have access to @@ -264,7 +263,7 @@ extern H5E_auto2_t old_func; /* previous error handler */ extern void *old_client_data; /*previous error handler arg.*/ extern int facc_type; /*Test file access type */ extern int dxfer_coll_type; -extern uint64_t vol_cap_flags; +extern uint64_t vol_cap_flags_g; /* Test program prototypes */ void test_plist_ed(void); diff --git a/testpar.h b/testpar.h index 8a60084..bce0cb1 100644 --- a/testpar.h +++ b/testpar.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -31,8 +30,11 @@ * mesg is not an empty string. */ #define MESG(mesg) \ - if (VERBOSE_MED && *mesg != '\0') \ - printf("%s\n", mesg) + do { \ + if (VERBOSE_MED && *mesg != '\0') { \ + HDprintf("%s\n", mesg); \ + } \ + } while (0) /* * VRFY: Verify if the condition val is true. @@ -50,13 +52,13 @@ MESG(mesg); \ } \ else { \ - printf("Proc %d: ", rankvar); \ - printf("*** Parallel ERROR ***\n"); \ - printf(" VRFY (%s) failed at line %4d in %s\n", mesg, (int)__LINE__, __FILE__); \ + HDprintf("Proc %d: ", rankvar); \ + HDprintf("*** Parallel ERROR ***\n"); \ + HDprintf(" VRFY (%s) failed at line %4d in %s\n", mesg, (int)__LINE__, __FILE__); \ ++nerrors; \ fflush(stdout); \ if (!VERBOSE_MED) { \ - printf("aborting MPI processes\n"); \ + HDprintf("aborting MPI processes\n"); \ MPI_Abort(MPI_COMM_WORLD, 1); \ } \ } \ @@ -76,9 +78,9 @@ MESG(mesg); \ } \ else { \ - printf("Proc %d: ", mpi_rank); \ - printf("*** PHDF5 REMARK (not an error) ***\n"); \ - printf(" Condition (%s) failed at line %4d in %s\n", mesg, (int)__LINE__, __FILE__); \ + HDprintf("Proc %d: ", mpi_rank); \ + HDprintf("*** PHDF5 REMARK (not an error) ***\n"); \ + HDprintf(" Condition (%s) failed at line %4d in %s\n", mesg, (int)__LINE__, __FILE__); \ fflush(stdout); \ } \ } while (0) @@ -86,10 +88,10 @@ #define MPI_BANNER(mesg) \ do { \ if (VERBOSE_MED || MAINPROCESS) { \ - printf("--------------------------------\n"); \ - printf("Proc %d: ", mpi_rank); \ - printf("*** %s\n", mesg); \ - printf("--------------------------------\n"); \ + HDprintf("--------------------------------\n"); \ + HDprintf("Proc %d: ", mpi_rank); \ + HDprintf("*** %s\n", mesg); \ + HDprintf("--------------------------------\n"); \ } \ } while (0) diff --git a/vol_async_test.c b/vol_async_test.c index 9f9136d..016e6d0 100644 --- a/vol_async_test.c +++ b/vol_async_test.c @@ -67,7 +67,7 @@ test_one_dataset_io(void) int rbuf[6][10]; int i, j; - TESTING_MULTIPART("single dataset I/O") + TESTING_MULTIPART("single dataset I/O"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || @@ -78,24 +78,24 @@ test_one_dataset_io(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); /* Create dataspace */ if ((space_id = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Create file asynchronously */ if ((file_id = H5Fcreate_async(ASYNC_VOL_TEST_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the dataset asynchronously */ if ((dset_id = H5Dcreate_async(file_id, "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -103,7 +103,7 @@ test_one_dataset_io(void) { PART_BEGIN(single_dset_eswait) { - TESTING_2("synchronization using H5ESwait()") + TESTING_2("synchronization using H5ESwait()"); /* Initialize wbuf */ for (i = 0; i < 6; i++) @@ -112,23 +112,23 @@ test_one_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf, es_id) < 0) - PART_TEST_ERROR(single_dset_eswait) + PART_TEST_ERROR(single_dset_eswait); /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(single_dset_eswait) + PART_TEST_ERROR(single_dset_eswait); if (op_failed) - PART_TEST_ERROR(single_dset_eswait) + PART_TEST_ERROR(single_dset_eswait); /* Read the dataset asynchronously */ if (H5Dread_async(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf, es_id) < 0) - PART_TEST_ERROR(single_dset_eswait) + PART_TEST_ERROR(single_dset_eswait); /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(single_dset_eswait) + PART_TEST_ERROR(single_dset_eswait); if (op_failed) - PART_TEST_ERROR(single_dset_eswait) + PART_TEST_ERROR(single_dset_eswait); /* Verify the read data */ for (i = 0; i < 6; i++) @@ -136,7 +136,7 @@ test_one_dataset_io(void) if (wbuf[i][j] != rbuf[i][j]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(single_dset_eswait) + PART_ERROR(single_dset_eswait); } /* end if */ PASSED(); @@ -145,7 +145,7 @@ test_one_dataset_io(void) PART_BEGIN(single_dset_dclose) { - TESTING_2("synchronization using H5Dclose()") + TESTING_2("synchronization using H5Dclose()"); /* Update wbuf */ for (i = 0; i < 6; i++) @@ -154,23 +154,23 @@ test_one_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf, es_id) < 0) - PART_TEST_ERROR(single_dset_dclose) + PART_TEST_ERROR(single_dset_dclose); /* Close the dataset synchronously */ if (H5Dclose(dset_id) < 0) - PART_TEST_ERROR(single_dset_dclose) + PART_TEST_ERROR(single_dset_dclose); /* Re-open the dataset asynchronously */ if ((dset_id = H5Dopen_async(file_id, "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(single_dset_dclose) + PART_TEST_ERROR(single_dset_dclose); /* Read the dataset asynchronously */ if (H5Dread_async(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf, es_id) < 0) - PART_TEST_ERROR(single_dset_dclose) + PART_TEST_ERROR(single_dset_dclose); /* Close the dataset synchronously */ if (H5Dclose(dset_id) < 0) - PART_TEST_ERROR(single_dset_dclose) + PART_TEST_ERROR(single_dset_dclose); /* Verify the read data */ for (i = 0; i < 6; i++) @@ -178,12 +178,12 @@ test_one_dataset_io(void) if (wbuf[i][j] != rbuf[i][j]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(single_dset_dclose) + PART_ERROR(single_dset_dclose); } /* end if */ /* Re-open the dataset asynchronously */ if ((dset_id = H5Dopen_async(file_id, "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(single_dset_dclose) + PART_TEST_ERROR(single_dset_dclose); PASSED(); } @@ -191,7 +191,7 @@ test_one_dataset_io(void) PART_BEGIN(single_dset_dflush) { - TESTING_2("synchronization using H5Oflush_async()") + TESTING_2("synchronization using H5Oflush_async()"); /* Update wbuf */ for (i = 0; i < 6; i++) @@ -200,22 +200,22 @@ test_one_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf, es_id) < 0) - PART_TEST_ERROR(single_dset_dflush) + PART_TEST_ERROR(single_dset_dflush); /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Oflush_async(dset_id, es_id) < 0) - PART_TEST_ERROR(single_dset_dflush) + PART_TEST_ERROR(single_dset_dflush); /* Read the dataset asynchronously */ if (H5Dread_async(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf, es_id) < 0) - PART_TEST_ERROR(single_dset_dflush) + PART_TEST_ERROR(single_dset_dflush); /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(single_dset_dflush) + PART_TEST_ERROR(single_dset_dflush); if (op_failed) - PART_TEST_ERROR(single_dset_dflush) + PART_TEST_ERROR(single_dset_dflush); /* Verify the read data */ for (i = 0; i < 6; i++) @@ -223,7 +223,7 @@ test_one_dataset_io(void) if (wbuf[i][j] != rbuf[i][j]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(single_dset_dflush) + PART_ERROR(single_dset_dflush); } /* end if */ PASSED(); @@ -232,7 +232,7 @@ test_one_dataset_io(void) PART_BEGIN(single_dset_fclose) { - TESTING_2("synchronization using H5Fclose()") + TESTING_2("synchronization using H5Fclose()"); /* Update wbuf */ for (i = 0; i < 6; i++) @@ -241,35 +241,35 @@ test_one_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf, es_id) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id, es_id) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Close the file synchronously */ if (H5Fclose(file_id) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Reopen the file asynchronously. */ if ((file_id = H5Fopen_async(ASYNC_VOL_TEST_FILE, H5F_ACC_RDONLY, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Re-open the dataset asynchronously */ if ((dset_id = H5Dopen_async(file_id, "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Read the dataset asynchronously */ if (H5Dread_async(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf, es_id) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id, es_id) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Close the file synchronously */ if (H5Fclose(file_id) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Verify the read data */ for (i = 0; i < 6; i++) @@ -277,7 +277,7 @@ test_one_dataset_io(void) if (wbuf[i][j] != rbuf[i][j]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(single_dset_fclose) + PART_ERROR(single_dset_fclose); } /* end if */ PASSED(); @@ -286,18 +286,18 @@ test_one_dataset_io(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -335,7 +335,7 @@ test_multi_dataset_io(void) int rbuf[5][6][10]; int i, j, k; - TESTING_MULTIPART("multi dataset I/O") + TESTING_MULTIPART("multi dataset I/O"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || @@ -346,19 +346,19 @@ test_multi_dataset_io(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); /* Create dataspace */ if ((space_id = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Create file asynchronously */ if ((file_id = H5Fcreate_async(ASYNC_VOL_TEST_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -366,7 +366,7 @@ test_multi_dataset_io(void) { PART_BEGIN(multi_dset_open) { - TESTING_2("keeping datasets open") + TESTING_2("keeping datasets open"); /* Loop over datasets */ for (i = 0; i < 5; i++) { @@ -376,7 +376,7 @@ test_multi_dataset_io(void) /* Create the dataset asynchronously */ if ((dset_id[i] = H5Dcreate_async(file_id, dset_name, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_dset_open) + PART_TEST_ERROR(multi_dset_open); /* Initialize wbuf. Must use a new slice of wbuf for each dset * since we can't overwrite the buffers until I/O is done. */ @@ -387,27 +387,27 @@ test_multi_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf[i], es_id) < 0) - PART_TEST_ERROR(multi_dset_open) + PART_TEST_ERROR(multi_dset_open); } /* end for */ /* Flush the file asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id, H5F_SCOPE_LOCAL, es_id) < 0) - PART_TEST_ERROR(multi_dset_open) + PART_TEST_ERROR(multi_dset_open); /* Loop over datasets */ for (i = 0; i < 5; i++) { /* Read the dataset asynchronously */ if (H5Dread_async(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[i], es_id) < 0) - PART_TEST_ERROR(multi_dset_open) + PART_TEST_ERROR(multi_dset_open); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_dset_open) + PART_TEST_ERROR(multi_dset_open); if (op_failed) - PART_TEST_ERROR(multi_dset_open) + PART_TEST_ERROR(multi_dset_open); /*printf("\nwbuf:\n"); for(i = 0; i < 5; i++) { for(j = 0; j < 6; j++) { @@ -433,13 +433,13 @@ test_multi_dataset_io(void) if (wbuf[i][j][k] != rbuf[i][j][k]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(multi_dset_open) + PART_ERROR(multi_dset_open); } /* end if */ /* Close the datasets */ for (i = 0; i < 5; i++) if (H5Dclose(dset_id[i]) < 0) - PART_TEST_ERROR(multi_dset_open) + PART_TEST_ERROR(multi_dset_open); PASSED(); } @@ -447,7 +447,7 @@ test_multi_dataset_io(void) PART_BEGIN(multi_dset_close) { - TESTING_2("closing datasets between I/O") + TESTING_2("closing datasets between I/O"); /* Loop over datasets */ for (i = 0; i < 5; i++) { @@ -456,9 +456,9 @@ test_multi_dataset_io(void) /* Open the dataset asynchronously */ if ((dset_id[0] = H5Dopen_async(file_id, dset_name, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); - /* Udpate wbuf */ + /* Update wbuf */ for (j = 0; j < 6; j++) for (k = 0; k < 10; k++) wbuf[i][j][k] += 5 * 6 * 10; @@ -466,17 +466,17 @@ test_multi_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf[i], es_id) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id[0], es_id) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); } /* end for */ /* Flush the file asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id, H5F_SCOPE_LOCAL, es_id) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); /* Loop over datasets */ for (i = 0; i < 5; i++) { @@ -485,23 +485,23 @@ test_multi_dataset_io(void) /* Open the dataset asynchronously */ if ((dset_id[0] = H5Dopen_async(file_id, dset_name, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); /* Read the dataset asynchronously */ if (H5Dread_async(dset_id[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[i], es_id) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id[0], es_id) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); if (op_failed) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); /*printf("\nwbuf:\n"); for(i = 0; i < 5; i++) { for(j = 0; j < 6; j++) { @@ -527,7 +527,7 @@ test_multi_dataset_io(void) if (wbuf[i][j][k] != rbuf[i][j][k]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(multi_dset_close) + PART_ERROR(multi_dset_close); } /* end if */ PASSED(); @@ -536,21 +536,21 @@ test_multi_dataset_io(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -590,7 +590,7 @@ test_multi_file_dataset_io(void) int rbuf[5][6][10]; int i, j, k; - TESTING_MULTIPART("multi file dataset I/O") + TESTING_MULTIPART("multi file dataset I/O"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || @@ -601,15 +601,15 @@ test_multi_file_dataset_io(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); /* Create dataspace */ if ((space_id = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -617,7 +617,7 @@ test_multi_file_dataset_io(void) { PART_BEGIN(multi_file_dset_open) { - TESTING_2("keeping files and datasets open") + TESTING_2("keeping files and datasets open"); /* Loop over files */ for (i = 0; i < 5; i++) { @@ -627,14 +627,14 @@ test_multi_file_dataset_io(void) /* Create file asynchronously */ if ((file_id[i] = H5Fcreate_async(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); if (i > max_printf_file) max_printf_file = i; /* Create the dataset asynchronously */ if ((dset_id[i] = H5Dcreate_async(file_id[i], "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); /* Initialize wbuf. Must use a new slice of wbuf for each dset * since we can't overwrite the buffers until I/O is done. */ @@ -645,7 +645,7 @@ test_multi_file_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf[i], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); } /* end for */ /* Loop over files */ @@ -653,19 +653,19 @@ test_multi_file_dataset_io(void) /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Oflush_async(dset_id[i], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); /* Read the dataset asynchronously */ if (H5Dread_async(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[i], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); if (op_failed) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); /* Verify the read data */ for (i = 0; i < 5; i++) @@ -674,13 +674,13 @@ test_multi_file_dataset_io(void) if (wbuf[i][j][k] != rbuf[i][j][k]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(multi_file_dset_open) + PART_ERROR(multi_file_dset_open); } /* end if */ /* Close the datasets */ for (i = 0; i < 5; i++) if (H5Dclose(dset_id[i]) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); PASSED(); } @@ -688,15 +688,15 @@ test_multi_file_dataset_io(void) PART_BEGIN(multi_file_dset_dclose) { - TESTING_2("closing datasets between I/O") + TESTING_2("closing datasets between I/O"); /* Loop over files */ for (i = 0; i < 5; i++) { /* Open the dataset asynchronously */ if ((dset_id[0] = H5Dopen_async(file_id[i], "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); - /* Udpate wbuf */ + /* Update wbuf */ for (j = 0; j < 6; j++) for (k = 0; k < 10; k++) wbuf[i][j][k] += 5 * 6 * 10; @@ -704,11 +704,11 @@ test_multi_file_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf[i], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id[0], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); } /* end for */ /* Loop over files */ @@ -716,27 +716,27 @@ test_multi_file_dataset_io(void) /* Flush the file asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id[i], H5F_SCOPE_LOCAL, es_id) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); /* Open the dataset asynchronously */ if ((dset_id[0] = H5Dopen_async(file_id[i], "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); /* Read the dataset asynchronously */ if (H5Dread_async(dset_id[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[i], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id[0], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); if (op_failed) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); /* Verify the read data */ for (i = 0; i < 5; i++) @@ -745,13 +745,13 @@ test_multi_file_dataset_io(void) if (wbuf[i][j][k] != rbuf[i][j][k]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(multi_file_dset_dclose) + PART_ERROR(multi_file_dset_dclose); } /* end if */ /* Close the files */ for (i = 0; i < 5; i++) if (H5Fclose(file_id[i]) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); PASSED(); } @@ -759,7 +759,7 @@ test_multi_file_dataset_io(void) PART_BEGIN(multi_file_dset_fclose) { - TESTING_2("closing files between I/O") + TESTING_2("closing files between I/O"); /* Loop over files */ for (i = 0; i < 5; i++) { @@ -768,13 +768,13 @@ test_multi_file_dataset_io(void) /* Open the file asynchronously */ if ((file_id[0] = H5Fopen_async(file_name, H5F_ACC_RDWR, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Open the dataset asynchronously */ if ((dset_id[0] = H5Dopen_async(file_id[0], "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); - /* Udpate wbuf */ + /* Update wbuf */ for (j = 0; j < 6; j++) for (k = 0; k < 10; k++) wbuf[i][j][k] += 5 * 6 * 10; @@ -782,22 +782,22 @@ test_multi_file_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf[i], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id[0], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Close the file asynchronously */ if (H5Fclose_async(file_id[0], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); if (op_failed) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Loop over files */ for (i = 0; i < 5; i++) { @@ -806,31 +806,31 @@ test_multi_file_dataset_io(void) /* Open the file asynchronously */ if ((file_id[0] = H5Fopen_async(file_name, H5F_ACC_RDONLY, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Open the dataset asynchronously */ if ((dset_id[0] = H5Dopen_async(file_id[0], "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Read the dataset asynchronously */ if (H5Dread_async(dset_id[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[i], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id[0], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Close the file asynchronously */ if (H5Fclose_async(file_id[0], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); if (op_failed) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Verify the read data */ for (i = 0; i < 5; i++) @@ -839,7 +839,7 @@ test_multi_file_dataset_io(void) if (wbuf[i][j][k] != rbuf[i][j][k]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(multi_file_dset_fclose) + PART_ERROR(multi_file_dset_fclose); } /* end if */ PASSED(); @@ -848,18 +848,18 @@ test_multi_file_dataset_io(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -901,7 +901,7 @@ test_multi_file_grp_dset_io(void) int rbuf[5][6][10]; int i, j, k; - TESTING_MULTIPART("multi file dataset I/O with groups") + TESTING_MULTIPART("multi file dataset I/O with groups"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -912,15 +912,15 @@ test_multi_file_grp_dset_io(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); /* Create dataspace */ if ((space_id = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -928,7 +928,7 @@ test_multi_file_grp_dset_io(void) { PART_BEGIN(multi_file_grp_dset_no_kick) { - TESTING_2("without intermediate calls to H5ESwait()") + TESTING_2("without intermediate calls to H5ESwait()"); /* Loop over files */ for (i = 0; i < 5; i++) { @@ -938,19 +938,19 @@ test_multi_file_grp_dset_io(void) /* Create file asynchronously */ if ((file_id = H5Fcreate_async(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); if (i > max_printf_file) max_printf_file = i; /* Create the group asynchronously */ if ((grp_id = H5Gcreate_async(file_id, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Create the dataset asynchronously */ if ((dset_id = H5Dcreate_async(grp_id, "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Initialize wbuf. Must use a new slice of wbuf for each dset * since we can't overwrite the buffers until I/O is done. */ @@ -961,26 +961,26 @@ test_multi_file_grp_dset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf[i], es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Close the group asynchronously */ if (H5Gclose_async(grp_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Close the file asynchronously */ if (H5Fclose_async(file_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); if (op_failed) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Loop over files */ for (i = 0; i < 5; i++) { @@ -989,38 +989,38 @@ test_multi_file_grp_dset_io(void) /* Open the file asynchronously */ if ((file_id = H5Fopen_async(file_name, H5F_ACC_RDONLY, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Open the group asynchronously */ if ((grp_id = H5Gopen_async(file_id, "grp", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Open the dataset asynchronously */ if ((dset_id = H5Dopen_async(grp_id, "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Read the dataset asynchronously */ if (H5Dread_async(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[i], es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Close the group asynchronously */ if (H5Gclose_async(grp_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Close the file asynchronously */ if (H5Fclose_async(file_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); if (op_failed) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Verify the read data */ for (i = 0; i < 5; i++) @@ -1029,7 +1029,7 @@ test_multi_file_grp_dset_io(void) if (wbuf[i][j][k] != rbuf[i][j][k]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(multi_file_grp_dset_no_kick) + PART_ERROR(multi_file_grp_dset_no_kick); } /* end if */ PASSED(); @@ -1038,7 +1038,7 @@ test_multi_file_grp_dset_io(void) PART_BEGIN(multi_file_grp_dset_kick) { - TESTING_2("with intermediate calls to H5ESwait() (0 timeout)") + TESTING_2("with intermediate calls to H5ESwait() (0 timeout)"); /* Loop over files */ for (i = 0; i < 5; i++) { @@ -1048,21 +1048,21 @@ test_multi_file_grp_dset_io(void) /* Create file asynchronously */ if ((file_id = H5Fcreate_async(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); if (i > max_printf_file) max_printf_file = i; /* Create the group asynchronously */ if ((grp_id = H5Gcreate_async(file_id, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Create the dataset asynchronously */ if ((dset_id = H5Dcreate_async(grp_id, "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); - /* Udpate wbuf */ + /* Update wbuf */ for (j = 0; j < 6; j++) for (k = 0; k < 10; k++) wbuf[i][j][k] += 5 * 6 * 10; @@ -1070,32 +1070,32 @@ test_multi_file_grp_dset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf[i], es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Close the group asynchronously */ if (H5Gclose_async(grp_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Close the file asynchronously */ if (H5Fclose_async(file_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Kick the event stack to make progress */ if (H5ESwait(es_id, 0, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); if (op_failed) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); if (op_failed) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Loop over files */ for (i = 0; i < 5; i++) { @@ -1104,44 +1104,44 @@ test_multi_file_grp_dset_io(void) /* Open the file asynchronously */ if ((file_id = H5Fopen_async(file_name, H5F_ACC_RDONLY, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Open the group asynchronously */ if ((grp_id = H5Gopen_async(file_id, "grp", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Open the dataset asynchronously */ if ((dset_id = H5Dopen_async(grp_id, "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Read the dataset asynchronously */ if (H5Dread_async(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[i], es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Close the group asynchronously */ if (H5Gclose_async(grp_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Close the file asynchronously */ if (H5Fclose_async(file_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Kick the event stack to make progress */ if (H5ESwait(es_id, 0, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); if (op_failed) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); if (op_failed) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Verify the read data */ for (i = 0; i < 5; i++) @@ -1150,7 +1150,7 @@ test_multi_file_grp_dset_io(void) if (wbuf[i][j][k] != rbuf[i][j][k]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(multi_file_grp_dset_kick) + PART_ERROR(multi_file_grp_dset_kick); } /* end if */ PASSED(); @@ -1159,18 +1159,18 @@ test_multi_file_grp_dset_io(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1218,7 +1218,7 @@ test_set_extent(void) int rbuf[6][10]; int i, j; - TESTING("H5Dset_extent() and H5Dget_space()") + TESTING("H5Dset_extent() and H5Dget_space()"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) || @@ -1231,19 +1231,19 @@ test_set_extent(void) /* Create file dataspace */ if ((fspace_id[0] = H5Screate_simple(2, dims, mdims)) < 0) - TEST_ERROR + TEST_ERROR; /* Create memory dataspace */ if ((mspace_id = H5Screate_simple(1, &dims[1], NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create DCPL */ if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; /* Set chunking */ if (H5Pset_chunk(dcpl_id, 2, cdims) < 0) - TEST_ERROR + TEST_ERROR; /* Initialize wbuf */ for (i = 0; i < 6; i++) @@ -1252,16 +1252,16 @@ test_set_extent(void) /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Create file asynchronously */ if ((file_id = H5Fcreate_async(ASYNC_VOL_TEST_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the dataset asynchronously */ if ((dset_id = H5Dcreate_async(file_id, "dset", H5T_NATIVE_INT, fspace_id[0], H5P_DEFAULT, dcpl_id, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Extend the first dataset from 1 to 6, 1 at a time */ for (i = 0; i < 6; i++) { @@ -1269,65 +1269,65 @@ test_set_extent(void) if (i) { /* Copy dataspace */ if ((fspace_id[i] = H5Scopy(fspace_id[i - 1])) < 0) - TEST_ERROR + TEST_ERROR; /* Extend datapace */ dims[0] = (hsize_t)(i + 1); if (H5Sset_extent_simple(fspace_id[i], 2, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR; /* Extend dataset asynchronously */ if (H5Dset_extent_async(dset_id, dims, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Select hyperslab in file space to match new region */ start[0] = (hsize_t)i; if (H5Sselect_hyperslab(fspace_id[i], H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Get dataset dataspace */ if ((fspace_out[i] = H5Dget_space_async(dset_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Write the dataset slice asynchronously */ if (H5Dwrite_async(dset_id, H5T_NATIVE_INT, mspace_id, fspace_id[i], H5P_DEFAULT, wbuf[i], es_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end for */ /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Oflush_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Read the entire dataset asynchronously */ if (H5Dread_async(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Verify extents are correct. We do not need to wait because of the * "future id" capability. */ for (i = 0; i < 6; i++) { if ((tri_ret = H5Sextent_equal(fspace_id[i], fspace_out[i])) < 0) - TEST_ERROR + TEST_ERROR; if (!tri_ret) FAIL_PUTS_ERROR(" dataspaces are not equal\n"); if (i && H5Sclose(fspace_id[i]) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_out[i]) < 0) - TEST_ERROR + TEST_ERROR; } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < 6; i++) for (j = 0; j < 10; j++) if (wbuf[i][j] != rbuf[i][j]) - FAIL_PUTS_ERROR(" data verification failed\n") + FAIL_PUTS_ERROR(" data verification failed\n"); /* * Now try extending the dataset, closing it, reopening it, and getting the @@ -1336,51 +1336,51 @@ test_set_extent(void) /* Extend datapace */ dims[0] = (hsize_t)7; if (H5Sset_extent_simple(fspace_id[0], 2, dims, mdims) < 0) - TEST_ERROR + TEST_ERROR; /* Extend dataset asynchronously */ if (H5Dset_extent_async(dset_id, dims, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Close dataset asynchronously */ if (H5Dclose_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Open dataset asynchronously */ if ((dset_id = H5Dopen_async(file_id, "dset", H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Get dataset dataspace asynchronously */ if ((fspace_out[0] = H5Dget_space_async(dset_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Verify the extents match */ if ((tri_ret = H5Sextent_equal(fspace_id[0], fspace_out[0])) < 0) - TEST_ERROR + TEST_ERROR; if (!tri_ret) FAIL_PUTS_ERROR(" dataspaces are not equal\n"); /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Close */ if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id[0]) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_out[0]) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1422,7 +1422,7 @@ test_attribute_exists(void) size_t num_in_progress; hbool_t op_failed; - TESTING("H5Aexists()") + TESTING("H5Aexists()"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) || @@ -1435,76 +1435,76 @@ test_attribute_exists(void) /* Create dataspace */ if ((space_id = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the dataset asynchronously */ if ((dset_id = H5Dcreate_async(file_id, "attr_exists_dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the attribute exists asynchronously */ if (H5Aexists_async(dset_id, "attr", &exists1, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the create takes place after the existence check */ if (H5Oflush_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Create the attribute asynchronously */ if ((attr_id = H5Acreate_async(dset_id, "attr", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the existence check takes place after the create. */ if (H5Oflush_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the attribute exists asynchronously */ if (H5Aexists_async(dset_id, "attr", &exists2, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Check if H5Aexists returned the correct values */ if (exists1) - FAIL_PUTS_ERROR(" H5Aexists returned TRUE for an attribute that should not exist") + FAIL_PUTS_ERROR(" H5Aexists returned TRUE for an attribute that should not exist"); if (!exists2) - FAIL_PUTS_ERROR(" H5Aexists returned FALSE for an attribute that should exist") + FAIL_PUTS_ERROR(" H5Aexists returned FALSE for an attribute that should exist"); /* Close */ if (H5Aclose_async(attr_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1543,7 +1543,7 @@ test_attribute_io(void) int rbuf[6][10]; int i, j; - TESTING("attribute I/O") + TESTING("attribute I/O"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) || @@ -1556,25 +1556,25 @@ test_attribute_io(void) /* Create dataspace */ if ((space_id = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the dataset asynchronously */ if ((dset_id = H5Dcreate_async(file_id, "attr_dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the attribute asynchronously */ if ((attr_id = H5Acreate_async(dset_id, "attr", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Initialize wbuf */ for (i = 0; i < 6; i++) @@ -1583,22 +1583,22 @@ test_attribute_io(void) /* Write the attribute asynchronously */ if (H5Awrite_async(attr_id, H5T_NATIVE_INT, wbuf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Oflush_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Read the attribute asynchronously */ if (H5Aread_async(attr_id, H5T_NATIVE_INT, rbuf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < 6; i++) @@ -1608,21 +1608,21 @@ test_attribute_io(void) /* Close the attribute asynchronously */ if (H5Aclose_async(attr_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Open the attribute asynchronously */ if ((attr_id = H5Aopen_async(dset_id, "attr", H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Read the attribute asynchronously */ if (H5Aread_async(attr_id, H5T_NATIVE_INT, rbuf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < 6; i++) @@ -1632,22 +1632,22 @@ test_attribute_io(void) /* Close out of order to see if it trips things up */ if (H5Dclose_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose_async(attr_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1685,7 +1685,7 @@ test_attribute_io_tconv(void) int rbuf[6][10]; int i, j; - TESTING("attribute I/O with type conversion") + TESTING("attribute I/O with type conversion"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) || @@ -1698,20 +1698,20 @@ test_attribute_io_tconv(void) /* Create dataspace */ if ((space_id = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the attribute asynchronously by name */ if ((attr_id = H5Acreate_by_name_async(file_id, "attr_dset", "attr_tconv", H5T_STD_U16BE, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Initialize wbuf */ for (i = 0; i < 6; i++) @@ -1720,22 +1720,22 @@ test_attribute_io_tconv(void) /* Write the attribute asynchronously */ if (H5Awrite_async(attr_id, H5T_NATIVE_INT, wbuf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id, H5F_SCOPE_LOCAL, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Read the attribute asynchronously */ if (H5Aread_async(attr_id, H5T_NATIVE_INT, rbuf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < 6; i++) @@ -1745,22 +1745,22 @@ test_attribute_io_tconv(void) /* Close the attribute asynchronously */ if (H5Aclose_async(attr_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Open the attribute asynchronously */ if ((attr_id = H5Aopen_by_name_async(file_id, "attr_dset", "attr_tconv", H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Read the attribute asynchronously */ if (H5Aread_async(attr_id, H5T_NATIVE_INT, rbuf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < 6; i++) @@ -1770,20 +1770,20 @@ test_attribute_io_tconv(void) /* Close */ if (H5Aclose_async(attr_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1831,7 +1831,7 @@ test_attribute_io_compound(void) tattr_cmpd_t fbuf[6][10]; int i, j; - TESTING("attribute I/O with compound type conversion") + TESTING("attribute I/O with compound type conversion"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) || @@ -1844,45 +1844,45 @@ test_attribute_io_compound(void) /* Create datatype */ if ((mtype_id = H5Tcreate(H5T_COMPOUND, sizeof(tattr_cmpd_t))) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(mtype_id, "a_name", HOFFSET(tattr_cmpd_t, a), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(mtype_id, "b_name", HOFFSET(tattr_cmpd_t, b), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if ((mtypea_id = H5Tcreate(H5T_COMPOUND, sizeof(tattr_cmpd_t))) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(mtypea_id, "a_name", HOFFSET(tattr_cmpd_t, a), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if ((mtypeb_id = H5Tcreate(H5T_COMPOUND, sizeof(tattr_cmpd_t))) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(mtypeb_id, "b_name", HOFFSET(tattr_cmpd_t, b), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if ((ftype_id = H5Tcreate(H5T_COMPOUND, 2 + 8)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(ftype_id, "a_name", 0, H5T_STD_U16BE) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(ftype_id, "b_name", 2, H5T_STD_I64LE) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if ((space_id = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the attribute asynchronously by name */ if ((attr_id = H5Acreate_by_name_async(file_id, "attr_dset", "attr_cmpd", ftype_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Initialize wbuf */ for (i = 0; i < 6; i++) @@ -1893,7 +1893,7 @@ test_attribute_io_compound(void) /* Write the attribute asynchronously */ if (H5Awrite_async(attr_id, mtype_id, wbuf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Update fbuf */ for (i = 0; i < 6; i++) @@ -1905,17 +1905,17 @@ test_attribute_io_compound(void) /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id, H5F_SCOPE_LOCAL, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Read the attribute asynchronously */ if (H5Aread_async(attr_id, mtype_id, rbuf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < 6; i++) @@ -1935,13 +1935,13 @@ test_attribute_io_compound(void) /* Read the attribute asynchronously (element a only) */ if (H5Aread_async(attr_id, mtypea_id, rbuf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < 6; i++) @@ -1961,13 +1961,13 @@ test_attribute_io_compound(void) /* Read the attribute asynchronously (element b only) */ if (H5Aread_async(attr_id, mtypeb_id, rbuf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < 6; i++) @@ -1987,7 +1987,7 @@ test_attribute_io_compound(void) /* Write the attribute asynchronously (element a only) */ if (H5Awrite_async(attr_id, mtypea_id, wbuf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Update fbuf */ for (i = 0; i < 6; i++) @@ -1997,7 +1997,7 @@ test_attribute_io_compound(void) /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id, H5F_SCOPE_LOCAL, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Clear the read buffer */ for (i = 0; i < 6; i++) @@ -2008,13 +2008,13 @@ test_attribute_io_compound(void) /* Read the attribute asynchronously */ if (H5Aread_async(attr_id, mtype_id, rbuf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < 6; i++) @@ -2034,7 +2034,7 @@ test_attribute_io_compound(void) /* Write the attribute asynchronously (element b only) */ if (H5Awrite_async(attr_id, mtypeb_id, wbuf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Update fbuf */ for (i = 0; i < 6; i++) @@ -2044,7 +2044,7 @@ test_attribute_io_compound(void) /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id, H5F_SCOPE_LOCAL, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Clear the read buffer */ for (i = 0; i < 6; i++) @@ -2055,13 +2055,13 @@ test_attribute_io_compound(void) /* Read the attribute asynchronously */ if (H5Aread_async(attr_id, mtype_id, rbuf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < 6; i++) @@ -2074,28 +2074,28 @@ test_attribute_io_compound(void) /* Close */ if (H5Aclose_async(attr_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(mtype_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(ftype_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(mtypea_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(mtypeb_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2137,129 +2137,134 @@ test_group(void) size_t num_in_progress; hbool_t op_failed; - TESTING("group operations") + TESTING("group operations"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { SKIPPED(); - HDprintf(" API functions for basic file, group, group more, or creation order aren't supported " + HDprintf(" API functions for basic file, group, or group more aren't supported " "with this connector\n"); return 0; } /* Create GCPL */ if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; - /* Track creation order */ - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) - TEST_ERROR + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + /* Track creation order */ + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) + TEST_ERROR; + } /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the parent group asynchronously */ if ((parent_group_id = H5Gcreate_async(file_id, "group_parent", H5P_DEFAULT, gcpl_id, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create 3 subgroups asynchronously, the first with no sub-subgroups, the * second with 1, and the third with 2 */ if ((group_id = H5Gcreate_async(parent_group_id, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if ((group_id = H5Gcreate_async(parent_group_id, "group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if ((subgroup_id = H5Gcreate_async(group_id, "subgroup1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(subgroup_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if ((group_id = H5Gcreate_async(parent_group_id, "group3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if ((subgroup_id = H5Gcreate_async(group_id, "subgroup1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(subgroup_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if ((subgroup_id = H5Gcreate_async(group_id, "subgroup2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(subgroup_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the file asynchronously. This will effectively work as a barrier, * guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id, H5F_SCOPE_LOCAL, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Test H5Gget_info_async */ /* Open group1 asynchronously */ if ((group_id = H5Gopen_async(parent_group_id, "group1", H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Get info */ if (H5Gget_info_async(group_id, &info1, es_id) < 0) - TEST_ERROR + TEST_ERROR; - /* Test H5Gget_info_by_idx_async */ - if (H5Gget_info_by_idx_async(parent_group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, &info2, - H5P_DEFAULT, es_id) < 0) - TEST_ERROR + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + /* Test H5Gget_info_by_idx_async */ + if (H5Gget_info_by_idx_async(parent_group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, &info2, + H5P_DEFAULT, es_id) < 0) + TEST_ERROR; + } /* Test H5Gget_info_by_name_async */ if (H5Gget_info_by_name_async(parent_group_id, "group3", &info3, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify group infos */ if (info1.nlinks != 0) - FAIL_PUTS_ERROR(" incorrect number of links") - if (info2.nlinks != 1) - FAIL_PUTS_ERROR(" incorrect number of links") + FAIL_PUTS_ERROR(" incorrect number of links"); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (info2.nlinks != 1) + FAIL_PUTS_ERROR(" incorrect number of links"); + } if (info3.nlinks != 2) - FAIL_PUTS_ERROR(" incorrect number of links") + FAIL_PUTS_ERROR(" incorrect number of links"); /* Close */ if (H5Gclose_async(group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2301,7 +2306,7 @@ test_link(void) size_t num_in_progress; hbool_t op_failed; - TESTING("link operations") + TESTING("link operations"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || @@ -2316,148 +2321,148 @@ test_link(void) /* Create GCPL */ if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; /* Track creation order */ if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the parent group asynchronously */ if ((parent_group_id = H5Gcreate_async(file_id, "link_parent", H5P_DEFAULT, gcpl_id, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create subgroup asynchronously. */ if ((group_id = H5Gcreate_async(parent_group_id, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the link to the subgroup is visible to later tasks. */ if (H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Create hard link asynchronously */ if (H5Lcreate_hard_async(parent_group_id, "group", parent_group_id, "hard_link", H5P_DEFAULT, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the soft link create takes place after the hard * link create. */ if (H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Create soft link asynchronously */ if (H5Lcreate_soft_async("/link_parent/group", parent_group_id, "soft_link", H5P_DEFAULT, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the writes. */ if (H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Check if hard link exists */ if (H5Lexists_async(parent_group_id, "hard_link", &existsh1, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Check if soft link exists */ if (H5Lexists_async(parent_group_id, "soft_link", &existss1, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the delete takes place after the reads. */ if (H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Delete soft link by index */ if (H5Ldelete_by_idx_async(parent_group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the delete. */ if (H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Check if hard link exists */ if (H5Lexists_async(parent_group_id, "hard_link", &existsh2, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Check if soft link exists */ if (H5Lexists_async(parent_group_id, "soft_link", &existss2, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the delete takes place after the reads. */ if (H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Delete hard link */ if (H5Ldelete_async(parent_group_id, "hard_link", H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the delete. */ if (H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Check if hard link exists */ if (H5Lexists_async(parent_group_id, "hard_link", &existsh3, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Check if soft link exists */ if (H5Lexists_async(parent_group_id, "soft_link", &existss3, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Check if existence returns were correct */ if (!existsh1) - FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist") + FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist"); if (!existss1) - FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist") + FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist"); if (!existsh2) - FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist") + FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist"); if (existss2) - FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist") + FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist"); if (existsh3) - FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist") + FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist"); if (existsh3) - FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist") + FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist"); /* Close */ if (H5Gclose_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2493,7 +2498,7 @@ test_ocopy_orefresh(void) size_t num_in_progress; hbool_t op_failed; - TESTING("H5Ocopy() and H5Orefresh()") + TESTING("H5Ocopy() and H5Orefresh()"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -2507,73 +2512,73 @@ test_ocopy_orefresh(void) /* Create dataspace */ if ((space_id = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the parent group asynchronously */ if ((parent_group_id = H5Gcreate_async(file_id, "ocopy_parent", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataset asynchronously. */ if ((dset_id = H5Dcreate_async(parent_group_id, "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the copy takes place after dataset create. */ if (H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Copy dataset */ if (H5Ocopy_async(parent_group_id, "dset", parent_group_id, "copied_dset", H5P_DEFAULT, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the dataset open takes place copy. */ if (H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Open the copied dataset asynchronously */ if ((dset_id = H5Dopen_async(parent_group_id, "copied_dset", H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Refresh the copied dataset asynchronously */ if (H5Orefresh(dset_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Close */ if (H5Dclose_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2605,7 +2610,7 @@ test_file_reopen(void) size_t num_in_progress; hbool_t op_failed; - TESTING("H5Freopen()") + TESTING("H5Freopen()"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE)) { @@ -2616,36 +2621,36 @@ test_file_reopen(void) /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Reopen file asynchronously */ if ((reopened_file_id = H5Freopen_async(file_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Close */ if (H5Fclose_async(reopened_file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2692,13 +2697,12 @@ vol_async_test(void) HDprintf("* *\n"); HDprintf("**********************************************\n\n"); - /* (Uncomment it for async support) Make sure the connector supports the async functions */ - /* if (!(vol_cap_flags_g & H5VL_CAP_FLAG_ASYNC)) { - SKIPPED(); - HDprintf(" Async APIs aren't supported with this connector\n"); - return 0; - } - */ + /* Make sure the connector supports the API functions being tested */ + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_ASYNC)) { + SKIPPED(); + HDprintf(" Async APIs aren't supported with this connector\n"); + return 0; + } for (i = 0, nerrors = 0; i < ARRAY_LENGTH(async_tests); i++) { nerrors += (*async_tests[i])() ? 1 : 0; diff --git a/vol_async_test_parallel.c b/vol_async_test_parallel.c index dfc9268..076c81b 100644 --- a/vol_async_test_parallel.c +++ b/vol_async_test_parallel.c @@ -77,7 +77,7 @@ test_one_dataset_io(void) int *write_buf = NULL; int *read_buf = NULL; - TESTING_MULTIPART("single dataset I/O") + TESTING_MULTIPART("single dataset I/O"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || @@ -91,34 +91,34 @@ test_one_dataset_io(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, coll_metadata_read)) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if (generate_random_parallel_dimensions(ONE_DATASET_IO_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; if ((space_id = H5Screate_simple(ONE_DATASET_IO_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Create file asynchronously */ if ((file_id = H5Fcreate_async(PAR_ASYNC_VOL_TEST_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Find out if the native connector is used */ if (H5VLobject_is_native(file_id, &is_native_vol) < 0) - TEST_ERROR + TEST_ERROR; /* Create the dataset asynchronously */ if ((dset_id = H5Dcreate_async(file_id, "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Calculate size of data buffers - first dimension is skipped in calculation */ for (i = 1, data_size = 1; i < ONE_DATASET_IO_TEST_SPACE_RANK; i++) @@ -128,13 +128,13 @@ test_one_dataset_io(void) if (NULL == (write_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for dataset write\n"); - TEST_ERROR + TEST_ERROR; } if (NULL == (read_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for dataset read\n"); - TEST_ERROR + TEST_ERROR; } /* Select this rank's portion of the dataspace */ @@ -175,7 +175,7 @@ test_one_dataset_io(void) { PART_BEGIN(single_dset_eswait) { - TESTING_2("synchronization using H5ESwait()") + TESTING_2("synchronization using H5ESwait()"); /* Initialize write_buf */ for (i = 0; i < data_size / sizeof(int); i++) @@ -184,30 +184,30 @@ test_one_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id, H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, write_buf, es_id) < 0) - PART_TEST_ERROR(single_dset_eswait) + PART_TEST_ERROR(single_dset_eswait); /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(single_dset_eswait) + PART_TEST_ERROR(single_dset_eswait); if (op_failed) - PART_TEST_ERROR(single_dset_eswait) + PART_TEST_ERROR(single_dset_eswait); /* Read the dataset asynchronously */ if (H5Dread_async(dset_id, H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, read_buf, es_id) < 0) - PART_TEST_ERROR(single_dset_eswait) + PART_TEST_ERROR(single_dset_eswait); /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(single_dset_eswait) + PART_TEST_ERROR(single_dset_eswait); if (op_failed) - PART_TEST_ERROR(single_dset_eswait) + PART_TEST_ERROR(single_dset_eswait); /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(single_dset_eswait) + PART_ERROR(single_dset_eswait); } /* end if */ PASSED(); @@ -216,7 +216,7 @@ test_one_dataset_io(void) PART_BEGIN(single_dset_dclose) { - TESTING_2("synchronization using H5Dclose()") + TESTING_2("synchronization using H5Dclose()"); /* Initialize write_buf */ for (i = 0; i < data_size / sizeof(int); i++) @@ -225,35 +225,35 @@ test_one_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id, H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, write_buf, es_id) < 0) - PART_TEST_ERROR(single_dset_dclose) + PART_TEST_ERROR(single_dset_dclose); /* Close the dataset synchronously */ if (H5Dclose(dset_id) < 0) - PART_TEST_ERROR(single_dset_dclose) + PART_TEST_ERROR(single_dset_dclose); /* Re-open the dataset asynchronously */ if ((dset_id = H5Dopen_async(file_id, "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(single_dset_dclose) + PART_TEST_ERROR(single_dset_dclose); /* Read the dataset asynchronously */ if (H5Dread_async(dset_id, H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, read_buf, es_id) < 0) - PART_TEST_ERROR(single_dset_dclose) + PART_TEST_ERROR(single_dset_dclose); /* Close the dataset synchronously */ if (H5Dclose(dset_id) < 0) - PART_TEST_ERROR(single_dset_dclose) + PART_TEST_ERROR(single_dset_dclose); /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(single_dset_dclose) + PART_ERROR(single_dset_dclose); } /* end if */ /* Re-open the dataset asynchronously */ if ((dset_id = H5Dopen_async(file_id, "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(single_dset_dclose) + PART_TEST_ERROR(single_dset_dclose); PASSED(); } @@ -261,7 +261,7 @@ test_one_dataset_io(void) PART_BEGIN(single_dset_dflush) { - TESTING_2("synchronization using H5Oflush_async()") + TESTING_2("synchronization using H5Oflush_async()"); /* Initialize write_buf */ for (i = 0; i < data_size / sizeof(int); i++) @@ -270,30 +270,30 @@ test_one_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id, H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, write_buf, es_id) < 0) - PART_TEST_ERROR(single_dset_dflush) + PART_TEST_ERROR(single_dset_dflush); /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. Skip this * function because it isn't supported for the native vol in parallel. */ if (!is_native_vol && H5Oflush_async(dset_id, es_id) < 0) - PART_TEST_ERROR(single_dset_dflush) + PART_TEST_ERROR(single_dset_dflush); /* Read the dataset asynchronously */ if (H5Dread_async(dset_id, H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, read_buf, es_id) < 0) - PART_TEST_ERROR(single_dset_dflush) + PART_TEST_ERROR(single_dset_dflush); /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(single_dset_dflush) + PART_TEST_ERROR(single_dset_dflush); if (op_failed) - PART_TEST_ERROR(single_dset_dflush) + PART_TEST_ERROR(single_dset_dflush); /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(single_dset_dflush) + PART_ERROR(single_dset_dflush); } /* end if */ PASSED(); @@ -302,7 +302,7 @@ test_one_dataset_io(void) PART_BEGIN(single_dset_fclose) { - TESTING_2("synchronization using H5Fclose()") + TESTING_2("synchronization using H5Fclose()"); /* Initialize write_buf */ for (i = 0; i < data_size / sizeof(int); i++) @@ -311,42 +311,42 @@ test_one_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id, H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, write_buf, es_id) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id, es_id) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Close the file synchronously */ if (H5Fclose(file_id) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Reopen the file asynchronously. */ if ((file_id = H5Fopen_async(PAR_ASYNC_VOL_TEST_FILE, H5F_ACC_RDONLY, fapl_id, es_id)) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Re-open the dataset asynchronously */ if ((dset_id = H5Dopen_async(file_id, "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Read the dataset asynchronously */ if (H5Dread_async(dset_id, H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, read_buf, es_id) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id, es_id) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Close the file synchronously */ if (H5Fclose(file_id) < 0) - PART_TEST_ERROR(single_dset_fclose) + PART_TEST_ERROR(single_dset_fclose); /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(single_dset_fclose) + PART_ERROR(single_dset_fclose); } /* end if */ PASSED(); @@ -355,13 +355,13 @@ test_one_dataset_io(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (read_buf) { HDfree(read_buf); @@ -379,13 +379,13 @@ test_one_dataset_io(void) } if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -442,7 +442,7 @@ test_multi_dataset_io(void) int *write_buf = NULL; int *read_buf = NULL; - TESTING_MULTIPART("multi dataset I/O") + TESTING_MULTIPART("multi dataset I/O"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || @@ -456,26 +456,26 @@ test_multi_dataset_io(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, coll_metadata_read)) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if (generate_random_parallel_dimensions(MULTI_DATASET_IO_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if ((space_id = H5Screate_simple(MULTI_DATASET_IO_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Create file asynchronously */ if ((file_id = H5Fcreate_async(PAR_ASYNC_VOL_TEST_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Calculate size of data buffers - first dimension is skipped in calculation */ for (i = 1, data_size = 1; i < MULTI_DATASET_IO_TEST_SPACE_RANK; i++) @@ -486,13 +486,13 @@ test_multi_dataset_io(void) if (NULL == (write_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for dataset write\n"); - TEST_ERROR + TEST_ERROR; } if (NULL == (read_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for dataset read\n"); - TEST_ERROR + TEST_ERROR; } /* Select this rank's portion of the dataspace */ @@ -535,7 +535,7 @@ test_multi_dataset_io(void) { size_t buf_start_idx; - TESTING_2("keeping datasets open") + TESTING_2("keeping datasets open"); /* Loop over datasets */ for (i = 0; i < MULTI_DATASET_IO_TEST_NDSETS; i++) { @@ -547,7 +547,7 @@ test_multi_dataset_io(void) /* Create the dataset asynchronously */ if ((dset_id[i] = H5Dcreate_async(file_id, dset_name, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_dset_open) + PART_TEST_ERROR(multi_dset_open); /* Initialize write_buf. Must use a new slice of write_buf for * each dset since we can't overwrite the buffers until I/O is done. */ @@ -559,13 +559,13 @@ test_multi_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id[i], H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, &write_buf[buf_start_idx], es_id) < 0) - PART_TEST_ERROR(multi_dset_open) + PART_TEST_ERROR(multi_dset_open); } /* end for */ /* Flush the file asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id, H5F_SCOPE_LOCAL, es_id) < 0) - PART_TEST_ERROR(multi_dset_open) + PART_TEST_ERROR(multi_dset_open); /* Loop over datasets */ for (i = 0; i < MULTI_DATASET_IO_TEST_NDSETS; i++) { @@ -574,27 +574,27 @@ test_multi_dataset_io(void) /* Read the dataset asynchronously */ if (H5Dread_async(dset_id[i], H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, &read_buf[buf_start_idx], es_id) < 0) - PART_TEST_ERROR(multi_dset_open) + PART_TEST_ERROR(multi_dset_open); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_dset_open) + PART_TEST_ERROR(multi_dset_open); if (op_failed) - PART_TEST_ERROR(multi_dset_open) + PART_TEST_ERROR(multi_dset_open); /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(multi_dset_open) + PART_ERROR(multi_dset_open); } /* end if */ /* Close the datasets */ for (i = 0; i < MULTI_DATASET_IO_TEST_NDSETS; i++) if (H5Dclose(dset_id[i]) < 0) - PART_TEST_ERROR(multi_dset_open) + PART_TEST_ERROR(multi_dset_open); PASSED(); } @@ -604,7 +604,7 @@ test_multi_dataset_io(void) { size_t buf_start_idx; - TESTING_2("closing datasets between I/O") + TESTING_2("closing datasets between I/O"); /* Loop over datasets */ for (i = 0; i < MULTI_DATASET_IO_TEST_NDSETS; i++) { @@ -615,7 +615,7 @@ test_multi_dataset_io(void) /* Open the dataset asynchronously */ if ((dset_id[0] = H5Dopen_async(file_id, dset_name, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); /* Initialize write_buf. */ buf_start_idx = i * (data_size / MULTI_DATASET_IO_TEST_NDSETS / sizeof(int)); @@ -626,17 +626,17 @@ test_multi_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id[0], H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, &write_buf[buf_start_idx], es_id) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id[0], es_id) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); } /* end for */ /* Flush the file asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id, H5F_SCOPE_LOCAL, es_id) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); /* Loop over datasets */ for (i = 0; i < MULTI_DATASET_IO_TEST_NDSETS; i++) { @@ -645,31 +645,31 @@ test_multi_dataset_io(void) /* Open the dataset asynchronously */ if ((dset_id[0] = H5Dopen_async(file_id, dset_name, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); /* Read the dataset asynchronously */ buf_start_idx = i * (data_size / MULTI_DATASET_IO_TEST_NDSETS / sizeof(int)); if (H5Dread_async(dset_id[0], H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, &read_buf[buf_start_idx], es_id) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id[0], es_id) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); if (op_failed) - PART_TEST_ERROR(multi_dset_close) + PART_TEST_ERROR(multi_dset_close); /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(multi_dset_close) + PART_ERROR(multi_dset_close); } /* end if */ PASSED(); @@ -678,13 +678,13 @@ test_multi_dataset_io(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (read_buf) { HDfree(read_buf); @@ -702,13 +702,13 @@ test_multi_dataset_io(void) } if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -768,7 +768,7 @@ test_multi_file_dataset_io(void) int *write_buf = NULL; int *read_buf = NULL; - TESTING_MULTIPART("multi file dataset I/O") + TESTING_MULTIPART("multi file dataset I/O"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || @@ -782,22 +782,22 @@ test_multi_file_dataset_io(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, coll_metadata_read)) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if (generate_random_parallel_dimensions(MULTI_FILE_DATASET_IO_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if ((space_id = H5Screate_simple(MULTI_FILE_DATASET_IO_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Calculate size of data buffers - first dimension is skipped in calculation */ for (i = 1, data_size = 1; i < MULTI_FILE_DATASET_IO_TEST_SPACE_RANK; i++) @@ -808,13 +808,13 @@ test_multi_file_dataset_io(void) if (NULL == (write_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for dataset write\n"); - TEST_ERROR + TEST_ERROR; } if (NULL == (read_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for dataset read\n"); - TEST_ERROR + TEST_ERROR; } /* Select this rank's portion of the dataspace */ @@ -857,7 +857,7 @@ test_multi_file_dataset_io(void) { size_t buf_start_idx; - TESTING_2("keeping files and datasets open") + TESTING_2("keeping files and datasets open"); /* Loop over files */ for (i = 0; i < MULTI_FILE_DATASET_IO_TEST_NFILES; i++) { @@ -868,14 +868,14 @@ test_multi_file_dataset_io(void) /* Create file asynchronously */ if ((file_id[i] = H5Fcreate_async(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); if ((int)i > max_printf_file) max_printf_file = (int)i; /* Create the dataset asynchronously */ if ((dset_id[i] = H5Dcreate_async(file_id[i], "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); /* Initialize write_buf. Must use a new slice of write_buf for * each dset since we can't overwrite the buffers until I/O is done. */ @@ -887,12 +887,12 @@ test_multi_file_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id[i], H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, &write_buf[buf_start_idx], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); } /* end for */ /* Find out if the native connector is used */ if (H5VLobject_is_native(file_id[0], &is_native_vol) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); /* Loop over files */ for (i = 0; i < MULTI_FILE_DATASET_IO_TEST_NFILES; i++) { @@ -900,33 +900,33 @@ test_multi_file_dataset_io(void) * barrier, guaranteeing the read takes place after the write. Skip this * function because it isn't supported for the native vol in parallel. */ if (!is_native_vol && H5Oflush_async(dset_id[i], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); /* Read the dataset asynchronously */ buf_start_idx = i * (data_size / MULTI_FILE_DATASET_IO_TEST_NFILES / sizeof(int)); if (H5Dread_async(dset_id[i], H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, &read_buf[buf_start_idx], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); if (op_failed) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(multi_file_dset_open) + PART_ERROR(multi_file_dset_open); } /* end if */ /* Close the datasets */ for (i = 0; i < MULTI_FILE_DATASET_IO_TEST_NFILES; i++) if (H5Dclose(dset_id[i]) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); PASSED(); } @@ -936,7 +936,7 @@ test_multi_file_dataset_io(void) { size_t buf_start_idx; - TESTING_2("closing datasets between I/O") + TESTING_2("closing datasets between I/O"); /* Loop over files */ for (i = 0; i < MULTI_FILE_DATASET_IO_TEST_NFILES; i++) { @@ -944,7 +944,7 @@ test_multi_file_dataset_io(void) /* Open the dataset asynchronously */ if ((dset_id[0] = H5Dopen_async(file_id[i], "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); /* Initialize write_buf. */ buf_start_idx = i * (data_size / MULTI_FILE_DATASET_IO_TEST_NFILES / sizeof(int)); @@ -955,11 +955,11 @@ test_multi_file_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id[0], H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, &write_buf[buf_start_idx], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id[0], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); } /* end for */ /* Loop over files */ @@ -967,41 +967,41 @@ test_multi_file_dataset_io(void) /* Flush the file asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id[i], H5F_SCOPE_LOCAL, es_id) < 0) - PART_TEST_ERROR(multi_file_dset_open) + PART_TEST_ERROR(multi_file_dset_open); /* Open the dataset asynchronously */ if ((dset_id[0] = H5Dopen_async(file_id[i], "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); /* Read the dataset asynchronously */ buf_start_idx = i * (data_size / MULTI_FILE_DATASET_IO_TEST_NFILES / sizeof(int)); if (H5Dread_async(dset_id[0], H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, &read_buf[buf_start_idx], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id[0], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); if (op_failed) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(multi_file_dset_dclose) + PART_ERROR(multi_file_dset_dclose); } /* end if */ /* Close the files */ for (i = 0; i < MULTI_FILE_DATASET_IO_TEST_NFILES; i++) if (H5Fclose(file_id[i]) < 0) - PART_TEST_ERROR(multi_file_dset_dclose) + PART_TEST_ERROR(multi_file_dset_dclose); PASSED(); } @@ -1011,7 +1011,7 @@ test_multi_file_dataset_io(void) { size_t buf_start_idx; - TESTING_2("closing files between I/O") + TESTING_2("closing files between I/O"); /* Loop over files */ for (i = 0; i < MULTI_FILE_DATASET_IO_TEST_NFILES; i++) { @@ -1022,11 +1022,11 @@ test_multi_file_dataset_io(void) /* Open the file asynchronously */ if ((file_id[0] = H5Fopen_async(file_name, H5F_ACC_RDWR, fapl_id, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Open the dataset asynchronously */ if ((dset_id[0] = H5Dopen_async(file_id[0], "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Initialize write_buf. */ buf_start_idx = i * (data_size / MULTI_FILE_DATASET_IO_TEST_NFILES / sizeof(int)); @@ -1037,22 +1037,22 @@ test_multi_file_dataset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id[0], H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, &write_buf[buf_start_idx], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id[0], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Close the file asynchronously */ if (H5Fclose_async(file_id[0], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); if (op_failed) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Loop over files */ for (i = 0; i < MULTI_FILE_DATASET_IO_TEST_NFILES; i++) { @@ -1061,39 +1061,39 @@ test_multi_file_dataset_io(void) /* Open the file asynchronously */ if ((file_id[0] = H5Fopen_async(file_name, H5F_ACC_RDONLY, fapl_id, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Open the dataset asynchronously */ if ((dset_id[0] = H5Dopen_async(file_id[0], "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Read the dataset asynchronously */ buf_start_idx = i * (data_size / MULTI_FILE_DATASET_IO_TEST_NFILES / sizeof(int)); if (H5Dread_async(dset_id[0], H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, &read_buf[buf_start_idx], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id[0], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Close the file asynchronously */ if (H5Fclose_async(file_id[0], es_id) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); if (op_failed) - PART_TEST_ERROR(multi_file_dset_fclose) + PART_TEST_ERROR(multi_file_dset_fclose); /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(multi_file_dset_fclose) + PART_ERROR(multi_file_dset_fclose); } /* end if */ PASSED(); @@ -1102,13 +1102,13 @@ test_multi_file_dataset_io(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (read_buf) { HDfree(read_buf); @@ -1126,13 +1126,13 @@ test_multi_file_dataset_io(void) } if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1191,7 +1191,7 @@ test_multi_file_grp_dset_io(void) int *write_buf = NULL; int *read_buf = NULL; - TESTING_MULTIPART("multi file dataset I/O with groups") + TESTING_MULTIPART("multi file dataset I/O with groups"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -1205,22 +1205,22 @@ test_multi_file_grp_dset_io(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, coll_metadata_read)) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if (generate_random_parallel_dimensions(MULTI_FILE_GRP_DSET_IO_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if ((space_id = H5Screate_simple(MULTI_FILE_GRP_DSET_IO_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Calculate size of data buffers - first dimension is skipped in calculation */ for (i = 1, data_size = 1; i < MULTI_FILE_GRP_DSET_IO_TEST_SPACE_RANK; i++) @@ -1231,13 +1231,13 @@ test_multi_file_grp_dset_io(void) if (NULL == (write_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for dataset write\n"); - TEST_ERROR + TEST_ERROR; } if (NULL == (read_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for dataset read\n"); - TEST_ERROR + TEST_ERROR; } /* Select this rank's portion of the dataspace */ @@ -1280,7 +1280,7 @@ test_multi_file_grp_dset_io(void) { size_t buf_start_idx; - TESTING_2("without intermediate calls to H5ESwait()") + TESTING_2("without intermediate calls to H5ESwait()"); /* Loop over files */ for (i = 0; i < MULTI_FILE_GRP_DSET_IO_TEST_NFILES; i++) { @@ -1291,19 +1291,19 @@ test_multi_file_grp_dset_io(void) /* Create file asynchronously */ if ((file_id = H5Fcreate_async(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); if ((int)i > max_printf_file) max_printf_file = (int)i; /* Create the group asynchronously */ if ((grp_id = H5Gcreate_async(file_id, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Create the dataset asynchronously */ if ((dset_id = H5Dcreate_async(grp_id, "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Initialize write_buf. Must use a new slice of write_buf for * each dset since we can't overwrite the buffers until I/O is done. */ @@ -1315,26 +1315,26 @@ test_multi_file_grp_dset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id, H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, &write_buf[buf_start_idx], es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Close the group asynchronously */ if (H5Gclose_async(grp_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Close the file asynchronously */ if (H5Fclose_async(file_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); if (op_failed) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Loop over files */ for (i = 0; i < MULTI_FILE_GRP_DSET_IO_TEST_NFILES; i++) { @@ -1343,47 +1343,47 @@ test_multi_file_grp_dset_io(void) /* Open the file asynchronously */ if ((file_id = H5Fopen_async(file_name, H5F_ACC_RDONLY, fapl_id, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Open the group asynchronously */ if ((grp_id = H5Gopen_async(file_id, "grp", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Open the dataset asynchronously */ if ((dset_id = H5Dopen_async(grp_id, "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Read the dataset asynchronously */ buf_start_idx = i * (data_size / MULTI_FILE_GRP_DSET_IO_TEST_NFILES / sizeof(int)); if (H5Dread_async(dset_id, H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, &read_buf[buf_start_idx], es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Close the group asynchronously */ if (H5Gclose_async(grp_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Close the file asynchronously */ if (H5Fclose_async(file_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); if (op_failed) - PART_TEST_ERROR(multi_file_grp_dset_no_kick) + PART_TEST_ERROR(multi_file_grp_dset_no_kick); /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(multi_file_grp_dset_no_kick) + PART_ERROR(multi_file_grp_dset_no_kick); } /* end if */ PASSED(); @@ -1394,7 +1394,7 @@ test_multi_file_grp_dset_io(void) { size_t buf_start_idx; - TESTING_2("with intermediate calls to H5ESwait() (0 timeout)") + TESTING_2("with intermediate calls to H5ESwait() (0 timeout)"); /* Loop over files */ for (i = 0; i < MULTI_FILE_GRP_DSET_IO_TEST_NFILES; i++) { @@ -1405,19 +1405,19 @@ test_multi_file_grp_dset_io(void) /* Create file asynchronously */ if ((file_id = H5Fcreate_async(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); if ((int)i > max_printf_file) max_printf_file = (int)i; /* Create the group asynchronously */ if ((grp_id = H5Gcreate_async(file_id, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Create the dataset asynchronously */ if ((dset_id = H5Dcreate_async(grp_id, "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Initialize write_buf. Must use a new slice of write_buf for * each dset since we can't overwrite the buffers until I/O is done. */ @@ -1429,32 +1429,32 @@ test_multi_file_grp_dset_io(void) /* Write the dataset asynchronously */ if (H5Dwrite_async(dset_id, H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, &write_buf[buf_start_idx], es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Close the group asynchronously */ if (H5Gclose_async(grp_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Close the file asynchronously */ if (H5Fclose_async(file_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Kick the event stack to make progress */ if (H5ESwait(es_id, 0, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); if (op_failed) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); if (op_failed) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Loop over files */ for (i = 0; i < MULTI_FILE_GRP_DSET_IO_TEST_NFILES; i++) { @@ -1463,53 +1463,53 @@ test_multi_file_grp_dset_io(void) /* Open the file asynchronously */ if ((file_id = H5Fopen_async(file_name, H5F_ACC_RDONLY, fapl_id, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Open the group asynchronously */ if ((grp_id = H5Gopen_async(file_id, "grp", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Open the dataset asynchronously */ if ((dset_id = H5Dopen_async(grp_id, "dset", H5P_DEFAULT, es_id)) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Read the dataset asynchronously */ buf_start_idx = i * (data_size / MULTI_FILE_GRP_DSET_IO_TEST_NFILES / sizeof(int)); if (H5Dread_async(dset_id, H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, &read_buf[buf_start_idx], es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Close the dataset asynchronously */ if (H5Dclose_async(dset_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Close the group asynchronously */ if (H5Gclose_async(grp_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Close the file asynchronously */ if (H5Fclose_async(file_id, es_id) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Kick the event stack to make progress */ if (H5ESwait(es_id, 0, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); if (op_failed) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); } /* end for */ /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); if (op_failed) - PART_TEST_ERROR(multi_file_grp_dset_kick) + PART_TEST_ERROR(multi_file_grp_dset_kick); /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); HDprintf(" data verification failed\n"); - PART_ERROR(multi_file_grp_dset_kick) + PART_ERROR(multi_file_grp_dset_kick); } /* end if */ PASSED(); @@ -1518,13 +1518,13 @@ test_multi_file_grp_dset_io(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (read_buf) { HDfree(read_buf); @@ -1542,13 +1542,13 @@ test_multi_file_grp_dset_io(void) } if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1612,7 +1612,7 @@ test_set_extent(void) int *write_buf = NULL; int *read_buf = NULL; - TESTING("extending dataset") + TESTING("extending dataset"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) || @@ -1627,22 +1627,22 @@ test_set_extent(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, coll_metadata_read)) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if (generate_random_parallel_dimensions(SET_EXTENT_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; if (NULL == (maxdims = HDmalloc(SET_EXTENT_TEST_SPACE_RANK * sizeof(hsize_t)))) { H5_FAILED(); HDprintf(" couldn't allocate max dataspace dimension buffer\n"); - TEST_ERROR + TEST_ERROR; } if (NULL == (cdims = HDmalloc(SET_EXTENT_TEST_SPACE_RANK * sizeof(hsize_t)))) { H5_FAILED(); HDprintf(" couldn't allocate chunk dimension buffer\n"); - TEST_ERROR + TEST_ERROR; } for (i = 0; i < SET_EXTENT_TEST_SPACE_RANK; i++) { @@ -1652,32 +1652,32 @@ test_set_extent(void) /* Create file dataspace */ if ((space_id = H5Screate_simple(SET_EXTENT_TEST_SPACE_RANK, dims, maxdims)) < 0) - TEST_ERROR + TEST_ERROR; /* Create DCPL */ if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; /* Set chunking */ if (H5Pset_chunk(dcpl_id, SET_EXTENT_TEST_SPACE_RANK, cdims) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Create file asynchronously */ if ((file_id = H5Fcreate_async(PAR_ASYNC_VOL_TEST_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Find out if the native connector is used */ if (H5VLobject_is_native(file_id, &is_native_vol) < 0) - TEST_ERROR + TEST_ERROR; /* Create the dataset asynchronously */ if ((dset_id = H5Dcreate_async(file_id, "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Calculate size of data buffers - first dimension is skipped in calculation */ for (i = 1, data_size = 1; i < SET_EXTENT_TEST_SPACE_RANK; i++) @@ -1688,13 +1688,13 @@ test_set_extent(void) if (NULL == (write_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for dataset write\n"); - TEST_ERROR + TEST_ERROR; } if (NULL == (read_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for dataset read\n"); - TEST_ERROR + TEST_ERROR; } /* Select this rank's portion of the dataspace */ @@ -1742,11 +1742,11 @@ test_set_extent(void) /* Extend datapace */ dims[0] += (hsize_t)mpi_size; if (H5Sset_extent_simple(space_id, SET_EXTENT_TEST_SPACE_RANK, dims, maxdims) < 0) - TEST_ERROR + TEST_ERROR; /* Extend dataset asynchronously */ if (H5Dset_extent_async(dset_id, dims, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Select hyperslab in file space to match new region */ for (j = 0; j < SET_EXTENT_TEST_SPACE_RANK; j++) { @@ -1775,47 +1775,47 @@ test_set_extent(void) hsize_t mdims[] = {(i + 1) * (data_size / SET_EXTENT_TEST_NUM_EXTENDS / sizeof(int))}; if (H5Sset_extent_simple(mspace_id, 1, mdims, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sselect_all(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; } } /* end if */ /* Get dataset dataspace */ if ((space_id_out = H5Dget_space_async(dset_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Verify extent is correct */ if ((tri_ret = H5Sextent_equal(space_id, space_id_out)) < 0) - TEST_ERROR + TEST_ERROR; if (!tri_ret) FAIL_PUTS_ERROR(" dataspaces are not equal\n"); /* Close output dataspace */ if (H5Sclose(space_id_out) < 0) - TEST_ERROR + TEST_ERROR; /* Write the dataset slice asynchronously */ if (H5Dwrite_async(dset_id, H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, write_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; } /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. Skip this * function because it isn't supported for the native vol in parallel. */ if (!is_native_vol && H5Oflush_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Read the entire dataset asynchronously */ if (H5Dread_async(dset_id, H5T_NATIVE_INT, mspace_id, space_id, H5P_DEFAULT, read_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) @@ -1827,19 +1827,19 @@ test_set_extent(void) /* Close dataset asynchronously */ if (H5Dclose_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Open dataset asynchronously */ if ((dset_id = H5Dopen_async(file_id, "dset", H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Get dataset dataspace asynchronously */ if ((space_id_out = H5Dget_space_async(dset_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Verify the extents match */ if ((tri_ret = H5Sextent_equal(space_id, space_id_out)) < 0) - TEST_ERROR + TEST_ERROR; if (!tri_ret) FAIL_PUTS_ERROR(" dataspaces are not equal\n"); @@ -1870,24 +1870,24 @@ test_set_extent(void) /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1945,7 +1945,7 @@ test_attribute_exists(void) hid_t space_id = H5I_INVALID_HID; hid_t es_id = H5I_INVALID_HID; - TESTING("H5Aexists()") + TESTING("H5Aexists()"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) || @@ -1960,89 +1960,89 @@ test_attribute_exists(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, coll_metadata_read)) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if (generate_random_parallel_dimensions(ATTRIBUTE_EXISTS_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if ((space_id = H5Screate_simple(ATTRIBUTE_EXISTS_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(PAR_ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, fapl_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Find out if the native connector is used */ if (H5VLobject_is_native(file_id, &is_native_vol) < 0) - TEST_ERROR + TEST_ERROR; /* Create the dataset asynchronously */ if ((dset_id = H5Dcreate_async(file_id, "attr_exists_dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the attribute exists asynchronously */ if (H5Aexists_async(dset_id, "attr", &exists1, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the create takes place after the existence check. * Skip this function because it isn't supported for the native vol in parallel. */ if (!is_native_vol && H5Oflush_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Create the attribute asynchronously */ if ((attr_id = H5Acreate_async(dset_id, "attr", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the existence check takes place after the create. * Skip this function because it isn't supported for the native vol in parallel. */ if (!is_native_vol && H5Oflush_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the attribute exists asynchronously */ if (H5Aexists_async(dset_id, "attr", &exists2, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Check if H5Aexists returned the correct values */ if (exists1) - FAIL_PUTS_ERROR(" H5Aexists returned TRUE for an attribute that should not exist") + FAIL_PUTS_ERROR(" H5Aexists returned TRUE for an attribute that should not exist"); if (!exists2) - FAIL_PUTS_ERROR(" H5Aexists returned FALSE for an attribute that should exist") + FAIL_PUTS_ERROR(" H5Aexists returned FALSE for an attribute that should exist"); /* Close */ if (H5Aclose_async(attr_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (dims) { HDfree(dims); @@ -2050,7 +2050,7 @@ test_attribute_exists(void) } if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2098,7 +2098,7 @@ test_attribute_io(void) int *write_buf = NULL; int *read_buf = NULL; - TESTING("attribute I/O") + TESTING("attribute I/O"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) || @@ -2113,37 +2113,37 @@ test_attribute_io(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, coll_metadata_read)) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if (generate_random_parallel_dimensions(ATTRIBUTE_IO_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if ((space_id = H5Screate_simple(ATTRIBUTE_IO_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(PAR_ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, fapl_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Find out if the native connector is used */ if (H5VLobject_is_native(file_id, &is_native_vol) < 0) - TEST_ERROR + TEST_ERROR; /* Create the dataset asynchronously */ if ((dset_id = H5Dcreate_async(file_id, "attr_dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the attribute asynchronously */ if ((attr_id = H5Acreate_async(dset_id, "attr", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Calculate size of data buffers */ for (i = 0, data_size = 1; i < ATTRIBUTE_IO_TEST_SPACE_RANK; i++) @@ -2153,13 +2153,13 @@ test_attribute_io(void) if (NULL == (write_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for attribute write\n"); - TEST_ERROR + TEST_ERROR; } if (NULL == (read_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for attribute read\n"); - TEST_ERROR + TEST_ERROR; } /* Initialize write_buf. */ @@ -2168,24 +2168,24 @@ test_attribute_io(void) /* Write the attribute asynchronously */ if (H5Awrite_async(attr_id, H5T_NATIVE_INT, write_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. * Skip this function because it isn't supported for the native vol in parallel. */ if (!is_native_vol && H5Oflush_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Read the attribute asynchronously */ if (H5Aread_async(attr_id, H5T_NATIVE_INT, read_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) @@ -2197,21 +2197,21 @@ test_attribute_io(void) /* Close the attribute asynchronously */ if (H5Aclose_async(attr_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Open the attribute asynchronously */ if ((attr_id = H5Aopen_async(dset_id, "attr", H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Read the attribute asynchronously */ if (H5Aread_async(attr_id, H5T_NATIVE_INT, read_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) @@ -2223,21 +2223,21 @@ test_attribute_io(void) /* Close out of order to see if it trips things up */ if (H5Dclose_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose_async(attr_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (read_buf) { HDfree(read_buf); @@ -2255,7 +2255,7 @@ test_attribute_io(void) } if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2305,7 +2305,7 @@ test_attribute_io_tconv(void) int *write_buf = NULL; int *read_buf = NULL; - TESTING("attribute I/O with type conversion") + TESTING("attribute I/O with type conversion"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) || @@ -2320,28 +2320,28 @@ test_attribute_io_tconv(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, coll_metadata_read)) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if (generate_random_parallel_dimensions(ATTRIBUTE_IO_TCONV_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if ((space_id = H5Screate_simple(ATTRIBUTE_IO_TCONV_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(PAR_ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, fapl_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the attribute asynchronously by name */ if ((attr_id = H5Acreate_by_name_async(file_id, "attr_dset", "attr_tconv", H5T_STD_U16BE, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Calculate size of data buffers */ for (i = 0, data_size = 1; i < ATTRIBUTE_IO_TCONV_TEST_SPACE_RANK; i++) @@ -2351,13 +2351,13 @@ test_attribute_io_tconv(void) if (NULL == (write_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for attribute write\n"); - TEST_ERROR + TEST_ERROR; } if (NULL == (read_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for attribute read\n"); - TEST_ERROR + TEST_ERROR; } /* Initialize write_buf. */ @@ -2366,22 +2366,22 @@ test_attribute_io_tconv(void) /* Write the attribute asynchronously */ if (H5Awrite_async(attr_id, H5T_NATIVE_INT, write_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id, H5F_SCOPE_LOCAL, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Read the attribute asynchronously */ if (H5Aread_async(attr_id, H5T_NATIVE_INT, read_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) @@ -2393,22 +2393,22 @@ test_attribute_io_tconv(void) /* Close the attribute asynchronously */ if (H5Aclose_async(attr_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Open the attribute asynchronously */ if ((attr_id = H5Aopen_by_name_async(file_id, "attr_dset", "attr_tconv", H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Read the attribute asynchronously */ if (H5Aread_async(attr_id, H5T_NATIVE_INT, read_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < data_size / sizeof(int); i++) @@ -2420,17 +2420,17 @@ test_attribute_io_tconv(void) /* Close */ if (H5Aclose_async(attr_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (read_buf) { HDfree(read_buf); @@ -2448,9 +2448,9 @@ test_attribute_io_tconv(void) } if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2509,7 +2509,7 @@ test_attribute_io_compound(void) tattr_cmpd_t *read_buf = NULL; tattr_cmpd_t *fbuf = NULL; - TESTING("attribute I/O with compound type conversion") + TESTING("attribute I/O with compound type conversion"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) || @@ -2524,53 +2524,53 @@ test_attribute_io_compound(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, coll_metadata_read)) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if (generate_random_parallel_dimensions(ATTRIBUTE_IO_COMPOUND_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; /* Create datatype */ if ((mtype_id = H5Tcreate(H5T_COMPOUND, sizeof(tattr_cmpd_t))) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(mtype_id, "a_name", HOFFSET(tattr_cmpd_t, a), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(mtype_id, "b_name", HOFFSET(tattr_cmpd_t, b), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if ((mtypea_id = H5Tcreate(H5T_COMPOUND, sizeof(tattr_cmpd_t))) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(mtypea_id, "a_name", HOFFSET(tattr_cmpd_t, a), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if ((mtypeb_id = H5Tcreate(H5T_COMPOUND, sizeof(tattr_cmpd_t))) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(mtypeb_id, "b_name", HOFFSET(tattr_cmpd_t, b), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if ((ftype_id = H5Tcreate(H5T_COMPOUND, 2 + 8)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(ftype_id, "a_name", 0, H5T_STD_U16BE) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(ftype_id, "b_name", 2, H5T_STD_I64LE) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if ((space_id = H5Screate_simple(ATTRIBUTE_IO_COMPOUND_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(PAR_ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, fapl_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the attribute asynchronously by name */ if ((attr_id = H5Acreate_by_name_async(file_id, "attr_dset", "attr_cmpd", ftype_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Calculate size of data buffers */ for (i = 0, data_size = 1; i < ATTRIBUTE_IO_COMPOUND_TEST_SPACE_RANK; i++) @@ -2580,19 +2580,19 @@ test_attribute_io_compound(void) if (NULL == (write_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for attribute write\n"); - TEST_ERROR + TEST_ERROR; } if (NULL == (read_buf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for attribute read\n"); - TEST_ERROR + TEST_ERROR; } if (NULL == (fbuf = HDmalloc(data_size))) { H5_FAILED(); HDprintf(" couldn't allocate buffer for attribute read verification\n"); - TEST_ERROR + TEST_ERROR; } /* Initialize write_buf. */ @@ -2603,7 +2603,7 @@ test_attribute_io_compound(void) /* Write the attribute asynchronously */ if (H5Awrite_async(attr_id, mtype_id, write_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Update fbuf */ for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) { @@ -2614,17 +2614,17 @@ test_attribute_io_compound(void) /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id, H5F_SCOPE_LOCAL, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Read the attribute asynchronously */ if (H5Aread_async(attr_id, mtype_id, read_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) { @@ -2648,13 +2648,13 @@ test_attribute_io_compound(void) /* Read the attribute asynchronously (element a only) */ if (H5Aread_async(attr_id, mtypea_id, read_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) { @@ -2678,13 +2678,13 @@ test_attribute_io_compound(void) /* Read the attribute asynchronously (element b only) */ if (H5Aread_async(attr_id, mtypeb_id, read_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) { @@ -2714,7 +2714,7 @@ test_attribute_io_compound(void) /* Write the attribute asynchronously (element a only) */ if (H5Awrite_async(attr_id, mtypea_id, write_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Update fbuf */ for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) { @@ -2724,7 +2724,7 @@ test_attribute_io_compound(void) /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id, H5F_SCOPE_LOCAL, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Clear the read buffer */ for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) { @@ -2734,13 +2734,13 @@ test_attribute_io_compound(void) /* Read the attribute asynchronously */ if (H5Aread_async(attr_id, mtype_id, read_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) { @@ -2770,7 +2770,7 @@ test_attribute_io_compound(void) /* Write the attribute asynchronously (element b only) */ if (H5Awrite_async(attr_id, mtypeb_id, write_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Update fbuf */ for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) { @@ -2780,7 +2780,7 @@ test_attribute_io_compound(void) /* Flush the dataset asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id, H5F_SCOPE_LOCAL, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Clear the read buffer */ for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) { @@ -2790,13 +2790,13 @@ test_attribute_io_compound(void) /* Read the attribute asynchronously */ if (H5Aread_async(attr_id, mtype_id, read_buf, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify the read data */ for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) { @@ -2814,25 +2814,25 @@ test_attribute_io_compound(void) /* Close */ if (H5Aclose_async(attr_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(mtype_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(ftype_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(mtypea_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(mtypeb_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (read_buf) { HDfree(read_buf); @@ -2855,9 +2855,9 @@ test_attribute_io_compound(void) } if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2909,15 +2909,14 @@ test_group(void) size_t num_in_progress; hbool_t op_failed; - TESTING("group operations") + TESTING("group operations"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { if (MAINPROCESS) { SKIPPED(); - HDprintf(" API functions for basic file, group, group more, creation order, or flush aren't " + HDprintf(" API functions for basic file, group, group more or flush aren't " "supported with this connector\n"); } @@ -2925,121 +2924,127 @@ test_group(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, coll_metadata_read)) < 0) - TEST_ERROR + TEST_ERROR; /* Create GCPL */ if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; - /* Track creation order */ - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) - TEST_ERROR + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + /* Track creation order */ + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) + TEST_ERROR; + } /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(PAR_ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, fapl_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the parent group asynchronously */ if ((parent_group_id = H5Gcreate_async(file_id, "group_parent", H5P_DEFAULT, gcpl_id, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create 3 subgroups asynchronously, the first with no sub-subgroups, the * second with 1, and the third with 2 */ if ((group_id = H5Gcreate_async(parent_group_id, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if ((group_id = H5Gcreate_async(parent_group_id, "group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if ((subgroup_id = H5Gcreate_async(group_id, "subgroup1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(subgroup_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if ((group_id = H5Gcreate_async(parent_group_id, "group3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if ((subgroup_id = H5Gcreate_async(group_id, "subgroup1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(subgroup_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if ((subgroup_id = H5Gcreate_async(group_id, "subgroup2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(subgroup_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the file asynchronously. This will effectively work as a barrier, * guaranteeing the read takes place after the write. */ if (H5Fflush_async(file_id, H5F_SCOPE_LOCAL, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Test H5Gget_info_async */ /* Open group1 asynchronously */ if ((group_id = H5Gopen_async(parent_group_id, "group1", H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Get info */ if (H5Gget_info_async(group_id, &info1, es_id) < 0) - TEST_ERROR + TEST_ERROR; - /* Test H5Gget_info_by_idx_async */ - if (H5Gget_info_by_idx_async(parent_group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, &info2, - H5P_DEFAULT, es_id) < 0) - TEST_ERROR + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + /* Test H5Gget_info_by_idx_async */ + if (H5Gget_info_by_idx_async(parent_group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, &info2, + H5P_DEFAULT, es_id) < 0) + TEST_ERROR; + } /* Test H5Gget_info_by_name_async */ if (H5Gget_info_by_name_async(parent_group_id, "group3", &info3, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Verify group infos */ if (info1.nlinks != 0) - FAIL_PUTS_ERROR(" incorrect number of links") - if (info2.nlinks != 1) - FAIL_PUTS_ERROR(" incorrect number of links") + FAIL_PUTS_ERROR(" incorrect number of links"); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (info2.nlinks != 1) + FAIL_PUTS_ERROR(" incorrect number of links"); + } if (info3.nlinks != 2) - FAIL_PUTS_ERROR(" incorrect number of links") + FAIL_PUTS_ERROR(" incorrect number of links"); /* Close */ if (H5Gclose_async(group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3084,7 +3089,7 @@ test_link(void) hbool_t op_failed = false; hbool_t is_native_vol = false; - TESTING("link operations") + TESTING("link operations"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || @@ -3101,76 +3106,76 @@ test_link(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, coll_metadata_read)) < 0) - TEST_ERROR + TEST_ERROR; /* Create GCPL */ if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; /* Track creation order */ if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(PAR_ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, fapl_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Find out if the native connector is used */ if (H5VLobject_is_native(file_id, &is_native_vol) < 0) - TEST_ERROR + TEST_ERROR; /* Create the parent group asynchronously */ if ((parent_group_id = H5Gcreate_async(file_id, "link_parent", H5P_DEFAULT, gcpl_id, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create subgroup asynchronously. */ if ((group_id = H5Gcreate_async(parent_group_id, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the link to the subgroup is visible to later tasks. * Skip this function for the native vol because it isn't supported in parallel. */ if (!is_native_vol && H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Create hard link asynchronously */ if (H5Lcreate_hard_async(parent_group_id, "group", parent_group_id, "hard_link", H5P_DEFAULT, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the soft link create takes place after the hard * link create. Skip this function for the native vol because it isn't supported in parallel. */ if (!is_native_vol && H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Create soft link asynchronously */ if (H5Lcreate_soft_async("/link_parent/group", parent_group_id, "soft_link", H5P_DEFAULT, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the writes. * Skip this function for the native vol because it isn't supported in parallel. */ if (!is_native_vol && H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); @@ -3180,36 +3185,36 @@ test_link(void) /* Check if hard link exists */ if (H5Lexists_async(parent_group_id, "hard_link", &existsh1, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Check if soft link exists */ if (H5Lexists_async(parent_group_id, "soft_link", &existss1, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the delete takes place after the reads. * Skip this function for the native vol because it isn't supported in parallel. */ if (!is_native_vol && H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Delete soft link by index */ if (H5Ldelete_by_idx_async(parent_group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the delete. * Skip this function for the native vol because it isn't supported in parallel. */ if (!is_native_vol && H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); @@ -3219,35 +3224,35 @@ test_link(void) /* Check if hard link exists */ if (H5Lexists_async(parent_group_id, "hard_link", &existsh2, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Check if soft link exists */ if (H5Lexists_async(parent_group_id, "soft_link", &existss2, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the delete takes place after the reads. * Skip this function for the native vol because it isn't supported in parallel. */ if (!is_native_vol && H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Delete hard link */ if (H5Ldelete_async(parent_group_id, "hard_link", H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the read takes place after the delete. * Skip this function for the native vol because it isn't supported in parallel. */ if (!is_native_vol && H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); @@ -3257,50 +3262,50 @@ test_link(void) /* Check if hard link exists */ if (H5Lexists_async(parent_group_id, "hard_link", &existsh3, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Check if soft link exists */ if (H5Lexists_async(parent_group_id, "soft_link", &existss3, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Check if existence returns were correct */ if (!existsh1) - FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist") + FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist"); if (!existss1) - FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist") + FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist"); if (!existsh2) - FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist") + FAIL_PUTS_ERROR(" link exists returned FALSE for link that should exist"); if (existss2) - FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist") + FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist"); if (existsh3) - FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist") + FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist"); if (existsh3) - FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist") + FAIL_PUTS_ERROR(" link exists returned TRUE for link that should not exist"); /* Close */ if (H5Gclose_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3340,7 +3345,7 @@ test_ocopy_orefresh(void) hbool_t op_failed = false; hbool_t is_native_vol = false; - TESTING("H5Ocopy() and H5Orefresh()") + TESTING("H5Ocopy() and H5Orefresh()"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -3356,65 +3361,65 @@ test_ocopy_orefresh(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, coll_metadata_read)) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if (generate_random_parallel_dimensions(OCOPY_REFRESH_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if ((space_id = H5Screate_simple(OCOPY_REFRESH_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(PAR_ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, fapl_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Find out if the native connector is used */ if (H5VLobject_is_native(file_id, &is_native_vol) < 0) - TEST_ERROR + TEST_ERROR; /* Create the parent group asynchronously */ if ((parent_group_id = H5Gcreate_async(file_id, "ocopy_parent", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataset asynchronously. */ if ((dset_id = H5Dcreate_async(parent_group_id, "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the copy takes place after dataset create. * Skip this function for the native vol because it isn't supported in parallel. */ if (!is_native_vol && H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Copy dataset */ if (H5Ocopy_async(parent_group_id, "dset", parent_group_id, "copied_dset", H5P_DEFAULT, H5P_DEFAULT, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Flush the parent group asynchronously. This will effectively work as a * barrier, guaranteeing the dataset open takes place copy. * Skip this function for the native vol because it isn't supported in parallel. */ if (!is_native_vol && H5Oflush_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (!coll_metadata_read) { /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); @@ -3425,31 +3430,31 @@ test_ocopy_orefresh(void) /* Open the copied dataset asynchronously */ if ((dset_id = H5Dopen_async(parent_group_id, "copied_dset", H5P_DEFAULT, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Refresh the copied dataset asynchronously */ if (H5Orefresh(dset_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Close */ if (H5Dclose_async(dset_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose_async(parent_group_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (dims) { HDfree(dims); @@ -3457,9 +3462,9 @@ test_ocopy_orefresh(void) } if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3497,7 +3502,7 @@ test_file_reopen(void) size_t num_in_progress; hbool_t op_failed; - TESTING("H5Freopen()") + TESTING("H5Freopen()"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE)) { @@ -3510,42 +3515,42 @@ test_file_reopen(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, coll_metadata_read)) < 0) - TEST_ERROR + TEST_ERROR; /* Create event stack */ if ((es_id = H5EScreate()) < 0) - TEST_ERROR + TEST_ERROR; /* Open file asynchronously */ if ((file_id = H5Fopen_async(PAR_ASYNC_VOL_TEST_FILE, H5F_ACC_RDWR, fapl_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Reopen file asynchronously */ if ((reopened_file_id = H5Freopen_async(file_id, es_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; /* Close */ if (H5Fclose_async(reopened_file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose_async(file_id, es_id) < 0) - TEST_ERROR + TEST_ERROR; /* Wait for the event stack to complete */ if (H5ESwait(es_id, VOL_TEST_WAIT_FOREVER, &num_in_progress, &op_failed) < 0) - TEST_ERROR + TEST_ERROR; if (op_failed) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5ESclose(es_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3597,16 +3602,14 @@ vol_async_test_parallel(void) HDprintf("**********************************************\n\n"); } - /* (Uncomment it for async support) Make sure the connector supports the async functions */ - /* if (!(vol_cap_flags_g & H5VL_CAP_FLAG_ASYNC)) { - if (MAINPROCESS) { - SKIPPED(); - HDprintf(" Async APIs aren't supported with this connector\n"); - } - - return 0; + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_ASYNC)) { + if (MAINPROCESS) { + SKIPPED(); + HDprintf(" Async APIs aren't supported with this connector\n"); } - */ + + return 0; + } for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_async_tests); i++) { nerrors += (*par_async_tests[i])() ? 1 : 0; diff --git a/vol_attribute_test.c b/vol_attribute_test.c index ef6e68f..4d46f6d 100644 --- a/vol_attribute_test.c +++ b/vol_attribute_test.c @@ -130,7 +130,7 @@ test_create_attribute_on_root(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -139,12 +139,12 @@ test_create_attribute_on_root(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_ROOT_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -152,7 +152,7 @@ test_create_attribute_on_root(void) { PART_BEGIN(H5Acreate2) { - TESTING_2("H5Acreate on the root group") + TESTING_2("H5Acreate on the root group"); if ((attr_id = H5Acreate2(file_id, ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME, attr_dtype1, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -182,7 +182,7 @@ test_create_attribute_on_root(void) PART_BEGIN(H5Acreate_by_name) { - TESTING_2("H5Acreate_by_name on the root group") + TESTING_2("H5Acreate_by_name on the root group"); if ((attr_id2 = H5Acreate_by_name(file_id, "/", ATTRIBUTE_CREATE_ON_ROOT_ATTR_NAME2, attr_dtype2, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -211,20 +211,20 @@ test_create_attribute_on_root(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -274,7 +274,7 @@ test_create_attribute_on_dataset(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -297,17 +297,17 @@ test_create_attribute_on_dataset(void) if ((dset_space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATASET_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATASET_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_CREATE_ON_DATASET_DSET_NAME, dset_dtype, dset_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -322,7 +322,7 @@ test_create_attribute_on_dataset(void) { PART_BEGIN(H5Acreate_on_dataset) { - TESTING_2("H5Acreate on a dataset") + TESTING_2("H5Acreate on a dataset"); if ((attr_id = H5Acreate2(dset_id, ATTRIBUTE_CREATE_ON_DATASET_ATTR_NAME, attr_dtype1, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -351,7 +351,7 @@ test_create_attribute_on_dataset(void) PART_BEGIN(H5Acreate_by_name_on_dataset) { - TESTING_2("H5Acreate_by_name on a dataset") + TESTING_2("H5Acreate_by_name on a dataset"); if ((attr_id2 = H5Acreate_by_name(group_id, ATTRIBUTE_CREATE_ON_DATASET_DSET_NAME, ATTRIBUTE_CREATE_ON_DATASET_ATTR_NAME2, attr_dtype2, @@ -381,30 +381,30 @@ test_create_attribute_on_dataset(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(dset_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(attr_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -458,7 +458,7 @@ test_create_attribute_on_datatype(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -493,12 +493,12 @@ test_create_attribute_on_datatype(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATATYPE_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -506,7 +506,7 @@ test_create_attribute_on_datatype(void) { PART_BEGIN(H5Acreate_on_datatype) { - TESTING_2("H5Acreate on a committed datatype") + TESTING_2("H5Acreate on a committed datatype"); if ((attr_id = H5Acreate2(type_id, ATTRIBUTE_CREATE_ON_DATATYPE_ATTR_NAME, attr_dtype1, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -533,7 +533,7 @@ test_create_attribute_on_datatype(void) PART_BEGIN(H5Acreate_by_name_on_datatype) { - TESTING_2("H5Acreate_by_name on a committed datatype") + TESTING_2("H5Acreate_by_name on a committed datatype"); if ((attr_id2 = H5Acreate_by_name(group_id, ATTRIBUTE_CREATE_ON_DATATYPE_DTYPE_NAME, ATTRIBUTE_CREATE_ON_DATATYPE_ATTR_NAME2, attr_dtype2, space_id, @@ -562,26 +562,26 @@ test_create_attribute_on_datatype(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -619,7 +619,7 @@ test_create_attribute_with_null_space(void) hid_t attr_dtype = H5I_INVALID_HID; hid_t space_id = H5I_INVALID_HID; - TESTING("attribute creation with a NULL dataspace") + TESTING("attribute creation with a NULL dataspace"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -650,10 +650,10 @@ test_create_attribute_with_null_space(void) } if ((space_id = H5Screate(H5S_NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_NULL_DATASPACE_TEST_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -676,7 +676,7 @@ test_create_attribute_with_null_space(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Aopen(group_id, ATTRIBUTE_CREATE_NULL_DATASPACE_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -685,17 +685,17 @@ test_create_attribute_with_null_space(void) } if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -730,7 +730,7 @@ test_create_attribute_with_scalar_space(void) hid_t attr_dtype = H5I_INVALID_HID; hid_t space_id = H5I_INVALID_HID; - TESTING("attribute creation with a SCALAR dataspace") + TESTING("attribute creation with a SCALAR dataspace"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -761,10 +761,10 @@ test_create_attribute_with_scalar_space(void) } if ((space_id = H5Screate(H5S_SCALAR)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_SCALAR_DATASPACE_TEST_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -787,7 +787,7 @@ test_create_attribute_with_scalar_space(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Aopen(group_id, ATTRIBUTE_CREATE_SCALAR_DATASPACE_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -796,17 +796,17 @@ test_create_attribute_with_scalar_space(void) } if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -843,7 +843,7 @@ test_create_attribute_with_space_in_name(void) hid_t attr_dtype = H5I_INVALID_HID; hid_t space_id = H5I_INVALID_HID; - TESTING("attribute creation with a space in attribute's name") + TESTING("attribute creation with a space in attribute's name"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -876,10 +876,10 @@ test_create_attribute_with_space_in_name(void) if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -902,17 +902,17 @@ test_create_attribute_with_space_in_name(void) } if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -958,7 +958,7 @@ test_create_attribute_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -981,9 +981,9 @@ test_create_attribute_invalid_params(void) if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_INVALID_PARAMS_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -991,7 +991,7 @@ test_create_attribute_invalid_params(void) { PART_BEGIN(H5Acreate_invalid_loc_id) { - TESTING_2("H5Acreate with invalid loc_id") + TESTING_2("H5Acreate with invalid loc_id"); H5E_BEGIN_TRY { @@ -1013,7 +1013,7 @@ test_create_attribute_invalid_params(void) PART_BEGIN(H5Acreate_invalid_attr_name) { - TESTING_2("H5Acreate with invalid attribute name") + TESTING_2("H5Acreate with invalid attribute name"); H5E_BEGIN_TRY { @@ -1047,7 +1047,7 @@ test_create_attribute_invalid_params(void) PART_BEGIN(H5Acreate_invalid_datatype) { - TESTING_2("H5Acreate with an invalid datatype") + TESTING_2("H5Acreate with an invalid datatype"); H5E_BEGIN_TRY { @@ -1069,7 +1069,7 @@ test_create_attribute_invalid_params(void) PART_BEGIN(H5Acreate_invalid_dataspace) { - TESTING_2("H5Acreate with an invalid dataspace") + TESTING_2("H5Acreate with an invalid dataspace"); H5E_BEGIN_TRY { @@ -1091,7 +1091,7 @@ test_create_attribute_invalid_params(void) PART_BEGIN(H5Acreate_invalid_acpl) { - TESTING_2("H5Acreate with an invalid ACPL") + TESTING_2("H5Acreate with an invalid ACPL"); H5E_BEGIN_TRY { @@ -1113,8 +1113,8 @@ test_create_attribute_invalid_params(void) PART_BEGIN(H5Acreate_invalid_aapl) { - TESTING_2("H5Acreate with an invalid AAPL") -#ifndef NO_INVALID_PROPERTY_LIST_TESTS + TESTING_2("H5Acreate with an invalid AAPL"); + H5E_BEGIN_TRY { attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_INVALID_PARAMS_ATTR_NAME, attr_dtype, @@ -1130,16 +1130,12 @@ test_create_attribute_invalid_params(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Acreate_invalid_aapl); -#endif } PART_END(H5Acreate_invalid_aapl); PART_BEGIN(H5Acreate_by_name_invalid_loc_id) { - TESTING_2("H5Acreate_by_name with an invalid loc_id") + TESTING_2("H5Acreate_by_name with an invalid loc_id"); H5E_BEGIN_TRY { @@ -1162,7 +1158,7 @@ test_create_attribute_invalid_params(void) PART_BEGIN(H5Acreate_by_name_invalid_obj_name) { - TESTING_2("H5Acreate_by_name with invalid object name") + TESTING_2("H5Acreate_by_name with invalid object name"); H5E_BEGIN_TRY { @@ -1199,7 +1195,7 @@ test_create_attribute_invalid_params(void) PART_BEGIN(H5Acreate_by_name_invalid_attr_name) { - TESTING_2("H5Acreate_by_name with invalid attribute name") + TESTING_2("H5Acreate_by_name with invalid attribute name"); H5E_BEGIN_TRY { @@ -1236,7 +1232,7 @@ test_create_attribute_invalid_params(void) PART_BEGIN(H5Acreate_by_name_invalid_datatype) { - TESTING_2("H5Acreate_by_name with invalid datatype") + TESTING_2("H5Acreate_by_name with invalid datatype"); H5E_BEGIN_TRY { @@ -1259,7 +1255,7 @@ test_create_attribute_invalid_params(void) PART_BEGIN(H5Acreate_by_name_invalid_dataspace) { - TESTING_2("H5Acreate_by_name with invalid dataspace") + TESTING_2("H5Acreate_by_name with invalid dataspace"); H5E_BEGIN_TRY { @@ -1282,7 +1278,7 @@ test_create_attribute_invalid_params(void) PART_BEGIN(H5Acreate_by_name_invalid_acpl) { - TESTING_2("H5Acreate_by_name with invalid ACPL") + TESTING_2("H5Acreate_by_name with invalid ACPL"); H5E_BEGIN_TRY { @@ -1305,8 +1301,8 @@ test_create_attribute_invalid_params(void) PART_BEGIN(H5Acreate_by_name_invalid_aapl) { - TESTING_2("H5Acreate_by_name with invalid AAPL") -#ifndef NO_INVALID_PROPERTY_LIST_TESTS + TESTING_2("H5Acreate_by_name with invalid AAPL"); + H5E_BEGIN_TRY { attr_id = H5Acreate_by_name(container_group, ATTRIBUTE_CREATE_INVALID_PARAMS_GROUP_NAME, @@ -1323,16 +1319,12 @@ test_create_attribute_invalid_params(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Acreate_by_name_invalid_aapl); -#endif } PART_END(H5Acreate_by_name_invalid_aapl); PART_BEGIN(H5Acreate_by_name_invalid_lapl) { - TESTING_2("H5Acreate_by_name with invalid LAPL") + TESTING_2("H5Acreate_by_name with invalid LAPL"); H5E_BEGIN_TRY { @@ -1355,18 +1347,18 @@ test_create_attribute_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1406,12 +1398,12 @@ test_open_attribute(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or attribute aren't supported with this connector\n"); + HDprintf(" API functions for basic file, group, or attribute aren't supported " + "with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1431,10 +1423,12 @@ test_open_attribute(void) goto error; } - if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set attribute creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set attribute creation order tracking\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id, @@ -1445,10 +1439,10 @@ test_open_attribute(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_OPEN_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_type = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; /* Create several attributes */ if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_OPEN_TEST_ATTR_NAME, attr_type, space_id, H5P_DEFAULT, @@ -1459,7 +1453,7 @@ test_open_attribute(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_OPEN_TEST_ATTR_NAME2, attr_type, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -1469,7 +1463,7 @@ test_open_attribute(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_OPEN_TEST_ATTR_NAME3, attr_type, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -1479,7 +1473,7 @@ test_open_attribute(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1487,7 +1481,7 @@ test_open_attribute(void) { PART_BEGIN(H5Aopen) { - TESTING_2("H5Aopen") + TESTING_2("H5Aopen"); if ((attr_id = H5Aopen(group_id, ATTRIBUTE_OPEN_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1507,7 +1501,7 @@ test_open_attribute(void) PART_BEGIN(H5Aopen_by_name) { - TESTING_2("H5Aopen_by_name") + TESTING_2("H5Aopen_by_name"); if ((attr_id = H5Aopen_by_name(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, ATTRIBUTE_OPEN_TEST_ATTR_NAME, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -1529,7 +1523,13 @@ test_open_attribute(void) PART_BEGIN(H5Aopen_by_idx_crt_order_increasing) { - TESTING_2("H5Aopen_by_idx by creation order in increasing order") + TESTING_2("H5Aopen_by_idx by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking is not supported with this VOL connector\n"); + PART_EMPTY(H5Aopen_by_idx_crt_order_increasing); + } if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -1582,7 +1582,13 @@ test_open_attribute(void) PART_BEGIN(H5Aopen_by_idx_crt_order_decreasing) { - TESTING_2("H5Aopen_by_idx by creation order in decreasing order") + TESTING_2("H5Aopen_by_idx by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking is not supported with this VOL connector\n"); + PART_EMPTY(H5Aopen_by_idx_crt_order_decreasing); + } if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -1635,7 +1641,7 @@ test_open_attribute(void) PART_BEGIN(H5Aopen_by_idx_name_order_increasing) { - TESTING_2("H5Aopen_by_idx by alphabetical order in increasing order") + TESTING_2("H5Aopen_by_idx by alphabetical order in increasing order"); if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME, H5_ITER_INC, 0, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -1688,12 +1694,12 @@ test_open_attribute(void) PART_BEGIN(H5Aopen_by_idx_name_order_decreasing) { - TESTING_2("H5Aopen_by_idx by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Aopen_by_idx by alphabetical order in decreasing order"); + if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME, H5_ITER_DEC, 2, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open attribute '%s' at index %lld using H5Aopen_by_idx by " + HDprintf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by " "alphabetical order in decreasing order\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME, 2); PART_ERROR(H5Aopen_by_idx_name_order_decreasing); @@ -1708,7 +1714,7 @@ test_open_attribute(void) if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME, H5_ITER_DEC, 1, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open attribute '%s' at index %lld using H5Aopen_by_idx by " + HDprintf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by " "alphabetical order in decreasing order\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME2, 1); PART_ERROR(H5Aopen_by_idx_name_order_decreasing); @@ -1723,7 +1729,7 @@ test_open_attribute(void) if ((attr_id = H5Aopen_by_idx(container_group, ATTRIBUTE_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME, H5_ITER_DEC, 0, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open attribute '%s' at index %lld using H5Aopen_by_idx by " + HDprintf(" couldn't open attribute '%s' at index %d using H5Aopen_by_idx by " "alphabetical order in decreasing order\n", ATTRIBUTE_OPEN_TEST_ATTR_NAME3, 0); PART_ERROR(H5Aopen_by_idx_name_order_decreasing); @@ -1736,29 +1742,25 @@ test_open_attribute(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Aopen_by_idx_name_order_decreasing); -#endif } PART_END(H5Aopen_by_idx_name_order_decreasing); } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_type) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1804,7 +1806,7 @@ test_open_attribute_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1827,10 +1829,10 @@ test_open_attribute_invalid_params(void) if ((space_id = generate_random_dataspace(ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_type = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME, attr_type, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -1840,7 +1842,7 @@ test_open_attribute_invalid_params(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1848,7 +1850,7 @@ test_open_attribute_invalid_params(void) { PART_BEGIN(H5Aopen_invalid_loc_id) { - TESTING_2("H5Aopen with an invalid loc_id") + TESTING_2("H5Aopen with an invalid loc_id"); H5E_BEGIN_TRY { @@ -1870,7 +1872,7 @@ test_open_attribute_invalid_params(void) PART_BEGIN(H5Aopen_invalid_attr_name) { - TESTING_2("H5Aopen with an invalid attribute name") + TESTING_2("H5Aopen with an invalid attribute name"); H5E_BEGIN_TRY { @@ -1906,7 +1908,7 @@ test_open_attribute_invalid_params(void) PART_BEGIN(H5Aopen_invalid_aapl) { - TESTING_2("H5Aopen with an invalid AAPL") + TESTING_2("H5Aopen with an invalid AAPL"); H5E_BEGIN_TRY { @@ -1928,7 +1930,7 @@ test_open_attribute_invalid_params(void) PART_BEGIN(H5Aopen_by_name_invalid_loc_id) { - TESTING_2("H5Aopen_by_name with an invalid loc_id") + TESTING_2("H5Aopen_by_name with an invalid loc_id"); H5E_BEGIN_TRY { @@ -1952,7 +1954,7 @@ test_open_attribute_invalid_params(void) PART_BEGIN(H5Aopen_by_name_invalid_obj_name) { - TESTING_2("H5Aopen_by_name with an invalid object name") + TESTING_2("H5Aopen_by_name with an invalid object name"); H5E_BEGIN_TRY { @@ -1991,7 +1993,7 @@ test_open_attribute_invalid_params(void) PART_BEGIN(H5Aopen_by_name_invalid_attr_name) { - TESTING_2("H5Aopen_by_name with an invalid attribute name") + TESTING_2("H5Aopen_by_name with an invalid attribute name"); H5E_BEGIN_TRY { @@ -2030,7 +2032,7 @@ test_open_attribute_invalid_params(void) PART_BEGIN(H5Aopen_by_name_invalid_aapl) { - TESTING_2("H5Aopen_by_name with an invalid AAPL") + TESTING_2("H5Aopen_by_name with an invalid AAPL"); H5E_BEGIN_TRY { @@ -2054,7 +2056,7 @@ test_open_attribute_invalid_params(void) PART_BEGIN(H5Aopen_by_name_invalid_lapl) { - TESTING_2("H5Aopen_by_name with an invalid LAPL") + TESTING_2("H5Aopen_by_name with an invalid LAPL"); H5E_BEGIN_TRY { @@ -2078,7 +2080,7 @@ test_open_attribute_invalid_params(void) PART_BEGIN(H5Aopen_by_idx_invalid_loc_id) { - TESTING_2("H5Aopen_by_idx with an invalid loc_id") + TESTING_2("H5Aopen_by_idx with an invalid loc_id"); H5E_BEGIN_TRY { @@ -2101,7 +2103,7 @@ test_open_attribute_invalid_params(void) PART_BEGIN(H5Aopen_by_idx_invalid_obj_name) { - TESTING_2("H5Aopen_by_idx with an invalid object name") + TESTING_2("H5Aopen_by_idx with an invalid object name"); H5E_BEGIN_TRY { @@ -2140,7 +2142,7 @@ test_open_attribute_invalid_params(void) PART_BEGIN(H5Aopen_by_idx_invalid_index_type) { - TESTING_2("H5Aopen_by_idx with an invalid index type") + TESTING_2("H5Aopen_by_idx with an invalid index type"); H5E_BEGIN_TRY { @@ -2180,7 +2182,7 @@ test_open_attribute_invalid_params(void) PART_BEGIN(H5Aopen_by_idx_invalid_iter_order) { - TESTING_2("H5Aopen_by_idx with an invalid iteration order") + TESTING_2("H5Aopen_by_idx with an invalid iteration order"); H5E_BEGIN_TRY { @@ -2220,7 +2222,7 @@ test_open_attribute_invalid_params(void) PART_BEGIN(H5Aopen_by_idx_invalid_aapl) { - TESTING_2("H5Aopen_by_idx with an invalid AAPL") + TESTING_2("H5Aopen_by_idx with an invalid AAPL"); H5E_BEGIN_TRY { @@ -2243,7 +2245,7 @@ test_open_attribute_invalid_params(void) PART_BEGIN(H5Aopen_by_idx_invalid_lapl) { - TESTING_2("H5Aopen_by_idx with an invalid LAPL") + TESTING_2("H5Aopen_by_idx with an invalid LAPL"); H5E_BEGIN_TRY { @@ -2266,18 +2268,18 @@ test_open_attribute_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_type) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2315,7 +2317,7 @@ test_write_attribute(void) hid_t space_id = H5I_INVALID_HID; void *data = NULL; - TESTING("H5Awrite") + TESTING("H5Awrite"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -2346,7 +2348,7 @@ test_write_attribute(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_WRITE_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_WRITE_TEST_ATTR_NAME, ATTRIBUTE_WRITE_TEST_ATTR_DTYPE, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -2373,7 +2375,7 @@ test_write_attribute(void) data_size *= ATTRIBUTE_WRITE_TEST_ATTR_DTYPE_SIZE; if (NULL == (data = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; for (i = 0; i < data_size / ATTRIBUTE_WRITE_TEST_ATTR_DTYPE_SIZE; i++) ((int *)data)[i] = (int)i; @@ -2397,15 +2399,15 @@ test_write_attribute(void) } if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2456,7 +2458,7 @@ test_write_attribute_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2480,7 +2482,7 @@ test_write_attribute_invalid_params(void) if ((space_id = generate_random_dataspace(ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_ATTR_NAME, ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_ATTR_DTYPE, space_id, H5P_DEFAULT, @@ -2508,7 +2510,7 @@ test_write_attribute_invalid_params(void) data_size *= ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_ATTR_DTYPE_SIZE; if (NULL == (data = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; for (i = 0; i < data_size / ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_ATTR_DTYPE_SIZE; i++) ((int *)data)[i] = (int)i; @@ -2519,7 +2521,7 @@ test_write_attribute_invalid_params(void) { PART_BEGIN(H5Awrite_invalid_attr_id) { - TESTING_2("H5Awrite with an invalid attr_id") + TESTING_2("H5Awrite with an invalid attr_id"); H5E_BEGIN_TRY { @@ -2539,7 +2541,7 @@ test_write_attribute_invalid_params(void) PART_BEGIN(H5Awrite_invalid_datatype) { - TESTING_2("H5Awrite with an invalid datatype") + TESTING_2("H5Awrite with an invalid datatype"); H5E_BEGIN_TRY { @@ -2559,7 +2561,7 @@ test_write_attribute_invalid_params(void) PART_BEGIN(H5Awrite_invalid_data_buf) { - TESTING_2("H5Awrite with an invalid data buffer") + TESTING_2("H5Awrite with an invalid data buffer"); H5E_BEGIN_TRY { @@ -2579,7 +2581,7 @@ test_write_attribute_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (data) { HDfree(data); @@ -2587,15 +2589,15 @@ test_write_attribute_invalid_params(void) } if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2636,7 +2638,7 @@ test_read_attribute(void) void *data = NULL; void *read_buf = NULL; - TESTING("H5Aread") + TESTING("H5Aread"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -2667,7 +2669,7 @@ test_read_attribute(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_READ_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_READ_TEST_ATTR_NAME, ATTRIBUTE_READ_TEST_ATTR_DTYPE, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -2694,9 +2696,9 @@ test_read_attribute(void) data_size *= ATTRIBUTE_READ_TEST_ATTR_DTYPE_SIZE; if (NULL == (data = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; if (NULL == (read_buf = HDcalloc(1, data_size))) - TEST_ERROR + TEST_ERROR; for (i = 0; i < data_size / ATTRIBUTE_READ_TEST_ATTR_DTYPE_SIZE; i++) ((int *)data)[i] = (int)i; @@ -2713,7 +2715,7 @@ test_read_attribute(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Aopen(group_id, ATTRIBUTE_READ_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2741,15 +2743,15 @@ test_read_attribute(void) } if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2803,7 +2805,7 @@ test_read_attribute_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2826,7 +2828,7 @@ test_read_attribute_invalid_params(void) if ((space_id = generate_random_dataspace(ATTRIBUTE_READ_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_NAME, ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_DTYPE, space_id, H5P_DEFAULT, @@ -2854,9 +2856,9 @@ test_read_attribute_invalid_params(void) data_size *= ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_DTYPE_SIZE; if (NULL == (data = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; if (NULL == (read_buf = HDcalloc(1, data_size))) - TEST_ERROR + TEST_ERROR; for (i = 0; i < data_size / ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_DTYPE_SIZE; i++) ((int *)data)[i] = (int)i; @@ -2873,7 +2875,7 @@ test_read_attribute_invalid_params(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Aopen(group_id, ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2887,7 +2889,7 @@ test_read_attribute_invalid_params(void) { PART_BEGIN(H5Aread_invalid_attr_id) { - TESTING_2("H5Aread with an invalid attr_id") + TESTING_2("H5Aread with an invalid attr_id"); H5E_BEGIN_TRY { @@ -2907,7 +2909,7 @@ test_read_attribute_invalid_params(void) PART_BEGIN(H5Aread_invalid_datatype) { - TESTING_2("H5Aread with an invalid datatype") + TESTING_2("H5Aread with an invalid datatype"); H5E_BEGIN_TRY { @@ -2927,7 +2929,7 @@ test_read_attribute_invalid_params(void) PART_BEGIN(H5Aread_invalid_read_buf) { - TESTING_2("H5Aread with an invalid read buffer") + TESTING_2("H5Aread with an invalid read buffer"); H5E_BEGIN_TRY { @@ -2947,7 +2949,7 @@ test_read_attribute_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (read_buf) { HDfree(read_buf); @@ -2955,15 +2957,15 @@ test_read_attribute_invalid_params(void) } if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3003,7 +3005,7 @@ test_read_empty_attribute(void) hid_t space_id = H5I_INVALID_HID; void *read_buf = NULL; - TESTING("reading an empty attribute") + TESTING("reading an empty attribute"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -3034,7 +3036,7 @@ test_read_empty_attribute(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_READ_EMPTY_SPACE_RANK, NULL, dims, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_READ_EMPTY_ATTR_NAME, ATTRIBUTE_READ_EMPTY_DTYPE, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -3057,7 +3059,7 @@ test_read_empty_attribute(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Aopen(group_id, ATTRIBUTE_READ_EMPTY_ATTR_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3070,7 +3072,7 @@ test_read_empty_attribute(void) data_size *= ATTRIBUTE_READ_EMPTY_DTYPE_SIZE; if (NULL == (read_buf = HDcalloc(1, data_size))) - TEST_ERROR + TEST_ERROR; if (H5Aread(attr_id, ATTRIBUTE_READ_EMPTY_DTYPE, read_buf) < 0) { H5_FAILED(); @@ -3084,15 +3086,15 @@ test_read_empty_attribute(void) } if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3123,7 +3125,7 @@ test_close_attribute_invalid_id(void) herr_t err_ret = -1; hid_t file_id = H5I_INVALID_HID; - TESTING("H5Aclose with an invalid attribute ID") + TESTING("H5Aclose with an invalid attribute ID"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { @@ -3151,7 +3153,7 @@ test_close_attribute_invalid_id(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3193,12 +3195,12 @@ test_get_attribute_space_and_type(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or attribute aren't supported with this connector\n"); + HDprintf(" API functions for basic file, group, attribute, or attribute aren't supported with " + "this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3221,10 +3223,10 @@ test_get_attribute_space_and_type(void) if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_GET_SPACE_TYPE_TEST_SPACE_RANK, NULL, attr_dims, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_SPACE_TYPE_TEST_ATTR_NAME, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -3253,7 +3255,7 @@ test_get_attribute_space_and_type(void) /* Retrieve the attribute's datatype and dataspace and verify them */ PART_BEGIN(H5Aget_type) { - TESTING_2("H5Aget_type") + TESTING_2("H5Aget_type"); if ((tmp_type_id = H5Aget_type(attr_id)) < 0) { H5_FAILED(); @@ -3283,7 +3285,7 @@ test_get_attribute_space_and_type(void) PART_BEGIN(H5Aget_space) { - TESTING_2("H5Aget_space") + TESTING_2("H5Aget_space"); if ((tmp_space_id = H5Aget_space(attr_id)) < 0) { H5_FAILED(); @@ -3342,7 +3344,7 @@ test_get_attribute_space_and_type(void) PART_BEGIN(H5Aget_type_reopened) { - TESTING_2("H5Aget_type after re-opening an attribute") + TESTING_2("H5Aget_type after re-opening an attribute"); if ((attr_id = H5Aopen(group_id, ATTRIBUTE_GET_SPACE_TYPE_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3387,7 +3389,7 @@ test_get_attribute_space_and_type(void) PART_BEGIN(H5Aget_space_reopened) { - TESTING_2("H5Aget_space after re-opening an attribute") + TESTING_2("H5Aget_space after re-opening an attribute"); if ((attr_id = H5Aopen(group_id, ATTRIBUTE_GET_SPACE_TYPE_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3434,22 +3436,22 @@ test_get_attribute_space_and_type(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(tmp_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(attr_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tmp_type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3501,7 +3503,7 @@ test_get_attribute_space_and_type_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3525,10 +3527,10 @@ test_get_attribute_space_and_type_invalid_params(void) if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_GET_SPACE_TYPE_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_SPACE_TYPE_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -3557,7 +3559,7 @@ test_get_attribute_space_and_type_invalid_params(void) /* Retrieve the attribute's datatype and dataspace and verify them */ PART_BEGIN(H5Aget_type_invalid_attr_id) { - TESTING_2("H5Aget_type with an invalid attr_id") + TESTING_2("H5Aget_type with an invalid attr_id"); H5E_BEGIN_TRY { @@ -3577,7 +3579,7 @@ test_get_attribute_space_and_type_invalid_params(void) PART_BEGIN(H5Aget_space_invalid_attr_id) { - TESTING_2("H5Aget_space with an invalid attr_id") + TESTING_2("H5Aget_space with an invalid attr_id"); H5E_BEGIN_TRY { @@ -3597,20 +3599,20 @@ test_get_attribute_space_and_type_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(attr_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3634,9 +3636,9 @@ test_get_attribute_space_and_type_invalid_params(void) } /* - * A test to check that a VOL connector stores and can - * retrieve a valid copy of an ACPL used at attribute - * creation time. + * A test to check that an ACPL used for attribute creation + * can be persisted and that a valid copy of that ACPL can + * be retrieved later with a call to H5Aget_create_plist. */ static int test_attribute_property_lists(void) @@ -3661,7 +3663,7 @@ test_attribute_property_lists(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3683,12 +3685,12 @@ test_attribute_property_lists(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_PROPERTY_LIST_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((acpl_id1 = H5Pcreate(H5P_ATTRIBUTE_CREATE)) < 0) { H5_FAILED(); @@ -3717,7 +3719,7 @@ test_attribute_property_lists(void) } if (H5Pclose(acpl_id1) < 0) - TEST_ERROR + TEST_ERROR; /* Verify the attributes have been created */ if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_PROPERTY_LIST_TEST_ATTRIBUTE_NAME1)) < 0) { @@ -3750,7 +3752,7 @@ test_attribute_property_lists(void) { PART_BEGIN(H5Aget_create_plist) { - TESTING_2("H5Aget_create_plist") + TESTING_2("H5Aget_create_plist"); /* Try to retrieve copies of the two property lists, one which has the property set and one which * does not */ @@ -3837,7 +3839,7 @@ test_attribute_property_lists(void) PART_BEGIN(H5Aget_create_plist_reopened) { - TESTING_2("H5Aget_create_plist after re-opening an attribute") + TESTING_2("H5Aget_create_plist after re-opening an attribute"); if ((attr_id1 = H5Aopen(group_id, ATTRIBUTE_PROPERTY_LIST_TEST_ATTRIBUTE_NAME1, H5P_DEFAULT)) < 0) { @@ -3872,28 +3874,28 @@ test_attribute_property_lists(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(acpl_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(acpl_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3941,15 +3943,14 @@ test_get_attribute_name(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_MORE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_MORE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, attribute, or creation order aren't supported " + HDprintf(" API functions for basic file, group, or attribute aren't supported " "with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3969,10 +3970,12 @@ test_get_attribute_name(void) goto error; } - if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set attribute creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set attribute creation order tracking\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id, @@ -3983,10 +3986,10 @@ test_get_attribute_name(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NAME_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; /* Create several attributes */ if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME, attr_dtype, space_id, @@ -3997,7 +4000,7 @@ test_get_attribute_name(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -4007,7 +4010,7 @@ test_get_attribute_name(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -4017,7 +4020,7 @@ test_get_attribute_name(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; /* Verify the attributes have been created */ if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME)) < 0) { @@ -4072,7 +4075,7 @@ test_get_attribute_name(void) { PART_BEGIN(H5Aget_name) { - TESTING_2("H5Aget_name") + TESTING_2("H5Aget_name"); if ((attr_id = H5Aopen(group_id, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -4114,7 +4117,13 @@ test_get_attribute_name(void) PART_BEGIN(H5Aget_name_by_idx_crt_order_increasing) { - TESTING_2("H5Aget_name_by_idx by creation order in increasing order") + TESTING_2("H5Aget_name_by_idx by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aget_name_by_idx_crt_order_increasing); + } *name_buf = '\0'; if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER, @@ -4176,7 +4185,13 @@ test_get_attribute_name(void) PART_BEGIN(H5Aget_name_by_idx_crt_order_decreasing) { - TESTING_2("H5Aget_name_by_idx by creation order in decreasing order") + TESTING_2("H5Aget_name_by_idx by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aget_name_by_idx_crt_order_decreasing); + } *name_buf = '\0'; if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_CRT_ORDER, @@ -4238,7 +4253,7 @@ test_get_attribute_name(void) PART_BEGIN(H5Aget_name_by_idx_name_order_increasing) { - TESTING_2("H5Aget_name_by_idx by alphabetical order in increasing order") + TESTING_2("H5Aget_name_by_idx by alphabetical order in increasing order"); *name_buf = '\0'; if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_NAME, @@ -4300,13 +4315,13 @@ test_get_attribute_name(void) PART_BEGIN(H5Aget_name_by_idx_name_order_decreasing) { - TESTING_2("H5Aget_name_by_idx by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Aget_name_by_idx by alphabetical order in decreasing order"); + *name_buf = '\0'; if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_NAME, H5_ITER_DEC, 2, name_buf, (size_t)name_buf_size, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't retrieve name of attribute at index %lld using H5Aget_name_by_index " + HDprintf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index " "by alphabetical order in decreasing order\n", 2); PART_ERROR(H5Aget_name_by_idx_name_order_decreasing); @@ -4324,7 +4339,7 @@ test_get_attribute_name(void) if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_NAME, H5_ITER_DEC, 1, name_buf, (size_t)name_buf_size, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't retrieve name of attribute at index %lld using H5Aget_name_by_index " + HDprintf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index " "by alphabetical order in decreasing order\n", 1); PART_ERROR(H5Aget_name_by_idx_name_order_decreasing); @@ -4342,7 +4357,7 @@ test_get_attribute_name(void) if (H5Aget_name_by_idx(container_group, ATTRIBUTE_GET_NAME_TEST_GROUP_NAME, H5_INDEX_NAME, H5_ITER_DEC, 0, name_buf, (size_t)name_buf_size, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't retrieve name of attribute at index %lld using H5Aget_name_by_index " + HDprintf(" couldn't retrieve name of attribute at index %d using H5Aget_name_by_index " "by alphabetical order in decreasing order\n", 0); PART_ERROR(H5Aget_name_by_idx_name_order_decreasing); @@ -4357,16 +4372,12 @@ test_get_attribute_name(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Aget_name_by_idx_name_order_decreasing); -#endif } PART_END(H5Aget_name_by_idx_name_order_decreasing); } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (name_buf) { HDfree(name_buf); @@ -4374,17 +4385,17 @@ test_get_attribute_name(void) } if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -4437,7 +4448,7 @@ test_get_attribute_name_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -4461,10 +4472,10 @@ test_get_attribute_name_invalid_params(void) if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NAME_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NAME_INVALID_PARAMS_TEST_ATTRIBUTE_NAME, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -4497,7 +4508,7 @@ test_get_attribute_name_invalid_params(void) } if (NULL == (name_buf = (char *)HDmalloc((size_t)name_buf_size + 1))) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -4505,7 +4516,7 @@ test_get_attribute_name_invalid_params(void) { PART_BEGIN(H5Aget_name_invalid_attr_id) { - TESTING_2("H5Aget_name with an invalid attr_id") + TESTING_2("H5Aget_name with an invalid attr_id"); H5E_BEGIN_TRY { @@ -4525,7 +4536,7 @@ test_get_attribute_name_invalid_params(void) PART_BEGIN(H5Aget_name_invalid_name_buf) { - TESTING_2("H5Aget_name with an invalid name buffer") + TESTING_2("H5Aget_name with an invalid name buffer"); H5E_BEGIN_TRY { @@ -4546,7 +4557,7 @@ test_get_attribute_name_invalid_params(void) PART_BEGIN(H5Aget_name_by_idx_invalid_loc_id) { - TESTING_2("H5Aget_name_by_idx with an invalid loc_id") + TESTING_2("H5Aget_name_by_idx with an invalid loc_id"); H5E_BEGIN_TRY { @@ -4568,7 +4579,7 @@ test_get_attribute_name_invalid_params(void) PART_BEGIN(H5Aget_name_by_idx_invalid_obj_name) { - TESTING_2("H5Aget_name_by_idx with an invalid object name") + TESTING_2("H5Aget_name_by_idx with an invalid object name"); H5E_BEGIN_TRY { @@ -4603,7 +4614,7 @@ test_get_attribute_name_invalid_params(void) PART_BEGIN(H5Aget_name_by_idx_invalid_index_type) { - TESTING_2("H5Aget_name_by_idx with an invalid index type") + TESTING_2("H5Aget_name_by_idx with an invalid index type"); H5E_BEGIN_TRY { @@ -4641,7 +4652,7 @@ test_get_attribute_name_invalid_params(void) PART_BEGIN(H5Aget_name_by_idx_invalid_iter_order) { - TESTING_2("H5Aget_name_by_idx with an invalid iteration order") + TESTING_2("H5Aget_name_by_idx with an invalid iteration order"); H5E_BEGIN_TRY { @@ -4679,7 +4690,7 @@ test_get_attribute_name_invalid_params(void) PART_BEGIN(H5Aget_name_by_idx_invalid_name_buf) { - TESTING_2("H5Aget_name_by_idx with an invalid name buffer") + TESTING_2("H5Aget_name_by_idx with an invalid name buffer"); H5E_BEGIN_TRY { @@ -4703,7 +4714,7 @@ test_get_attribute_name_invalid_params(void) PART_BEGIN(H5Aget_name_by_idx_invalid_lapl) { - TESTING_2("H5Aget_name_by_idx with an invalid LAPL") + TESTING_2("H5Aget_name_by_idx with an invalid LAPL"); H5E_BEGIN_TRY { @@ -4725,7 +4736,7 @@ test_get_attribute_name_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (name_buf) { HDfree(name_buf); @@ -4733,17 +4744,17 @@ test_get_attribute_name_invalid_params(void) } if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -4799,15 +4810,14 @@ test_get_attribute_info(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_MORE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_MORE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, attribute, or creation order aren't supported " + HDprintf(" API functions for basic file, group, or attribute aren't supported " "with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -4827,10 +4837,12 @@ test_get_attribute_info(void) goto error; } - if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set attribute creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set attribute creation order tracking\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_GET_INFO_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id, @@ -4841,10 +4853,10 @@ test_get_attribute_info(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_INFO_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; /* Create several attributes */ if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_INFO_TEST_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT, @@ -4855,7 +4867,7 @@ test_get_attribute_info(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_INFO_TEST_ATTR_NAME2, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -4865,7 +4877,7 @@ test_get_attribute_info(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_INFO_TEST_ATTR_NAME3, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -4875,7 +4887,7 @@ test_get_attribute_info(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; /* Verify the attributes have been created */ if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_GET_INFO_TEST_ATTR_NAME)) < 0) { @@ -4920,7 +4932,7 @@ test_get_attribute_info(void) { PART_BEGIN(H5Aget_info) { - TESTING_2("H5Aget_info") + TESTING_2("H5Aget_info"); if ((attr_id = H5Aopen(group_id, ATTRIBUTE_GET_INFO_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -4969,7 +4981,7 @@ test_get_attribute_info(void) PART_BEGIN(H5Aget_info_by_name) { - TESTING_2("H5Aget_info_by_name") + TESTING_2("H5Aget_info_by_name"); HDmemset(&attr_info, 0, sizeof(attr_info)); if (H5Aget_info_by_name(group_id, ".", ATTRIBUTE_GET_INFO_TEST_ATTR_NAME, &attr_info, @@ -5048,7 +5060,13 @@ test_get_attribute_info(void) PART_BEGIN(H5Aget_info_by_idx_crt_order_increasing) { - TESTING_2("H5Aget_info_by_idx by creation order in increasing order") + TESTING_2("H5Aget_info_by_idx by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aget_info_by_idx_crt_order_increasing); + } HDmemset(&attr_info, 0, sizeof(attr_info)); if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &attr_info, @@ -5131,7 +5149,13 @@ test_get_attribute_info(void) PART_BEGIN(H5Aget_info_by_idx_crt_order_decreasing) { - TESTING_2("H5Aget_info_by_idx by creation order in decreasing order") + TESTING_2("H5Aget_info_by_idx by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aget_info_by_idx_crt_order_decreasing); + } HDmemset(&attr_info, 0, sizeof(attr_info)); if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, &attr_info, @@ -5214,7 +5238,7 @@ test_get_attribute_info(void) PART_BEGIN(H5Aget_info_by_idx_name_order_increasing) { - TESTING_2("H5Aget_info_by_idx by alphabetical order in increasing order") + TESTING_2("H5Aget_info_by_idx by alphabetical order in increasing order"); HDmemset(&attr_info, 0, sizeof(attr_info)); if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &attr_info, H5P_DEFAULT) < @@ -5297,13 +5321,13 @@ test_get_attribute_info(void) PART_BEGIN(H5Aget_info_by_idx_name_order_decreasing) { - TESTING_2("H5Aget_info_by_idx by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Aget_info_by_idx by alphabetical order in decreasing order"); + HDmemset(&attr_info, 0, sizeof(attr_info)); if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &attr_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get info for attribute at index %lld using H5Aget_info_by_idx by " + HDprintf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by " "alphabetical order in decreasing order\n", 2); PART_ERROR(H5Aget_info_by_idx_name_order_decreasing); @@ -5328,7 +5352,7 @@ test_get_attribute_info(void) if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &attr_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get info for attribute at index %lld using H5Aget_info_by_idx by " + HDprintf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by " "alphabetical order in decreasing order\n", 1); PART_ERROR(H5Aget_info_by_idx_name_order_decreasing); @@ -5353,7 +5377,7 @@ test_get_attribute_info(void) if (H5Aget_info_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &attr_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get info for attribute at index %lld using H5Aget_info_by_idx by " + HDprintf(" couldn't get info for attribute at index %d using H5Aget_info_by_idx by " "alphabetical order in decreasing order\n", 0); PART_ERROR(H5Aget_info_by_idx_name_order_decreasing); @@ -5375,29 +5399,25 @@ test_get_attribute_info(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Aget_info_by_idx_name_order_decreasing); -#endif } PART_END(H5Aget_info_by_idx_name_order_decreasing); } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -5447,7 +5467,7 @@ test_get_attribute_info_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -5471,10 +5491,10 @@ test_get_attribute_info_invalid_params(void) if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_INFO_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_INFO_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -5502,7 +5522,7 @@ test_get_attribute_info_invalid_params(void) { PART_BEGIN(H5Aget_info_invalid_attr_id) { - TESTING_2("H5Aget_info with an invalid attr_id") + TESTING_2("H5Aget_info with an invalid attr_id"); H5E_BEGIN_TRY { @@ -5522,7 +5542,7 @@ test_get_attribute_info_invalid_params(void) PART_BEGIN(H5Aget_info_invalid_attr_info_pointer) { - TESTING_2("H5Aget_info with an invalid attribute info pointer") + TESTING_2("H5Aget_info with an invalid attribute info pointer"); H5E_BEGIN_TRY { @@ -5542,7 +5562,7 @@ test_get_attribute_info_invalid_params(void) PART_BEGIN(H5Aget_info_by_name_invalid_loc_id) { - TESTING_2("H5Aget_info_by_name with an invalid loc_id") + TESTING_2("H5Aget_info_by_name with an invalid loc_id"); H5E_BEGIN_TRY { @@ -5564,7 +5584,7 @@ test_get_attribute_info_invalid_params(void) PART_BEGIN(H5Aget_info_by_name_invalid_obj_name) { - TESTING_2("H5Aget_info_by_name with an invalid object name") + TESTING_2("H5Aget_info_by_name with an invalid object name"); H5E_BEGIN_TRY { @@ -5600,7 +5620,7 @@ test_get_attribute_info_invalid_params(void) PART_BEGIN(H5Aget_info_by_name_invalid_attr_name) { - TESTING_2("H5Aget_info_by_name with an invalid attribute name") + TESTING_2("H5Aget_info_by_name with an invalid attribute name"); H5E_BEGIN_TRY { @@ -5634,7 +5654,7 @@ test_get_attribute_info_invalid_params(void) PART_BEGIN(H5Aget_info_by_name_invalid_attr_info_pointer) { - TESTING_2("H5Aget_info_by_name with an invalid attribute info pointer") + TESTING_2("H5Aget_info_by_name with an invalid attribute info pointer"); H5E_BEGIN_TRY { @@ -5656,7 +5676,7 @@ test_get_attribute_info_invalid_params(void) PART_BEGIN(H5Aget_info_by_name_invalid_lapl) { - TESTING_2("H5Aget_info_by_name with an invalid LAPL") + TESTING_2("H5Aget_info_by_name with an invalid LAPL"); H5E_BEGIN_TRY { @@ -5677,7 +5697,7 @@ test_get_attribute_info_invalid_params(void) PART_BEGIN(H5Aget_info_by_idx_invalid_loc_id) { - TESTING_2("H5Aget_info_by_idx with an invalid loc_id") + TESTING_2("H5Aget_info_by_idx with an invalid loc_id"); H5E_BEGIN_TRY { @@ -5698,7 +5718,7 @@ test_get_attribute_info_invalid_params(void) PART_BEGIN(H5Aget_info_by_idx_invalid_obj_name) { - TESTING_2("H5Aget_info_by_idx with an invalid object name") + TESTING_2("H5Aget_info_by_idx with an invalid object name"); H5E_BEGIN_TRY { @@ -5733,7 +5753,7 @@ test_get_attribute_info_invalid_params(void) PART_BEGIN(H5Aget_info_by_idx_invalid_index_type) { - TESTING_2("H5Aget_info_by_idx with an invalid index type") + TESTING_2("H5Aget_info_by_idx with an invalid index type"); H5E_BEGIN_TRY { @@ -5769,7 +5789,7 @@ test_get_attribute_info_invalid_params(void) PART_BEGIN(H5Aget_info_by_idx_invalid_iter_order) { - TESTING_2("H5Aget_info_by_idx with an invalid iteration order") + TESTING_2("H5Aget_info_by_idx with an invalid iteration order"); H5E_BEGIN_TRY { @@ -5805,7 +5825,7 @@ test_get_attribute_info_invalid_params(void) PART_BEGIN(H5Aget_info_by_idx_invalid_attr_info_pointer) { - TESTING_2("H5Aget_info_by_idx with an invalid attribute info pointer") + TESTING_2("H5Aget_info_by_idx with an invalid attribute info pointer"); H5E_BEGIN_TRY { @@ -5826,7 +5846,7 @@ test_get_attribute_info_invalid_params(void) PART_BEGIN(H5Aget_info_by_idx_invalid_lapl) { - TESTING_2("H5Aget_info_by_idx with an invalid LAPL") + TESTING_2("H5Aget_info_by_idx with an invalid LAPL"); H5E_BEGIN_TRY { @@ -5847,20 +5867,20 @@ test_get_attribute_info_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -5907,7 +5927,7 @@ test_rename_attribute(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -5929,10 +5949,10 @@ test_rename_attribute(void) } if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_RENAME_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_RENAME_TEST_ATTR_NAME, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -5979,7 +5999,7 @@ test_rename_attribute(void) { PART_BEGIN(H5Arename) { - TESTING_2("H5Arename") + TESTING_2("H5Arename"); if (H5Arename(group_id, ATTRIBUTE_RENAME_TEST_ATTR_NAME, ATTRIBUTE_RENAME_TEST_NEW_NAME) < 0) { H5_FAILED(); @@ -6019,7 +6039,7 @@ test_rename_attribute(void) PART_BEGIN(H5Arename_by_name) { - TESTING_2("H5Arename_by_name") + TESTING_2("H5Arename_by_name"); if (H5Arename_by_name(container_group, ATTRIBUTE_RENAME_TEST_GROUP_NAME, ATTRIBUTE_RENAME_TEST_ATTR_NAME2, ATTRIBUTE_RENAME_TEST_NEW_NAME2, @@ -6061,22 +6081,22 @@ test_rename_attribute(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(attr_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -6125,7 +6145,7 @@ test_rename_attribute_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -6149,10 +6169,10 @@ test_rename_attribute_invalid_params(void) if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_RENAME_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_RENAME_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -6199,7 +6219,7 @@ test_rename_attribute_invalid_params(void) { PART_BEGIN(H5Arename_invalid_loc_id) { - TESTING_2("H5Arename with an invalid loc_id") + TESTING_2("H5Arename with an invalid loc_id"); H5E_BEGIN_TRY { @@ -6220,7 +6240,7 @@ test_rename_attribute_invalid_params(void) PART_BEGIN(H5Arename_invalid_old_attr_name) { - TESTING_2("H5Arename with an invalid old attribute name") + TESTING_2("H5Arename with an invalid old attribute name"); H5E_BEGIN_TRY { @@ -6252,7 +6272,7 @@ test_rename_attribute_invalid_params(void) PART_BEGIN(H5Arename_invalid_new_attr_name) { - TESTING_2("H5Arename with an invalid new attribute name") + TESTING_2("H5Arename with an invalid new attribute name"); H5E_BEGIN_TRY { @@ -6284,7 +6304,7 @@ test_rename_attribute_invalid_params(void) PART_BEGIN(H5Arename_by_name_invalid_loc_id) { - TESTING_2("H5Arename_by_name with an invalid loc_id") + TESTING_2("H5Arename_by_name with an invalid loc_id"); H5E_BEGIN_TRY { @@ -6306,7 +6326,7 @@ test_rename_attribute_invalid_params(void) PART_BEGIN(H5Arename_by_name_invalid_obj_name) { - TESTING_2("H5Arename_by_name with an invalid object name") + TESTING_2("H5Arename_by_name with an invalid object name"); H5E_BEGIN_TRY { @@ -6341,7 +6361,7 @@ test_rename_attribute_invalid_params(void) PART_BEGIN(H5Arename_by_name_invalid_old_attr_name) { - TESTING_2("H5Arename_by_name with an invalid old attribute name") + TESTING_2("H5Arename_by_name with an invalid old attribute name"); H5E_BEGIN_TRY { @@ -6376,7 +6396,7 @@ test_rename_attribute_invalid_params(void) PART_BEGIN(H5Arename_by_name_invalid_new_attr_name) { - TESTING_2("H5Arename_by_name with an invalid new attribute name") + TESTING_2("H5Arename_by_name with an invalid new attribute name"); H5E_BEGIN_TRY { @@ -6411,7 +6431,7 @@ test_rename_attribute_invalid_params(void) PART_BEGIN(H5Arename_by_name_invalid_lapl) { - TESTING_2("H5Arename_by_name with an invalid LAPL") + TESTING_2("H5Arename_by_name with an invalid LAPL"); H5E_BEGIN_TRY { @@ -6432,22 +6452,22 @@ test_rename_attribute_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(attr_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -6493,15 +6513,14 @@ test_attribute_iterate_group(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, attribute, iterate, or creation order aren't " + HDprintf(" API functions for basic file, group, attribute, or iterate aren't " "supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -6521,10 +6540,12 @@ test_attribute_iterate_group(void) goto error; } - if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set attribute creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set attribute creation order tracking\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_ITERATE_TEST_GRP_SUBGROUP_NAME, H5P_DEFAULT, @@ -6535,10 +6556,10 @@ test_attribute_iterate_group(void) } if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; /* Create some attributes with a reverse-ordering naming scheme to test creation order */ for (i = 0; i < ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; i++) { @@ -6588,7 +6609,7 @@ test_attribute_iterate_group(void) PART_BEGIN(H5Aiterate2_name_increasing) { - TESTING_2("H5Aiterate by attribute name in increasing order") + TESTING_2("H5Aiterate by attribute name in increasing order"); link_counter = 0; @@ -6614,8 +6635,7 @@ test_attribute_iterate_group(void) PART_BEGIN(H5Aiterate2_name_decreasing) { - TESTING_2("H5Aiterate by attribute name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Aiterate by attribute name in decreasing order"); /* Reset the counter to the appropriate value for the next test */ link_counter = ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -6635,16 +6655,18 @@ test_attribute_iterate_group(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Aiterate2_name_decreasing); -#endif } PART_END(H5Aiterate2_name_decreasing); PART_BEGIN(H5Aiterate2_creation_increasing) { - TESTING_2("H5Aiterate by creation order in increasing order") + TESTING_2("H5Aiterate by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aiterate2_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ link_counter = 2 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -6670,7 +6692,13 @@ test_attribute_iterate_group(void) PART_BEGIN(H5Aiterate2_creation_decreasing) { - TESTING_2("H5Aiterate by creation order in decreasing order") + TESTING_2("H5Aiterate by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aiterate2_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ link_counter = 3 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -6696,7 +6724,7 @@ test_attribute_iterate_group(void) PART_BEGIN(H5Aiterate_by_name_name_increasing) { - TESTING_2("H5Aiterate_by_name by attribute name in increasing order") + TESTING_2("H5Aiterate_by_name by attribute name in increasing order"); /* Reset the counter to the appropriate value for the next test */ link_counter = 0; @@ -6723,8 +6751,8 @@ test_attribute_iterate_group(void) PART_BEGIN(H5Aiterate_by_name_name_decreasing) { - TESTING_2("H5Aiterate_by_name by attribute name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Aiterate_by_name by attribute name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ link_counter = ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -6745,16 +6773,18 @@ test_attribute_iterate_group(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Aiterate_by_name_name_decreasing); -#endif } PART_END(H5Aiterate_by_name_name_decreasing); PART_BEGIN(H5Aiterate_by_name_creation_increasing) { - TESTING_2("H5Aiterate_by_name by creation order in increasing order") + TESTING_2("H5Aiterate_by_name by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aiterate_by_name_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ link_counter = 2 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -6782,7 +6812,13 @@ test_attribute_iterate_group(void) PART_BEGIN(H5Aiterate_by_name_creation_decreasing) { - TESTING_2("H5Aiterate_by_name by creation order in decreasing order") + TESTING_2("H5Aiterate_by_name by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aiterate_by_name_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ link_counter = 3 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -6810,20 +6846,20 @@ test_attribute_iterate_group(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(attr_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -6873,15 +6909,14 @@ test_attribute_iterate_dataset(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { SKIPPED(); - HDprintf(" API functions for basic file, group, dataset, attribute, iterate, or creation order " + HDprintf(" API functions for basic file, group, dataset, attribute, or iterate " "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -6908,23 +6943,25 @@ test_attribute_iterate_dataset(void) goto error; } - if (H5Pset_attr_creation_order(dcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set attribute creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_attr_creation_order(dcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set attribute creation order tracking\n"); + goto error; + } } if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_space_id = generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_ITERATE_TEST_DSET_NAME, dset_dtype, dset_space_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) { @@ -6981,7 +7018,7 @@ test_attribute_iterate_dataset(void) PART_BEGIN(H5Aiterate2_name_increasing) { - TESTING_2("H5Aiterate by attribute name in increasing order") + TESTING_2("H5Aiterate by attribute name in increasing order"); link_counter = 0; @@ -7007,8 +7044,7 @@ test_attribute_iterate_dataset(void) PART_BEGIN(H5Aiterate2_name_decreasing) { - TESTING_2("H5Aiterate by attribute name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Aiterate by attribute name in decreasing order"); /* Reset the counter to the appropriate value for the next test */ link_counter = ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -7028,16 +7064,18 @@ test_attribute_iterate_dataset(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Aiterate2_name_decreasing); -#endif } PART_END(H5Aiterate2_name_decreasing); PART_BEGIN(H5Aiterate2_creation_increasing) { - TESTING_2("H5Aiterate by creation order in increasing order") + TESTING_2("H5Aiterate by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aiterate2_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ link_counter = 2 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -7063,7 +7101,13 @@ test_attribute_iterate_dataset(void) PART_BEGIN(H5Aiterate2_creation_decreasing) { - TESTING_2("H5Aiterate by creation order in decreasing order") + TESTING_2("H5Aiterate by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aiterate2_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ link_counter = 3 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -7089,7 +7133,7 @@ test_attribute_iterate_dataset(void) PART_BEGIN(H5Aiterate_by_name_name_increasing) { - TESTING_2("H5Aiterate_by_name by attribute name in increasing order") + TESTING_2("H5Aiterate_by_name by attribute name in increasing order"); /* Reset the counter to the appropriate value for the next test */ link_counter = 0; @@ -7118,8 +7162,8 @@ test_attribute_iterate_dataset(void) PART_BEGIN(H5Aiterate_by_name_name_decreasing) { - TESTING_2("H5Aiterate_by_name by attribute name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Aiterate_by_name by attribute name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ link_counter = ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -7142,16 +7186,18 @@ test_attribute_iterate_dataset(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Aiterate_by_name_name_decreasing); -#endif } PART_END(H5Aiterate_by_name_name_decreasing); PART_BEGIN(H5Aiterate_by_name_creation_increasing) { - TESTING_2("H5Aiterate_by_name by creation order in increasing order") + TESTING_2("H5Aiterate_by_name by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aiterate_by_name_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ link_counter = 2 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -7180,7 +7226,13 @@ test_attribute_iterate_dataset(void) PART_BEGIN(H5Aiterate_by_name_creation_decreasing) { - TESTING_2("H5Aiterate_by_name by creation order in decreasing order") + TESTING_2("H5Aiterate_by_name by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aiterate_by_name_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ link_counter = 3 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -7209,26 +7261,26 @@ test_attribute_iterate_dataset(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(attr_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(dset_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -7279,15 +7331,14 @@ test_attribute_iterate_datatype(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) { SKIPPED(); - HDprintf(" API functions for basic file, group, stored datatype, attribute, iterate, or creation " - "order aren't supported with this connector\n"); + HDprintf(" API functions for basic file, group, stored datatype, attribute, or iterate " + "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -7314,20 +7365,22 @@ test_attribute_iterate_datatype(void) goto error; } - if (H5Pset_attr_creation_order(tcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set attribute creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_attr_creation_order(tcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set attribute creation order tracking\n"); + goto error; + } } if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tcommit2(group_id, ATTRIBUTE_ITERATE_TEST_DTYPE_NAME, type_id, H5P_DEFAULT, tcpl_id, H5P_DEFAULT) < 0) { @@ -7384,7 +7437,7 @@ test_attribute_iterate_datatype(void) PART_BEGIN(H5Aiterate2_name_increasing) { - TESTING_2("H5Aiterate by attribute name in increasing order") + TESTING_2("H5Aiterate by attribute name in increasing order"); link_counter = 0; @@ -7410,8 +7463,7 @@ test_attribute_iterate_datatype(void) PART_BEGIN(H5Aiterate2_name_decreasing) { - TESTING_2("H5Aiterate by attribute name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Aiterate by attribute name in decreasing order"); /* Reset the counter to the appropriate value for the next test */ link_counter = ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -7431,16 +7483,18 @@ test_attribute_iterate_datatype(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Aiterate2_name_decreasing); -#endif } PART_END(H5Aiterate2_name_decreasing); PART_BEGIN(H5Aiterate2_creation_increasing) { - TESTING_2("H5Aiterate by creation order in increasing order") + TESTING_2("H5Aiterate by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aiterate2_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ link_counter = 2 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -7466,7 +7520,13 @@ test_attribute_iterate_datatype(void) PART_BEGIN(H5Aiterate2_creation_decreasing) { - TESTING_2("H5Aiterate by creation order in decreasing order") + TESTING_2("H5Aiterate by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aiterate2_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ link_counter = 3 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -7492,7 +7552,7 @@ test_attribute_iterate_datatype(void) PART_BEGIN(H5Aiterate_by_name_name_increasing) { - TESTING_2("H5Aiterate_by_name by attribute name in increasing order") + TESTING_2("H5Aiterate_by_name by attribute name in increasing order"); /* Reset the counter to the appropriate value for the next test */ link_counter = 0; @@ -7521,8 +7581,8 @@ test_attribute_iterate_datatype(void) PART_BEGIN(H5Aiterate_by_name_name_decreasing) { - TESTING_2("H5Aiterate_by_name by attribute name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Aiterate_by_name by attribute name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ link_counter = ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -7545,16 +7605,18 @@ test_attribute_iterate_datatype(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Aiterate_by_name_name_decreasing); -#endif } PART_END(H5Aiterate_by_name_name_decreasing); PART_BEGIN(H5Aiterate_by_name_creation_increasing) { - TESTING_2("H5Aiterate_by_name by creation order in increasing order") + TESTING_2("H5Aiterate_by_name by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aiterate_by_name_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ link_counter = 2 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -7584,7 +7646,13 @@ test_attribute_iterate_datatype(void) PART_BEGIN(H5Aiterate_by_name_creation_decreasing) { - TESTING_2("H5Aiterate_by_name by creation order in decreasing order") + TESTING_2("H5Aiterate_by_name by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Aiterate_by_name_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ link_counter = 3 * ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; @@ -7614,22 +7682,22 @@ test_attribute_iterate_datatype(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(tcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(attr_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -7662,7 +7730,7 @@ test_attribute_iterate_datatype(void) static int test_attribute_iterate_index_saving(void) { - TESTING("attribute iteration index saving capability") + TESTING("attribute iteration index saving capability"); SKIPPED(); @@ -7697,7 +7765,7 @@ test_attribute_iterate_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -7719,11 +7787,11 @@ test_attribute_iterate_invalid_params(void) } if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -7808,7 +7876,7 @@ test_attribute_iterate_invalid_params(void) { PART_BEGIN(H5Aiterate_invalid_loc_id) { - TESTING_2("H5Aiterate with an invalid loc_id") + TESTING_2("H5Aiterate with an invalid loc_id"); H5E_BEGIN_TRY { @@ -7829,7 +7897,7 @@ test_attribute_iterate_invalid_params(void) PART_BEGIN(H5Aiterate_invalid_index_type) { - TESTING_2("H5Aiterate with an invalid index type") + TESTING_2("H5Aiterate with an invalid index type"); H5E_BEGIN_TRY { @@ -7864,7 +7932,7 @@ test_attribute_iterate_invalid_params(void) PART_BEGIN(H5Aiterate_invalid_index_order) { - TESTING_2("H5Aiterate with an invalid index ordering") + TESTING_2("H5Aiterate with an invalid index ordering"); H5E_BEGIN_TRY { @@ -7899,7 +7967,7 @@ test_attribute_iterate_invalid_params(void) PART_BEGIN(H5Aiterate_by_name_invalid_loc_id) { - TESTING_2("H5Aiterate_by_name with an invalid loc_id") + TESTING_2("H5Aiterate_by_name with an invalid loc_id"); H5E_BEGIN_TRY { @@ -7920,7 +7988,7 @@ test_attribute_iterate_invalid_params(void) PART_BEGIN(H5Aiterate_by_name_invalid_obj_name) { - TESTING_2("H5Aiterate_by_name with an invalid object name") + TESTING_2("H5Aiterate_by_name with an invalid object name"); H5E_BEGIN_TRY { @@ -7955,7 +8023,7 @@ test_attribute_iterate_invalid_params(void) PART_BEGIN(H5Aiterate_by_name_invalid_index_type) { - TESTING_2("H5Aiterate_by_name with an invalid index type") + TESTING_2("H5Aiterate_by_name with an invalid index type"); H5E_BEGIN_TRY { @@ -7991,7 +8059,7 @@ test_attribute_iterate_invalid_params(void) PART_BEGIN(H5Aiterate_by_name_invalid_index_order) { - TESTING_2("H5Aiterate_by_name with an invalid index ordering") + TESTING_2("H5Aiterate_by_name with an invalid index ordering"); H5E_BEGIN_TRY { @@ -8027,7 +8095,7 @@ test_attribute_iterate_invalid_params(void) PART_BEGIN(H5Aiterate_by_name_invalid_lapl) { - TESTING_2("H5Aiterate_by_name with an invalid LAPL") + TESTING_2("H5Aiterate_by_name with an invalid LAPL"); H5E_BEGIN_TRY { @@ -8048,26 +8116,26 @@ test_attribute_iterate_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(attr_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id4) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -8105,19 +8173,19 @@ test_attribute_iterate_0_attributes(void) hid_t dset_dtype = H5I_INVALID_HID; hid_t dset_space_id = H5I_INVALID_HID; - TESTING_MULTIPART("attribute iteration on object with 0 attributes") + TESTING_MULTIPART("attribute iteration on object with 0 attributes"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { SKIPPED(); - HDprintf(" API functions for basic file, group, dataset, attribute, or iterate aren't supported " - "with this connector\n"); + HDprintf(" API functions for basic file, group, dataset, attribute, or iterate " + "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -8139,11 +8207,11 @@ test_attribute_iterate_0_attributes(void) } if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_space_id = generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_DSET_NAME, dset_dtype, dset_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -8158,7 +8226,7 @@ test_attribute_iterate_0_attributes(void) { PART_BEGIN(H5Aiterate_0_attributes_native) { - TESTING_2("H5Aiterate (native order)") + TESTING_2("H5Aiterate (native order)"); if (H5Aiterate2(dset_id, H5_INDEX_NAME, H5_ITER_NATIVE, NULL, attr_iter_callback2, NULL) < 0) { H5_FAILED(); @@ -8172,7 +8240,7 @@ test_attribute_iterate_0_attributes(void) PART_BEGIN(H5Aiterate_0_attributes_inc) { - TESTING_2("H5Aiterate (increasing order)") + TESTING_2("H5Aiterate (increasing order)"); if (H5Aiterate2(dset_id, H5_INDEX_NAME, H5_ITER_INC, NULL, attr_iter_callback2, NULL) < 0) { H5_FAILED(); @@ -8186,8 +8254,8 @@ test_attribute_iterate_0_attributes(void) PART_BEGIN(H5Aiterate_0_attributes_dec) { - TESTING_2("H5Aiterate (decreasing order)") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Aiterate (decreasing order)"); + if (H5Aiterate2(dset_id, H5_INDEX_NAME, H5_ITER_DEC, NULL, attr_iter_callback2, NULL) < 0) { H5_FAILED(); HDprintf(" H5Aiterate2 on object with 0 attributes failed\n"); @@ -8195,16 +8263,12 @@ test_attribute_iterate_0_attributes(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Aiterate_0_attributes_dec); -#endif } PART_END(H5Aiterate_0_attributes_dec); PART_BEGIN(H5Aiterate_by_name_0_attributes_native) { - TESTING_2("H5Aiterate_by_name (native order)") + TESTING_2("H5Aiterate_by_name (native order)"); if (H5Aiterate_by_name(group_id, ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_DSET_NAME, H5_INDEX_NAME, H5_ITER_NATIVE, NULL, attr_iter_callback2, NULL, H5P_DEFAULT) < 0) { @@ -8219,7 +8283,7 @@ test_attribute_iterate_0_attributes(void) PART_BEGIN(H5Aiterate_by_name_0_attributes_inc) { - TESTING_2("H5Aiterate_by_name (increasing order)") + TESTING_2("H5Aiterate_by_name (increasing order)"); if (H5Aiterate_by_name(group_id, ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_DSET_NAME, H5_INDEX_NAME, H5_ITER_INC, NULL, attr_iter_callback2, NULL, H5P_DEFAULT) < 0) { @@ -8234,8 +8298,7 @@ test_attribute_iterate_0_attributes(void) PART_BEGIN(H5Aiterate_by_name_0_attributes_dec) { - TESTING_2("H5Aiterate_by_name (decreasing order)") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Aiterate_by_name (decreasing order)"); if (H5Aiterate_by_name(group_id, ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_DSET_NAME, H5_INDEX_NAME, H5_ITER_DEC, NULL, attr_iter_callback2, NULL, H5P_DEFAULT) < 0) { H5_FAILED(); @@ -8244,29 +8307,25 @@ test_attribute_iterate_0_attributes(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Aiterate_by_name_0_attributes_dec); -#endif } PART_END(H5Aiterate_by_name_0_attributes_dec); } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(dset_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -8307,14 +8366,14 @@ test_delete_attribute(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { SKIPPED(); - HDprintf(" API functions for basic file, group, attribute, or creation order aren't supported " + HDprintf(" API functions for basic file, group, or attribute aren't supported " "with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -8334,10 +8393,12 @@ test_delete_attribute(void) goto error; } - if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set attribute creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set attribute creation order tracking\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, ATTRIBUTE_DELETION_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id, @@ -8348,10 +8409,10 @@ test_delete_attribute(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_DELETION_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -8359,7 +8420,7 @@ test_delete_attribute(void) { PART_BEGIN(H5Adelete) { - TESTING_2("H5Adelete") + TESTING_2("H5Adelete"); /* Test H5Adelete */ if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME, attr_dtype, space_id, @@ -8424,7 +8485,7 @@ test_delete_attribute(void) PART_BEGIN(H5Adelete_by_name) { - TESTING_2("H5Adelete_by_name") + TESTING_2("H5Adelete_by_name"); /* Test H5Adelete_by_name */ if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME, attr_dtype, space_id, @@ -8490,7 +8551,13 @@ test_delete_attribute(void) PART_BEGIN(H5Adelete_by_idx_crt_order_increasing) { - TESTING_2("H5Adelete_by_idx by creation order in increasing order") + TESTING_2("H5Adelete_by_idx by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Adelete_by_idx_crt_order_increasing); + } /* Create several attributes */ if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME, attr_dtype, space_id, @@ -8735,7 +8802,13 @@ test_delete_attribute(void) PART_BEGIN(H5Adelete_by_idx_crt_order_decreasing) { - TESTING_2("H5Adelete_by_idx by creation order in decreasing order") + TESTING_2("H5Adelete_by_idx by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Adelete_by_idx_crt_order_decreasing); + } /* Create several attributes */ if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME, attr_dtype, space_id, @@ -8980,7 +9053,7 @@ test_delete_attribute(void) PART_BEGIN(H5Adelete_by_idx_name_order_increasing) { - TESTING_2("H5Adelete_by_idx by alphabetical order in increasing order") + TESTING_2("H5Adelete_by_idx by alphabetical order in increasing order"); /* Create several attributes */ if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME, attr_dtype, space_id, @@ -9225,8 +9298,8 @@ test_delete_attribute(void) PART_BEGIN(H5Adelete_by_idx_name_order_decreasing) { - TESTING_2("H5Adelete_by_idx by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Adelete_by_idx by alphabetical order in decreasing order"); + /* Create several attributes */ if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_TEST_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -9458,10 +9531,6 @@ test_delete_attribute(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Adelete_by_idx_name_order_decreasing); -#endif } PART_END(H5Adelete_by_idx_name_order_decreasing); @@ -9474,20 +9543,20 @@ test_delete_attribute(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -9537,7 +9606,7 @@ test_delete_attribute_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -9561,10 +9630,10 @@ test_delete_attribute_invalid_params(void) if ((space_id = generate_random_dataspace(ATTRIBUTE_DELETION_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -9592,7 +9661,7 @@ test_delete_attribute_invalid_params(void) { PART_BEGIN(H5Adelete_invalid_loc_id) { - TESTING_2("H5Adelete with an invalid loc_id") + TESTING_2("H5Adelete with an invalid loc_id"); H5E_BEGIN_TRY { @@ -9612,7 +9681,7 @@ test_delete_attribute_invalid_params(void) PART_BEGIN(H5Adelete_invalid_attr_name) { - TESTING_2("H5Adelete with an invalid attribute name") + TESTING_2("H5Adelete with an invalid attribute name"); H5E_BEGIN_TRY { @@ -9644,7 +9713,7 @@ test_delete_attribute_invalid_params(void) PART_BEGIN(H5Adelete_by_name_invalid_loc_id) { - TESTING_2("H5Adelete_by_name with an invalid loc_id") + TESTING_2("H5Adelete_by_name with an invalid loc_id"); H5E_BEGIN_TRY { @@ -9665,7 +9734,7 @@ test_delete_attribute_invalid_params(void) PART_BEGIN(H5Adelete_by_name_invalid_obj_name) { - TESTING_2("H5Adelete_by_name with an invalid object name") + TESTING_2("H5Adelete_by_name with an invalid object name"); H5E_BEGIN_TRY { @@ -9700,7 +9769,7 @@ test_delete_attribute_invalid_params(void) PART_BEGIN(H5Adelete_by_name_invalid_attr_name) { - TESTING_2("H5Adelete_by_name with an invalid attribute name") + TESTING_2("H5Adelete_by_name with an invalid attribute name"); H5E_BEGIN_TRY { @@ -9733,7 +9802,7 @@ test_delete_attribute_invalid_params(void) PART_BEGIN(H5Adelete_by_name_invalid_lapl) { - TESTING_2("H5Adelete_by_name with an invalid LAPL") + TESTING_2("H5Adelete_by_name with an invalid LAPL"); H5E_BEGIN_TRY { @@ -9754,7 +9823,7 @@ test_delete_attribute_invalid_params(void) PART_BEGIN(H5Adelete_by_idx_invalid_loc_id) { - TESTING_2("H5Adelete_by_idx with an invalid loc_id") + TESTING_2("H5Adelete_by_idx with an invalid loc_id"); H5E_BEGIN_TRY { @@ -9774,7 +9843,7 @@ test_delete_attribute_invalid_params(void) PART_BEGIN(H5Adelete_by_idx_invalid_obj_name) { - TESTING_2("H5Adelete_by_idx with an invalid object name") + TESTING_2("H5Adelete_by_idx with an invalid object name"); H5E_BEGIN_TRY { @@ -9807,7 +9876,7 @@ test_delete_attribute_invalid_params(void) PART_BEGIN(H5Adelete_by_idx_invalid_index_type) { - TESTING_2("H5Adelete_by_idx with an invalid index type") + TESTING_2("H5Adelete_by_idx with an invalid index type"); H5E_BEGIN_TRY { @@ -9841,7 +9910,7 @@ test_delete_attribute_invalid_params(void) PART_BEGIN(H5Adelete_by_idx_invalid_index_order) { - TESTING_2("H5Adelete_by_idx with an invalid index ordering") + TESTING_2("H5Adelete_by_idx with an invalid index ordering"); H5E_BEGIN_TRY { @@ -9875,7 +9944,7 @@ test_delete_attribute_invalid_params(void) PART_BEGIN(H5Adelete_by_idx_invalid_lapl) { - TESTING_2("H5Adelete_by_idx with an invalid LAPL") + TESTING_2("H5Adelete_by_idx with an invalid LAPL"); H5E_BEGIN_TRY { @@ -9895,20 +9964,20 @@ test_delete_attribute_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -9943,7 +10012,7 @@ test_attribute_exists(void) hid_t attr_dtype = H5I_INVALID_HID; hid_t space_id = H5I_INVALID_HID; - TESTING_MULTIPART("attribute existence") + TESTING_MULTIPART("attribute existence"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -9954,7 +10023,7 @@ test_attribute_exists(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -9976,10 +10045,10 @@ test_attribute_exists(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_EXISTS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_EXISTS_TEST_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -9994,7 +10063,7 @@ test_attribute_exists(void) { PART_BEGIN(H5Aexists) { - TESTING_2("H5Aexists") + TESTING_2("H5Aexists"); if ((attr_exists = H5Aexists(group_id, ATTRIBUTE_EXISTS_TEST_ATTR_NAME)) < 0) { H5_FAILED(); @@ -10014,7 +10083,7 @@ test_attribute_exists(void) PART_BEGIN(H5Aexists_by_name) { - TESTING_2("H5Aexists_by_name") + TESTING_2("H5Aexists_by_name"); if ((attr_exists = H5Aexists_by_name(container_group, ATTRIBUTE_EXISTS_TEST_GROUP_NAME, ATTRIBUTE_EXISTS_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) { @@ -10035,20 +10104,20 @@ test_attribute_exists(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -10096,7 +10165,7 @@ test_attribute_exists_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -10120,10 +10189,10 @@ test_attribute_exists_invalid_params(void) if ((space_id = generate_random_dataspace(ATTRIBUTE_EXISTS_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_EXISTS_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -10151,7 +10220,7 @@ test_attribute_exists_invalid_params(void) { PART_BEGIN(H5Aexists_invalid_loc_id) { - TESTING_2("H5Aexists with an invalid loc_id") + TESTING_2("H5Aexists with an invalid loc_id"); H5E_BEGIN_TRY { @@ -10171,7 +10240,7 @@ test_attribute_exists_invalid_params(void) PART_BEGIN(H5Aexists_invalid_attr_name) { - TESTING_2("H5Aexists with invalid attribute name") + TESTING_2("H5Aexists with invalid attribute name"); H5E_BEGIN_TRY { @@ -10203,7 +10272,7 @@ test_attribute_exists_invalid_params(void) PART_BEGIN(H5Aexists_by_name_invalid_loc_id) { - TESTING_2("H5Aexists_by_name with an invalid loc_id") + TESTING_2("H5Aexists_by_name with an invalid loc_id"); H5E_BEGIN_TRY { @@ -10224,7 +10293,7 @@ test_attribute_exists_invalid_params(void) PART_BEGIN(H5Aexists_by_name_invalid_obj_name) { - TESTING_2("H5Aexists_by_name with invalid object name") + TESTING_2("H5Aexists_by_name with invalid object name"); H5E_BEGIN_TRY { @@ -10258,7 +10327,7 @@ test_attribute_exists_invalid_params(void) PART_BEGIN(H5Aexists_by_name_invalid_attr_name) { - TESTING_2("H5Aexists_by_name with invalid attribute name") + TESTING_2("H5Aexists_by_name with invalid attribute name"); H5E_BEGIN_TRY { @@ -10292,7 +10361,7 @@ test_attribute_exists_invalid_params(void) PART_BEGIN(H5Aexists_by_name_invalid_lapl) { - TESTING_2("H5Aexists_by_name with an invalid link access property list") + TESTING_2("H5Aexists_by_name with an invalid link access property list"); H5E_BEGIN_TRY { @@ -10313,20 +10382,20 @@ test_attribute_exists_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -10364,7 +10433,7 @@ test_attribute_many(void) hid_t space_id = H5I_INVALID_HID; char attrname[ATTRIBUTE_MANY_NAME_BUF_SIZE]; /* Name of attribute */ - TESTING("creating many attributes") + TESTING("creating many attributes"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -10395,10 +10464,10 @@ test_attribute_many(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_MANY_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; /* Create many attributes */ for (u = 0; u < ATTRIBUTE_MANY_NUMB; u++) { @@ -10424,19 +10493,19 @@ test_attribute_many(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; } if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -10472,7 +10541,7 @@ test_attribute_duplicate_id(void) hid_t attr_dtype = H5I_INVALID_HID; hid_t space_id = H5I_INVALID_HID; - TESTING("duplicated IDs for an attribute") + TESTING("duplicated IDs for an attribute"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -10503,10 +10572,10 @@ test_attribute_duplicate_id(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_DUPLICATE_ID_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DUPLICATE_ID_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -10536,19 +10605,19 @@ test_attribute_duplicate_id(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -10588,7 +10657,7 @@ test_get_number_attributes(void) hid_t attr_dtype = H5I_INVALID_HID; hid_t space_id = H5I_INVALID_HID; - TESTING_MULTIPART("retrieval of the number of attributes on an object") + TESTING_MULTIPART("retrieval of the number of attributes on an object"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -10599,7 +10668,7 @@ test_get_number_attributes(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -10621,10 +10690,10 @@ test_get_number_attributes(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NUM_ATTRS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NUM_ATTRS_TEST_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -10652,7 +10721,7 @@ test_get_number_attributes(void) { PART_BEGIN(H5Oget_info) { - TESTING_2("H5Oget_info") + TESTING_2("H5Oget_info"); /* Now get the number of attributes from the group */ if (H5Oget_info3(group_id, &obj_info, H5O_INFO_ALL) < 0) { @@ -10673,7 +10742,7 @@ test_get_number_attributes(void) PART_BEGIN(H5Oget_info_by_name) { - TESTING_2("H5Oget_info_by_name") + TESTING_2("H5Oget_info_by_name"); if (H5Oget_info_by_name3(container_group, ATTRIBUTE_GET_NUM_ATTRS_TEST_GRP_NAME, &obj_info, H5O_INFO_ALL, H5P_DEFAULT) < 0) { @@ -10694,7 +10763,7 @@ test_get_number_attributes(void) PART_BEGIN(H5Oget_info_by_idx) { - TESTING_2("H5Oget_info_by_idx") + TESTING_2("H5Oget_info_by_idx"); if (H5Oget_info_by_idx3(container_group, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &obj_info, H5O_INFO_ALL, H5P_DEFAULT) < 0) { @@ -10715,20 +10784,20 @@ test_get_number_attributes(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -10758,7 +10827,6 @@ test_get_number_attributes(void) static int test_attr_shared_dtype(void) { -#ifndef NO_SHARED_DATATYPES H5O_info2_t obj_info; htri_t attr_exists; hid_t file_id = H5I_INVALID_HID; @@ -10768,11 +10836,9 @@ test_attr_shared_dtype(void) hid_t attr_dtype = H5I_INVALID_HID; hid_t space_id = H5I_INVALID_HID; hid_t dset_id = H5I_INVALID_HID; -#endif - TESTING("shared datatype for attributes") + TESTING("shared datatype for attributes"); -#ifndef NO_SHARED_DATATYPES /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || @@ -10804,10 +10870,10 @@ test_attr_shared_dtype(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_SHARED_DTYPE_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; /* Commit datatype to file */ if (H5Tcommit2(group_id, ATTRIBUTE_SHARED_DTYPE_NAME, attr_dtype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < @@ -10884,15 +10950,15 @@ test_attr_shared_dtype(void) } if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -10910,10 +10976,6 @@ test_attr_shared_dtype(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } static herr_t diff --git a/vol_dataset_test.c b/vol_dataset_test.c index 1777f2d..9496969 100644 --- a/vol_dataset_test.c +++ b/vol_dataset_test.c @@ -50,20 +50,10 @@ static int test_read_dataset_small_all(void); static int test_read_dataset_small_hyperslab(void); static int test_read_dataset_small_point_selection(void); static int test_dataset_io_point_selections(void); -#ifndef NO_LARGE_TESTS -static int test_read_dataset_large_all(void); -static int test_read_dataset_large_hyperslab(void); -static int test_read_dataset_large_point_selection(void); -#endif static int test_read_dataset_invalid_params(void); static int test_write_dataset_small_all(void); static int test_write_dataset_small_hyperslab(void); static int test_write_dataset_small_point_selection(void); -#ifndef NO_LARGE_TESTS -static int test_write_dataset_large_all(void); -static int test_write_dataset_large_hyperslab(void); -static int test_write_dataset_large_point_selection(void); -#endif static int test_write_dataset_data_verification(void); static int test_write_dataset_invalid_params(void); static int test_dataset_builtin_type_conversion(void); @@ -132,20 +122,10 @@ static int (*dataset_tests[])(void) = { test_read_dataset_small_hyperslab, test_read_dataset_small_point_selection, test_dataset_io_point_selections, -#ifndef NO_LARGE_TESTS - test_read_dataset_large_all, - test_read_dataset_large_hyperslab, - test_read_dataset_large_point_selection, -#endif test_read_dataset_invalid_params, test_write_dataset_small_all, test_write_dataset_small_hyperslab, test_write_dataset_small_point_selection, -#ifndef NO_LARGE_TESTS - test_write_dataset_large_all, - test_write_dataset_large_hyperslab, - test_write_dataset_large_point_selection, -#endif test_write_dataset_data_verification, test_write_dataset_invalid_params, test_dataset_builtin_type_conversion, @@ -184,7 +164,7 @@ test_create_dataset_under_root(void) hid_t dset_dtype = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID; - TESTING("dataset creation under root group") + TESTING("dataset creation under root group"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { @@ -200,10 +180,10 @@ test_create_dataset_under_root(void) } if ((fspace_id = generate_random_dataspace(DATASET_CREATE_UNDER_ROOT_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the Dataset under the root group of the file */ if ((dset_id = H5Dcreate2(file_id, DATASET_CREATE_UNDER_ROOT_DSET_NAME, dset_dtype, fspace_id, @@ -214,13 +194,13 @@ test_create_dataset_under_root(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -252,7 +232,7 @@ test_create_dataset_under_existing_group(void) hid_t dset_dtype = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID; - TESTING("dataset creation under an existing group") + TESTING("dataset creation under an existing group"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -284,10 +264,10 @@ test_create_dataset_under_existing_group(void) if ((fspace_id = generate_random_dataspace(DATASET_CREATE_UNDER_EXISTING_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_UNDER_EXISTING_DSET_NAME, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -297,17 +277,17 @@ test_create_dataset_under_existing_group(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -352,7 +332,7 @@ test_create_dataset_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -375,10 +355,10 @@ test_create_dataset_invalid_params(void) if ((fspace_id = generate_random_dataspace(DATASET_CREATE_INVALID_PARAMS_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -386,7 +366,7 @@ test_create_dataset_invalid_params(void) { PART_BEGIN(H5Dcreate_invalid_loc_id) { - TESTING_2("H5Dcreate with an invalid loc_id") + TESTING_2("H5Dcreate with an invalid loc_id"); H5E_BEGIN_TRY { @@ -408,7 +388,7 @@ test_create_dataset_invalid_params(void) PART_BEGIN(H5Dcreate_invalid_dataset_name) { - TESTING_2("H5Dcreate with an invalid dataset name") + TESTING_2("H5Dcreate with an invalid dataset name"); H5E_BEGIN_TRY { @@ -444,7 +424,7 @@ test_create_dataset_invalid_params(void) PART_BEGIN(H5Dcreate_invalid_datatype) { - TESTING_2("H5Dcreate with an invalid datatype") + TESTING_2("H5Dcreate with an invalid datatype"); H5E_BEGIN_TRY { @@ -466,7 +446,7 @@ test_create_dataset_invalid_params(void) PART_BEGIN(H5Dcreate_invalid_dataspace) { - TESTING_2("H5Dcreate with an invalid dataspace") + TESTING_2("H5Dcreate with an invalid dataspace"); H5E_BEGIN_TRY { @@ -488,7 +468,7 @@ test_create_dataset_invalid_params(void) PART_BEGIN(H5Dcreate_invalid_lcpl) { - TESTING_2("H5Dcreate with an invalid LCPL") + TESTING_2("H5Dcreate with an invalid LCPL"); H5E_BEGIN_TRY { @@ -510,7 +490,7 @@ test_create_dataset_invalid_params(void) PART_BEGIN(H5Dcreate_invalid_dcpl) { - TESTING_2("H5Dcreate with an invalid DCPL") + TESTING_2("H5Dcreate with an invalid DCPL"); H5E_BEGIN_TRY { @@ -532,7 +512,7 @@ test_create_dataset_invalid_params(void) PART_BEGIN(H5Dcreate_invalid_dapl) { - TESTING_2("H5Dcreate with an invalid DAPL") + TESTING_2("H5Dcreate with an invalid DAPL"); H5E_BEGIN_TRY { @@ -554,18 +534,18 @@ test_create_dataset_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -598,7 +578,7 @@ test_create_anonymous_dataset(void) hid_t dset_dtype = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID; - TESTING("anonymous dataset creation") + TESTING("anonymous dataset creation"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -629,10 +609,10 @@ test_create_anonymous_dataset(void) } if ((fspace_id = generate_random_dataspace(DATASET_CREATE_ANONYMOUS_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate_anon(group_id, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -641,17 +621,17 @@ test_create_anonymous_dataset(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -697,7 +677,7 @@ test_create_anonymous_dataset_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -721,10 +701,10 @@ test_create_anonymous_dataset_invalid_params(void) if ((fspace_id = generate_random_dataspace(DATASET_CREATE_ANONYMOUS_INVALID_PARAMS_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -732,7 +712,7 @@ test_create_anonymous_dataset_invalid_params(void) { PART_BEGIN(H5Dcreate_anon_invalid_loc_id) { - TESTING_2("H5Dcreate_anon with an invalid loc_id") + TESTING_2("H5Dcreate_anon with an invalid loc_id"); H5E_BEGIN_TRY { @@ -753,7 +733,7 @@ test_create_anonymous_dataset_invalid_params(void) PART_BEGIN(H5Dcreate_anon_invalid_datatype) { - TESTING_2("H5Dcreate_anon with an invalid dataset datatype") + TESTING_2("H5Dcreate_anon with an invalid dataset datatype"); H5E_BEGIN_TRY { @@ -774,7 +754,7 @@ test_create_anonymous_dataset_invalid_params(void) PART_BEGIN(H5Dcreate_anon_invalid_dataspace) { - TESTING_2("H5Dcreate_anon with an invalid dataset dataspace") + TESTING_2("H5Dcreate_anon with an invalid dataset dataspace"); H5E_BEGIN_TRY { @@ -795,7 +775,7 @@ test_create_anonymous_dataset_invalid_params(void) PART_BEGIN(H5Dcreate_anon_invalid_dcpl) { - TESTING_2("H5Dcreate_anon with an invalid DCPL") + TESTING_2("H5Dcreate_anon with an invalid DCPL"); H5E_BEGIN_TRY { @@ -816,7 +796,7 @@ test_create_anonymous_dataset_invalid_params(void) PART_BEGIN(H5Dcreate_anon_invalid_dapl) { - TESTING_2("H5Dcreate_anon with an invalid DAPL") + TESTING_2("H5Dcreate_anon with an invalid DAPL"); H5E_BEGIN_TRY { @@ -837,18 +817,18 @@ test_create_anonymous_dataset_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -882,7 +862,7 @@ test_create_dataset_null_space(void) hid_t dset_dtype = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID; - TESTING("dataset creation with a NULL dataspace") + TESTING("dataset creation with a NULL dataspace"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -914,10 +894,10 @@ test_create_dataset_null_space(void) } if ((fspace_id = H5Screate(H5S_NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_NULL_DATASPACE_TEST_DSET_NAME, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -927,7 +907,7 @@ test_create_dataset_null_space(void) } if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dopen2(group_id, DATASET_CREATE_NULL_DATASPACE_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -936,17 +916,17 @@ test_create_dataset_null_space(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -980,7 +960,7 @@ test_create_dataset_scalar_space(void) hid_t dset_dtype = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID; - TESTING("dataset creation with a SCALAR dataspace") + TESTING("dataset creation with a SCALAR dataspace"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -1012,10 +992,10 @@ test_create_dataset_scalar_space(void) } if ((fspace_id = H5Screate(H5S_SCALAR)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_SCALAR_DATASPACE_TEST_DSET_NAME, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -1025,7 +1005,7 @@ test_create_dataset_scalar_space(void) } if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dopen2(group_id, DATASET_CREATE_SCALAR_DATASPACE_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1034,17 +1014,17 @@ test_create_dataset_scalar_space(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1080,7 +1060,7 @@ test_create_zero_dim_dset(void) hid_t fspace_id = H5I_INVALID_HID; int data[1]; - TESTING("creation of 0-sized dataset") + TESTING("creation of 0-sized dataset"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -1111,7 +1091,7 @@ test_create_zero_dim_dset(void) } if ((fspace_id = H5Screate_simple(1, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, ZERO_DIM_DSET_TEST_DSET_NAME, H5T_NATIVE_INT, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -1141,15 +1121,15 @@ test_create_zero_dim_dset(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1182,7 +1162,7 @@ test_create_dataset_random_shapes(void) hid_t dset_id = H5I_INVALID_HID, space_id = H5I_INVALID_HID; hid_t dset_dtype = H5I_INVALID_HID; - TESTING("dataset creation with random dimension sizes") + TESTING("dataset creation with random dimension sizes"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -1213,7 +1193,7 @@ test_create_dataset_random_shapes(void) } if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; for (i = 0; i < DATASET_SHAPE_TEST_NUM_ITERATIONS; i++) { char name[100]; @@ -1235,19 +1215,19 @@ test_create_dataset_random_shapes(void) } if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; } if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1287,7 +1267,7 @@ test_create_dataset_predefined_types(void) H5T_STD_U64LE, H5T_STD_U64BE, H5T_STD_I64LE, H5T_STD_I64BE, H5T_IEEE_F32LE, H5T_IEEE_F32BE, H5T_IEEE_F64LE, H5T_IEEE_F64BE}; - TESTING("dataset creation with predefined datatypes") + TESTING("dataset creation with predefined datatypes"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -1323,7 +1303,7 @@ test_create_dataset_predefined_types(void) if ((fspace_id = generate_random_dataspace(DATASET_PREDEFINED_TYPE_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; HDsprintf(name, "%s%zu", DATASET_PREDEFINED_TYPE_TEST_BASE_NAME, i); @@ -1335,9 +1315,9 @@ test_create_dataset_predefined_types(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dopen2(group_id, name, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1346,15 +1326,15 @@ test_create_dataset_predefined_types(void) } if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; } if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1387,7 +1367,7 @@ test_create_dataset_string_types(void) hid_t type_id_fixed = H5I_INVALID_HID, type_id_variable = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID; - TESTING_MULTIPART("dataset creation with string types") + TESTING_MULTIPART("dataset creation with string types"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -1398,7 +1378,7 @@ test_create_dataset_string_types(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1432,7 +1412,7 @@ test_create_dataset_string_types(void) } if ((fspace_id = generate_random_dataspace(DATASET_STRING_TYPE_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1440,7 +1420,7 @@ test_create_dataset_string_types(void) { PART_BEGIN(H5Dcreate_fixed_string_type) { - TESTING_2("creation of fixed-size string dataset") + TESTING_2("creation of fixed-size string dataset"); if ((dset_id_fixed = H5Dcreate2(group_id, DATASET_STRING_TYPE_TEST_DSET_NAME1, type_id_fixed, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -1471,7 +1451,7 @@ test_create_dataset_string_types(void) PART_BEGIN(H5Dcreate_variable_string_type) { - TESTING_2("creation of variable-length string dataset") + TESTING_2("creation of variable-length string dataset"); if ((dset_id_variable = H5Dcreate2(group_id, DATASET_STRING_TYPE_TEST_DSET_NAME2, type_id_variable, fspace_id, @@ -1504,24 +1484,24 @@ test_create_dataset_string_types(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Tclose(type_id_fixed) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(type_id_variable) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id_fixed) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id_variable) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1560,7 +1540,7 @@ test_create_dataset_compound_types(void) hid_t type_pool[DATASET_COMPOUND_TYPE_TEST_MAX_SUBTYPES]; int num_passes; - TESTING("dataset creation with compound datatypes") + TESTING("dataset creation with compound datatypes"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -1599,7 +1579,7 @@ test_create_dataset_compound_types(void) } if ((fspace_id = generate_random_dataspace(DATASET_COMPOUND_TYPE_TEST_DSET_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; num_passes = (rand() % DATASET_COMPOUND_TYPE_TEST_MAX_PASSES) + 1; @@ -1647,16 +1627,16 @@ test_create_dataset_compound_types(void) compound_size += member_size; if (H5Tset_size(compound_type, compound_size) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(compound_type, member_name, next_offset, type_pool[j]) < 0) - TEST_ERROR + TEST_ERROR; next_offset += member_size; } if (H5Tpack(compound_type) < 0) - TEST_ERROR + TEST_ERROR; HDsnprintf(dset_name, sizeof(dset_name), "%s%zu", DATASET_COMPOUND_TYPE_TEST_DSET_NAME, i); @@ -1668,7 +1648,7 @@ test_create_dataset_compound_types(void) } if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dopen2(group_id, dset_name, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1678,21 +1658,21 @@ test_create_dataset_compound_types(void) for (j = 0; j < num_subtypes; j++) if (type_pool[j] >= 0 && H5Tclose(type_pool[j]) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(compound_type) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1731,7 +1711,7 @@ test_create_dataset_enum_types(void) const char *enum_type_test_table[] = {"RED", "GREEN", "BLUE", "BLACK", "WHITE", "PURPLE", "ORANGE", "YELLOW", "BROWN"}; - TESTING("dataset creation with enum types") + TESTING("dataset creation with enum types"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -1769,7 +1749,7 @@ test_create_dataset_enum_types(void) for (i = 0; i < ARRAY_LENGTH(enum_type_test_table); i++) if (H5Tenum_insert(enum_native, enum_type_test_table[i], &i) < 0) - TEST_ERROR + TEST_ERROR; if ((enum_non_native = H5Tenum_create(H5T_STD_U32LE)) < 0) { H5_FAILED(); @@ -1780,14 +1760,14 @@ test_create_dataset_enum_types(void) for (i = 0; i < DATASET_ENUM_TYPE_TEST_NUM_MEMBERS; i++) { char val_name[15]; - HDsprintf(val_name, "%s%zu", DATASET_ENUM_TYPE_TEST_VAL_BASE_NAME, i); + HDsnprintf(val_name, 15, "%s%zu", DATASET_ENUM_TYPE_TEST_VAL_BASE_NAME, i); if (H5Tenum_insert(enum_non_native, val_name, &i) < 0) - TEST_ERROR + TEST_ERROR; } if ((fspace_id = generate_random_dataspace(DATASET_ENUM_TYPE_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id_native = H5Dcreate2(group_id, DATASET_ENUM_TYPE_TEST_DSET_NAME1, enum_native, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -1804,9 +1784,9 @@ test_create_dataset_enum_types(void) } if (H5Dclose(dset_id_native) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id_non_native) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id_native = H5Dopen2(group_id, DATASET_ENUM_TYPE_TEST_DSET_NAME1, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1821,21 +1801,21 @@ test_create_dataset_enum_types(void) } if (H5Tclose(enum_native) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(enum_non_native) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id_native) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id_non_native) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1879,7 +1859,7 @@ test_create_dataset_array_types(void) array_base_type_id3 = H5I_INVALID_HID; hid_t nested_type_id = H5I_INVALID_HID; - TESTING("dataset creation with array types") + TESTING("dataset creation with array types"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -1914,7 +1894,7 @@ test_create_dataset_array_types(void) array_dims1[i] = (hsize_t)(rand() % MAX_DIM_SIZE + 1); if ((array_base_type_id1 = generate_random_datatype(H5T_ARRAY, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((array_type_id1 = H5Tarray_create2(array_base_type_id1, DATASET_ARRAY_TYPE_TEST_RANK1, array_dims1)) < 0) { @@ -1927,7 +1907,7 @@ test_create_dataset_array_types(void) array_dims2[i] = (hsize_t)(rand() % MAX_DIM_SIZE + 1); if ((array_base_type_id2 = generate_random_datatype(H5T_ARRAY, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((array_type_id2 = H5Tarray_create2(array_base_type_id2, DATASET_ARRAY_TYPE_TEST_RANK2, array_dims2)) < 0) { @@ -1941,7 +1921,7 @@ test_create_dataset_array_types(void) array_dims3[i] = (hsize_t)(rand() % MAX_DIM_SIZE + 1); if ((array_base_type_id3 = generate_random_datatype(H5T_ARRAY, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((nested_type_id = H5Tarray_create2(array_base_type_id3, DATASET_ARRAY_TYPE_TEST_RANK3, array_dims3)) < 0) { @@ -1957,7 +1937,7 @@ test_create_dataset_array_types(void) } if ((fspace_id = generate_random_dataspace(DATASET_ARRAY_TYPE_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id1 = H5Dcreate2(group_id, DATASET_ARRAY_TYPE_TEST_DSET_NAME1, array_type_id1, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -1981,11 +1961,11 @@ test_create_dataset_array_types(void) } if (H5Dclose(dset_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id3) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id1 = H5Dopen2(group_id, DATASET_ARRAY_TYPE_TEST_DSET_NAME1, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2006,33 +1986,33 @@ test_create_dataset_array_types(void) } if (H5Tclose(array_base_type_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(array_base_type_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(array_base_type_id3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(nested_type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(array_type_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(array_type_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(array_type_id3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2077,20 +2057,18 @@ test_create_dataset_creation_properties(void) hid_t dset_dtype = H5I_INVALID_HID, compact_dtype = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID, compact_fspace_id = H5I_INVALID_HID; - TESTING_MULTIPART("dataset creation properties") + TESTING_MULTIPART("dataset creation properties"); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILTERS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || !(vol_cap_flags_g & H5VL_CAP_FLAG_TRACK_TIMES) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_FILTERS)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { SKIPPED(); - HDprintf(" API functions for basic file, group, dataset, creation order, track time, or filter " - "pipeline aren't supported with this connector\n"); + HDprintf(" API functions for basic file, group, or dataset " + "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2113,19 +2091,19 @@ test_create_dataset_creation_properties(void) if ((fspace_id = generate_random_dataspace(DATASET_CREATION_PROPERTIES_TEST_SHAPE_RANK, NULL, dims, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((compact_fspace_id = generate_random_dataspace(DATASET_CREATION_PROPERTIES_TEST_SHAPE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; /* Set chunk dims to be size of dataset - for filters test */ for (i = 0; i < DATASET_CREATION_PROPERTIES_TEST_SHAPE_RANK; i++) chunk_dims[i] = dims[i]; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((compact_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2137,7 +2115,7 @@ test_create_dataset_creation_properties(void) H5D_alloc_time_t alloc_times[] = {H5D_ALLOC_TIME_DEFAULT, H5D_ALLOC_TIME_EARLY, H5D_ALLOC_TIME_INCR, H5D_ALLOC_TIME_LATE}; - TESTING_2("dataset storage space allocation time property") + TESTING_2("dataset storage space allocation time property"); if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) { H5_FAILED(); @@ -2207,7 +2185,13 @@ test_create_dataset_creation_properties(void) unsigned creation_orders[] = {H5P_CRT_ORDER_TRACKED, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED}; - TESTING_2("attribute creation order property for DCPL") + TESTING_2("attribute creation order property for DCPL"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking is not supported by this VOL connector\n"); + PART_EMPTY(DCPL_attr_crt_order_test); + } if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) { H5_FAILED(); @@ -2274,7 +2258,7 @@ test_create_dataset_creation_properties(void) /* Test the attribute phase change property */ PART_BEGIN(DCPL_attr_phase_change_test) { - TESTING_2("attribute phase change property for DCPL") + TESTING_2("attribute phase change property for DCPL"); if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) { H5_FAILED(); @@ -2340,7 +2324,7 @@ test_create_dataset_creation_properties(void) { H5D_fill_time_t fill_times[] = {H5D_FILL_TIME_IFSET, H5D_FILL_TIME_ALLOC, H5D_FILL_TIME_NEVER}; - TESTING_2("dataset fill time property") + TESTING_2("dataset fill time property"); if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) { H5_FAILED(); @@ -2409,7 +2393,13 @@ test_create_dataset_creation_properties(void) /* Test filters */ PART_BEGIN(DCPL_filters_test) { - TESTING_2("dataset filters") + TESTING_2("dataset filters"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILTERS)) { + SKIPPED(); + HDprintf(" dataset filters are not supported by this VOL connector\n"); + PART_EMPTY(DCPL_filters_test); + } if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) { H5_FAILED(); @@ -2505,7 +2495,7 @@ test_create_dataset_creation_properties(void) { H5D_layout_t layouts[] = {H5D_COMPACT, H5D_CONTIGUOUS, H5D_CHUNKED}; - TESTING_2("dataset storage layouts") + TESTING_2("dataset storage layouts"); if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) { H5_FAILED(); @@ -2589,7 +2579,13 @@ test_create_dataset_creation_properties(void) /* Test the "track object times" property */ PART_BEGIN(DCPL_track_obj_times_test) { - TESTING_2("object time tracking property for DCPL") + TESTING_2("object time tracking property for DCPL"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_TRACK_TIMES)) { + SKIPPED(); + HDprintf(" object time tracking is not supported by this VOL connector\n"); + PART_EMPTY(DCPL_track_obj_times_test); + } if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) { H5_FAILED(); @@ -2691,22 +2687,22 @@ test_create_dataset_creation_properties(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(compact_fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(compact_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2744,7 +2740,7 @@ test_create_many_dataset(void) unsigned char data; unsigned int i; - TESTING("creating many datasets") + TESTING("creating many datasets"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -2807,13 +2803,13 @@ test_create_many_dataset(void) } if (H5Sclose(dataspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2840,7 +2836,7 @@ test_create_many_dataset(void) static int test_open_dataset(void) { - TESTING("H5Dopen") + TESTING("H5Dopen"); SKIPPED(); @@ -2871,7 +2867,7 @@ test_open_dataset_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2894,10 +2890,10 @@ test_open_dataset_invalid_params(void) if ((fspace_id = generate_random_dataspace(DATASET_OPEN_INVALID_PARAMS_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_OPEN_INVALID_PARAMS_DSET_NAME, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -2907,7 +2903,7 @@ test_open_dataset_invalid_params(void) } if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2915,7 +2911,7 @@ test_open_dataset_invalid_params(void) { PART_BEGIN(H5Dopen_invalid_loc_id) { - TESTING_2("H5Dopen with an invalid loc_id") + TESTING_2("H5Dopen with an invalid loc_id"); H5E_BEGIN_TRY { @@ -2936,7 +2932,7 @@ test_open_dataset_invalid_params(void) PART_BEGIN(H5Dopen_invalid_dataset_name) { - TESTING_2("H5Dopen with an invalid dataset name") + TESTING_2("H5Dopen with an invalid dataset name"); H5E_BEGIN_TRY { @@ -2970,7 +2966,7 @@ test_open_dataset_invalid_params(void) PART_BEGIN(H5Dopen_invalid_dapl) { - TESTING_2("H5Dopen with an invalid DAPL") + TESTING_2("H5Dopen with an invalid DAPL"); H5E_BEGIN_TRY { @@ -2991,18 +2987,18 @@ test_open_dataset_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3033,7 +3029,7 @@ test_close_dataset_invalid_params(void) herr_t err_ret = -1; hid_t file_id = H5I_INVALID_HID; - TESTING("H5Dclose with an invalid dataset ID") + TESTING("H5Dclose with an invalid dataset ID"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { @@ -3061,7 +3057,7 @@ test_close_dataset_invalid_params(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3107,7 +3103,7 @@ test_get_dataset_space_and_type(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3130,10 +3126,10 @@ test_get_dataset_space_and_type(void) if ((dset_space_id = generate_random_dataspace(DATASET_GET_SPACE_TYPE_TEST_SPACE_RANK, NULL, dset_dims, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_GET_SPACE_TYPE_TEST_DSET_NAME, dset_dtype, dset_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -3149,7 +3145,7 @@ test_get_dataset_space_and_type(void) /* Retrieve the dataset's datatype and dataspace and verify them */ PART_BEGIN(H5Dget_type) { - TESTING_2("H5Dget_type") + TESTING_2("H5Dget_type"); if ((tmp_type_id = H5Dget_type(dset_id)) < 0) { H5_FAILED(); @@ -3179,7 +3175,7 @@ test_get_dataset_space_and_type(void) PART_BEGIN(H5Dget_space) { - TESTING_2("H5Dget_space") + TESTING_2("H5Dget_space"); if ((tmp_space_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); @@ -3238,7 +3234,7 @@ test_get_dataset_space_and_type(void) PART_BEGIN(H5Dget_type_reopened) { - TESTING_2("H5Dget_type after re-opening a dataset") + TESTING_2("H5Dget_type after re-opening a dataset"); if ((dset_id = H5Dopen2(group_id, DATASET_GET_SPACE_TYPE_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3283,7 +3279,7 @@ test_get_dataset_space_and_type(void) PART_BEGIN(H5Dget_space_reopened) { - TESTING_2("H5Dget_space after re-opening a dataset") + TESTING_2("H5Dget_space after re-opening a dataset"); if ((dset_id = H5Dopen2(group_id, DATASET_GET_SPACE_TYPE_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3330,22 +3326,22 @@ test_get_dataset_space_and_type(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(tmp_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(dset_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tmp_type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3396,7 +3392,7 @@ test_get_dataset_space_and_type_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3420,10 +3416,10 @@ test_get_dataset_space_and_type_invalid_params(void) if ((dset_space_id = generate_random_dataspace(DATASET_GET_SPACE_TYPE_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_GET_SPACE_TYPE_INVALID_PARAMS_TEST_DSET_NAME, dset_dtype, dset_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -3438,7 +3434,7 @@ test_get_dataset_space_and_type_invalid_params(void) { PART_BEGIN(H5Dget_type_invalid_dset_id) { - TESTING_2("H5Dget_type with an invalid dset_id") + TESTING_2("H5Dget_type with an invalid dset_id"); H5E_BEGIN_TRY { @@ -3458,7 +3454,7 @@ test_get_dataset_space_and_type_invalid_params(void) PART_BEGIN(H5Dget_space_invalid_dset_id) { - TESTING_2("H5Dget_space with an invalid dset_id") + TESTING_2("H5Dget_space with an invalid dset_id"); H5E_BEGIN_TRY { @@ -3478,20 +3474,20 @@ test_get_dataset_space_and_type_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(dset_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3520,7 +3516,7 @@ test_get_dataset_space_and_type_invalid_params(void) static int test_get_dataset_space_status(void) { - TESTING("H5Dget_space_status") + TESTING("H5Dget_space_status"); SKIPPED(); @@ -3535,7 +3531,7 @@ test_get_dataset_space_status(void) static int test_get_dataset_space_status_invalid_params(void) { - TESTING("H5Dget_space_status with invalid parameters") + TESTING("H5Dget_space_status with invalid parameters"); SKIPPED(); @@ -3543,9 +3539,11 @@ test_get_dataset_space_status_invalid_params(void) } /* - * A test to check that a VOL connector stores and can - * retrieve valid copies of a DAPL and DCPL used at - * dataset access and dataset creation, respectively. + * A test to check that a DCPL used for dataset creation + * can be persisted and that a valid copy of that DCPL can + * be retrieved later with a call to H5Dget_create_plist. + * Also tests that a valid copy of a DAPL used for dataset + * access can be retrieved with a call to H5Dget_access_plist. */ static int test_dataset_property_lists(void) @@ -3578,7 +3576,7 @@ test_dataset_property_lists(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3589,7 +3587,7 @@ test_dataset_property_lists(void) /** for DAOS VOL, this test is problematic since auto chunking can be selected, so skip for now */ if (H5VLget_connector_name(file_id, vol_name, 5) < 0) { H5_FAILED(); - HDprintf(" couldn't get VOL NAME '%s'\n", DATASET_TEST_GROUP_NAME); + HDprintf(" couldn't get VOL connector name\n"); goto error; } @@ -3607,19 +3605,19 @@ test_dataset_property_lists(void) } if ((space_id = generate_random_dataspace(DATASET_PROPERTY_LIST_TEST_SPACE_RANK, NULL, dims, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; for (i = 0; i < DATASET_PROPERTY_LIST_TEST_SPACE_RANK; i++) chunk_dims[i] = (hsize_t)(rand() % (int)dims[i] + 1); if ((dset_dtype1 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype2 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype3 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype4 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dcpl_id1 = H5Pcreate(H5P_DATASET_CREATE)) < 0) { H5_FAILED(); @@ -3648,7 +3646,7 @@ test_dataset_property_lists(void) } if (H5Pclose(dcpl_id1) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3656,7 +3654,7 @@ test_dataset_property_lists(void) { PART_BEGIN(H5Dget_create_plist) { - TESTING_2("H5Dget_create_plist") + TESTING_2("H5Dget_create_plist"); /* Try to receive copies of the two property lists, one which has the property set and one which * does not */ @@ -3712,7 +3710,7 @@ test_dataset_property_lists(void) PART_BEGIN(H5Dget_access_plist) { - TESTING_2("H5Dget_access_plist") + TESTING_2("H5Dget_access_plist"); if ((dapl_id1 = H5Pcreate(H5P_DATASET_ACCESS)) < 0) { H5_FAILED(); @@ -3848,7 +3846,7 @@ test_dataset_property_lists(void) PART_BEGIN(H5Dget_create_plist_reopened) { - TESTING_2("H5Dget_create_plist after re-opening a dataset") + TESTING_2("H5Dget_create_plist after re-opening a dataset"); if ((dset_id1 = H5Dopen2(group_id, DATASET_PROPERTY_LIST_TEST_DSET_NAME1, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3914,7 +3912,7 @@ test_dataset_property_lists(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (tmp_prefix) { HDfree(tmp_prefix); @@ -3922,37 +3920,37 @@ test_dataset_property_lists(void) } if (H5Pclose(dcpl_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dcpl_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dapl_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dapl_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype4) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id4) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3991,7 +3989,7 @@ test_dataset_property_lists(void) static int test_get_dataset_storage_size(void) { - TESTING("H5Dget_storage_size") + TESTING("H5Dget_storage_size"); SKIPPED(); @@ -4006,7 +4004,7 @@ test_get_dataset_storage_size(void) static int test_get_dataset_storage_size_invalid_params(void) { - TESTING("H5Dget_storage_size with invalid parameters") + TESTING("H5Dget_storage_size with invalid parameters"); SKIPPED(); @@ -4019,7 +4017,7 @@ test_get_dataset_storage_size_invalid_params(void) static int test_get_dataset_chunk_storage_size(void) { - TESTING("H5Dget_chunk_storage_size") + TESTING("H5Dget_chunk_storage_size"); SKIPPED(); @@ -4034,7 +4032,7 @@ test_get_dataset_chunk_storage_size(void) static int test_get_dataset_chunk_storage_size_invalid_params(void) { - TESTING("H5Dget_chunk_storage_size with invalid parameters") + TESTING("H5Dget_chunk_storage_size with invalid parameters"); SKIPPED(); @@ -4047,7 +4045,7 @@ test_get_dataset_chunk_storage_size_invalid_params(void) static int test_get_dataset_offset(void) { - TESTING("H5Dget_offset") + TESTING("H5Dget_offset"); SKIPPED(); @@ -4062,7 +4060,7 @@ test_get_dataset_offset(void) static int test_get_dataset_offset_invalid_params(void) { - TESTING("H5Dget_offset with invalid parameters") + TESTING("H5Dget_offset with invalid parameters"); SKIPPED(); @@ -4084,7 +4082,7 @@ test_read_dataset_small_all(void) hid_t fspace_id = H5I_INVALID_HID; void *read_buf = NULL; - TESTING("small read from dataset with H5S_ALL") + TESTING("small read from dataset with H5S_ALL"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -4115,7 +4113,7 @@ test_read_dataset_small_all(void) } if ((fspace_id = H5Screate_simple(DATASET_SMALL_READ_TEST_ALL_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_SMALL_READ_TEST_ALL_DSET_NAME, DATASET_SMALL_READ_TEST_ALL_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, @@ -4130,7 +4128,7 @@ test_read_dataset_small_all(void) data_size *= DATASET_SMALL_READ_TEST_ALL_DSET_DTYPESIZE; if (NULL == (read_buf = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; if (H5Dread(dset_id, DATASET_SMALL_READ_TEST_ALL_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { @@ -4145,15 +4143,15 @@ test_read_dataset_small_all(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -4194,7 +4192,7 @@ test_read_dataset_small_hyperslab(void) hid_t mspace_id = H5I_INVALID_HID, fspace_id = H5I_INVALID_HID; void *read_buf = NULL; - TESTING("small read from dataset with a hyperslab selection") + TESTING("small read from dataset with a hyperslab selection"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -4226,9 +4224,9 @@ test_read_dataset_small_hyperslab(void) } if ((fspace_id = H5Screate_simple(DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((mspace_id = H5Screate_simple(DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_SPACE_RANK - 1, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_NAME, DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_DTYPE, fspace_id, H5P_DEFAULT, @@ -4248,14 +4246,14 @@ test_read_dataset_small_hyperslab(void) count[2] = 1; if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR; for (i = 0, data_size = 1; i < DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_SPACE_RANK - 1; i++) data_size *= dims[i]; data_size *= DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_DTYPESIZE; if (NULL == (read_buf = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; if (H5Dread(dset_id, DATASET_SMALL_READ_TEST_HYPERSLAB_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, read_buf) < 0) { @@ -4270,17 +4268,17 @@ test_read_dataset_small_hyperslab(void) } if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -4322,7 +4320,7 @@ test_read_dataset_small_point_selection(void) hid_t mspace_id = H5I_INVALID_HID; void *data = NULL; - TESTING("small read from dataset with a point selection") + TESTING("small read from dataset with a point selection"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -4355,9 +4353,9 @@ test_read_dataset_small_point_selection(void) if ((fspace_id = H5Screate_simple(DATASET_SMALL_READ_TEST_POINT_SELECTION_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((mspace_id = H5Screate_simple(1, mspace_dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_SMALL_READ_TEST_POINT_SELECTION_DSET_NAME, DATASET_SMALL_READ_TEST_POINT_SELECTION_DSET_DTYPE, fspace_id, H5P_DEFAULT, @@ -4371,7 +4369,7 @@ test_read_dataset_small_point_selection(void) DATASET_SMALL_READ_TEST_POINT_SELECTION_DSET_DTYPESIZE; if (NULL == (data = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; for (i = 0; i < DATASET_SMALL_READ_TEST_POINT_SELECTION_NUM_POINTS; i++) { size_t j; @@ -4400,17 +4398,17 @@ test_read_dataset_small_point_selection(void) } if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -4477,7 +4475,7 @@ test_dataset_io_point_selections(void) hbool_t do_chunk; int i, j; - TESTING("point selection I/O with all selection in memory and points in file") + TESTING("point selection I/O with all selection in memory and points in file"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -4490,46 +4488,46 @@ test_dataset_io_point_selections(void) /* Create dataspaces and DCPL */ if ((mspace_id_full = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((mspace_id_all = H5Screate_simple(1, &npoints, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dcpl_id_chunk = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; /* Enable chunking on chunk DCPL */ if (H5Pset_chunk(dcpl_id_chunk, 2, cdims) < 0) - TEST_ERROR + TEST_ERROR; /* Open file */ if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Open container group */ if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Create group */ if ((group_id = H5Gcreate2(container_group, DATASET_IO_POINT_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Perform with and without chunking */ for (do_chunk = FALSE;; do_chunk = TRUE) { if (do_chunk) { - TESTING("point selection I/O with all selection in memory and points in file with chunking") + TESTING("point selection I/O with all selection in memory and points in file with chunking"); /* Create chunked dataset */ if ((dset_id = H5Dcreate2(group_id, DATASET_IO_POINT_DSET_NAME_CHUNK, H5T_NATIVE_INT, fspace_id, H5P_DEFAULT, dcpl_id_chunk, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ else /* Create non-chunked dataset */ if ((dset_id = H5Dcreate2(group_id, DATASET_IO_POINT_DSET_NAME_NOCHUNK, H5T_NATIVE_INT, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Fill write buffer */ for (i = 0; i < DATASET_IO_POINT_DIM_0; i++) @@ -4538,7 +4536,7 @@ test_dataset_io_point_selections(void) /* Write data */ if (H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_all) < 0) - FAIL_PUTS_ERROR("Failed to write entire dataset") + FAIL_PUTS_ERROR("Failed to write entire dataset"); /* Update file_state */ for (i = 0; i < DATASET_IO_POINT_DIM_0; i++) @@ -4550,26 +4548,26 @@ test_dataset_io_point_selections(void) /* Select points */ if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, DATASET_IO_POINT_NPOINTS, points) < 0) - TEST_ERROR + TEST_ERROR; /* Wipe read buffer */ memset(buf_point, 0, sizeof(buf_point)); /* Read points to "all" memory buffer */ if (H5Dread(dset_id, H5T_NATIVE_INT, mspace_id_all, fspace_id, H5P_DEFAULT, buf_point) < 0) - FAIL_PUTS_ERROR("Failed to read points from dataset to all memory buffer") + FAIL_PUTS_ERROR("Failed to read points from dataset to all memory buffer"); /* Verify data */ for (i = 0; i < DATASET_IO_POINT_NPOINTS; i++) if (buf_point[i] != file_state[points[2 * i]][points[2 * i + 1]]) - FAIL_PUTS_ERROR("Incorrect data read from points to all memory buffer") + FAIL_PUTS_ERROR("Incorrect data read from points to all memory buffer"); /* Generate points to write */ DATASET_IO_POINT_GEN_POINTS(points, i, j); /* Select points */ if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, DATASET_IO_POINT_NPOINTS, points) < 0) - TEST_ERROR + TEST_ERROR; /* Fill write buffer */ for (i = 0; i < DATASET_IO_POINT_NPOINTS; i++) @@ -4577,7 +4575,7 @@ test_dataset_io_point_selections(void) /* Write points from "all" memory buffer */ if (H5Dwrite(dset_id, H5T_NATIVE_INT, mspace_id_all, fspace_id, H5P_DEFAULT, buf_point) < 0) - FAIL_PUTS_ERROR("Failed to write points to dataset from all memory buffer") + FAIL_PUTS_ERROR("Failed to write points to dataset from all memory buffer"); /* Update file state */ for (i = 0; i < DATASET_IO_POINT_NPOINTS; i++) @@ -4588,27 +4586,29 @@ test_dataset_io_point_selections(void) /* Read entire dataset */ if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_all) < 0) - FAIL_PUTS_ERROR("Failed to read entire dataset") + FAIL_PUTS_ERROR("Failed to read entire dataset"); /* Verify data */ for (i = 0; i < DATASET_IO_POINT_DIM_0; i++) for (j = 0; j < DATASET_IO_POINT_DIM_1; j++) if (buf_all[i][j] != file_state[i][j]) - FAIL_PUTS_ERROR("Incorrect data found after writing from all memory buffer to points") + FAIL_PUTS_ERROR("Incorrect data found after writing from all memory buffer to points"); - PASSED() + PASSED(); - if (do_chunk) - TESTING("point selection I/O with points in memory and file (same shape) with chunking") - else - TESTING("point selection I/O with points in memory and file (same shape)") + if (do_chunk) { + TESTING("point selection I/O with points in memory and file (same shape) with chunking"); + } + else { + TESTING("point selection I/O with points in memory and file (same shape)"); + } /* Generate points to read */ DATASET_IO_POINT_GEN_POINTS(points, i, j); /* Select points */ if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, DATASET_IO_POINT_NPOINTS, points) < 0) - TEST_ERROR + TEST_ERROR; /* Wipe read buffer */ memset(buf_all, 0, sizeof(buf_all)); @@ -4620,20 +4620,20 @@ test_dataset_io_point_selections(void) /* Read data points->points */ if (H5Dread(dset_id, H5T_NATIVE_INT, fspace_id, fspace_id, H5P_DEFAULT, buf_all) < 0) - FAIL_PUTS_ERROR("Failed to read points from dataset to points in memory buffer") + FAIL_PUTS_ERROR("Failed to read points from dataset to points in memory buffer"); /* Verify data */ for (i = 0; i < DATASET_IO_POINT_DIM_0; i++) for (j = 0; j < DATASET_IO_POINT_DIM_1; j++) if (buf_all[i][j] != erbuf[i][j]) - FAIL_PUTS_ERROR("Incorrect data found read from points in file to points in memory") + FAIL_PUTS_ERROR("Incorrect data found read from points in file to points in memory"); /* Generate points to write */ DATASET_IO_POINT_GEN_POINTS(points, i, j); /* Select points */ if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, DATASET_IO_POINT_NPOINTS, points) < 0) - TEST_ERROR + TEST_ERROR; /* Fill write buffer */ for (i = 0; i < DATASET_IO_POINT_DIM_0; i++) @@ -4642,7 +4642,7 @@ test_dataset_io_point_selections(void) /* Write data points->points */ if (H5Dwrite(dset_id, H5T_NATIVE_INT, fspace_id, fspace_id, H5P_DEFAULT, buf_all) < 0) - FAIL_PUTS_ERROR("Failed to write from in memory to points in dataset") + FAIL_PUTS_ERROR("Failed to write from in memory to points in dataset"); /* Update file_state */ for (i = 0; i < DATASET_IO_POINT_NPOINTS; i++) @@ -4653,21 +4653,23 @@ test_dataset_io_point_selections(void) /* Read entire dataset */ if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_all) < 0) - FAIL_PUTS_ERROR("Failed to read entire dataset") + FAIL_PUTS_ERROR("Failed to read entire dataset"); /* Verify data */ for (i = 0; i < DATASET_IO_POINT_DIM_0; i++) for (j = 0; j < DATASET_IO_POINT_DIM_1; j++) if (buf_all[i][j] != file_state[i][j]) FAIL_PUTS_ERROR( - "Incorrect data found after writing from points in memory to points in dataset") + "Incorrect data found after writing from points in memory to points in dataset"); - PASSED() + PASSED(); - if (do_chunk) - TESTING("point selection I/O with points in memory and file (different shape) with chunking") - else - TESTING("point selection I/O with points in memory and file (different shape)") + if (do_chunk) { + TESTING("point selection I/O with points in memory and file (different shape) with chunking"); + } + else { + TESTING("point selection I/O with points in memory and file (different shape)"); + } /* Generate points to read */ DATASET_IO_POINT_GEN_POINTS(points, i, j); @@ -4675,9 +4677,9 @@ test_dataset_io_point_selections(void) /* Select points */ if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, DATASET_IO_POINT_NPOINTS, points) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sselect_elements(mspace_id_full, H5S_SELECT_SET, DATASET_IO_POINT_NPOINTS, points2) < 0) - TEST_ERROR + TEST_ERROR; /* Wipe read buffer */ memset(buf_all, 0, sizeof(buf_all)); @@ -4689,14 +4691,14 @@ test_dataset_io_point_selections(void) /* Read data points->points */ if (H5Dread(dset_id, H5T_NATIVE_INT, mspace_id_full, fspace_id, H5P_DEFAULT, buf_all) < 0) - FAIL_PUTS_ERROR("Failed to read points from dataset to points in memory buffer") + FAIL_PUTS_ERROR("Failed to read points from dataset to points in memory buffer"); /* Verify data */ for (i = 0; i < DATASET_IO_POINT_DIM_0; i++) for (j = 0; j < DATASET_IO_POINT_DIM_1; j++) if (buf_all[i][j] != erbuf[i][j]) FAIL_PUTS_ERROR( - "Incorrect data found after reading from points in file to points in memory") + "Incorrect data found after reading from points in file to points in memory"); /* Generate points to write */ DATASET_IO_POINT_GEN_POINTS(points, i, j); @@ -4704,9 +4706,9 @@ test_dataset_io_point_selections(void) /* Select points */ if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, DATASET_IO_POINT_NPOINTS, points) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sselect_elements(mspace_id_full, H5S_SELECT_SET, DATASET_IO_POINT_NPOINTS, points2) < 0) - TEST_ERROR + TEST_ERROR; /* Fill write buffer */ for (i = 0; i < DATASET_IO_POINT_DIM_0; i++) @@ -4715,7 +4717,7 @@ test_dataset_io_point_selections(void) /* Write data points->points */ if (H5Dwrite(dset_id, H5T_NATIVE_INT, mspace_id_full, fspace_id, H5P_DEFAULT, buf_all) < 0) - FAIL_PUTS_ERROR("Failed to write from points in memory to points in dataset") + FAIL_PUTS_ERROR("Failed to write from points in memory to points in dataset"); /* Update file_state */ for (i = 0; i < DATASET_IO_POINT_NPOINTS; i++) @@ -4726,32 +4728,34 @@ test_dataset_io_point_selections(void) /* Read entire dataset */ if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_all) < 0) - FAIL_PUTS_ERROR("Failed to read entire dataset") + FAIL_PUTS_ERROR("Failed to read entire dataset"); /* Verify data */ for (i = 0; i < DATASET_IO_POINT_DIM_0; i++) for (j = 0; j < DATASET_IO_POINT_DIM_1; j++) if (buf_all[i][j] != file_state[i][j]) FAIL_PUTS_ERROR( - "Incorrect data found after writing from points in memory to points in dataset") + "Incorrect data found after writing from points in memory to points in dataset"); - PASSED() + PASSED(); - if (do_chunk) - TESTING("point selection I/O with hyperslab in memory and points in file with chunking") - else - TESTING("point selection I/O with hyperslab in memory and points in file") + if (do_chunk) { + TESTING("point selection I/O with hyperslab in memory and points in file with chunking"); + } + else { + TESTING("point selection I/O with hyperslab in memory and points in file"); + } /* Generate points to read */ DATASET_IO_POINT_GEN_POINTS(points, i, j); /* Select points */ if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, DATASET_IO_POINT_NPOINTS, points) < 0) - TEST_ERROR + TEST_ERROR; /* Select hyperslab */ if (H5Sselect_hyperslab(mspace_id_full, H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR; /* Wipe read buffer */ memset(buf_all, 0, sizeof(buf_all)); @@ -4764,21 +4768,21 @@ test_dataset_io_point_selections(void) /* Read data points->hslab */ if (H5Dread(dset_id, H5T_NATIVE_INT, mspace_id_full, fspace_id, H5P_DEFAULT, buf_all) < 0) - FAIL_PUTS_ERROR("Failed to read points from dataset to hyperslab in memory buffer") + FAIL_PUTS_ERROR("Failed to read points from dataset to hyperslab in memory buffer"); /* Verify data */ for (i = 0; i < DATASET_IO_POINT_DIM_0; i++) for (j = 0; j < DATASET_IO_POINT_DIM_1; j++) if (buf_all[i][j] != erbuf[i][j]) FAIL_PUTS_ERROR( - "Incorrect data found after reading from points in file to hyperslab in memory") + "Incorrect data found after reading from points in file to hyperslab in memory"); /* Generate points to write */ DATASET_IO_POINT_GEN_POINTS(points, i, j); /* Select points */ if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, DATASET_IO_POINT_NPOINTS, points) < 0) - TEST_ERROR + TEST_ERROR; /* Fill write buffer */ for (i = 0; i < DATASET_IO_POINT_DIM_0; i++) @@ -4787,7 +4791,7 @@ test_dataset_io_point_selections(void) /* Write data hlsab->points */ if (H5Dwrite(dset_id, H5T_NATIVE_INT, mspace_id_full, fspace_id, H5P_DEFAULT, buf_all) < 0) - FAIL_PUTS_ERROR("Failed to write from hyperslab in memory to points in dataset") + FAIL_PUTS_ERROR("Failed to write from hyperslab in memory to points in dataset"); /* Update file_state */ for (i = 0; i < DATASET_IO_POINT_NPOINTS; i++) @@ -4799,32 +4803,34 @@ test_dataset_io_point_selections(void) /* Read entire dataset */ if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_all) < 0) - FAIL_PUTS_ERROR("Failed to read entire dataset") + FAIL_PUTS_ERROR("Failed to read entire dataset"); /* Verify data */ for (i = 0; i < DATASET_IO_POINT_DIM_0; i++) for (j = 0; j < DATASET_IO_POINT_DIM_1; j++) if (buf_all[i][j] != file_state[i][j]) FAIL_PUTS_ERROR( - "Incorrect data found after writing from hyperslab in memory to points in dataset") + "Incorrect data found after writing from hyperslab in memory to points in dataset"); - PASSED() + PASSED(); - if (do_chunk) - TESTING("point selection I/O with points in memory and hyperslab in file with chunking") - else - TESTING("point selection I/O with points in memory and hyperslab in file") + if (do_chunk) { + TESTING("point selection I/O with points in memory and hyperslab in file with chunking"); + } + else { + TESTING("point selection I/O with points in memory and hyperslab in file"); + } /* Generate points to read */ DATASET_IO_POINT_GEN_POINTS(points, i, j); /* Select points */ if (H5Sselect_elements(mspace_id_full, H5S_SELECT_SET, DATASET_IO_POINT_NPOINTS, points) < 0) - TEST_ERROR + TEST_ERROR; /* Select hyperslab */ if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR; /* Wipe read buffer */ memset(buf_all, 0, sizeof(buf_all)); @@ -4838,21 +4844,21 @@ test_dataset_io_point_selections(void) /* Read data hslab->points */ if (H5Dread(dset_id, H5T_NATIVE_INT, mspace_id_full, fspace_id, H5P_DEFAULT, buf_all) < 0) - FAIL_PUTS_ERROR("Failed to read hyperslab from dataset to points in memory buffer") + FAIL_PUTS_ERROR("Failed to read hyperslab from dataset to points in memory buffer"); /* Verify data */ for (i = 0; i < DATASET_IO_POINT_DIM_0; i++) for (j = 0; j < DATASET_IO_POINT_DIM_1; j++) if (buf_all[i][j] != erbuf[i][j]) FAIL_PUTS_ERROR( - "Incorrect data found after reading from hyperslab in file to points in memory") + "Incorrect data found after reading from hyperslab in file to points in memory"); /* Generate points to write */ DATASET_IO_POINT_GEN_POINTS(points, i, j); /* Select points */ if (H5Sselect_elements(mspace_id_full, H5S_SELECT_SET, DATASET_IO_POINT_NPOINTS, points) < 0) - TEST_ERROR + TEST_ERROR; /* Fill write buffer */ for (i = 0; i < DATASET_IO_POINT_DIM_0; i++) @@ -4861,7 +4867,7 @@ test_dataset_io_point_selections(void) /* Write data points->hslab */ if (H5Dwrite(dset_id, H5T_NATIVE_INT, mspace_id_full, fspace_id, H5P_DEFAULT, buf_all) < 0) - FAIL_PUTS_ERROR("Failed to write from points in memory to hyperslab in dataset") + FAIL_PUTS_ERROR("Failed to write from points in memory to hyperslab in dataset"); /* Update file_state */ for (i = 0; i < DATASET_IO_POINT_NPOINTS; i++) @@ -4873,21 +4879,21 @@ test_dataset_io_point_selections(void) /* Read entire dataset */ if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_all) < 0) - FAIL_PUTS_ERROR("Failed to read entire dataset") + FAIL_PUTS_ERROR("Failed to read entire dataset"); /* Verify data */ for (i = 0; i < DATASET_IO_POINT_DIM_0; i++) for (j = 0; j < DATASET_IO_POINT_DIM_1; j++) if (buf_all[i][j] != file_state[i][j]) FAIL_PUTS_ERROR( - "Incorrect data found after writing from points in memory to hyperslab in dataset") + "Incorrect data found after writing from points in memory to hyperslab in dataset"); if (!do_chunk) - PASSED() + PASSED(); /* Close dataset */ if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; /* Exit after chunked run */ if (do_chunk) @@ -4896,21 +4902,21 @@ test_dataset_io_point_selections(void) /* Close */ if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dcpl_id_chunk) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(mspace_id_full) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(mspace_id_all) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; - PASSED() + PASSED(); return 0; @@ -4931,378 +4937,12 @@ test_dataset_io_point_selections(void) return 1; } /* end test_dataset_io_point_selections() */ -#ifndef NO_LARGE_TESTS /* - * A test to check that a large amount of data can be - * read back from a dataset using an H5S_ALL selection. + * A test to check that data can't be read from a + * dataset when H5Dread is passed invalid parameters. */ static int -test_read_dataset_large_all(void) -{ - hsize_t dims[DATASET_LARGE_READ_TEST_ALL_DSET_SPACE_RANK] = {600, 600, 600}; - size_t i, data_size; - hid_t file_id = H5I_INVALID_HID; - hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; - hid_t dset_id = H5I_INVALID_HID; - hid_t fspace_id = H5I_INVALID_HID; - void *read_buf = NULL; - - TESTING("large read from dataset with H5S_ALL") - - /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { - SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); - return 0; - } - - if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", vol_test_filename); - goto error; - } - - if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); - goto error; - } - - if ((group_id = H5Gcreate2(container_group, DATASET_LARGE_READ_TEST_ALL_GROUP_NAME, H5P_DEFAULT, - H5P_DEFAULT, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", DATASET_LARGE_READ_TEST_ALL_GROUP_NAME); - goto error; - } - - if ((fspace_id = H5Screate_simple(DATASET_LARGE_READ_TEST_ALL_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR - - if ((dset_id = H5Dcreate2(group_id, DATASET_LARGE_READ_TEST_ALL_DSET_NAME, - DATASET_LARGE_READ_TEST_ALL_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, - H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_LARGE_READ_TEST_ALL_DSET_NAME); - goto error; - } - - for (i = 0, data_size = 1; i < DATASET_LARGE_READ_TEST_ALL_DSET_SPACE_RANK; i++) - data_size *= dims[i]; - data_size *= DATASET_LARGE_READ_TEST_ALL_DSET_DTYPESIZE; - - if (NULL == (read_buf = HDmalloc(data_size))) - TEST_ERROR - - if (H5Dread(dset_id, DATASET_LARGE_READ_TEST_ALL_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < - 0) { - H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_LARGE_READ_TEST_ALL_DSET_NAME); - goto error; - } - - if (read_buf) { - HDfree(read_buf); - read_buf = NULL; - } - - if (H5Sclose(fspace_id) < 0) - TEST_ERROR - if (H5Dclose(dset_id) < 0) - TEST_ERROR - if (H5Gclose(group_id) < 0) - TEST_ERROR - if (H5Gclose(container_group) < 0) - TEST_ERROR - if (H5Fclose(file_id) < 0) - TEST_ERROR - - PASSED(); - - return 0; - -error: - H5E_BEGIN_TRY - { - if (read_buf) - HDfree(read_buf); - H5Sclose(fspace_id); - H5Dclose(dset_id); - H5Gclose(group_id); - H5Gclose(container_group); - H5Fclose(file_id); - } - H5E_END_TRY; - - return 1; -} - -/* - * A test to check that a large amount of data can be - * read back from a dataset using a hyperslab selection. - */ -static int -test_read_dataset_large_hyperslab(void) -{ - hsize_t start[DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_SPACE_RANK]; - hsize_t stride[DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_SPACE_RANK]; - hsize_t count[DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_SPACE_RANK]; - hsize_t block[DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_SPACE_RANK]; - hsize_t dims[DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_SPACE_RANK] = {600, 600, 600}; - size_t i, data_size; - hid_t file_id = H5I_INVALID_HID; - hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; - hid_t dset_id = H5I_INVALID_HID; - hid_t mspace_id = H5I_INVALID_HID, fspace_id = H5I_INVALID_HID; - void *read_buf = NULL; - - TESTING("large read from dataset with a hyperslab selection") - - /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { - SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); - return 0; - } - - if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", vol_test_filename); - goto error; - } - - if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); - goto error; - } - - if ((group_id = H5Gcreate2(container_group, DATASET_LARGE_READ_TEST_HYPERSLAB_GROUP_NAME, H5P_DEFAULT, - H5P_DEFAULT, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_LARGE_READ_TEST_HYPERSLAB_GROUP_NAME); - goto error; - } - - if ((fspace_id = H5Screate_simple(DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR - if ((mspace_id = H5Screate_simple(DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR - - if ((dset_id = H5Dcreate2(group_id, DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_NAME, - DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_DTYPE, fspace_id, H5P_DEFAULT, - H5P_DEFAULT, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_NAME); - goto error; - } - - for (i = 0; i < DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_SPACE_RANK; i++) { - start[i] = 0; - stride[i] = 1; - count[i] = dims[i]; - block[i] = 1; - } - - if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR - - for (i = 0, data_size = 1; i < DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_SPACE_RANK; i++) - data_size *= dims[i]; - data_size *= DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_DTYPESIZE; - - if (NULL == (read_buf = HDmalloc(data_size))) - TEST_ERROR - - if (H5Dread(dset_id, DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, - read_buf) < 0) { - H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_NAME); - goto error; - } - - if (read_buf) { - HDfree(read_buf); - read_buf = NULL; - } - - if (H5Sclose(mspace_id) < 0) - TEST_ERROR - if (H5Sclose(fspace_id) < 0) - TEST_ERROR - if (H5Dclose(dset_id) < 0) - TEST_ERROR - if (H5Gclose(group_id) < 0) - TEST_ERROR - if (H5Gclose(container_group) < 0) - TEST_ERROR - if (H5Fclose(file_id) < 0) - TEST_ERROR - - PASSED(); - - return 0; - -error: - H5E_BEGIN_TRY - { - H5Sclose(mspace_id); - H5Sclose(fspace_id); - H5Dclose(dset_id); - H5Gclose(group_id); - H5Gclose(container_group); - H5Fclose(file_id); - } - H5E_END_TRY; - - return 1; -} - -/* - * A test to check that a large amount of data can be - * read back from a dataset using a large point selection. - * - * XXX: Test takes up significant amounts of memory. - */ -static int -test_read_dataset_large_point_selection(void) -{ - hsize_t *points = NULL; - hsize_t dims[DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_SPACE_RANK] = {225000000}; - size_t i, data_size; - hid_t file_id = H5I_INVALID_HID; - hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; - hid_t dset_id = H5I_INVALID_HID; - hid_t fspace_id = H5I_INVALID_HID; - void *data = NULL; - - TESTING("large read from dataset with a point selection") - - /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { - SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); - return 0; - } - - if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", vol_test_filename); - goto error; - } - - if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); - goto error; - } - - if ((group_id = H5Gcreate2(container_group, DATASET_LARGE_READ_TEST_POINT_SELECTION_GROUP_NAME, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_LARGE_READ_TEST_POINT_SELECTION_GROUP_NAME); - goto error; - } - - if ((fspace_id = H5Screate_simple(DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_SPACE_RANK, dims, NULL)) < - 0) - TEST_ERROR - - if ((dset_id = H5Dcreate2(group_id, DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_NAME, - DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_DTYPE, fspace_id, H5P_DEFAULT, - H5P_DEFAULT, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_NAME); - goto error; - } - - for (i = 0, data_size = 1; i < DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_SPACE_RANK; i++) - data_size *= dims[i]; - data_size *= DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_DTYPESIZE; - - if (NULL == (data = HDmalloc(data_size))) - TEST_ERROR - if (NULL == - (points = HDmalloc((data_size / DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_DTYPESIZE) * - ((DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_SPACE_RANK) * (sizeof(hsize_t)))))) - TEST_ERROR - - /* Select the entire dataspace */ - for (i = 0; i < data_size / DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_DTYPESIZE; i++) { - points[i] = i; - } - - if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, - data_size / DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_DTYPESIZE, points) < 0) { - H5_FAILED(); - HDprintf(" couldn't select points\n"); - goto error; - } - - if (H5Dread(dset_id, DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_DTYPE, H5S_ALL, fspace_id, H5P_DEFAULT, - data) < 0) { - H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_NAME); - goto error; - } - - if (data) { - HDfree(data); - data = NULL; - } - - if (points) { - HDfree(points); - points = NULL; - } - - if (H5Sclose(fspace_id) < 0) - TEST_ERROR - if (H5Dclose(dset_id) < 0) - TEST_ERROR - if (H5Gclose(group_id) < 0) - TEST_ERROR - if (H5Gclose(container_group) < 0) - TEST_ERROR - if (H5Fclose(file_id) < 0) - TEST_ERROR - - PASSED(); - - return 0; - -error: - H5E_BEGIN_TRY - { - if (data) - HDfree(data); - if (points) - HDfree(points); - H5Sclose(fspace_id); - H5Dclose(dset_id); - H5Gclose(group_id); - H5Gclose(container_group); - H5Fclose(file_id); - } - H5E_END_TRY; - - return 1; -} -#endif - -/* - * A test to check that data can't be read from a - * dataset when H5Dread is passed invalid parameters. - */ -static int -test_read_dataset_invalid_params(void) +test_read_dataset_invalid_params(void) { hsize_t dims[DATASET_READ_INVALID_PARAMS_TEST_DSET_SPACE_RANK] = {10, 5, 3}; herr_t err_ret = -1; @@ -5324,7 +4964,7 @@ test_read_dataset_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -5347,7 +4987,7 @@ test_read_dataset_invalid_params(void) } if ((fspace_id = H5Screate_simple(DATASET_READ_INVALID_PARAMS_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_READ_INVALID_PARAMS_TEST_DSET_NAME, DATASET_READ_INVALID_PARAMS_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, @@ -5362,7 +5002,7 @@ test_read_dataset_invalid_params(void) data_size *= DATASET_READ_INVALID_PARAMS_TEST_DSET_DTYPESIZE; if (NULL == (read_buf = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -5370,7 +5010,7 @@ test_read_dataset_invalid_params(void) { PART_BEGIN(H5Dread_invalid_dset_id) { - TESTING_2("H5Dread with an invalid dataset ID") + TESTING_2("H5Dread with an invalid dataset ID"); H5E_BEGIN_TRY { @@ -5391,7 +5031,7 @@ test_read_dataset_invalid_params(void) PART_BEGIN(H5Dread_invalid_datatype) { - TESTING_2("H5Dread with an invalid memory datatype") + TESTING_2("H5Dread with an invalid memory datatype"); H5E_BEGIN_TRY { @@ -5411,7 +5051,7 @@ test_read_dataset_invalid_params(void) PART_BEGIN(H5Dread_invalid_mem_dataspace) { - TESTING_2("H5Dread with an invalid memory dataspace") + TESTING_2("H5Dread with an invalid memory dataspace"); H5E_BEGIN_TRY { @@ -5432,7 +5072,7 @@ test_read_dataset_invalid_params(void) PART_BEGIN(H5Dread_invalid_file_dataspace) { - TESTING_2("H5Dread with an invalid file dataspace") + TESTING_2("H5Dread with an invalid file dataspace"); H5E_BEGIN_TRY { @@ -5453,7 +5093,7 @@ test_read_dataset_invalid_params(void) PART_BEGIN(H5Dread_invalid_dxpl) { - TESTING_2("H5Dread with an invalid DXPL") + TESTING_2("H5Dread with an invalid DXPL"); H5E_BEGIN_TRY { @@ -5474,7 +5114,7 @@ test_read_dataset_invalid_params(void) PART_BEGIN(H5Dread_invalid_data_buf) { - TESTING_2("H5Dread with an invalid data buffer") + TESTING_2("H5Dread with an invalid data buffer"); H5E_BEGIN_TRY { @@ -5495,7 +5135,7 @@ test_read_dataset_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (read_buf) { HDfree(read_buf); @@ -5503,15 +5143,15 @@ test_read_dataset_invalid_params(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -5549,7 +5189,7 @@ test_write_dataset_small_all(void) hid_t fspace_id = H5I_INVALID_HID; void *data = NULL; - TESTING("small write to dataset with H5S_ALL") + TESTING("small write to dataset with H5S_ALL"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -5580,7 +5220,7 @@ test_write_dataset_small_all(void) } if ((fspace_id = H5Screate_simple(DATASET_SMALL_WRITE_TEST_ALL_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_SMALL_WRITE_TEST_ALL_DSET_NAME, DATASET_SMALL_WRITE_TEST_ALL_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, @@ -5594,7 +5234,7 @@ test_write_dataset_small_all(void) if (H5Dclose(dset_id) < 0) TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dopen2(group_id, DATASET_SMALL_WRITE_TEST_ALL_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -5615,7 +5255,7 @@ test_write_dataset_small_all(void) } if (NULL == (data = HDmalloc((hsize_t)space_npoints * DATASET_SMALL_WRITE_TEST_ALL_DSET_DTYPESIZE))) - TEST_ERROR + TEST_ERROR; for (i = 0; i < (hsize_t)space_npoints; i++) ((int *)data)[i] = (int)i; @@ -5632,15 +5272,15 @@ test_write_dataset_small_all(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -5681,7 +5321,7 @@ test_write_dataset_small_hyperslab(void) hid_t mspace_id = H5I_INVALID_HID, fspace_id = H5I_INVALID_HID; void *data = NULL; - TESTING("small write to dataset with a hyperslab selection") + TESTING("small write to dataset with a hyperslab selection"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -5713,10 +5353,10 @@ test_write_dataset_small_hyperslab(void) } if ((fspace_id = H5Screate_simple(DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((mspace_id = H5Screate_simple(DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_SPACE_RANK - 1, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_NAME, DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_DTYPE, fspace_id, H5P_DEFAULT, @@ -5731,7 +5371,7 @@ test_write_dataset_small_hyperslab(void) data_size *= DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_DTYPESIZE; if (NULL == (data = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; for (i = 0; i < data_size / DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_DTYPESIZE; i++) ((int *)data)[i] = (int)i; @@ -5746,7 +5386,7 @@ test_write_dataset_small_hyperslab(void) count[2] = 1; if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(dset_id, DATASET_SMALL_WRITE_TEST_HYPERSLAB_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, data) < 0) { @@ -5761,17 +5401,17 @@ test_write_dataset_small_hyperslab(void) } if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -5813,7 +5453,7 @@ test_write_dataset_small_point_selection(void) hid_t mspace_id = H5I_INVALID_HID; void *data = NULL; - TESTING("small write to dataset with a point selection") + TESTING("small write to dataset with a point selection"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -5846,9 +5486,9 @@ test_write_dataset_small_point_selection(void) if ((fspace_id = H5Screate_simple(DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_NAME, DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_DTYPE, fspace_id, H5P_DEFAULT, @@ -5862,7 +5502,7 @@ test_write_dataset_small_point_selection(void) DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_DTYPESIZE; if (NULL == (data = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; for (i = 0; i < data_size / DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_DTYPESIZE; i++) ((int *)data)[i] = (int)i; @@ -5870,278 +5510,21 @@ test_write_dataset_small_point_selection(void) for (i = 0; i < DATASET_SMALL_WRITE_TEST_POINT_SELECTION_NUM_POINTS; i++) { size_t j; - for (j = 0; j < DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_SPACE_RANK; j++) - points[(i * DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_SPACE_RANK) + j] = i; - } - - if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, DATASET_SMALL_WRITE_TEST_POINT_SELECTION_NUM_POINTS, - points) < 0) { - H5_FAILED(); - HDprintf(" couldn't select points\n"); - goto error; - } - - if (H5Dwrite(dset_id, DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_DTYPE, mspace_id, fspace_id, - H5P_DEFAULT, data) < 0) { - H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_NAME); - goto error; - } - - if (data) { - HDfree(data); - data = NULL; - } - - if (H5Sclose(mspace_id) < 0) - TEST_ERROR - if (H5Sclose(fspace_id) < 0) - TEST_ERROR - if (H5Dclose(dset_id) < 0) - TEST_ERROR - if (H5Gclose(group_id) < 0) - TEST_ERROR - if (H5Gclose(container_group) < 0) - TEST_ERROR - if (H5Fclose(file_id) < 0) - TEST_ERROR - - PASSED(); - - return 0; - -error: - H5E_BEGIN_TRY - { - if (data) - HDfree(data); - H5Sclose(mspace_id); - H5Sclose(fspace_id); - H5Dclose(dset_id); - H5Gclose(group_id); - H5Gclose(container_group); - H5Fclose(file_id); - } - H5E_END_TRY; - - return 1; -} - -#ifndef NO_LARGE_TESTS -/* - * A test to check that a large write can be made - * to a dataset using an H5S_ALL selection. - */ -static int -test_write_dataset_large_all(void) -{ - hssize_t space_npoints; - hsize_t dims[DATASET_LARGE_WRITE_TEST_ALL_DSET_SPACE_RANK] = {600, 600, 600}; - size_t i, data_size; - hid_t file_id = H5I_INVALID_HID; - hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; - hid_t dset_id = H5I_INVALID_HID; - hid_t fspace_id = H5I_INVALID_HID; - void *data = NULL; - - TESTING("large write to dataset with H5S_ALL") - - /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { - SKIPPED(); - HDprintf(" API functions for basic file, group, basic or more dataset aren't supported with this " - "connector\n"); - return 0; - } - - if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", vol_test_filename); - goto error; - } - - if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); - goto error; - } - - if ((group_id = H5Gcreate2(container_group, DATASET_LARGE_WRITE_TEST_ALL_GROUP_NAME, H5P_DEFAULT, - H5P_DEFAULT, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", DATASET_LARGE_WRITE_TEST_ALL_GROUP_NAME); - goto error; - } - - if ((fspace_id = H5Screate_simple(DATASET_LARGE_WRITE_TEST_ALL_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR - - if ((dset_id = H5Dcreate2(group_id, DATASET_LARGE_WRITE_TEST_ALL_DSET_NAME, - DATASET_LARGE_WRITE_TEST_ALL_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, - H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_LARGE_WRITE_TEST_ALL_DSET_NAME); - goto error; - } - - /* Close the dataset and dataspace to ensure that retrieval of file space ID is working */ - if (H5Dclose(dset_id) < 0) - TEST_ERROR - if (H5Sclose(fspace_id) < 0) - TEST_ERROR - - if ((dset_id = H5Dopen2(group_id, DATASET_LARGE_WRITE_TEST_ALL_DSET_NAME, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_LARGE_WRITE_TEST_ALL_DSET_NAME); - goto error; - } - - if ((fspace_id = H5Dget_space(dset_id)) < 0) { - H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); - goto error; - } - - if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { - H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); - goto error; - } - - if (NULL == (data = HDmalloc((hsize_t)space_npoints * DATASET_LARGE_WRITE_TEST_ALL_DSET_DTYPESIZE))) - TEST_ERROR - - for (i = 0; i < (hsize_t)space_npoints; i++) - ((int *)data)[i] = (int)i; - - if (H5Dwrite(dset_id, DATASET_LARGE_WRITE_TEST_ALL_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0) { - H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", DATASET_LARGE_WRITE_TEST_ALL_DSET_NAME); - goto error; - } - - if (data) { - HDfree(data); - data = NULL; - } - - if (H5Sclose(fspace_id) < 0) - TEST_ERROR - if (H5Dclose(dset_id) < 0) - TEST_ERROR - if (H5Gclose(group_id) < 0) - TEST_ERROR - if (H5Gclose(container_group) < 0) - TEST_ERROR - if (H5Fclose(file_id) < 0) - TEST_ERROR - - PASSED(); - - return 0; - -error: - H5E_BEGIN_TRY - { - H5Sclose(fspace_id); - H5Dclose(dset_id); - H5Gclose(group_id); - H5Gclose(container_group); - H5Fclose(file_id); - } - H5E_END_TRY; - - return 1; -} - -/* - * A test to check that a large write can be made - * to a dataset using a hyperslab selection. - */ -static int -test_write_dataset_large_hyperslab(void) -{ - hsize_t start[DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_SPACE_RANK]; - hsize_t stride[DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_SPACE_RANK]; - hsize_t count[DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_SPACE_RANK]; - hsize_t block[DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_SPACE_RANK]; - hsize_t dims[DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_SPACE_RANK] = {600, 600, 600}; - size_t i, data_size; - hid_t file_id = H5I_INVALID_HID; - hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; - hid_t dset_id = H5I_INVALID_HID; - hid_t mspace_id = H5I_INVALID_HID, fspace_id = H5I_INVALID_HID; - void *data = NULL; - - TESTING("large write to dataset with a hyperslab selection") - - /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { - SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); - return 0; - } - - if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", vol_test_filename); - goto error; - } - - if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); - goto error; - } - - if ((group_id = H5Gcreate2(container_group, DATASET_LARGE_WRITE_TEST_HYPERSLAB_GROUP_NAME, H5P_DEFAULT, - H5P_DEFAULT, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_LARGE_WRITE_TEST_HYPERSLAB_GROUP_NAME); - goto error; - } - - if ((fspace_id = H5Screate_simple(DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR - if ((mspace_id = H5Screate_simple(DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR - - if ((dset_id = H5Dcreate2(group_id, DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_NAME, - DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_DTYPE, fspace_id, H5P_DEFAULT, - H5P_DEFAULT, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_NAME); - goto error; - } - - for (i = 0, data_size = 1; i < DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_SPACE_RANK; i++) - data_size *= dims[i]; - data_size *= DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_DTYPESIZE; - - if (NULL == (data = HDmalloc(data_size))) - TEST_ERROR - - for (i = 0; i < data_size / DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_DTYPESIZE; i++) - ((int *)data)[i] = (int)i; - - for (i = 0; i < DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_SPACE_RANK; i++) { - start[i] = 0; - stride[i] = 1; - count[i] = dims[i]; - block[i] = 1; + for (j = 0; j < DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_SPACE_RANK; j++) + points[(i * DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_SPACE_RANK) + j] = i; } - if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, DATASET_SMALL_WRITE_TEST_POINT_SELECTION_NUM_POINTS, + points) < 0) { + H5_FAILED(); + HDprintf(" couldn't select points\n"); + goto error; + } - if (H5Dwrite(dset_id, DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, - data) < 0) { + if (H5Dwrite(dset_id, DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_DTYPE, mspace_id, fspace_id, + H5P_DEFAULT, data) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_NAME); + HDprintf(" couldn't write to dataset '%s'\n", DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_NAME); goto error; } @@ -6151,17 +5534,17 @@ test_write_dataset_large_hyperslab(void) } if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -6184,24 +5567,6 @@ test_write_dataset_large_hyperslab(void) return 1; } -/* - * A test to check that a large write can be made - * to a dataset using a point selection. - */ -static int -test_write_dataset_large_point_selection(void) -{ - TESTING("large write to dataset with a point selection") - - SKIPPED(); - - return 0; - -error: - return 1; -} -#endif - /* * A test to ensure that data is read back correctly from * a dataset after it has been written. @@ -6238,7 +5603,7 @@ test_write_dataset_data_verification(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -6260,7 +5625,7 @@ test_write_dataset_data_verification(void) } if ((fspace_id = H5Screate_simple(DATASET_DATA_VERIFY_WRITE_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_DATA_VERIFY_WRITE_TEST_DSET_NAME, DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, @@ -6275,7 +5640,7 @@ test_write_dataset_data_verification(void) data_size *= DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE; if (NULL == (data = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; for (i = 0; i < data_size / DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE; i++) ((int *)data)[i] = (int)i; @@ -6286,7 +5651,7 @@ test_write_dataset_data_verification(void) { PART_BEGIN(H5Dwrite_all_read) { - TESTING_2("H5Dwrite using H5S_ALL then H5Dread") + TESTING_2("H5Dwrite using H5S_ALL then H5Dread"); if (H5Dwrite(dset_id, DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0) { @@ -6367,7 +5732,7 @@ test_write_dataset_data_verification(void) PART_BEGIN(H5Dwrite_hyperslab_read) { - TESTING_2("H5Dwrite using hyperslab selection then H5Dread") + TESTING_2("H5Dwrite using hyperslab selection then H5Dread"); data_size = dims[1] * 2 * DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE; @@ -6519,7 +5884,7 @@ test_write_dataset_data_verification(void) PART_BEGIN(H5Dwrite_point_sel_read) { - TESTING_2("H5Dwrite using point selection then H5Dread") + TESTING_2("H5Dwrite using point selection then H5Dread"); data_size = DATASET_DATA_VERIFY_WRITE_TEST_NUM_POINTS * DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE; @@ -6664,7 +6029,7 @@ test_write_dataset_data_verification(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (data) { HDfree(data); @@ -6682,15 +6047,15 @@ test_write_dataset_data_verification(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -6745,7 +6110,7 @@ test_write_dataset_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -6768,7 +6133,7 @@ test_write_dataset_invalid_params(void) } if ((fspace_id = H5Screate_simple(DATASET_WRITE_INVALID_PARAMS_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_WRITE_INVALID_PARAMS_TEST_DSET_NAME, DATASET_SMALL_WRITE_TEST_ALL_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, @@ -6785,7 +6150,7 @@ test_write_dataset_invalid_params(void) } if (NULL == (data = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_INVALID_PARAMS_TEST_DSET_DTYPESIZE))) - TEST_ERROR + TEST_ERROR; for (i = 0; i < (hsize_t)space_npoints; i++) ((int *)data)[i] = (int)i; @@ -6796,7 +6161,7 @@ test_write_dataset_invalid_params(void) { PART_BEGIN(H5Dwrite_invalid_dset_id) { - TESTING_2("H5Dwrite with an invalid dataset ID") + TESTING_2("H5Dwrite with an invalid dataset ID"); H5E_BEGIN_TRY { @@ -6817,7 +6182,7 @@ test_write_dataset_invalid_params(void) PART_BEGIN(H5Dwrite_invalid_datatype) { - TESTING_2("H5Dwrite with an invalid memory datatype") + TESTING_2("H5Dwrite with an invalid memory datatype"); H5E_BEGIN_TRY { @@ -6837,7 +6202,7 @@ test_write_dataset_invalid_params(void) PART_BEGIN(H5Dwrite_invalid_mem_dataspace) { - TESTING_2("H5Dwrite with an invalid memory dataspace") + TESTING_2("H5Dwrite with an invalid memory dataspace"); H5E_BEGIN_TRY { @@ -6858,7 +6223,7 @@ test_write_dataset_invalid_params(void) PART_BEGIN(H5Dwrite_invalid_file_dataspace) { - TESTING_2("H5Dwrite with an invalid file dataspace") + TESTING_2("H5Dwrite with an invalid file dataspace"); H5E_BEGIN_TRY { @@ -6879,7 +6244,7 @@ test_write_dataset_invalid_params(void) PART_BEGIN(H5Dwrite_invalid_dxpl) { - TESTING_2("H5Dwrite with an invalid DXPL") + TESTING_2("H5Dwrite with an invalid DXPL"); H5E_BEGIN_TRY { @@ -6900,7 +6265,7 @@ test_write_dataset_invalid_params(void) PART_BEGIN(H5Dwrite_invalid_data_buf) { - TESTING_2("H5Dwrite with an invalid data buffer") + TESTING_2("H5Dwrite with an invalid data buffer"); H5E_BEGIN_TRY { @@ -6921,7 +6286,7 @@ test_write_dataset_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (data) { HDfree(data); @@ -6929,15 +6294,15 @@ test_write_dataset_invalid_params(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -6998,7 +6363,7 @@ test_dataset_builtin_type_conversion(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((native_order = H5Tget_order(DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPE)) < 0) { H5_FAILED(); @@ -7030,7 +6395,7 @@ test_dataset_builtin_type_conversion(void) } if ((fspace_id = H5Screate_simple(DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_DATA_BUILTIN_CONVERSION_TEST_DSET_NAME, file_type_id, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -7044,7 +6409,7 @@ test_dataset_builtin_type_conversion(void) data_size *= DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE; if (NULL == (data = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; for (i = 0; i < data_size / DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE; i++) ((int *)data)[i] = (int)i; @@ -7055,7 +6420,7 @@ test_dataset_builtin_type_conversion(void) { PART_BEGIN(H5Dwrite_all_read) { - TESTING_2("H5Dwrite then H5Dread with H5S_ALL selection") + TESTING_2("H5Dwrite then H5Dread with H5S_ALL selection"); if (H5Dwrite(dset_id, DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0) { @@ -7139,7 +6504,7 @@ test_dataset_builtin_type_conversion(void) PART_BEGIN(H5Dwrite_hyperslab_read) { - TESTING_2("H5Dwrite using hyperslab selection then H5Dread") + TESTING_2("H5Dwrite using hyperslab selection then H5Dread"); data_size = dims[1] * 2 * DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE; @@ -7295,7 +6660,7 @@ test_dataset_builtin_type_conversion(void) PART_BEGIN(H5Dwrite_point_sel_read) { - TESTING_2("H5Dwrite using point selection then H5Dread") + TESTING_2("H5Dwrite using point selection then H5Dread"); data_size = DATASET_DATA_BUILTIN_CONVERSION_TEST_NUM_POINTS * DATASET_DATA_BUILTIN_CONVERSION_TEST_MEM_DTYPESIZE; @@ -7444,7 +6809,7 @@ test_dataset_builtin_type_conversion(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (data) { HDfree(data); @@ -7462,15 +6827,15 @@ test_dataset_builtin_type_conversion(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -7535,7 +6900,7 @@ test_dataset_compound_partial_io(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -7558,24 +6923,24 @@ test_dataset_compound_partial_io(void) } if ((space_id = H5Screate_simple(1, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((full_type_id = H5Tcreate(H5T_COMPOUND, sizeof(dataset_compount_partial_io_t))) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(full_type_id, "a", HOFFSET(dataset_compount_partial_io_t, a), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(full_type_id, "b", HOFFSET(dataset_compount_partial_io_t, b), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if ((a_type_id = H5Tcreate(H5T_COMPOUND, sizeof(dataset_compount_partial_io_t))) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(a_type_id, "a", HOFFSET(dataset_compount_partial_io_t, a), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if ((b_type_id = H5Tcreate(H5T_COMPOUND, sizeof(dataset_compount_partial_io_t))) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(b_type_id, "b", HOFFSET(dataset_compount_partial_io_t, b), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_DATA_COMPOUND_PARTIAL_IO_TEST_DSET_NAME, full_type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -7590,7 +6955,7 @@ test_dataset_compound_partial_io(void) { PART_BEGIN(write_full_read_full) { - TESTING_2("H5Dwrite then H5Dread with all compound members") + TESTING_2("H5Dwrite then H5Dread with all compound members"); /* Initialize wbuf */ for (i = 0; i < DATASET_COMPOUND_PARTIAL_IO_DSET_DIMS; i++) { @@ -7600,7 +6965,7 @@ test_dataset_compound_partial_io(void) /* Write data */ if (H5Dwrite(dset_id, full_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0) - PART_TEST_ERROR(write_full_read_full) + PART_TEST_ERROR(write_full_read_full); /* Update fbuf to match file state */ for (i = 0; i < DATASET_COMPOUND_PARTIAL_IO_DSET_DIMS; i++) { @@ -7623,14 +6988,14 @@ test_dataset_compound_partial_io(void) /* Read data */ if (H5Dread(dset_id, full_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0) - PART_TEST_ERROR(write_full_read_full) + PART_TEST_ERROR(write_full_read_full); /* Verify data */ for (i = 0; i < DATASET_COMPOUND_PARTIAL_IO_DSET_DIMS; i++) { if (rbuf[i].a != erbuf[i].a) - PART_TEST_ERROR(write_full_read_full) + PART_TEST_ERROR(write_full_read_full); if (rbuf[i].b != erbuf[i].b) - PART_TEST_ERROR(write_full_read_full) + PART_TEST_ERROR(write_full_read_full); } PASSED(); @@ -7639,7 +7004,7 @@ test_dataset_compound_partial_io(void) PART_BEGIN(read_a) { - TESTING_2("H5Dread with compound member a") + TESTING_2("H5Dread with compound member a"); /* Initialize rbuf to -1 */ for (i = 0; i < DATASET_COMPOUND_PARTIAL_IO_DSET_DIMS; i++) { @@ -7656,14 +7021,14 @@ test_dataset_compound_partial_io(void) /* Read data */ if (H5Dread(dset_id, a_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0) - PART_TEST_ERROR(read_a) + PART_TEST_ERROR(read_a); /* Verify data */ for (i = 0; i < DATASET_COMPOUND_PARTIAL_IO_DSET_DIMS; i++) { if (rbuf[i].a != erbuf[i].a) - PART_TEST_ERROR(read_a) + PART_TEST_ERROR(read_a); if (rbuf[i].b != erbuf[i].b) - PART_TEST_ERROR(read_a) + PART_TEST_ERROR(read_a); } PASSED(); @@ -7672,7 +7037,7 @@ test_dataset_compound_partial_io(void) PART_BEGIN(write_b_read_full) { - TESTING_2("H5Dwrite with compound member b then H5Dread with all compound members") + TESTING_2("H5Dwrite with compound member b then H5Dread with all compound members"); /* Initialize wbuf */ for (i = 0; i < DATASET_COMPOUND_PARTIAL_IO_DSET_DIMS; i++) { @@ -7682,7 +7047,7 @@ test_dataset_compound_partial_io(void) /* Write data */ if (H5Dwrite(dset_id, b_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0) - PART_TEST_ERROR(write_full_read_full) + PART_TEST_ERROR(write_full_read_full); /* Update fbuf to match file state - only element b was updated */ for (i = 0; i < DATASET_COMPOUND_PARTIAL_IO_DSET_DIMS; i++) { @@ -7704,14 +7069,14 @@ test_dataset_compound_partial_io(void) /* Read data */ if (H5Dread(dset_id, full_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0) - PART_TEST_ERROR(write_b_read_full) + PART_TEST_ERROR(write_b_read_full); /* Verify data */ for (i = 0; i < DATASET_COMPOUND_PARTIAL_IO_DSET_DIMS; i++) { if (rbuf[i].a != erbuf[i].a) - PART_TEST_ERROR(write_b_read_full) + PART_TEST_ERROR(write_b_read_full); if (rbuf[i].b != erbuf[i].b) - PART_TEST_ERROR(write_b_read_full) + PART_TEST_ERROR(write_b_read_full); } PASSED(); @@ -7720,24 +7085,24 @@ test_dataset_compound_partial_io(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(full_type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(a_type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(b_type_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -7781,7 +7146,7 @@ test_dataset_set_extent_chunked_unlimited(void) hid_t dcpl_id = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID; - TESTING("H5Dset_extent on chunked dataset with unlimited dimensions") + TESTING("H5Dset_extent on chunked dataset with unlimited dimensions"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -7819,13 +7184,13 @@ test_dataset_set_extent_chunked_unlimited(void) if ((fspace_id = generate_random_dataspace(DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_SPACE_RANK, max_dims, dims, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(dcpl_id, DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_SPACE_RANK, chunk_dims) < 0) { H5_FAILED(); @@ -7860,7 +7225,7 @@ test_dataset_set_extent_chunked_unlimited(void) * are different from the original. */ if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); @@ -7916,9 +7281,9 @@ test_dataset_set_extent_chunked_unlimited(void) * are different from the original. */ if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dopen2(group_id, DATASET_SET_EXTENT_CHUNKED_UNLIMITED_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { @@ -7959,19 +7324,19 @@ test_dataset_set_extent_chunked_unlimited(void) } if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -8014,7 +7379,7 @@ test_dataset_set_extent_chunked_fixed(void) hid_t dcpl_id = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID, fspace_id2 = H5I_INVALID_HID; - TESTING("H5Dset_extent on chunked dataset with fixed dimensions") + TESTING("H5Dset_extent on chunked dataset with fixed dimensions"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -8054,15 +7419,15 @@ test_dataset_set_extent_chunked_fixed(void) } if ((fspace_id = H5Screate_simple(DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id2 = H5Screate_simple(DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_SPACE_RANK, dims2, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(dcpl_id, DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_SPACE_RANK, chunk_dims) < 0) { H5_FAILED(); @@ -8122,7 +7487,7 @@ test_dataset_set_extent_chunked_fixed(void) * are different from the original. */ if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); @@ -8132,7 +7497,7 @@ test_dataset_set_extent_chunked_fixed(void) if (H5Sget_simple_extent_dims(fspace_id, new_dims, NULL) < 0) { H5_FAILED(); - HDprintf(" failed to retreive dataset dimensionality\n"); + HDprintf(" failed to retrieve dataset dimensionality\n"); goto error; } @@ -8191,9 +7556,9 @@ test_dataset_set_extent_chunked_fixed(void) * are different from the original. */ if (H5Sclose(fspace_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id2) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id2 = H5Dopen2(group_id, DATASET_SET_EXTENT_CHUNKED_FIXED_TEST_DSET_NAME2, H5P_DEFAULT)) < 0) { @@ -8210,7 +7575,7 @@ test_dataset_set_extent_chunked_fixed(void) if (H5Sget_simple_extent_dims(fspace_id2, new_dims, NULL) < 0) { H5_FAILED(); - HDprintf(" failed to retreive dataset dimensionality\n"); + HDprintf(" failed to retrieve dataset dimensionality\n"); goto error; } @@ -8233,23 +7598,23 @@ test_dataset_set_extent_chunked_fixed(void) } if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -8296,10 +7661,8 @@ test_dataset_set_extent_data(void) hid_t dcpl_id = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID, dset_space_id = H5I_INVALID_HID; int buf_origin[DATASET_SET_EXTENT_DATA_TEST_SPACE_DIM][DATASET_SET_EXTENT_DATA_TEST_SPACE_DIM]; -#ifndef NO_CLEAR_ON_SHRINK - int buf_expand2[DATASET_SET_EXTENT_DATA_TEST_SPACE_DIM][DATASET_SET_EXTENT_DATA_TEST_SPACE_DIM]; -#endif - int buf_expand[DATASET_SET_EXTENT_DATA_TEST_SPACE_DIM * 2 - 1] + int buf_expand2[DATASET_SET_EXTENT_DATA_TEST_SPACE_DIM][DATASET_SET_EXTENT_DATA_TEST_SPACE_DIM]; + int buf_expand[DATASET_SET_EXTENT_DATA_TEST_SPACE_DIM * 2 - 1] [DATASET_SET_EXTENT_DATA_TEST_SPACE_DIM * 2 - 1]; int buf_shrink[DATASET_SET_EXTENT_DATA_TEST_SPACE_DIM / 2 + 1] [DATASET_SET_EXTENT_DATA_TEST_SPACE_DIM / 2 + 1]; @@ -8316,7 +7679,7 @@ test_dataset_set_extent_data(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -8338,10 +7701,10 @@ test_dataset_set_extent_data(void) } if ((fspace_id = H5Screate_simple(DATASET_SET_EXTENT_DATA_TEST_SPACE_RANK, dims_origin, dims_max)) < 0) - TEST_ERROR + TEST_ERROR; if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(dcpl_id, DATASET_SET_EXTENT_DATA_TEST_SPACE_RANK, dims_chunk) < 0) { H5_FAILED(); @@ -8371,7 +7734,7 @@ test_dataset_set_extent_data(void) * X X X X X X X X */ if (H5Dwrite(dset_id, H5T_NATIVE_INT, fspace_id, H5S_ALL, H5P_DEFAULT, buf_origin) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -8379,7 +7742,7 @@ test_dataset_set_extent_data(void) { PART_BEGIN(H5Dset_extent_data_expand) { - TESTING_2("H5Dset_extent for data expansion") + TESTING_2("H5Dset_extent for data expansion"); /* Expand the dataset. The extended space should be initialized with the * the default value (0) @@ -8432,7 +7795,7 @@ test_dataset_set_extent_data(void) PART_BEGIN(H5Dset_extent_data_shrink) { - TESTING_2("H5Dset_extent for data shrinking") + TESTING_2("H5Dset_extent for data shrinking"); /* Shrink the dataset. * X X X X X @@ -8447,7 +7810,7 @@ test_dataset_set_extent_data(void) if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_shrink) < 0) PART_ERROR(H5Dset_extent_data_shrink); - /* compare the shrinked data */ + /* compare the shrunk data */ for (i = 0; i < (int)dims_shrink[0]; i++) { for (j = 0; j < (int)dims_shrink[1]; j++) { if (buf_shrink[i][j] != buf_origin[i][j]) { @@ -8465,8 +7828,8 @@ test_dataset_set_extent_data(void) PART_BEGIN(H5Dset_extent_data_expand_to_origin) { - TESTING_2("H5Dset_extent for data back to the original size") -#ifndef NO_CLEAR_ON_SHRINK + TESTING_2("H5Dset_extent for data back to the original size"); + /* Expand the dataset back to the original size. The data should look like this: * X X X X X 0 0 0 * X X X X X 0 0 0 @@ -8506,16 +7869,12 @@ test_dataset_set_extent_data(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Dset_extent_data_expand_to_origin); -#endif } PART_END(H5Dset_extent_data_expand_to_origin); PART_BEGIN(H5Dset_extent_data_shrink_to_zero) { - TESTING_2("H5Dset_extent for data shrink to zero size") + TESTING_2("H5Dset_extent for data shrink to zero size"); /* Shrink the dimensions to 0 and verify it */ dims_shrink[0] = dims_shrink[1] = 0; @@ -8549,8 +7908,8 @@ test_dataset_set_extent_data(void) PART_BEGIN(H5Dset_extent_data_expand_to_origin_again) { - TESTING_2("H5Dset_extent for data expansion back to the original again") -#ifndef NO_CLEAR_ON_SHRINK + TESTING_2("H5Dset_extent for data expansion back to the original again"); + /* Expand the dataset back to the original size. The data should look like this: * 0 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 0 @@ -8579,29 +7938,25 @@ test_dataset_set_extent_data(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Dset_extent_data_expand_to_origin_again); -#endif } PART_END(H5Dset_extent_data_expand_to_origin_again); } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -8631,7 +7986,6 @@ test_dataset_set_extent_data(void) static int test_dataset_set_extent_double_handles(void) { -#ifndef NO_DOUBLE_OBJECT_OPENS hsize_t dims_origin[DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_SPACE_RANK] = { DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_SPACE_DIM, DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_SPACE_DIM}; hsize_t dims_expand[DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_SPACE_RANK] = { @@ -8648,11 +8002,8 @@ test_dataset_set_extent_double_handles(void) hid_t dcpl_id = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID, dset_space_id = H5I_INVALID_HID; int i; -#endif - TESTING("H5Dset_extent on double dataset handles") - -#ifndef NO_DOUBLE_OBJECT_OPENS + TESTING("H5Dset_extent on double dataset handles"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -8684,10 +8035,10 @@ test_dataset_set_extent_double_handles(void) if ((fspace_id = H5Screate_simple(DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_SPACE_RANK, dims_origin, dims_max)) < 0) - TEST_ERROR + TEST_ERROR; if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(dcpl_id, DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_SPACE_RANK, dims_chunk) < 0) { H5_FAILED(); @@ -8712,40 +8063,41 @@ test_dataset_set_extent_double_handles(void) /* Expand the dataset's dimensions with the first dataset handle */ if (H5Dset_extent(dset_id, dims_expand) < 0) - TEST_ERROR + TEST_ERROR; /* Get the data space with the second dataset handle */ if ((dset_space_id = H5Dget_space(dset_id2)) < 0) - TEST_ERROR + TEST_ERROR; /* Get the dimensions with the second dataset handle */ if (H5Sget_simple_extent_dims(dset_space_id, dims_out, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(dset_space_id) < 0) - TEST_ERROR + TEST_ERROR; for (i = 0; i < DATASET_SET_EXTENT_DOUBLE_HANDLES_TEST_SPACE_RANK; i++) if (dims_out[i] != dims_expand[i]) { H5_FAILED(); - HDprintf(" dims_out[%d] = %d. It should be %d.\n", i, dims_out[i], dims_expand[i]); + HDprintf(" dims_out[%d] = %" PRIuHSIZE ". It should be %" PRIuHSIZE ".\n", i, dims_out[i], + dims_expand[i]); goto error; } if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -8766,10 +8118,6 @@ test_dataset_set_extent_double_handles(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } /* test_dataset_set_extent_double_handles */ /* @@ -8806,7 +8154,7 @@ test_dataset_set_extent_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -8817,12 +8165,12 @@ test_dataset_set_extent_invalid_params(void) /** for DAOS VOL, this test is problematic since auto chunking can be selected, so skip for now */ if (H5VLget_connector_name(file_id, vol_name, 5) < 0) { H5_FAILED(); - HDprintf(" couldn't get VOL NAME '%s'\n", DATASET_TEST_GROUP_NAME); + HDprintf(" couldn't get VOL connector name\n"); goto error; } if (strcmp(vol_name, "daos") == 0) { if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; SKIPPED(); return 0; } @@ -8843,7 +8191,7 @@ test_dataset_set_extent_invalid_params(void) if ((fspace_id = generate_random_dataspace(DATASET_SET_EXTENT_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; for (i = 0; i < DATASET_SET_EXTENT_INVALID_PARAMS_TEST_SPACE_RANK; i++) { do { @@ -8855,19 +8203,19 @@ test_dataset_set_extent_invalid_params(void) } if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; /* Create a compact dataset */ if ((compact_dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_layout(compact_dcpl_id, H5D_COMPACT) < 0) - TEST_ERROR + TEST_ERROR; /* Keep the data space small because the storage size of compact dataset is limited to 64K */ if ((compact_fspace_id = H5Screate_simple(DATASET_SET_EXTENT_INVALID_PARAMS_TEST_SPACE_RANK, compact_dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((compact_dset_id = H5Dcreate2(group_id, DATASET_SET_EXTENT_INVALID_LAYOUT_TEST_COMPACT_DSET_NAME, H5T_NATIVE_INT, @@ -8880,10 +8228,10 @@ test_dataset_set_extent_invalid_params(void) /* Create a contiguous dataset */ if ((contiguous_dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_layout(contiguous_dcpl_id, H5D_CONTIGUOUS) < 0) - TEST_ERROR + TEST_ERROR; if ((contiguous_dset_id = H5Dcreate2(group_id, DATASET_SET_EXTENT_INVALID_LAYOUT_TEST_CONTIGUOUS_DSET_NAME, dset_dtype, @@ -8896,7 +8244,7 @@ test_dataset_set_extent_invalid_params(void) /* Create a chunked dataset */ if ((chunked_dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(chunked_dcpl_id, DATASET_SET_EXTENT_INVALID_PARAMS_TEST_SPACE_RANK, chunk_dims) < 0) { H5_FAILED(); @@ -8917,7 +8265,7 @@ test_dataset_set_extent_invalid_params(void) { PART_BEGIN(H5Dset_extent_invalid_layout_compact) { - TESTING_2("H5Dset_extent with an invalid dataset layout (compact)") + TESTING_2("H5Dset_extent with an invalid dataset layout (compact)"); H5E_BEGIN_TRY { @@ -8937,7 +8285,7 @@ test_dataset_set_extent_invalid_params(void) PART_BEGIN(H5Dset_extent_invalid_layout_contiguous) { - TESTING_2("H5Dset_extent with an invalid dataset layout (continguous)") + TESTING_2("H5Dset_extent with an invalid dataset layout (contiguous)"); H5E_BEGIN_TRY { @@ -8957,7 +8305,7 @@ test_dataset_set_extent_invalid_params(void) PART_BEGIN(H5Dset_extent_invalid_dset_id) { - TESTING_2("H5Dset_extent with an invalid dataset ID") + TESTING_2("H5Dset_extent with an invalid dataset ID"); H5E_BEGIN_TRY { @@ -8977,7 +8325,7 @@ test_dataset_set_extent_invalid_params(void) PART_BEGIN(H5Dset_extent_null_dim_pointer) { - TESTING_2("H5Dset_extent with NULL dimension pointer") + TESTING_2("H5Dset_extent with NULL dimension pointer"); H5E_BEGIN_TRY { @@ -8997,32 +8345,32 @@ test_dataset_set_extent_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(chunked_dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(compact_dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(contiguous_dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(compact_fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(chunked_dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(compact_dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(contiguous_dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -9055,7 +8403,7 @@ test_dataset_set_extent_invalid_params(void) static int test_flush_dataset(void) { - TESTING("H5Dflush") + TESTING("H5Dflush"); SKIPPED(); @@ -9069,7 +8417,7 @@ test_flush_dataset(void) static int test_flush_dataset_invalid_params(void) { - TESTING("H5Dflush with invalid parameters") + TESTING("H5Dflush with invalid parameters"); SKIPPED(); @@ -9082,7 +8430,7 @@ test_flush_dataset_invalid_params(void) static int test_refresh_dataset(void) { - TESTING("H5Drefresh") + TESTING("H5Drefresh"); SKIPPED(); @@ -9096,7 +8444,7 @@ test_refresh_dataset(void) static int test_refresh_dataset_invalid_params(void) { - TESTING("H5Drefresh") + TESTING("H5Drefresh"); SKIPPED(); @@ -9119,7 +8467,7 @@ test_create_single_chunk_dataset(void) hid_t dcpl_id = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID; - TESTING("creation of dataset with single chunk") + TESTING("creation of dataset with single chunk"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -9150,12 +8498,12 @@ test_create_single_chunk_dataset(void) } if ((fspace_id = generate_random_dataspace(DATASET_SINGLE_CHUNK_TEST_SPACE_RANK, NULL, dims, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(dcpl_id, DATASET_SINGLE_CHUNK_TEST_SPACE_RANK, dims) < 0) { H5_FAILED(); @@ -9246,19 +8594,19 @@ test_create_single_chunk_dataset(void) } if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -9299,7 +8647,7 @@ test_write_single_chunk_dataset(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("write to dataset with single chunk") + TESTING("write to dataset with single chunk"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -9333,10 +8681,10 @@ test_write_single_chunk_dataset(void) if ((fspace_id = generate_random_dataspace(DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_SPACE_RANK, NULL, dims, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(dcpl_id, DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_SPACE_RANK, dims) < 0) { H5_FAILED(); @@ -9388,7 +8736,7 @@ test_write_single_chunk_dataset(void) data_size *= DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_DTYPESIZE; if (NULL == (write_buf = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; for (i = 0; i < data_size / DATASET_SINGLE_CHUNK_WRITE_TEST_DSET_DTYPESIZE; i++) ((int *)write_buf)[i] = (int)i; @@ -9467,17 +8815,17 @@ test_write_single_chunk_dataset(void) } if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -9519,7 +8867,7 @@ test_create_multi_chunk_dataset(void) hid_t dcpl_id = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID; - TESTING("creation of dataset with multiple chunks") + TESTING("creation of dataset with multiple chunks"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -9550,12 +8898,12 @@ test_create_multi_chunk_dataset(void) } if ((fspace_id = H5Screate_simple(DATASET_MULTI_CHUNK_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_TEST_SPACE_RANK, chunk_dims) < 0) { H5_FAILED(); @@ -9646,19 +8994,19 @@ test_create_multi_chunk_dataset(void) } if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -9704,7 +9052,7 @@ test_write_multi_chunk_dataset_same_shape_read(void) void *write_buf = NULL; int read_buf[10][10]; - TESTING("write to dataset with multiple chunks using same shaped dataspaces") + TESTING("write to dataset with multiple chunks using same shaped dataspaces"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -9738,10 +9086,10 @@ test_write_multi_chunk_dataset_same_shape_read(void) if ((fspace_id = H5Screate_simple(DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK, chunk_dims) < 0) { @@ -9800,7 +9148,7 @@ test_write_multi_chunk_dataset_same_shape_read(void) data_size *= DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_DTYPESIZE; if (NULL == (write_buf = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; /* * Ensure that each underlying chunk contains the values @@ -9972,19 +9320,19 @@ test_write_multi_chunk_dataset_same_shape_read(void) } if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -10032,7 +9380,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("write to dataset with multiple chunks using differently shaped dataspaces") + TESTING("write to dataset with multiple chunks using differently shaped dataspaces"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -10065,10 +9413,10 @@ test_write_multi_chunk_dataset_diff_shape_read(void) if ((fspace_id = H5Screate_simple(DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK, chunk_dims) < 0) { @@ -10127,7 +9475,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void) data_size *= DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_DTYPESIZE; if (NULL == (write_buf = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; /* * Ensure that each underlying chunk contains the values @@ -10308,19 +9656,19 @@ test_write_multi_chunk_dataset_diff_shape_read(void) } if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -10371,7 +9719,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) void *write_buf = NULL; int read_buf[10][10]; - TESTING("several overwrites to dataset with multiple chunks using same shaped dataspaces") + TESTING("several overwrites to dataset with multiple chunks using same shaped dataspaces"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -10404,10 +9752,10 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) if ((fspace_id = H5Screate_simple(DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK, chunk_dims) < 0) { @@ -10466,20 +9814,20 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) data_size *= DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_DTYPESIZE; if (NULL == (write_buf = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; - /* - * Create 2-dimensional memory dataspace for read buffer. - */ - { - hsize_t mdims[] = {chunk_dims[0], chunk_dims[1]}; + /* + * Create 2-dimensional memory dataspace for read buffer. + */ + { + hsize_t mdims[] = {chunk_dims[0], chunk_dims[1]}; - if ((mspace_id = H5Screate_simple(2, mdims, NULL)) < 0) { - H5_FAILED(); - HDprintf(" failed to create memory dataspace\n"); - goto error; - } + if ((mspace_id = H5Screate_simple(2, mdims, NULL)) < 0) { + H5_FAILED(); + HDprintf(" failed to create memory dataspace\n"); + goto error; } + } for (i = 0; i < DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK; i++) { count[i] = chunk_dims[i]; @@ -10645,19 +9993,19 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) } if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -10706,7 +10054,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("several overwrites to dataset with multiple chunks using differently shaped dataspaces") + TESTING("several overwrites to dataset with multiple chunks using differently shaped dataspaces"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -10739,10 +10087,10 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) if ((fspace_id = H5Screate_simple(DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK, chunk_dims) < 0) { @@ -10801,7 +10149,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) data_size *= DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_DTYPESIZE; if (NULL == (write_buf = HDmalloc(data_size))) - TEST_ERROR + TEST_ERROR; /* * Allocate single chunk-sized read buffer. @@ -10990,19 +10338,19 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) } if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -11051,7 +10399,7 @@ test_read_partial_chunk_all_selection(void) hid_t dcpl_id = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID; - TESTING("reading a partial chunk using H5S_ALL for file dataspace") + TESTING("reading a partial chunk using H5S_ALL for file dataspace"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -11084,10 +10432,10 @@ test_read_partial_chunk_all_selection(void) if ((fspace_id = H5Screate_simple(DATASET_PARTIAL_CHUNK_READ_ALL_SEL_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(dcpl_id, DATASET_PARTIAL_CHUNK_READ_ALL_SEL_TEST_DSET_SPACE_RANK, chunk_dims) < 0) { H5_FAILED(); @@ -11154,7 +10502,7 @@ test_read_partial_chunk_all_selection(void) * Close and re-open the dataset to ensure that the data is written. */ if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dopen2(group_id, DATASET_PARTIAL_CHUNK_READ_ALL_SEL_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); HDprintf(" failed to re-open dataset\n"); @@ -11180,17 +10528,17 @@ test_read_partial_chunk_all_selection(void) } if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -11238,7 +10586,7 @@ test_read_partial_chunk_hyperslab_selection(void) hid_t mspace_id = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID; - TESTING("reading a partial chunk using a hyperslab selection in file dataspace") + TESTING("reading a partial chunk using a hyperslab selection in file dataspace"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -11271,10 +10619,10 @@ test_read_partial_chunk_hyperslab_selection(void) if ((fspace_id = H5Screate_simple(DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(dcpl_id, DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_SPACE_RANK, chunk_dims) < 0) { H5_FAILED(); @@ -11425,9 +10773,9 @@ test_read_partial_chunk_hyperslab_selection(void) * Close and re-open the dataset to ensure the data gets written. */ if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dopen2(group_id, DATASET_PARTIAL_CHUNK_READ_HYPER_SEL_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -11469,19 +10817,19 @@ test_read_partial_chunk_hyperslab_selection(void) } if (H5Pclose(dcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -11516,7 +10864,7 @@ test_read_partial_chunk_hyperslab_selection(void) static int test_read_partial_chunk_point_selection(void) { - TESTING("reading a partial chunk using a point selection in file dataspace") + TESTING("reading a partial chunk using a point selection in file dataspace"); SKIPPED(); return 1; @@ -11543,13 +10891,13 @@ test_get_vlen_buf_size(void) hsize_t size; /* Number of bytes which will be used */ unsigned i, j; - TESTING("H5Dvlen_get_buf_size") + TESTING("H5Dvlen_get_buf_size"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, dataset, or more aren't supported with this " + HDprintf(" API functions for basic file, group, or dataset aren't supported with this " "connector\n"); return 0; } @@ -11584,24 +10932,24 @@ test_get_vlen_buf_size(void) /* Create dataspace for dataset */ if ((dspace_id = H5Screate_simple(DATASET_GET_VLEN_BUF_SIZE_DSET_SPACE_RANK, dims1, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create a datatype to refer to */ if ((dtype_id = H5Tvlen_create(H5T_NATIVE_UINT)) < 0) - TEST_ERROR + TEST_ERROR; /* Create a dataset */ if ((dataset = H5Dcreate2(group_id, DATASET_GET_VLEN_BUF_SIZE_DSET_NAME, dtype_id, dspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Write dataset to disk */ if (H5Dwrite(dataset, dtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata) < 0) - TEST_ERROR + TEST_ERROR; /* Make certain the correct amount of memory will be used */ if (H5Dvlen_get_buf_size(dataset, dtype_id, dspace_id, &size) < 0) - TEST_ERROR + TEST_ERROR; /* 10 elements allocated = 1 + 2 + 3 + 4 elements for each array position */ if (size != @@ -11621,22 +10969,22 @@ test_get_vlen_buf_size(void) freed_wdata = TRUE; if (H5Dclose(dataset) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dtype_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(dspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); diff --git a/vol_dataset_test.h b/vol_dataset_test.h index 5f32f08..4076327 100644 --- a/vol_dataset_test.h +++ b/vol_dataset_test.h @@ -149,26 +149,6 @@ int vol_dataset_test(void); #define DATASET_IO_POINT_DSET_NAME_NOCHUNK "dataset_io_point_selection_dset_nochunk" #define DATASET_IO_POINT_DSET_NAME_CHUNK "dataset_io_point_selection_dset_chunk" -#ifndef NO_LARGE_TESTS -#define DATASET_LARGE_READ_TEST_ALL_DSET_SPACE_RANK 3 -#define DATASET_LARGE_READ_TEST_ALL_DSET_DTYPESIZE sizeof(int) -#define DATASET_LARGE_READ_TEST_ALL_DSET_DTYPE H5T_NATIVE_INT -#define DATASET_LARGE_READ_TEST_ALL_GROUP_NAME "dataset_large_read_all_test" -#define DATASET_LARGE_READ_TEST_ALL_DSET_NAME "dataset_large_read_all_dset" - -#define DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_SPACE_RANK 3 -#define DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_DTYPESIZE sizeof(int) -#define DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_DTYPE H5T_NATIVE_INT -#define DATASET_LARGE_READ_TEST_HYPERSLAB_GROUP_NAME "dataset_large_read_hyperslab_test" -#define DATASET_LARGE_READ_TEST_HYPERSLAB_DSET_NAME "dataset_large_read_hyperslab_dset" - -#define DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_SPACE_RANK 1 -#define DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_DTYPESIZE sizeof(int) -#define DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_DTYPE H5T_NATIVE_INT -#define DATASET_LARGE_READ_TEST_POINT_SELECTION_GROUP_NAME "dataset_large_read_point_selection_test" -#define DATASET_LARGE_READ_TEST_POINT_SELECTION_DSET_NAME "dataset_large_read_point_selection_dset" -#endif - #define DATASET_READ_INVALID_PARAMS_TEST_DSET_SPACE_RANK 3 #define DATASET_READ_INVALID_PARAMS_TEST_DSET_DTYPESIZE sizeof(int) #define DATASET_READ_INVALID_PARAMS_TEST_DSET_DTYPE H5T_NATIVE_INT @@ -194,26 +174,6 @@ int vol_dataset_test(void); #define DATASET_SMALL_WRITE_TEST_POINT_SELECTION_GROUP_NAME "dataset_small_write_point_selection_test" #define DATASET_SMALL_WRITE_TEST_POINT_SELECTION_DSET_NAME "dataset_small_write_point_selection_dset" -#ifndef NO_LARGE_TESTS -#define DATASET_LARGE_WRITE_TEST_ALL_DSET_SPACE_RANK 3 -#define DATASET_LARGE_WRITE_TEST_ALL_DSET_DTYPESIZE sizeof(int) -#define DATASET_LARGE_WRITE_TEST_ALL_DSET_DTYPE H5T_NATIVE_INT -#define DATASET_LARGE_WRITE_TEST_ALL_GROUP_NAME "dataset_large_write_all_test" -#define DATASET_LARGE_WRITE_TEST_ALL_DSET_NAME "dataset_large_write_all_dset" - -#define DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_SPACE_RANK 3 -#define DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_DTYPESIZE sizeof(int) -#define DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_DTYPE H5T_NATIVE_INT -#define DATASET_LARGE_WRITE_TEST_HYPERSLAB_GROUP_NAME "dataset_large_write_hyperslab_test" -#define DATASET_LARGE_WRITE_TEST_HYPERSLAB_DSET_NAME "dataset_large_write_hyperslab_dset" - -#define DATASET_LARGE_WRITE_TEST_POINT_SELECTION_DSET_SPACE_RANK 3 -#define DATASET_LARGE_WRITE_TEST_POINT_SELECTION_DSET_DTYPESIZE sizeof(int) -#define DATASET_LARGE_WRITE_TEST_POINT_SELECTION_DSET_DTYPE H5T_NATIVE_INT -#define DATASET_LARGE_WRITE_TEST_POINT_SELECTION_GROUP_NAME "dataset_large_write_point_selection_test" -#define DATASET_LARGE_WRITE_TEST_POINT_SELECTION_DSET_NAME "dataset_large_write_point_selection_dset" -#endif - #define DATASET_DATA_VERIFY_WRITE_TEST_DSET_SPACE_RANK 3 #define DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPESIZE sizeof(int) #define DATASET_DATA_VERIFY_WRITE_TEST_DSET_DTYPE H5T_NATIVE_INT diff --git a/vol_dataset_test_parallel.c b/vol_dataset_test_parallel.c index 843d31a..0bade86 100644 --- a/vol_dataset_test_parallel.c +++ b/vol_dataset_test_parallel.c @@ -120,10 +120,10 @@ test_write_dataset_data_verification(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); @@ -145,10 +145,10 @@ test_write_dataset_data_verification(void) } if (generate_random_parallel_dimensions(DATASET_WRITE_DATA_VERIFY_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = H5Screate_simple(DATASET_WRITE_DATA_VERIFY_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1, DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, @@ -200,7 +200,7 @@ test_write_dataset_data_verification(void) { hbool_t op_failed = FALSE; - TESTING_2("H5Dwrite using H5S_ALL then H5Dread") + TESTING_2("H5Dwrite using H5S_ALL then H5Dread"); if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -374,7 +374,7 @@ test_write_dataset_data_verification(void) PART_BEGIN(H5Dwrite_hyperslab_read) { - TESTING_2("H5Dwrite using hyperslab selection then H5Dread") + TESTING_2("H5Dwrite using hyperslab selection then H5Dread"); for (i = 1, data_size = 1; i < DATASET_WRITE_DATA_VERIFY_TEST_SPACE_RANK; i++) data_size *= dims[i]; @@ -597,7 +597,7 @@ test_write_dataset_data_verification(void) PART_BEGIN(H5Dwrite_point_sel_read) { - TESTING_2("H5Dwrite using point selection then H5Dread") + TESTING_2("H5Dwrite using point selection then H5Dread"); for (i = 1, data_size = 1; i < DATASET_WRITE_DATA_VERIFY_TEST_SPACE_RANK; i++) data_size *= dims[i]; @@ -835,7 +835,7 @@ test_write_dataset_data_verification(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (read_buf) { HDfree(read_buf); @@ -858,13 +858,13 @@ test_write_dataset_data_verification(void) } if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -927,7 +927,7 @@ test_write_dataset_independent(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("independent writing to different datasets by different ranks") + TESTING("independent writing to different datasets by different ranks"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -939,7 +939,7 @@ test_write_dataset_independent(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); @@ -965,10 +965,10 @@ test_write_dataset_independent(void) * to the MPI rank. */ if (generate_random_parallel_dimensions(DATASET_INDEPENDENT_WRITE_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = H5Screate_simple(DATASET_INDEPENDENT_WRITE_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create a dataset collectively */ if ((dset_id1 = H5Dcreate2(group_id, DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME1, @@ -1198,19 +1198,19 @@ test_write_dataset_independent(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1267,7 +1267,7 @@ test_write_dataset_one_proc_0_selection(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("write to dataset with one rank selecting 0 rows") + TESTING("write to dataset with one rank selecting 0 rows"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -1279,7 +1279,7 @@ test_write_dataset_one_proc_0_selection(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); @@ -1302,10 +1302,10 @@ test_write_dataset_one_proc_0_selection(void) } if (generate_random_parallel_dimensions(DATASET_WRITE_ONE_PROC_0_SEL_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = H5Screate_simple(DATASET_WRITE_ONE_PROC_0_SEL_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME, DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, @@ -1501,17 +1501,17 @@ test_write_dataset_one_proc_0_selection(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1567,7 +1567,7 @@ test_write_dataset_one_proc_none_selection(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("write to dataset with one rank using 'none' selection") + TESTING("write to dataset with one rank using 'none' selection"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -1579,7 +1579,7 @@ test_write_dataset_one_proc_none_selection(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); @@ -1602,10 +1602,10 @@ test_write_dataset_one_proc_none_selection(void) } if (generate_random_parallel_dimensions(DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = H5Screate_simple(DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME, DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, @@ -1815,17 +1815,17 @@ test_write_dataset_one_proc_none_selection(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1878,7 +1878,7 @@ test_write_dataset_one_proc_all_selection(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("write to dataset with one rank using all selection; others none selection") + TESTING("write to dataset with one rank using all selection; others none selection"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -1890,7 +1890,7 @@ test_write_dataset_one_proc_all_selection(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); @@ -1913,10 +1913,10 @@ test_write_dataset_one_proc_all_selection(void) } if (generate_random_parallel_dimensions(DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = H5Screate_simple(DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME, DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, @@ -2104,17 +2104,17 @@ test_write_dataset_one_proc_all_selection(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2175,7 +2175,7 @@ test_write_dataset_hyper_file_all_mem(void) void *read_buf = NULL; #endif - TESTING("write to dataset with hyperslab sel. for file space; all sel. for memory") + TESTING("write to dataset with hyperslab sel. for file space; all sel. for memory"); #ifdef BROKEN /* Make sure the connector supports the API functions being tested */ @@ -2188,7 +2188,7 @@ test_write_dataset_hyper_file_all_mem(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); @@ -2211,10 +2211,10 @@ test_write_dataset_hyper_file_all_mem(void) } if (generate_random_parallel_dimensions(DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = H5Screate_simple(DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME, DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, @@ -2377,17 +2377,17 @@ test_write_dataset_hyper_file_all_mem(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); #else @@ -2445,7 +2445,7 @@ test_write_dataset_all_file_hyper_mem(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("write to dataset with all sel. for file space; hyperslab sel. for memory") + TESTING("write to dataset with all sel. for file space; hyperslab sel. for memory"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -2457,7 +2457,7 @@ test_write_dataset_all_file_hyper_mem(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); @@ -2480,10 +2480,10 @@ test_write_dataset_all_file_hyper_mem(void) } if (generate_random_parallel_dimensions(DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = H5Screate_simple(DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME, DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, @@ -2675,17 +2675,17 @@ test_write_dataset_all_file_hyper_mem(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2721,7 +2721,7 @@ test_write_dataset_all_file_hyper_mem(void) static int test_write_dataset_point_file_all_mem(void) { - TESTING("write to dataset with point sel. for file space; all sel. for memory") + TESTING("write to dataset with point sel. for file space; all sel. for memory"); SKIPPED(); @@ -2754,7 +2754,7 @@ test_write_dataset_all_file_point_mem(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("write to dataset with all sel. for file space; point sel. for memory") + TESTING("write to dataset with all sel. for file space; point sel. for memory"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -2766,7 +2766,7 @@ test_write_dataset_all_file_point_mem(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); @@ -2789,10 +2789,10 @@ test_write_dataset_all_file_point_mem(void) } if (generate_random_parallel_dimensions(DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = H5Screate_simple(DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME, DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, @@ -3000,17 +3000,17 @@ test_write_dataset_all_file_point_mem(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3070,7 +3070,7 @@ test_write_dataset_hyper_file_point_mem(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("write to dataset with hyperslab sel. for file space; point sel. for memory") + TESTING("write to dataset with hyperslab sel. for file space; point sel. for memory"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -3082,7 +3082,7 @@ test_write_dataset_hyper_file_point_mem(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); @@ -3105,10 +3105,10 @@ test_write_dataset_hyper_file_point_mem(void) } if (generate_random_parallel_dimensions(DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = H5Screate_simple(DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME, DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, @@ -3325,17 +3325,17 @@ test_write_dataset_hyper_file_point_mem(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3391,7 +3391,7 @@ test_write_dataset_point_file_hyper_mem(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("write to dataset with point sel. for file space; hyperslab sel. for memory") + TESTING("write to dataset with point sel. for file space; hyperslab sel. for memory"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -3403,7 +3403,7 @@ test_write_dataset_point_file_hyper_mem(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); @@ -3426,10 +3426,10 @@ test_write_dataset_point_file_hyper_mem(void) } if (generate_random_parallel_dimensions(DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = H5Screate_simple(DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_SPACE_RANK, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME, DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, @@ -3644,17 +3644,17 @@ test_write_dataset_point_file_hyper_mem(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3712,7 +3712,7 @@ test_read_dataset_one_proc_0_selection(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("read from dataset with one rank selecting 0 rows") + TESTING("read from dataset with one rank selecting 0 rows"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -3724,7 +3724,7 @@ test_read_dataset_one_proc_0_selection(void) } if (generate_random_parallel_dimensions(DATASET_READ_ONE_PROC_0_SEL_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; /* * Have rank 0 create the dataset and completely fill it with data. @@ -3859,7 +3859,7 @@ test_read_dataset_one_proc_0_selection(void) * Re-open file on all ranks. */ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); HDprintf(" couldn't re-open file '%s'\n", vol_test_parallel_filename); @@ -3979,19 +3979,19 @@ test_read_dataset_one_proc_0_selection(void) } if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -4047,7 +4047,7 @@ test_read_dataset_one_proc_none_selection(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("read from dataset with one rank using 'none' selection") + TESTING("read from dataset with one rank using 'none' selection"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -4059,7 +4059,7 @@ test_read_dataset_one_proc_none_selection(void) } if (generate_random_parallel_dimensions(DATASET_READ_ONE_PROC_NONE_SEL_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; /* * Have rank 0 create the dataset and completely fill it with data. @@ -4196,7 +4196,7 @@ test_read_dataset_one_proc_none_selection(void) * Re-open file on all ranks. */ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); HDprintf(" couldn't re-open file '%s'\n", vol_test_parallel_filename); @@ -4330,19 +4330,19 @@ test_read_dataset_one_proc_none_selection(void) } if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -4395,7 +4395,7 @@ test_read_dataset_one_proc_all_selection(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("read from dataset with one rank using all selection; others none selection") + TESTING("read from dataset with one rank using all selection; others none selection"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -4407,7 +4407,7 @@ test_read_dataset_one_proc_all_selection(void) } if (generate_random_parallel_dimensions(DATASET_READ_ONE_PROC_ALL_SEL_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; /* * Have rank 0 create the dataset and completely fill it with data. @@ -4544,7 +4544,7 @@ test_read_dataset_one_proc_all_selection(void) * Re-open file on all ranks. */ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); HDprintf(" couldn't re-open file '%s'\n", vol_test_parallel_filename); @@ -4670,19 +4670,19 @@ test_read_dataset_one_proc_all_selection(void) } if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -4718,7 +4718,7 @@ test_read_dataset_one_proc_all_selection(void) static int test_read_dataset_hyper_file_all_mem(void) { - TESTING("read from dataset with hyperslab sel. for file space; all sel. for memory") + TESTING("read from dataset with hyperslab sel. for file space; all sel. for memory"); SKIPPED(); @@ -4750,7 +4750,7 @@ test_read_dataset_all_file_hyper_mem(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("read from dataset with all sel. for file space; hyperslab sel. for memory") + TESTING("read from dataset with all sel. for file space; hyperslab sel. for memory"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -4762,7 +4762,7 @@ test_read_dataset_all_file_hyper_mem(void) } if (generate_random_parallel_dimensions(DATASET_READ_ALL_FILE_HYPER_MEM_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; /* * Have rank 0 create the dataset and completely fill it with data. @@ -4901,7 +4901,7 @@ test_read_dataset_all_file_hyper_mem(void) * Re-open file on all ranks. */ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); HDprintf(" couldn't re-open file '%s'\n", vol_test_parallel_filename); @@ -5021,17 +5021,17 @@ test_read_dataset_all_file_hyper_mem(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -5067,7 +5067,7 @@ test_read_dataset_all_file_hyper_mem(void) static int test_read_dataset_point_file_all_mem(void) { - TESTING("read from dataset with point sel. for file space; all sel. for memory") + TESTING("read from dataset with point sel. for file space; all sel. for memory"); SKIPPED(); @@ -5100,7 +5100,7 @@ test_read_dataset_all_file_point_mem(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("read from dataset with all sel. for file space; point sel. for memory") + TESTING("read from dataset with all sel. for file space; point sel. for memory"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -5112,7 +5112,7 @@ test_read_dataset_all_file_point_mem(void) } if (generate_random_parallel_dimensions(DATASET_READ_ALL_FILE_POINT_MEM_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; /* * Have rank 0 create the dataset and completely fill it with data. @@ -5251,7 +5251,7 @@ test_read_dataset_all_file_point_mem(void) * Re-open file on all ranks. */ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); HDprintf(" couldn't re-open file '%s'\n", vol_test_parallel_filename); @@ -5384,17 +5384,17 @@ test_read_dataset_all_file_point_mem(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -5454,7 +5454,7 @@ test_read_dataset_hyper_file_point_mem(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("read from dataset with hyperslab sel. for file space; point sel. for memory") + TESTING("read from dataset with hyperslab sel. for file space; point sel. for memory"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -5466,7 +5466,7 @@ test_read_dataset_hyper_file_point_mem(void) } if (generate_random_parallel_dimensions(DATASET_READ_HYPER_FILE_POINT_MEM_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; /* * Have rank 0 create the dataset and completely fill it with data. @@ -5605,7 +5605,7 @@ test_read_dataset_hyper_file_point_mem(void) * Re-open file on all ranks. */ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); HDprintf(" couldn't re-open file '%s'\n", vol_test_parallel_filename); @@ -5743,17 +5743,17 @@ test_read_dataset_hyper_file_point_mem(void) } if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -5809,7 +5809,7 @@ test_read_dataset_point_file_hyper_mem(void) void *write_buf = NULL; void *read_buf = NULL; - TESTING("read from dataset with point sel. for file space; hyperslab sel. for memory") + TESTING("read from dataset with point sel. for file space; hyperslab sel. for memory"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -5821,7 +5821,7 @@ test_read_dataset_point_file_hyper_mem(void) } if (generate_random_parallel_dimensions(DATASET_READ_POINT_FILE_HYPER_MEM_TEST_SPACE_RANK, &dims) < 0) - TEST_ERROR + TEST_ERROR; /* * Have rank 0 create the dataset and completely fill it with data. @@ -5960,7 +5960,7 @@ test_read_dataset_point_file_hyper_mem(void) * Re-open file on all ranks. */ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); HDprintf(" couldn't re-open file '%s'\n", vol_test_parallel_filename); @@ -6099,19 +6099,19 @@ test_read_dataset_point_file_hyper_mem(void) } if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -6176,7 +6176,7 @@ test_write_multi_chunk_dataset_same_shape_read(void) void *write_buf = NULL; int read_buf[1][DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_FIXED_CHUNK_DIMSIZE]; - TESTING("write to dataset with multiple chunks using same shaped dataspaces") + TESTING("write to dataset with multiple chunks using same shaped dataspaces"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -6438,7 +6438,7 @@ test_write_multi_chunk_dataset_same_shape_read(void) * Re-open file on all ranks. */ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); HDprintf(" couldn't re-open file '%s'\n", vol_test_parallel_filename); @@ -6561,19 +6561,19 @@ test_write_multi_chunk_dataset_same_shape_read(void) } if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -6640,7 +6640,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void) int read_buf[DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_READ_BUF_DIMSIZE] [DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_READ_BUF_DIMSIZE]; - TESTING("write to dataset with multiple chunks using differently shaped dataspaces") + TESTING("write to dataset with multiple chunks using differently shaped dataspaces"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -6902,7 +6902,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void) * Re-open file on all ranks. */ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); HDprintf(" couldn't re-open file '%s'\n", vol_test_parallel_filename); @@ -7027,19 +7027,19 @@ test_write_multi_chunk_dataset_diff_shape_read(void) } if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -7106,7 +7106,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) void *write_buf = NULL; int read_buf[1][DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_FIXED_CHUNK_DIMSIZE]; - TESTING("several overwrites to dataset with multiple chunks using same shaped dataspaces") + TESTING("several overwrites to dataset with multiple chunks using same shaped dataspaces"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -7304,7 +7304,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) * Re-open file on all ranks. */ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); HDprintf(" couldn't re-open file '%s'\n", vol_test_parallel_filename); @@ -7554,15 +7554,15 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) } if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -7632,7 +7632,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) int read_buf[DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_READ_BUF_DIMSIZE] [DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_READ_BUF_DIMSIZE]; - TESTING("several overwrites to dataset with multiple chunks using differently shaped dataspaces") + TESTING("several overwrites to dataset with multiple chunks using differently shaped dataspaces"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -7830,7 +7830,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) * Re-open file on all ranks. */ if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); HDprintf(" couldn't re-open file '%s'\n", vol_test_parallel_filename); @@ -8082,15 +8082,15 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) } if (H5Sclose(mspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); diff --git a/vol_datatype_test.c b/vol_datatype_test.c index 3f169d5..4ccb6c1 100644 --- a/vol_datatype_test.c +++ b/vol_datatype_test.c @@ -84,7 +84,7 @@ test_create_committed_datatype(void) hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t type_id = H5I_INVALID_HID; - TESTING("creation of a committed datatype") + TESTING("creation of a committed datatype"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -128,13 +128,13 @@ test_create_committed_datatype(void) } if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -176,7 +176,7 @@ test_create_committed_datatype_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -210,7 +210,7 @@ test_create_committed_datatype_invalid_params(void) { PART_BEGIN(H5Tcommit2_invalid_loc_id) { - TESTING_2("H5Tcommit2 with an invalid loc_id") + TESTING_2("H5Tcommit2 with an invalid loc_id"); H5E_BEGIN_TRY { @@ -347,16 +347,16 @@ test_create_committed_datatype_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -386,7 +386,7 @@ test_create_anonymous_committed_datatype(void) hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t type_id = H5I_INVALID_HID; - TESTING("creation of anonymous committed datatype") + TESTING("creation of anonymous committed datatype"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -429,13 +429,13 @@ test_create_anonymous_committed_datatype(void) } if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -477,7 +477,7 @@ test_create_anonymous_committed_datatype_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -531,7 +531,7 @@ test_create_anonymous_committed_datatype_invalid_params(void) PART_BEGIN(H5Tcommit_anon_invalid_type_id) { - TESTING_2("H5Tcommit_anon with an invalid datatype ID") + TESTING_2("H5Tcommit_anon with an invalid datatype ID"); H5E_BEGIN_TRY { @@ -551,7 +551,7 @@ test_create_anonymous_committed_datatype_invalid_params(void) PART_BEGIN(H5Tcommit_anon_invalid_tcpl) { - TESTING_2("H5Tcommit_anon with an invalid TCPL") + TESTING_2("H5Tcommit_anon with an invalid TCPL"); H5E_BEGIN_TRY { @@ -571,7 +571,7 @@ test_create_anonymous_committed_datatype_invalid_params(void) PART_BEGIN(H5Tcommit_anon_invalid_tapl) { - TESTING_2("H5Tcommit_anon with an invalid TAPL") + TESTING_2("H5Tcommit_anon with an invalid TAPL"); H5E_BEGIN_TRY { @@ -591,16 +591,16 @@ test_create_anonymous_committed_datatype_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -632,7 +632,7 @@ test_create_committed_datatype_empty_types(void) hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t type_id = H5I_INVALID_HID; - TESTING_MULTIPART("creation of committed datatype with empty types") + TESTING_MULTIPART("creation of committed datatype with empty types"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -643,7 +643,7 @@ test_create_committed_datatype_empty_types(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -671,7 +671,7 @@ test_create_committed_datatype_empty_types(void) { PART_BEGIN(H5Tcommit_empty_compound_type) { - TESTING_2("creation of committed datatype with empty compound type") + TESTING_2("creation of committed datatype with empty compound type"); if ((type_id = H5Tcreate(H5T_COMPOUND, (size_t)32)) < 0) { H5_FAILED(); @@ -724,7 +724,7 @@ test_create_committed_datatype_empty_types(void) { int enum_val = 1; - TESTING_2("creation of committed datatype with empty enum type") + TESTING_2("creation of committed datatype with empty enum type"); if ((type_id = H5Tenum_create(H5T_NATIVE_INT)) < 0) { H5_FAILED(); @@ -776,11 +776,11 @@ test_create_committed_datatype_empty_types(void) END_MULTIPART; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; error: H5E_BEGIN_TRY @@ -808,7 +808,7 @@ test_recommit_committed_type(void) hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t type_id = H5I_INVALID_HID; - TESTING("inability to re-commit a committed datatype") + TESTING("inability to re-commit a committed datatype"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -877,13 +877,13 @@ test_recommit_committed_type(void) } if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -913,7 +913,7 @@ test_open_committed_datatype(void) hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t type_id = H5I_INVALID_HID; - TESTING("H5Topen2") + TESTING("H5Topen2"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -957,7 +957,7 @@ test_open_committed_datatype(void) } if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if ((type_id = H5Topen2(group_id, DATATYPE_OPEN_TEST_TYPE_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -966,13 +966,13 @@ test_open_committed_datatype(void) } if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1013,7 +1013,7 @@ test_open_committed_datatype_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1049,7 +1049,7 @@ test_open_committed_datatype_invalid_params(void) } if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1078,7 +1078,7 @@ test_open_committed_datatype_invalid_params(void) PART_BEGIN(H5Topen2_invalid_type_name) { - TESTING_2("H5Topen2 with an invalid datatype name") + TESTING_2("H5Topen2 with an invalid datatype name"); H5E_BEGIN_TRY { @@ -1112,7 +1112,7 @@ test_open_committed_datatype_invalid_params(void) PART_BEGIN(H5Topen2_invalid_tapl) { - TESTING_2("H5Topen2 with an invalid TAPL") + TESTING_2("H5Topen2 with an invalid TAPL"); H5E_BEGIN_TRY { @@ -1133,14 +1133,14 @@ test_open_committed_datatype_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1175,7 +1175,7 @@ test_reopen_committed_datatype_indirect(void) hid_t strtype = H5I_INVALID_HID; hid_t space_id = H5I_INVALID_HID; - TESTING_MULTIPART("reopening open committed datatypes using H5Dget_type") + TESTING_MULTIPART("reopening open committed datatypes using H5Dget_type"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -1187,7 +1187,7 @@ test_reopen_committed_datatype_indirect(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1209,7 +1209,7 @@ test_reopen_committed_datatype_indirect(void) } if ((space_id = generate_random_dataspace(DATATYPE_REOPEN_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1217,7 +1217,7 @@ test_reopen_committed_datatype_indirect(void) { PART_BEGIN(reopen_compound_type) { - TESTING_2("re-open of compound datatype") + TESTING_2("re-open of compound datatype"); if ((strtype = H5Tcopy(H5T_C_S1)) < 0) { H5_FAILED(); @@ -1311,7 +1311,7 @@ test_reopen_committed_datatype_indirect(void) { int enum_value; - TESTING_2("re-open of enum datatype") + TESTING_2("re-open of enum datatype"); if ((type_id = H5Tenum_create(H5T_NATIVE_INT)) < 0) { H5_FAILED(); @@ -1391,7 +1391,7 @@ test_reopen_committed_datatype_indirect(void) PART_BEGIN(reopen_vlen_type) { - TESTING_2("reopen of a variable-length datatype") + TESTING_2("reopen of a variable-length datatype"); if ((type_id = H5Tvlen_create(H5T_NATIVE_INT)) < 0) { H5_FAILED(); @@ -1459,7 +1459,7 @@ test_reopen_committed_datatype_indirect(void) { const char *tag = "opaque_tag"; - TESTING_2("reopen of an opaque datatype") + TESTING_2("reopen of an opaque datatype"); if ((type_id = H5Tcreate(H5T_OPAQUE, (size_t)13)) < 0) { H5_FAILED(); @@ -1533,7 +1533,7 @@ test_reopen_committed_datatype_indirect(void) { hsize_t array_dims[] = {2, 3}; - TESTING_2("reopen of an array datatype") + TESTING_2("reopen of an array datatype"); if ((type_id = H5Tarray_create2(H5T_NATIVE_INT, 1, array_dims)) < 0) { H5_FAILED(); @@ -1599,16 +1599,16 @@ test_reopen_committed_datatype_indirect(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1641,7 +1641,7 @@ test_close_committed_datatype_invalid_id(void) herr_t err_ret = -1; hid_t file_id = H5I_INVALID_HID; - TESTING("H5Tclose with an invalid committed datatype ID") + TESTING("H5Tclose with an invalid committed datatype ID"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || @@ -1671,7 +1671,7 @@ test_close_committed_datatype_invalid_id(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1688,9 +1688,9 @@ test_close_committed_datatype_invalid_id(void) } /* - * A test to check that a VOL connector stores and can - * retrieve a valid copy of a TCPL used during committed - * datatype creation time. + * A test to check that a TCPL used for datatype creation + * can be persisted and that a valid copy of that TCPL can + * be retrieved later with a call to H5Tget_create_plist. */ static int test_datatype_property_lists(void) @@ -1700,7 +1700,7 @@ test_datatype_property_lists(void) hid_t type_id1 = H5I_INVALID_HID, type_id2 = H5I_INVALID_HID; hid_t tcpl_id1 = H5I_INVALID_HID, tcpl_id2 = H5I_INVALID_HID; - TESTING_MULTIPART("datatype property list operations") + TESTING_MULTIPART("datatype property list operations"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -1711,7 +1711,7 @@ test_datatype_property_lists(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1767,7 +1767,7 @@ test_datatype_property_lists(void) } if (H5Pclose(tcpl_id1) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1775,7 +1775,7 @@ test_datatype_property_lists(void) { PART_BEGIN(H5Tget_create_plist) { - TESTING_2("H5Tget_create_plist") + TESTING_2("H5Tget_create_plist"); /* Try to receive copies for the two property lists */ if ((tcpl_id1 = H5Tget_create_plist(type_id1)) < 0) { @@ -1794,7 +1794,7 @@ test_datatype_property_lists(void) } PART_END(H5Tget_create_plist); - /* Now close the property lists and datatypes and see if we can still retieve copies of + /* Now close the property lists and datatypes and see if we can still retrieve copies of * the property lists upon opening (instead of creating) a datatype */ if (tcpl_id1 >= 0) { @@ -1832,7 +1832,7 @@ test_datatype_property_lists(void) PART_BEGIN(H5Tget_create_plist_reopened) { - TESTING_2("H5Tget_create_plist after re-opening committed datatype") + TESTING_2("H5Tget_create_plist after re-opening committed datatype"); if ((type_id1 = H5Topen2(group_id, DATATYPE_PROPERTY_LIST_TEST_DATATYPE_NAME1, H5P_DEFAULT)) < 0) { @@ -1866,22 +1866,22 @@ test_datatype_property_lists(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(tcpl_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(tcpl_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(type_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(type_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1916,7 +1916,7 @@ test_create_dataset_with_committed_type(void) hid_t type_id = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID; - TESTING("dataset creation with a committed datatype") + TESTING("dataset creation with a committed datatype"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -1961,13 +1961,13 @@ test_create_dataset_with_committed_type(void) } if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1995,7 +1995,7 @@ test_create_dataset_with_committed_type(void) } if ((fspace_id = generate_random_dataspace(DATATYPE_CREATE_TEST_DATASET_DIMS, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, DATASET_CREATE_WITH_DATATYPE_TEST_DSET_NAME, type_id, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -2006,7 +2006,7 @@ test_create_dataset_with_committed_type(void) } if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dopen2(group_id, DATASET_CREATE_WITH_DATATYPE_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2015,17 +2015,17 @@ test_create_dataset_with_committed_type(void) } if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2060,7 +2060,7 @@ test_create_attribute_with_committed_type(void) hid_t type_id = H5I_INVALID_HID; hid_t space_id = H5I_INVALID_HID; - TESTING("attribute creation with a committed datatype") + TESTING("attribute creation with a committed datatype"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -2106,7 +2106,7 @@ test_create_attribute_with_committed_type(void) } if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if ((type_id = H5Topen2(group_id, ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_DTYPE_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2117,7 +2117,7 @@ test_create_attribute_with_committed_type(void) if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_ATTR_NAME, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -2141,7 +2141,7 @@ test_create_attribute_with_committed_type(void) } if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Aopen(group_id, ATTRIBUTE_CREATE_WITH_DATATYPE_TEST_ATTR_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2150,17 +2150,17 @@ test_create_attribute_with_committed_type(void) } if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2193,7 +2193,7 @@ test_delete_committed_type(void) hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t type_id = H5I_INVALID_HID; - TESTING("committed datatype deletion") + TESTING("committed datatype deletion"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -2268,13 +2268,13 @@ test_delete_committed_type(void) } if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2300,16 +2300,13 @@ test_delete_committed_type(void) static int test_resurrect_datatype(void) { -#ifndef NO_ID_PREVENTS_OBJ_DELETE hid_t file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID; hid_t group_id = H5I_INVALID_HID; hid_t type_id = H5I_INVALID_HID; -#endif /* NO_ID_PREVENTS_OBJ_DELETE */ - TESTING("resurrecting datatype after deletion") + TESTING("resurrecting datatype after deletion"); -#ifndef NO_ID_PREVENTS_OBJ_DELETE /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) || @@ -2359,14 +2356,13 @@ test_resurrect_datatype(void) HDprintf(" failed to delete datatype\n"); goto error; } -#ifndef NO_OBJECT_GET_NAME + /* Check that datatype name is NULL */ if (H5Iget_name(type_id, NULL, (size_t)0) != 0) { H5_FAILED(); HDprintf(" deleted datatype name was not NULL!\n"); goto error; } -#endif /* Re-link the datatype to the group hierarchy (shouldn't get deleted now) */ if (H5Lcreate_hard(type_id, ".", group_id, DATATYPE_RESURRECT_TEST_DTYPE_NAME2, H5P_DEFAULT, @@ -2378,13 +2374,13 @@ test_resurrect_datatype(void) /* Close things */ if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; /* Re-open the file */ if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { @@ -2413,22 +2409,18 @@ test_resurrect_datatype(void) } if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); -#else /* NO_ID_PREVENTS_OBJ_DELETE */ - SKIPPED(); -#endif /* NO_ID_PREVENTS_OBJ_DELETE */ return 0; -#ifndef NO_ID_PREVENTS_OBJ_DELETE error: H5E_BEGIN_TRY { @@ -2440,13 +2432,12 @@ test_resurrect_datatype(void) H5E_END_TRY; return 1; -#endif /* NO_ID_PREVENTS_OBJ_DELETE */ } static int test_flush_committed_datatype(void) { - TESTING("H5Tflush") + TESTING("H5Tflush"); SKIPPED(); @@ -2456,7 +2447,7 @@ test_flush_committed_datatype(void) static int test_flush_committed_datatype_invalid_params(void) { - TESTING("H5Tflush with invalid parameters") + TESTING("H5Tflush with invalid parameters"); SKIPPED(); @@ -2466,7 +2457,7 @@ test_flush_committed_datatype_invalid_params(void) static int test_refresh_committed_datatype(void) { - TESTING("H5Trefresh") + TESTING("H5Trefresh"); SKIPPED(); @@ -2476,7 +2467,7 @@ test_refresh_committed_datatype(void) static int test_refresh_committed_datatype_invalid_params(void) { - TESTING("H5Trefresh with invalid parameters") + TESTING("H5Trefresh with invalid parameters"); SKIPPED(); @@ -2497,7 +2488,7 @@ test_cant_commit_predefined(void) hid_t container_group = H5I_INVALID_HID; hid_t group_id = H5I_INVALID_HID; - TESTING("inability to commit predefined types directly") + TESTING("inability to commit predefined types directly"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -2541,11 +2532,11 @@ test_cant_commit_predefined(void) } if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2577,7 +2568,7 @@ test_cant_modify_committed_type(void) hid_t group_id = H5I_INVALID_HID; hid_t type_id = H5I_INVALID_HID; - TESTING("inability to modify a committed datatype") + TESTING("inability to modify a committed datatype"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -2646,13 +2637,13 @@ test_cant_modify_committed_type(void) } if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); diff --git a/vol_file_test.c b/vol_file_test.c index 80bfea3..1d699c7 100644 --- a/vol_file_test.c +++ b/vol_file_test.c @@ -54,7 +54,7 @@ static int (*file_tests[])(void) = { }; /* - * Tests that a file can be created with the VOL connector. + * Tests that a file can be created. */ static int test_create_file(void) @@ -84,7 +84,7 @@ test_create_file(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; HDfree(prefixed_filename); prefixed_filename = NULL; @@ -252,7 +252,6 @@ test_create_file_invalid_params(void) H5E_END_TRY; HDfree(prefixed_filename); - prefixed_filename = NULL; return 1; } @@ -291,7 +290,7 @@ test_create_file_excl(void) /* Close the file */ if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; /* Try again with H5F_ACC_EXCL. This should fail because the file already * exists on disk from the previous steps. @@ -316,7 +315,7 @@ test_create_file_excl(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; HDfree(prefixed_filename); prefixed_filename = NULL; @@ -339,7 +338,7 @@ test_create_file_excl(void) } /* - * Tests that a file can be opened with the VOL connector. + * Tests that a file can be opened. */ static int test_open_file(void) @@ -359,7 +358,7 @@ test_open_file(void) { PART_BEGIN(H5Fopen_rdonly) { - TESTING_2("H5Fopen in read-only mode") + TESTING_2("H5Fopen in read-only mode"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -382,7 +381,7 @@ test_open_file(void) PART_BEGIN(H5Fopen_rdwrite) { - TESTING_2("H5Fopen in read-write mode") + TESTING_2("H5Fopen in read-write mode"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -532,7 +531,7 @@ test_open_nonexistent_file(void) hid_t file_id = H5I_INVALID_HID; char *prefixed_filename = NULL; - TESTING("for invalid opening of a non-existent file") + TESTING("for invalid opening of a non-existent file"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) { @@ -603,12 +602,12 @@ test_file_permission(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) { SKIPPED(); - HDprintf(" API functions for basic file, group, dataset, attribute, stored datatype aren't " + HDprintf(" API functions for basic file, group, dataset, attribute, or stored datatype aren't " "supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if (prefix_filename(test_path_prefix, FILE_PERMISSION_TEST_FILENAME, &prefixed_filename) < 0) { H5_FAILED(); @@ -636,9 +635,9 @@ test_file_permission(void) } if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; /* Open the file (with read-only permission) */ if ((file_id = H5Fopen(prefixed_filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) { @@ -653,7 +652,7 @@ test_file_permission(void) { PART_BEGIN(H5Gcreate_rdonly_file) { - TESTING_2("invalid creation of group in read-only file") + TESTING_2("invalid creation of group in read-only file"); /* Create a group with the read-only file handle (should fail) */ H5E_BEGIN_TRY @@ -687,7 +686,7 @@ test_file_permission(void) PART_BEGIN(H5Dcreate_rdonly_file) { - TESTING_2("invalid creation of dataset in read-only file") + TESTING_2("invalid creation of dataset in read-only file"); /* Create a dataset with the read-only file handle (should fail) */ H5E_BEGIN_TRY @@ -721,7 +720,7 @@ test_file_permission(void) PART_BEGIN(H5Acreate_rdonly_file) { - TESTING_2("invalid creation of attribute in read-only file") + TESTING_2("invalid creation of attribute in read-only file"); /* Create an attribute with the read-only file handle (should fail) */ H5E_BEGIN_TRY @@ -743,7 +742,7 @@ test_file_permission(void) PART_BEGIN(H5Tcommit_rdonly_file) { - TESTING_2("invalid creation of committed datatype in read-only file") + TESTING_2("invalid creation of committed datatype in read-only file"); if ((dtype_id = H5Tcopy(H5T_NATIVE_INT)) < 0) { H5_FAILED(); @@ -783,14 +782,14 @@ test_file_permission(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Tclose(dtype_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(dspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; HDfree(prefixed_filename); prefixed_filename = NULL; @@ -825,7 +824,7 @@ test_reopen_file(void) hid_t file_id = H5I_INVALID_HID; hid_t file_id2 = H5I_INVALID_HID; - TESTING("re-open of a file with H5Freopen") + TESTING("re-open of a file with H5Freopen"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) { @@ -847,9 +846,9 @@ test_reopen_file(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id2) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -874,7 +873,7 @@ test_close_file_invalid_id(void) { herr_t err_ret = -1; - TESTING("H5Fclose with an invalid ID") + TESTING("H5Fclose with an invalid ID"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) { @@ -916,7 +915,7 @@ test_flush_file(void) char dset_name[32]; unsigned u; - TESTING_MULTIPART("H5Fflush") + TESTING_MULTIPART("H5Fflush"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || @@ -927,7 +926,7 @@ test_flush_file(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if (prefix_filename(test_path_prefix, FILE_FLUSH_TEST_FILENAME, &prefixed_filename) < 0) { H5_FAILED(); @@ -959,7 +958,7 @@ test_flush_file(void) } if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; } PASSED(); @@ -968,7 +967,7 @@ test_flush_file(void) { PART_BEGIN(H5Fflush_local) { - TESTING_2("file flushing at local scope") + TESTING_2("file flushing at local scope"); if (H5Fflush(file_id, H5F_SCOPE_LOCAL) < 0) { H5_FAILED(); @@ -982,7 +981,7 @@ test_flush_file(void) PART_BEGIN(H5Fflush_global) { - TESTING_2("file flushing at global scope") + TESTING_2("file flushing at global scope"); if (H5Fflush(file_id, H5F_SCOPE_GLOBAL) < 0) { H5_FAILED(); @@ -996,12 +995,12 @@ test_flush_file(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(dspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; HDfree(prefixed_filename); prefixed_filename = NULL; @@ -1034,7 +1033,7 @@ test_file_is_accessible(void) char *prefixed_filename = NULL; htri_t is_accessible = FAIL; - TESTING_MULTIPART("H5Fis_accessible") + TESTING_MULTIPART("H5Fis_accessible"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) { @@ -1053,7 +1052,7 @@ test_file_is_accessible(void) { PART_BEGIN(H5Fis_accessible_valid_file) { - TESTING_2("H5Fis_accessible on existing file") + TESTING_2("H5Fis_accessible on existing file"); if ((is_accessible = H5Fis_accessible(vol_test_filename, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1076,7 +1075,7 @@ test_file_is_accessible(void) PART_BEGIN(H5Fis_accessible_invalid_file) { - TESTING_2("H5Fis_accessible on non-existing file") + TESTING_2("H5Fis_accessible on non-existing file"); H5E_BEGIN_TRY { @@ -1109,8 +1108,11 @@ test_file_is_accessible(void) } /* - * A test to check that a VOL connector stores and can return a valid copy - * of a FAPL and FCPL used upon file access and creation time, respectively. + * A test to check that a FCPL used for file creation can + * be persisted and that a valid copy of that FCPL can be + * retrieved later with a call to H5Fget_create_plist. Also + * tests that a valid copy of a FAPL used for file access + * can be retrieved with a call to H5Fget_access_plist. */ static int test_file_property_lists(void) @@ -1125,7 +1127,7 @@ test_file_property_lists(void) char *prefixed_filename1 = NULL; char *prefixed_filename2 = NULL; - TESTING_MULTIPART("file property list operations") + TESTING_MULTIPART("file property list operations"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE) || @@ -1136,7 +1138,7 @@ test_file_property_lists(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if (prefix_filename(test_path_prefix, FILE_PROPERTY_LIST_TEST_FNAME1, &prefixed_filename1) < 0) { H5_FAILED(); @@ -1174,7 +1176,7 @@ test_file_property_lists(void) } if (H5Pclose(fcpl_id1) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1182,7 +1184,7 @@ test_file_property_lists(void) { PART_BEGIN(H5Fget_create_plist) { - TESTING_2("H5Fget_create_plist") + TESTING_2("H5Fget_create_plist"); /* Try to receive copies of the two property lists, one which has the property set and one which * does not */ @@ -1233,7 +1235,7 @@ test_file_property_lists(void) PART_BEGIN(H5Fget_access_plist) { - TESTING_2("H5Fget_access_plist") + TESTING_2("H5Fget_access_plist"); /* Due to the nature of needing to supply a FAPL with the VOL connector having been set on it to * the H5Fcreate() call, we cannot exactly test using H5P_DEFAULT as the FAPL for one of the @@ -1312,7 +1314,7 @@ test_file_property_lists(void) PART_BEGIN(H5Fget_create_plist_reopened) { - TESTING_2("H5Fget_create_plist after re-opening file") + TESTING_2("H5Fget_create_plist after re-opening file"); if ((file_id1 = H5Fopen(prefixed_filename1, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1373,16 +1375,16 @@ test_file_property_lists(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(fcpl_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fcpl_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id2) < 0) - TEST_ERROR + TEST_ERROR; HDfree(prefixed_filename1); prefixed_filename1 = NULL; @@ -1421,7 +1423,7 @@ test_get_file_intent(void) hid_t file_id = H5I_INVALID_HID; char *prefixed_filename = NULL; - TESTING_MULTIPART("retrieval of file intent with H5Fget_intent") + TESTING_MULTIPART("retrieval of file intent with H5Fget_intent"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE)) { @@ -1430,7 +1432,7 @@ test_get_file_intent(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if (prefix_filename(test_path_prefix, FILE_INTENT_TEST_FILENAME, &prefixed_filename) < 0) { H5_FAILED(); @@ -1451,7 +1453,7 @@ test_get_file_intent(void) { PART_BEGIN(H5Fget_intent_file_creation) { - TESTING_2("H5Fget_intent on newly-created file") + TESTING_2("H5Fget_intent on newly-created file"); if (H5Fget_intent(file_id, &file_intent) < 0) { H5_FAILED(); @@ -1480,7 +1482,7 @@ test_get_file_intent(void) PART_BEGIN(H5Fget_intent_rdonly_file_open) { - TESTING_2("H5Fget_intent for file opened read-only") + TESTING_2("H5Fget_intent for file opened read-only"); /* Test that file intent retrieval works correctly for file open */ if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) { @@ -1516,7 +1518,7 @@ test_get_file_intent(void) PART_BEGIN(H5Fget_intent_rdwrite_file_open) { - TESTING_2("H5Fget_intent for file opened read-write") + TESTING_2("H5Fget_intent for file opened read-write"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1587,7 +1589,7 @@ test_get_file_obj_count(void) char *prefixed_filename1 = NULL; char *prefixed_filename2 = NULL; - TESTING_MULTIPART("retrieval of open object number and IDs") + TESTING_MULTIPART("retrieval of open object number and IDs"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE) || @@ -1595,12 +1597,13 @@ test_get_file_obj_count(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { SKIPPED(); - HDprintf(" API functions for basic or more file, basic dataset, group, datatype, or attribute " - "aren't supported with this connector\n"); + HDprintf( + " API functions for basic or more file, basic dataset, group, stored datatypes, or attribute " + "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if (prefix_filename(test_path_prefix, GET_OBJ_COUNT_TEST_FILENAME1, &prefixed_filename1) < 0) { H5_FAILED(); @@ -1676,7 +1679,7 @@ test_get_file_obj_count(void) { PART_BEGIN(H5Fget_obj_count_files) { - TESTING_2("H5Fget_obj_count for files") + TESTING_2("H5Fget_obj_count for files"); /* Get the number of files currently opened */ if ((obj_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_FILE)) < 0) { @@ -1697,7 +1700,7 @@ test_get_file_obj_count(void) PART_BEGIN(H5Fget_obj_count_grps_single_file) { - TESTING_2("H5Fget_obj_count for groups in single file") + TESTING_2("H5Fget_obj_count for groups in single file"); /* Get the number of groups */ if ((obj_count = H5Fget_obj_count(file_id, H5F_OBJ_GROUP)) < 0) { @@ -1718,7 +1721,7 @@ test_get_file_obj_count(void) PART_BEGIN(H5Fget_obj_count_grps) { - TESTING_2("H5Fget_obj_count for groups") + TESTING_2("H5Fget_obj_count for groups"); /* Get the number of groups in two opened files */ if ((obj_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_GROUP)) < 0) { @@ -1739,8 +1742,8 @@ test_get_file_obj_count(void) PART_BEGIN(H5Fget_obj_count_types) { - TESTING_2("H5Fget_obj_count for datatypes") -#ifndef WRONG_DATATYPE_OBJ_COUNT + TESTING_2("H5Fget_obj_count for datatypes"); + /* Get the number of named datatype in two opened files */ if ((obj_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_DATATYPE)) < 0) { H5_FAILED(); @@ -1756,16 +1759,12 @@ test_get_file_obj_count(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Fget_obj_count_types); -#endif } PART_END(H5Fget_obj_count_types); PART_BEGIN(H5Fget_obj_count_attrs) { - TESTING_2("H5Fget_obj_count for attributes") + TESTING_2("H5Fget_obj_count for attributes"); /* Get the number of attribute in two opened files */ if ((obj_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_ATTR)) < 0) { @@ -1787,7 +1786,7 @@ test_get_file_obj_count(void) PART_BEGIN(H5Fget_obj_count_dsets) { - TESTING_2("H5Fget_obj_count for datasets") + TESTING_2("H5Fget_obj_count for datasets"); /* Get the number of dataset in two opened files */ if ((obj_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_DATASET)) < 0 || obj_count != 1) { @@ -1808,7 +1807,7 @@ test_get_file_obj_count(void) PART_BEGIN(H5Fget_obj_count_all_single_file) { - TESTING_2("H5Fget_obj_count for all object types in single file") + TESTING_2("H5Fget_obj_count for all object types in single file"); /* Get the number of all open objects */ if ((obj_count = H5Fget_obj_count(file_id, H5F_OBJ_ALL)) < 0) { @@ -1830,8 +1829,8 @@ test_get_file_obj_count(void) PART_BEGIN(H5Fget_obj_count_all) { - TESTING_2("H5Fget_obj_count for all object types") -#ifndef WRONG_DATATYPE_OBJ_COUNT + TESTING_2("H5Fget_obj_count for all object types"); + /* Get the number of all open objects */ if ((obj_count = H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL)) < 0) { H5_FAILED(); @@ -1846,16 +1845,12 @@ test_get_file_obj_count(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Fget_obj_count_all); -#endif } PART_END(H5Fget_obj_count_all); PART_BEGIN(H5Fget_obj_ids_singular_grp) { - TESTING_2("H5Fget_obj_ids for a singular group") + TESTING_2("H5Fget_obj_ids for a singular group"); if (H5Fget_obj_ids(file_id, H5F_OBJ_GROUP, (size_t)obj_count, &object_id) < 0) { H5_FAILED(); @@ -1876,22 +1871,22 @@ test_get_file_obj_count(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(dspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(named_dtype_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id2) < 0) - TEST_ERROR + TEST_ERROR; HDfree(prefixed_filename1); prefixed_filename1 = NULL; @@ -1928,7 +1923,6 @@ test_get_file_obj_count(void) static int test_file_open_overlap(void) { -#ifndef NO_DOUBLE_OBJECT_OPENS ssize_t obj_count; hid_t file_id = H5I_INVALID_HID; hid_t file_id2 = H5I_INVALID_HID; @@ -1936,9 +1930,8 @@ test_file_open_overlap(void) hid_t dspace_id = H5I_INVALID_HID; hid_t dset_id = H5I_INVALID_HID; char *prefixed_filename = NULL; -#endif - TESTING("overlapping file opens") + TESTING("overlapping file opens"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE) || @@ -1949,7 +1942,6 @@ test_file_open_overlap(void) return 0; } -#ifndef NO_DOUBLE_OBJECT_OPENS if (prefix_filename(test_path_prefix, OVERLAPPING_FILENAME, &prefixed_filename) < 0) { H5_FAILED(); HDprintf(" couldn't prefix filename\n"); @@ -2004,11 +1996,11 @@ test_file_open_overlap(void) } if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; /* Create a dataset in the second file */ if ((dset_id = H5Dcreate2(file_id2, OVERLAPPING_OPEN_TEST_DSET_NAME, H5T_NATIVE_INT, dspace_id, @@ -2033,11 +2025,11 @@ test_file_open_overlap(void) } if (H5Sclose(dspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id2) < 0) - TEST_ERROR + TEST_ERROR; HDfree(prefixed_filename); prefixed_filename = NULL; @@ -2060,10 +2052,6 @@ test_file_open_overlap(void) HDfree(prefixed_filename); return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -2073,14 +2061,12 @@ test_file_open_overlap(void) static int test_file_mounts(void) { -#ifndef NO_FILE_MOUNTS hid_t file_id = H5I_INVALID_HID; hid_t child_fid = H5I_INVALID_HID; hid_t group_id = H5I_INVALID_HID; char *prefixed_filename = NULL; -#endif - TESTING("file mounting/unmounting") + TESTING("file mounting/unmounting"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_MOUNT) || @@ -2091,7 +2077,6 @@ test_file_mounts(void) return 0; } -#ifndef NO_FILE_MOUNTS if (prefix_filename(test_path_prefix, FILE_MOUNT_TEST_FILENAME, &prefixed_filename) < 0) { H5_FAILED(); HDprintf(" couldn't prefix filename\n"); @@ -2131,11 +2116,11 @@ test_file_mounts(void) } if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(child_fid) < 0) - TEST_ERROR + TEST_ERROR; HDfree(prefixed_filename); prefixed_filename = NULL; @@ -2156,10 +2141,6 @@ test_file_mounts(void) HDfree(prefixed_filename); return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -2178,7 +2159,7 @@ test_get_file_name(void) char *prefixed_filename = NULL; char *file_name_buf = NULL; - TESTING_MULTIPART("retrieval of file name") + TESTING_MULTIPART("retrieval of file name"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE) || @@ -2186,12 +2167,13 @@ test_get_file_name(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { SKIPPED(); - HDprintf(" API functions for basic or more file, basic dataset, group, datatype, or attribute " - "aren't supported with this connector\n"); + HDprintf( + " API functions for basic or more file, basic dataset, group, stored datatypes, or attribute " + "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if (prefix_filename(test_path_prefix, GET_FILE_NAME_TEST_FNAME, &prefixed_filename) < 0) { H5_FAILED(); @@ -2207,11 +2189,11 @@ test_get_file_name(void) /* Retrieve the size of the file name */ if ((file_name_buf_len = H5Fget_name(file_id, NULL, 0)) < 0) - TEST_ERROR + TEST_ERROR; /* Allocate buffer for file name */ if (NULL == (file_name_buf = (char *)HDmalloc((size_t)file_name_buf_len + 1))) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2219,7 +2201,7 @@ test_get_file_name(void) { PART_BEGIN(H5Fget_name_file_id) { - TESTING_2("H5Fget_name using file ID") + TESTING_2("H5Fget_name using file ID"); memset(file_name_buf, 0, (size_t)file_name_buf_len); @@ -2243,7 +2225,7 @@ test_get_file_name(void) PART_BEGIN(H5Fget_name_grp_id) { - TESTING_2("H5Fget_name using non-root group ID") + TESTING_2("H5Fget_name using non-root group ID"); /* Attempt to retrieve the name of the file from an object that isn't the root group */ memset(file_name_buf, 0, (size_t)file_name_buf_len); @@ -2283,7 +2265,7 @@ test_get_file_name(void) PART_BEGIN(H5Fget_name_dset_id) { - TESTING_2("H5Fget_name using dataset ID") + TESTING_2("H5Fget_name using dataset ID"); if ((dspace_id = H5Screate(H5S_SCALAR)) < 0) { H5_FAILED(); @@ -2336,7 +2318,7 @@ test_get_file_name(void) PART_BEGIN(H5Fget_name_attr_id) { - TESTING_2("H5Fget_name using attribute ID") + TESTING_2("H5Fget_name using attribute ID"); if ((dspace_id = H5Screate(H5S_SCALAR)) < 0) { H5_FAILED(); @@ -2389,7 +2371,7 @@ test_get_file_name(void) PART_BEGIN(H5Fget_name_dtype_id) { - TESTING_2("H5Fget_name using committed datatype ID") + TESTING_2("H5Fget_name using committed datatype ID"); /* Create a named datatype */ if ((named_dtype_id = H5Tcopy(H5T_NATIVE_INT)) < 0) { @@ -2436,7 +2418,7 @@ test_get_file_name(void) { ssize_t name_len = 0; - TESTING_2("invalid H5Fget_name using dataspace ID") + TESTING_2("invalid H5Fget_name using dataspace ID"); if ((dspace_id = H5Screate(H5S_SCALAR)) < 0) { H5_FAILED(); @@ -2473,7 +2455,7 @@ test_get_file_name(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (file_name_buf) { HDfree(file_name_buf); @@ -2481,7 +2463,7 @@ test_get_file_name(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; HDfree(prefixed_filename); prefixed_filename = NULL; @@ -2521,9 +2503,7 @@ cleanup_files(void) /* The below file should not get created */ /* remove_test_file(test_path_prefix, FILE_CREATE_INVALID_PARAMS_FILE_NAME); */ -#ifndef NO_DOUBLE_OBJECT_OPENS remove_test_file(test_path_prefix, OVERLAPPING_FILENAME); -#endif remove_test_file(test_path_prefix, FILE_PERMISSION_TEST_FILENAME); remove_test_file(test_path_prefix, FILE_FLUSH_TEST_FILENAME); remove_test_file(test_path_prefix, FILE_PROPERTY_LIST_TEST_FNAME1); @@ -2531,9 +2511,7 @@ cleanup_files(void) remove_test_file(test_path_prefix, FILE_INTENT_TEST_FILENAME); remove_test_file(test_path_prefix, GET_OBJ_COUNT_TEST_FILENAME1); remove_test_file(test_path_prefix, GET_OBJ_COUNT_TEST_FILENAME2); -#ifndef NO_FILE_MOUNTS remove_test_file(test_path_prefix, FILE_MOUNT_TEST_FILENAME); -#endif remove_test_file(test_path_prefix, GET_FILE_NAME_TEST_FNAME); } diff --git a/vol_file_test_parallel.c b/vol_file_test_parallel.c index aca862d..fe6bfbb 100644 --- a/vol_file_test_parallel.c +++ b/vol_file_test_parallel.c @@ -45,7 +45,7 @@ test_create_file(void) } if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fcreate(FILE_CREATE_TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0) { H5_FAILED(); @@ -54,9 +54,9 @@ test_create_file(void) } if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -91,10 +91,10 @@ test_open_file(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -102,7 +102,7 @@ test_open_file(void) { PART_BEGIN(H5Fopen_rdonly) { - TESTING_2("H5Fopen in read-only mode") + TESTING_2("H5Fopen in read-only mode"); if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDONLY, fapl_id)) < 0) { H5_FAILED(); @@ -125,7 +125,7 @@ test_open_file(void) PART_BEGIN(H5Fopen_rdwrite) { - TESTING_2("H5Fopen in read-write mode") + TESTING_2("H5Fopen in read-write mode"); if ((file_id = H5Fopen(vol_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); @@ -152,10 +152,10 @@ test_open_file(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -196,7 +196,7 @@ test_split_comm_file_access(void) int newrank; int err_occurred = 0; - TESTING("file access with a split communicator") + TESTING("file access with a split communicator"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) { diff --git a/vol_group_test.c b/vol_group_test.c index d3ab7be..1da2500 100644 --- a/vol_group_test.c +++ b/vol_group_test.c @@ -65,7 +65,7 @@ test_create_group_under_root(void) hid_t file_id = H5I_INVALID_HID; hid_t parent_gid = H5I_INVALID_HID; - TESTING("creation of group under the root group") + TESTING("creation of group under the root group"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) { @@ -89,9 +89,9 @@ test_create_group_under_root(void) } if (H5Gclose(parent_gid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -119,7 +119,7 @@ test_create_group_under_existing_group(void) hid_t parent_group_id = H5I_INVALID_HID, child_group_id = H5I_INVALID_HID, grandchild_group_id = H5I_INVALID_HID; - TESTING("creation of group under existing group using a relative path") + TESTING("creation of group under existing group using a relative path"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) { @@ -160,13 +160,13 @@ test_create_group_under_existing_group(void) } if (H5Gclose(grandchild_group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(child_group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(parent_group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -197,7 +197,7 @@ test_create_many_groups(void) char group_name[NAME_BUF_SIZE]; unsigned i; - TESTING("H5Gcreate many groups") + TESTING("H5Gcreate many groups"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) { @@ -238,15 +238,15 @@ test_create_many_groups(void) } if (H5Gclose(child_group_id) < 0) - TEST_ERROR + TEST_ERROR; } if (H5Gclose(parent_group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -275,7 +275,7 @@ test_create_deep_groups(void) hid_t container_group = H5I_INVALID_HID; hid_t group_id = H5I_INVALID_HID; - TESTING("H5Gcreate groups of great depths") + TESTING("H5Gcreate groups of great depths"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) { @@ -306,14 +306,14 @@ test_create_deep_groups(void) HDprintf("\n"); if (create_group_recursive(group_id, 1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -355,11 +355,11 @@ create_group_recursive(hid_t parent_gid, unsigned counter) if (counter < GROUP_DEPTH) { if (create_group_recursive(child_gid, counter + 1) < 0) - TEST_ERROR + TEST_ERROR; } if (H5Gclose(child_gid) < 0) - TEST_ERROR + TEST_ERROR; return 0; @@ -384,7 +384,7 @@ test_create_intermediate_group(void) hid_t group_id = H5I_INVALID_HID; hid_t crt_intmd_lcpl_id = H5I_INVALID_HID; - TESTING("H5Gcreate group with intermediate group creation") + TESTING("H5Gcreate group with intermediate group creation"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) { @@ -407,33 +407,33 @@ test_create_intermediate_group(void) /* Set up plist for creating intermediate groups */ if ((crt_intmd_lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_create_intermediate_group(crt_intmd_lcpl_id, TRUE) < 0) - TEST_ERROR + TEST_ERROR; /* Create an intermediate group using a relative path */ if ((group_id = H5Gcreate2(container_group, GROUP_CREATE_INTMD_REL_INTMD_NAME "/" GROUP_CREATE_INTMD_REL_END_NAME, crt_intmd_lcpl_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; group_id = H5I_INVALID_HID; /* Verify both groups were created */ if ((group_id = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME "/" GROUP_CREATE_INTMD_REL_INTMD_NAME, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; group_id = H5I_INVALID_HID; if ((group_id = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME "/" GROUP_CREATE_INTMD_REL_INTMD_NAME "/" GROUP_CREATE_INTMD_REL_END_NAME, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; group_id = H5I_INVALID_HID; /* Create an intermediate group using an absolute path */ @@ -441,25 +441,25 @@ test_create_intermediate_group(void) "/" GROUP_TEST_GROUP_NAME "/" GROUP_CREATE_INTMD_ABS_INTMD_NAME "/" GROUP_CREATE_INTMD_ABS_END_NAME, crt_intmd_lcpl_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; group_id = H5I_INVALID_HID; /* Verify both groups were created */ if ((group_id = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME "/" GROUP_CREATE_INTMD_ABS_INTMD_NAME, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; group_id = H5I_INVALID_HID; if ((group_id = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME "/" GROUP_CREATE_INTMD_ABS_INTMD_NAME "/" GROUP_CREATE_INTMD_ABS_END_NAME, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; group_id = H5I_INVALID_HID; /* Create two intermediate groups using an absolute path */ @@ -467,42 +467,42 @@ test_create_intermediate_group(void) "/" GROUP_TEST_GROUP_NAME "/" GROUP_CREATE_INTMD_MULT_INTMD1_NAME "/" GROUP_CREATE_INTMD_MULT_INTMD2_NAME "/" GROUP_CREATE_INTMD_MULT_END_NAME, crt_intmd_lcpl_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; group_id = H5I_INVALID_HID; /* Verify all three groups were created */ if ((group_id = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME "/" GROUP_CREATE_INTMD_MULT_INTMD1_NAME, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; group_id = H5I_INVALID_HID; if ((group_id = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME "/" GROUP_CREATE_INTMD_MULT_INTMD1_NAME "/" GROUP_CREATE_INTMD_MULT_INTMD2_NAME, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; group_id = H5I_INVALID_HID; if ((group_id = H5Gopen2(file_id, GROUP_TEST_GROUP_NAME "/" GROUP_CREATE_INTMD_MULT_INTMD1_NAME "/" GROUP_CREATE_INTMD_MULT_INTMD2_NAME "/" GROUP_CREATE_INTMD_MULT_END_NAME, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; group_id = H5I_INVALID_HID; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(crt_intmd_lcpl_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -540,7 +540,7 @@ test_create_group_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -554,7 +554,7 @@ test_create_group_invalid_params(void) { PART_BEGIN(H5Gcreate_invalid_loc_id) { - TESTING_2("H5Gcreate with an invalid loc_id") + TESTING_2("H5Gcreate with an invalid loc_id"); H5E_BEGIN_TRY { @@ -576,7 +576,7 @@ test_create_group_invalid_params(void) PART_BEGIN(H5Gcreate_invalid_grp_name) { - TESTING_2("H5Gcreate with an invalid group name") + TESTING_2("H5Gcreate with an invalid group name"); H5E_BEGIN_TRY { @@ -610,7 +610,7 @@ test_create_group_invalid_params(void) PART_BEGIN(H5Gcreate_invalid_lcpl) { - TESTING_2("H5Gcreate with an invalid LCPL") + TESTING_2("H5Gcreate with an invalid LCPL"); H5E_BEGIN_TRY { @@ -632,7 +632,7 @@ test_create_group_invalid_params(void) PART_BEGIN(H5Gcreate_invalid_gcpl) { - TESTING_2("H5Gcreate with an invalid GCPL") + TESTING_2("H5Gcreate with an invalid GCPL"); H5E_BEGIN_TRY { @@ -654,7 +654,7 @@ test_create_group_invalid_params(void) PART_BEGIN(H5Gcreate_invalid_gapl) { - TESTING_2("H5Gcreate with an invalid GAPL") + TESTING_2("H5Gcreate with an invalid GAPL"); H5E_BEGIN_TRY { @@ -676,10 +676,10 @@ test_create_group_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -706,7 +706,7 @@ test_create_anonymous_group(void) hid_t file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID, new_group_id = H5I_INVALID_HID; - TESTING("creation of anonymous group") + TESTING("creation of anonymous group"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) { @@ -734,11 +734,11 @@ test_create_anonymous_group(void) } if (H5Gclose(new_group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -775,7 +775,7 @@ test_create_anonymous_group_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -795,7 +795,7 @@ test_create_anonymous_group_invalid_params(void) { PART_BEGIN(H5Gcreate_anon_invalid_loc_id) { - TESTING_2("H5Gcreate_anon with an invalid loc_id") + TESTING_2("H5Gcreate_anon with an invalid loc_id"); H5E_BEGIN_TRY { @@ -816,7 +816,7 @@ test_create_anonymous_group_invalid_params(void) PART_BEGIN(H5Gcreate_anon_invalid_gcpl) { - TESTING_2("H5Gcreate_anon with an invalid GCPL") + TESTING_2("H5Gcreate_anon with an invalid GCPL"); H5E_BEGIN_TRY { @@ -837,7 +837,7 @@ test_create_anonymous_group_invalid_params(void) PART_BEGIN(H5Gcreate_anon_invalid_gapl) { - TESTING_2("H5Gcreate_anon with an invalid GAPL") + TESTING_2("H5Gcreate_anon with an invalid GAPL"); H5E_BEGIN_TRY { @@ -858,12 +858,12 @@ test_create_anonymous_group_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -891,7 +891,7 @@ test_open_nonexistent_group(void) hid_t file_id = H5I_INVALID_HID; hid_t group_id = H5I_INVALID_HID; - TESTING("for invalid opening of a nonexistent group") + TESTING("for invalid opening of a nonexistent group"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) { @@ -919,7 +919,7 @@ test_open_nonexistent_group(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -955,7 +955,7 @@ test_open_group_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -969,7 +969,7 @@ test_open_group_invalid_params(void) { PART_BEGIN(H5Gopen_invalid_loc_id) { - TESTING_2("H5Gopen with an invalid loc_id") + TESTING_2("H5Gopen with an invalid loc_id"); H5E_BEGIN_TRY { @@ -990,7 +990,7 @@ test_open_group_invalid_params(void) PART_BEGIN(H5Gopen_invalid_grp_name) { - TESTING_2("H5Gopen with an invalid group name") + TESTING_2("H5Gopen with an invalid group name"); H5E_BEGIN_TRY { @@ -1024,7 +1024,7 @@ test_open_group_invalid_params(void) PART_BEGIN(H5Gopen_invalid_gapl) { - TESTING_2("H5Gopen with an invalid GAPL") + TESTING_2("H5Gopen with an invalid GAPL"); H5E_BEGIN_TRY { @@ -1045,10 +1045,10 @@ test_open_group_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1074,7 +1074,7 @@ test_close_group_invalid_id(void) { herr_t err_ret = -1; - TESTING("H5Gclose with an invalid group ID") + TESTING("H5Gclose with an invalid group ID"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC)) { @@ -1104,8 +1104,9 @@ test_close_group_invalid_id(void) } /* - * A test to check that a VOL connector stores and can retrieve a valid - * copy of a GCPL used at group creation time. + * A test to check that a GCPL used for group creation can + * be persisted and that a valid copy of that GCPL can be + * retrieved later with a call to H5Gget_create_plist. */ static int test_group_property_lists(void) @@ -1116,18 +1117,18 @@ test_group_property_lists(void) hid_t group_id1 = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; hid_t gcpl_id1 = H5I_INVALID_HID, gcpl_id2 = H5I_INVALID_HID; - TESTING_MULTIPART("group property list operations") + TESTING_MULTIPART("group property list operations"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { SKIPPED(); - HDprintf(" API functions for basic file, group, property list, creation order aren't supported " + HDprintf(" API functions for basic file, group, property list, or creation order aren't supported " "with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1170,7 +1171,7 @@ test_group_property_lists(void) } if (H5Pclose(gcpl_id1) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1178,7 +1179,7 @@ test_group_property_lists(void) { PART_BEGIN(H5Gget_create_plist) { - TESTING_2("H5Gget_create_plist") + TESTING_2("H5Gget_create_plist"); /* Try to retrieve copies of the two property lists, one which has the property set and one which * does not */ @@ -1272,7 +1273,7 @@ test_group_property_lists(void) PART_BEGIN(H5Gget_create_plist_reopened) { - TESTING_2("H5Gget_create_plist after re-opening a group") + TESTING_2("H5Gget_create_plist after re-opening a group"); if ((group_id1 = H5Gopen2(container_group, GROUP_PROPERTY_LIST_TEST_GROUP_NAME1, H5P_DEFAULT)) < 0) { @@ -1340,20 +1341,20 @@ test_group_property_lists(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(gcpl_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1392,14 +1393,13 @@ test_get_group_info(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE)) { SKIPPED(); - HDprintf(" API functions for basic file or group, creation order aren't supported with this " - "connector\n"); + HDprintf(" API functions for basic file or group aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1419,10 +1419,12 @@ test_get_group_info(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { - H5_FAILED(); - HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { + H5_FAILED(); + HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); + goto error; + } } if ((parent_group_id = H5Gcreate2(container_group, GROUP_GET_INFO_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id, @@ -1445,7 +1447,7 @@ test_get_group_info(void) } if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; } PASSED(); @@ -1454,7 +1456,7 @@ test_get_group_info(void) { PART_BEGIN(H5Gget_info) { - TESTING_2("retrieval of group info with H5Gget_info") + TESTING_2("retrieval of group info with H5Gget_info"); memset(&group_info, 0, sizeof(group_info)); @@ -1506,7 +1508,7 @@ test_get_group_info(void) PART_BEGIN(H5Gget_info_by_name) { - TESTING_2("retrieval of group info with H5Gget_info_by_name") + TESTING_2("retrieval of group info with H5Gget_info_by_name"); memset(&group_info, 0, sizeof(group_info)); @@ -1559,7 +1561,13 @@ test_get_group_info(void) PART_BEGIN(H5Gget_info_by_idx_crt_order_increasing) { - TESTING_2("H5Gget_info_by_idx by creation order in increasing order") + TESTING_2("H5Gget_info_by_idx by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Gget_info_by_idx_crt_order_increasing); + } for (i = 0; i < GROUP_GET_INFO_TEST_GROUP_NUMB; i++) { memset(&group_info, 0, sizeof(group_info)); @@ -1610,7 +1618,13 @@ test_get_group_info(void) PART_BEGIN(H5Gget_info_by_idx_crt_order_decreasing) { - TESTING_2("H5Gget_info_by_idx by creation order in decreasing order") + TESTING_2("H5Gget_info_by_idx by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Gget_info_by_idx_crt_order_decreasing); + } for (i = 0; i < GROUP_GET_INFO_TEST_GROUP_NUMB; i++) { memset(&group_info, 0, sizeof(group_info)); @@ -1661,7 +1675,7 @@ test_get_group_info(void) PART_BEGIN(H5Gget_info_by_idx_name_order_increasing) { - TESTING_2("H5Gget_info_by_idx by alphabetical order in increasing order") + TESTING_2("H5Gget_info_by_idx by alphabetical order in increasing order"); for (i = 0; i < GROUP_GET_INFO_TEST_GROUP_NUMB; i++) { memset(&group_info, 0, sizeof(group_info)); @@ -1712,8 +1726,8 @@ test_get_group_info(void) PART_BEGIN(H5Gget_info_by_idx_name_order_decreasing) { - TESTING_2("H5Gget_info_by_idx by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Gget_info_by_idx by alphabetical order in decreasing order"); + for (i = 0; i < GROUP_GET_INFO_TEST_GROUP_NUMB; i++) { memset(&group_info, 0, sizeof(group_info)); @@ -1727,14 +1741,15 @@ test_get_group_info(void) if (group_info.nlinks != 0) { H5_FAILED(); - HDprintf(" group's number of links '%lld' doesn't match expected value '%lld'\n", + HDprintf(" group's number of links '%" PRIuHSIZE + "' doesn't match expected value '%d'\n", group_info.nlinks, 0); PART_ERROR(H5Gget_info_by_idx_name_order_decreasing); } if (group_info.max_corder != 0) { H5_FAILED(); - HDprintf(" group's max creation order '%lld' doesn't match expected value '%lld'\n", + HDprintf(" group's max creation order '%lld' doesn't match expected value '%d'\n", (long long)group_info.max_corder, 0); PART_ERROR(H5Gget_info_by_idx_name_order_decreasing); } @@ -1758,25 +1773,21 @@ test_get_group_info(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Gget_info_by_idx_name_order_decreasing); -#endif } PART_END(H5Gget_info_by_idx_name_order_decreasing); } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(parent_group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1810,15 +1821,14 @@ test_get_group_info_invalid_params(void) TESTING_MULTIPART("retrieval of group info with invalid parameters"); /* Make sure the connector supports the API functions being tested */ - if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE)) { SKIPPED(); - HDprintf(" API functions for basic file, more group, creation order aren't supported with this " + HDprintf(" API functions for basic file, or more group aren't supported with this " "connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1832,7 +1842,7 @@ test_get_group_info_invalid_params(void) { PART_BEGIN(H5Gget_info_invalid_loc_id) { - TESTING_2("H5Gget_info with an invalid loc_id") + TESTING_2("H5Gget_info with an invalid loc_id"); H5E_BEGIN_TRY { @@ -1852,7 +1862,7 @@ test_get_group_info_invalid_params(void) PART_BEGIN(H5Gget_info_invalid_grp_info_pointer) { - TESTING_2("H5Gget_info with an invalid group info pointer") + TESTING_2("H5Gget_info with an invalid group info pointer"); H5E_BEGIN_TRY { @@ -1872,7 +1882,7 @@ test_get_group_info_invalid_params(void) PART_BEGIN(H5Gget_info_by_name_invalid_loc_id) { - TESTING_2("H5Gget_info_by_name with an invalid loc_id") + TESTING_2("H5Gget_info_by_name with an invalid loc_id"); H5E_BEGIN_TRY { @@ -1892,7 +1902,7 @@ test_get_group_info_invalid_params(void) PART_BEGIN(H5Gget_info_by_name_invalid_grp_name) { - TESTING_2("H5Gget_info_by_name with an invalid group name") + TESTING_2("H5Gget_info_by_name with an invalid group name"); H5E_BEGIN_TRY { @@ -1925,7 +1935,7 @@ test_get_group_info_invalid_params(void) PART_BEGIN(H5Gget_info_by_name_invalid_grp_info_pointer) { - TESTING_2("H5Gget_info_by_name with an invalid group info pointer") + TESTING_2("H5Gget_info_by_name with an invalid group info pointer"); H5E_BEGIN_TRY { @@ -1946,7 +1956,7 @@ test_get_group_info_invalid_params(void) PART_BEGIN(H5Gget_info_by_name_invalid_lapl) { - TESTING_2("H5Gget_info_by_name with an invalid LAPL") + TESTING_2("H5Gget_info_by_name with an invalid LAPL"); H5E_BEGIN_TRY { @@ -1966,7 +1976,7 @@ test_get_group_info_invalid_params(void) PART_BEGIN(H5Gget_info_by_idx_invalid_loc_id) { - TESTING_2("H5Gget_info_by_idx with an invalid loc_id") + TESTING_2("H5Gget_info_by_idx with an invalid loc_id"); H5E_BEGIN_TRY { @@ -1987,7 +1997,7 @@ test_get_group_info_invalid_params(void) PART_BEGIN(H5Gget_info_by_idx_invalid_grp_name) { - TESTING_2("H5Gget_info_by_idx with an invalid group name") + TESTING_2("H5Gget_info_by_idx with an invalid group name"); H5E_BEGIN_TRY { @@ -2022,7 +2032,7 @@ test_get_group_info_invalid_params(void) PART_BEGIN(H5Gget_info_by_idx_invalid_index_type) { - TESTING_2("H5Gget_info_by_idx with an invalid index type") + TESTING_2("H5Gget_info_by_idx with an invalid index type"); H5E_BEGIN_TRY { @@ -2058,7 +2068,7 @@ test_get_group_info_invalid_params(void) PART_BEGIN(H5Gget_info_by_idx_invalid_iter_order) { - TESTING_2("H5Gget_info_by_idx with an invalid iteration order") + TESTING_2("H5Gget_info_by_idx with an invalid iteration order"); H5E_BEGIN_TRY { @@ -2094,7 +2104,7 @@ test_get_group_info_invalid_params(void) PART_BEGIN(H5Gget_info_by_idx_invalid_grp_info_pointer) { - TESTING_2("H5Gget_info_by_idx with an invalid group info pointer") + TESTING_2("H5Gget_info_by_idx with an invalid group info pointer"); H5E_BEGIN_TRY { @@ -2115,7 +2125,7 @@ test_get_group_info_invalid_params(void) PART_BEGIN(H5Gget_info_by_idx_invalid_lapl) { - TESTING_2("H5Gget_info_by_idx with an invalid LAPL") + TESTING_2("H5Gget_info_by_idx with an invalid LAPL"); H5E_BEGIN_TRY { @@ -2136,10 +2146,10 @@ test_get_group_info_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2165,13 +2175,13 @@ test_flush_group(void) hid_t container_group = H5I_INVALID_HID; hid_t group_id = H5I_INVALID_HID; - TESTING("H5Gflush") + TESTING("H5Gflush"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { SKIPPED(); - HDprintf(" API functions for basic file, more group, creation order aren't supported with this " + HDprintf(" API functions for basic file, group, or flush refresh aren't supported with this " "connector\n"); return 0; } @@ -2203,11 +2213,11 @@ test_flush_group(void) } if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2234,7 +2244,7 @@ test_flush_group_invalid_params(void) { herr_t status; - TESTING("H5Gflush with invalid parameters") + TESTING("H5Gflush with invalid parameters"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { @@ -2273,14 +2283,14 @@ test_refresh_group(void) hid_t container_group = H5I_INVALID_HID; hid_t group_id = H5I_INVALID_HID; - TESTING("H5Grefresh") + TESTING("H5Grefresh"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or refresh aren't supported with this connector\n"); + HDprintf(" API functions for basic file, group, or flush refresh aren't supported with this " + "connector\n"); return 0; } @@ -2311,11 +2321,11 @@ test_refresh_group(void) } if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2342,7 +2352,7 @@ test_refresh_group_invalid_params(void) { herr_t status; - TESTING("H5Grefresh with invalid parameters") + TESTING("H5Grefresh with invalid parameters"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { diff --git a/vol_link_test.c b/vol_link_test.c index c646cf3..6811e81 100644 --- a/vol_link_test.c +++ b/vol_link_test.c @@ -77,57 +77,31 @@ static herr_t link_iter_hard_links_cb(hid_t group_id, const char *name, const H5 void *op_data); static herr_t link_iter_soft_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); -#ifndef NO_EXTERNAL_LINKS static herr_t link_iter_external_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); -#endif -#ifndef NO_USER_DEFINED_LINKS -static herr_t link_iter_ud_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); -#endif -#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS) static herr_t link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); -#endif static herr_t link_iter_invalid_params_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); static herr_t link_iter_0_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); -#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS) static herr_t link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); -#endif - static herr_t link_visit_hard_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); static herr_t link_visit_soft_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); -#ifndef NO_EXTERNAL_LINKS static herr_t link_visit_external_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); -#endif -#ifndef NO_USER_DEFINED_LINKS -static herr_t link_visit_ud_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, - void *op_data); -#endif -#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS) static herr_t link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); -#endif static herr_t link_visit_hard_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); static herr_t link_visit_soft_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); -#ifndef NO_EXTERNAL_LINKS static herr_t link_visit_external_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); -#endif -#ifndef NO_USER_DEFINED_LINKS -static herr_t link_visit_ud_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, - void *op_data); -#endif -#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS) static herr_t link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); -#endif static herr_t link_visit_invalid_params_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); static herr_t link_visit_0_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); @@ -205,13 +179,13 @@ test_create_hard_link(void) hid_t file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; - TESTING("hard link creation") + TESTING("hard link creation"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file or group, basic or hard link aren't supported with this " + HDprintf(" API functions for basic file, group, link, or hard link aren't supported with this " "connector\n"); return 0; } @@ -255,11 +229,11 @@ test_create_hard_link(void) } if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -292,13 +266,13 @@ test_create_hard_link_long_name(void) char *objname = NULL; /* Name of object [Long] */ size_t u; /* Local index variable */ - TESTING("hard link creation with a long name") + TESTING("hard link creation with a long name"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file or group, basic or hard link aren't supported with this " + HDprintf(" API functions for basic file, group, link, or hard link aren't supported with this " "connector\n"); return 0; } @@ -324,7 +298,7 @@ test_create_hard_link_long_name(void) if (H5VLget_connector_name(file_id, vol_name, 5) < 0) { H5_FAILED(); - HDprintf(" couldn't get VOL NAME '%s'\n", HARD_LINK_TEST_GROUP_NAME); + HDprintf(" couldn't get VOL connector name\n"); goto error; } @@ -334,7 +308,7 @@ test_create_hard_link_long_name(void) /* Construct very long file name */ if ((objname = (char *)HDmalloc((size_t)(name_len + 1))) == NULL) - TEST_ERROR + TEST_ERROR; for (u = 0; u < name_len; u++) objname[u] = 'a'; @@ -360,11 +334,11 @@ test_create_hard_link_long_name(void) } if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; /* Release memory */ if (objname) @@ -400,18 +374,16 @@ test_create_hard_link_many(void) hid_t file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID; hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID; -#ifndef NO_OBJECT_GET_NAME - char objname[HARD_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE]; /* Object name */ -#endif + char objname[HARD_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE]; /* Object name */ - TESTING("hard link creation of many links") + TESTING("hard link creation of many links"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) { SKIPPED(); HDprintf( - " API functions for basic file or group, or hard link aren't supported with this connector\n"); + " API functions for basic file, group, or hard link aren't supported with this connector\n"); return 0; } @@ -443,47 +415,47 @@ test_create_hard_link_many(void) if (H5Lcreate_hard(group_id, HARD_LINK_TEST_GROUP_MANY_FINAL_NAME, group_id, "hard1", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard1", group_id, "hard2", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard2", group_id, "hard3", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard3", group_id, "hard4", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard4", group_id, "hard5", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard5", group_id, "hard6", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard6", group_id, "hard7", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard7", group_id, "hard8", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard8", group_id, "hard9", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard9", group_id, "hard10", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard10", group_id, "hard11", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard11", group_id, "hard12", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard12", group_id, "hard13", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard13", group_id, "hard14", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard14", group_id, "hard15", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard15", group_id, "hard16", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard16", group_id, "hard17", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard17", group_id, "hard18", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard18", group_id, "hard19", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard19", group_id, "hard20", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(group_id, "hard20", group_id, "hard21", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Verify the link has been created */ if ((link_exists = H5Lexists(group_id, "hard21", H5P_DEFAULT)) < 0) { @@ -499,13 +471,13 @@ test_create_hard_link_many(void) } if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; /* Reopen the file and group and verify the hard link */ if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { @@ -533,7 +505,6 @@ test_create_hard_link_many(void) HARD_LINK_TEST_GROUP_MANY_FINAL_NAME); goto error; } -#ifndef NO_OBJECT_GET_NAME /* Check name */ if (H5Iget_name(group_id2, objname, (size_t)HARD_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE) < 0) { H5_FAILED(); @@ -546,16 +517,15 @@ test_create_hard_link_many(void) HDprintf(" wrong name of the object '%s'\n", objname); goto error; } -#endif if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -585,18 +555,18 @@ test_create_hard_link_same_loc(void) hid_t file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; - TESTING_MULTIPART("hard link creation with H5L_SAME_LOC") + TESTING_MULTIPART("hard link creation with H5L_SAME_LOC"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file or group, basic or hard link aren't supported with this " + HDprintf(" API functions for basic file, group, link, or hard link aren't supported with this " "connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -623,7 +593,7 @@ test_create_hard_link_same_loc(void) { PART_BEGIN(H5L_SAME_LOC_first_param) { - TESTING_2("usage of H5L_SAME_LOC for first parameter of H5Lcreate_hard") + TESTING_2("usage of H5L_SAME_LOC for first parameter of H5Lcreate_hard"); /* Library functionality for this part of the test is broken */ if (H5Lcreate_hard(H5L_SAME_LOC, ".", group_id, H5L_SAME_LOC_TEST_LINK_NAME1, H5P_DEFAULT, @@ -652,7 +622,7 @@ test_create_hard_link_same_loc(void) PART_BEGIN(H5L_SAME_LOC_third_param) { - TESTING_2("usage of H5L_SAME_LOC for third parameter of H5Lcreate_hard") + TESTING_2("usage of H5L_SAME_LOC for third parameter of H5Lcreate_hard"); if (H5Lcreate_hard(group_id, ".", H5L_SAME_LOC, H5L_SAME_LOC_TEST_LINK_NAME2, H5P_DEFAULT, H5P_DEFAULT) < 0) { @@ -680,14 +650,14 @@ test_create_hard_link_same_loc(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -716,10 +686,8 @@ test_create_hard_link_invalid_params(void) htri_t link_exists; hid_t file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; -#ifndef NO_PREVENT_HARD_LINKS_ACROSS_FILES - char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; -#endif - hid_t ext_file_id = H5I_INVALID_HID; + char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; + hid_t ext_file_id = H5I_INVALID_HID; TESTING_MULTIPART("hard link creation with invalid parameters"); @@ -727,12 +695,12 @@ test_create_hard_link_invalid_params(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file or group, basic or hard link aren't supported with this " + HDprintf(" API functions for basic file, group, link, or hard link aren't supported with this " "connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -759,7 +727,7 @@ test_create_hard_link_invalid_params(void) { PART_BEGIN(H5Lcreate_hard_invalid_cur_loc_id) { - TESTING_2("H5Lcreate_hard with an invalid cur_loc_id") + TESTING_2("H5Lcreate_hard with an invalid cur_loc_id"); H5E_BEGIN_TRY { @@ -780,7 +748,7 @@ test_create_hard_link_invalid_params(void) PART_BEGIN(H5Lcreate_hard_invalid_cur_name) { - TESTING_2("H5Lcreate_hard with an invalid cur_name") + TESTING_2("H5Lcreate_hard with an invalid cur_name"); H5E_BEGIN_TRY { @@ -814,7 +782,7 @@ test_create_hard_link_invalid_params(void) PART_BEGIN(H5Lcreate_hard_invalid_new_loc_id) { - TESTING_2("H5Lcreate_hard with an invalid new_loc_id") + TESTING_2("H5Lcreate_hard with an invalid new_loc_id"); H5E_BEGIN_TRY { @@ -835,7 +803,7 @@ test_create_hard_link_invalid_params(void) PART_BEGIN(H5Lcreate_hard_invalid_new_name) { - TESTING_2("H5Lcreate_hard with an invalid new_name") + TESTING_2("H5Lcreate_hard with an invalid new_name"); H5E_BEGIN_TRY { @@ -867,7 +835,7 @@ test_create_hard_link_invalid_params(void) PART_BEGIN(H5Lcreate_hard_invalid_lcpl) { - TESTING_2("H5Lcreate_hard with an invalid LCPL") + TESTING_2("H5Lcreate_hard with an invalid LCPL"); H5E_BEGIN_TRY { @@ -888,7 +856,7 @@ test_create_hard_link_invalid_params(void) PART_BEGIN(H5Lcreate_hard_invalid_lapl) { - TESTING_2("H5Lcreate_hard with an invalid LAPL") + TESTING_2("H5Lcreate_hard with an invalid LAPL"); H5E_BEGIN_TRY { @@ -909,7 +877,7 @@ test_create_hard_link_invalid_params(void) PART_BEGIN(H5Lcreate_hard_invalid_same_loc) { - TESTING_2("H5Lcreate_hard with the invalid same location") + TESTING_2("H5Lcreate_hard with the invalid same location"); H5E_BEGIN_TRY { @@ -930,8 +898,8 @@ test_create_hard_link_invalid_params(void) PART_BEGIN(H5Lcreate_hard_across_files) { - TESTING_2("H5Lcreate_hard across files") -#ifndef NO_PREVENT_HARD_LINKS_ACROSS_FILES + TESTING_2("H5Lcreate_hard across files"); + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -967,16 +935,12 @@ test_create_hard_link_invalid_params(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lcreate_hard_across_files); -#endif } PART_END(H5Lcreate_hard_across_files); PART_BEGIN(H5Lcreate_hard_invalid_existence) { - TESTING_2("invalid link existence after previous invalid H5Lcreate_hard calls") + TESTING_2("invalid link existence after previous invalid H5Lcreate_hard calls"); /* Verify the link hasn't been created */ if ((link_exists = H5Lexists(group_id, HARD_LINK_INVALID_PARAMS_TEST_LINK_NAME, H5P_DEFAULT)) < @@ -999,17 +963,16 @@ test_create_hard_link_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") -#ifndef NO_PREVENT_HARD_LINKS_ACROSS_FILES + TESTING_2("test cleanup"); + if (H5Fclose(ext_file_id) < 0) - TEST_ERROR -#endif + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1040,13 +1003,13 @@ test_create_soft_link_existing_relative(void) hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t object_id = H5I_INVALID_HID; - TESTING("soft link creation to existing object by relative path") + TESTING("soft link creation to existing object by relative path"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file or group, basic or soft link aren't supported with this " + HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this " "connector\n"); return 0; } @@ -1080,7 +1043,7 @@ test_create_soft_link_existing_relative(void) } if (H5Gclose(object_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft(SOFT_LINK_EXISTING_RELATIVE_TEST_OBJECT_NAME, group_id, SOFT_LINK_EXISTING_RELATIVE_TEST_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) { @@ -1110,13 +1073,13 @@ test_create_soft_link_existing_relative(void) } if (H5Gclose(object_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1146,13 +1109,13 @@ test_create_soft_link_existing_absolute(void) hid_t file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID, root_id = H5I_INVALID_HID; - TESTING("soft link creation to existing object by absolute path") + TESTING("soft link creation to existing object by absolute path"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file or group, basic or soft link aren't supported with this " + HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this " "connector\n"); return 0; } @@ -1205,13 +1168,13 @@ test_create_soft_link_existing_absolute(void) } if (H5Gclose(root_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1243,13 +1206,13 @@ test_create_soft_link_dangling_relative(void) hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t object_id = H5I_INVALID_HID; - TESTING("dangling soft link creation to object by relative path") + TESTING("dangling soft link creation to object by relative path"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file or group, basic or soft link aren't supported with this " + HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this " "connector\n"); return 0; } @@ -1316,7 +1279,7 @@ test_create_soft_link_dangling_relative(void) } if (H5Gclose(object_id) < 0) - TEST_ERROR + TEST_ERROR; if ((object_id = H5Gopen2(group_id, SOFT_LINK_DANGLING_RELATIVE_TEST_LINK_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1326,13 +1289,13 @@ test_create_soft_link_dangling_relative(void) } if (H5Gclose(object_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1364,13 +1327,13 @@ test_create_soft_link_dangling_absolute(void) hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t object_id = H5I_INVALID_HID; - TESTING("dangling soft link creation to object by absolute path") + TESTING("dangling soft link creation to object by absolute path"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file or group, basic or soft link aren't supported with this " + HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this " "connector\n"); return 0; } @@ -1438,7 +1401,7 @@ test_create_soft_link_dangling_absolute(void) } if (H5Gclose(object_id) < 0) - TEST_ERROR + TEST_ERROR; if ((object_id = H5Gopen2(group_id, SOFT_LINK_DANGLING_ABSOLUTE_TEST_LINK_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1448,13 +1411,13 @@ test_create_soft_link_dangling_absolute(void) } if (H5Gclose(object_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1488,13 +1451,13 @@ test_create_soft_link_long_name(void) char *objname = NULL; /* Name of object [Long] */ size_t u; /* Local index variable */ - TESTING("soft link creation with a long name") + TESTING("soft link creation with a long name"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file or group, basic or soft link aren't supported with this " + HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this " "connector\n"); return 0; } @@ -1520,7 +1483,7 @@ test_create_soft_link_long_name(void) if (H5VLget_connector_name(file_id, vol_name, 5) < 0) { H5_FAILED(); - HDprintf(" couldn't get VOL NAME '%s'\n", HARD_LINK_TEST_GROUP_NAME); + HDprintf(" couldn't get VOL connector name\n"); goto error; } @@ -1530,7 +1493,7 @@ test_create_soft_link_long_name(void) /* Construct very long file name */ if ((objname = (char *)HDmalloc((size_t)(name_len + 1))) == NULL) - TEST_ERROR + TEST_ERROR; for (u = 0; u < name_len; u++) objname[u] = 'b'; @@ -1556,11 +1519,11 @@ test_create_soft_link_long_name(void) } if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; /* Release memory */ if (objname) @@ -1592,29 +1555,24 @@ test_create_soft_link_long_name(void) static int test_create_soft_link_many(void) { -#ifndef NO_SOFT_LINK_MANY_DANGLING htri_t link_exists; hid_t file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID; hid_t group_id = H5I_INVALID_HID; hid_t object_id = H5I_INVALID_HID; -#ifndef NO_OBJECT_GET_NAME - char objname[SOFT_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE]; /* Object name */ -#endif -#endif + char objname[SOFT_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE]; /* Object name */ - TESTING("soft link creation of many links") + TESTING("soft link creation of many links"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file or group, basic or soft link aren't supported with this " + HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this " "connector\n"); return 0; } -#ifndef NO_SOFT_LINK_MANY_DANGLING if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); HDprintf(" couldn't open file '%s'\n", vol_test_filename); @@ -1637,37 +1595,37 @@ test_create_soft_link_many(void) if (H5Lcreate_soft("/" LINK_TEST_GROUP_NAME "/" SOFT_LINK_TEST_GROUP_MANY_NAME "/" SOFT_LINK_TEST_GROUP_MANY_FINAL_NAME, group_id, "soft1", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft("soft1", group_id, "soft2", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft("soft2", group_id, "soft3", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft("soft3", group_id, "soft4", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft("soft4", group_id, "soft5", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft("soft5", group_id, "soft6", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft("soft6", group_id, "soft7", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft("soft7", group_id, "soft8", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft("soft8", group_id, "soft9", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft("soft9", group_id, "soft10", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft("soft10", group_id, "soft11", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft("soft11", group_id, "soft12", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft("soft12", group_id, "soft13", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft("soft13", group_id, "soft14", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft("soft14", group_id, "soft15", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft("soft15", group_id, "soft16", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Verify the link has been created */ if ((link_exists = H5Lexists(group_id, "soft16", H5P_DEFAULT)) < 0) { @@ -1683,11 +1641,11 @@ test_create_soft_link_many(void) } if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; /* Reopen the file and group and verify the hard link */ if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { @@ -1733,7 +1691,7 @@ test_create_soft_link_many(void) } if (H5Gclose(object_id) < 0) - TEST_ERROR + TEST_ERROR; /* * XXX: Open the object through last soft link. It should work this time. If H5Oopen is available, use @@ -1744,7 +1702,6 @@ test_create_soft_link_many(void) HDprintf(" failed to open object pointed to by soft link '%s'\n", SOFT_LINK_TEST_GROUP_MANY_NAME); goto error; } -#ifndef NO_OBJECT_GET_NAME /* Check name */ if (H5Iget_name(object_id, objname, (size_t)SOFT_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE) < 0) { H5_FAILED(); @@ -1757,16 +1714,15 @@ test_create_soft_link_many(void) HDprintf(" wrong name of the object '%s'\n", objname); goto error; } -#endif if (H5Gclose(object_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1783,10 +1739,6 @@ test_create_soft_link_many(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -1807,11 +1759,12 @@ test_create_soft_link_invalid_params(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, or link aren't supported with this connector\n"); + HDprintf( + " API functions for basic file, group, or soft link aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1838,7 +1791,7 @@ test_create_soft_link_invalid_params(void) { PART_BEGIN(H5Lcreate_soft_invalid_link_target) { - TESTING_2("H5Lcreate_soft with an invalid link target") + TESTING_2("H5Lcreate_soft with an invalid link target"); H5E_BEGIN_TRY { @@ -1874,7 +1827,7 @@ test_create_soft_link_invalid_params(void) PART_BEGIN(H5Lcreate_soft_invalid_link_loc_id) { - TESTING_2("H5Lcreate_soft with an invalid link_loc_id") + TESTING_2("H5Lcreate_soft with an invalid link_loc_id"); H5E_BEGIN_TRY { @@ -1896,7 +1849,7 @@ test_create_soft_link_invalid_params(void) PART_BEGIN(H5Lcreate_soft_invalid_link_name) { - TESTING_2("H5Lcreate_soft with an invalid link name") + TESTING_2("H5Lcreate_soft with an invalid link name"); H5E_BEGIN_TRY { @@ -1930,7 +1883,7 @@ test_create_soft_link_invalid_params(void) PART_BEGIN(H5Lcreate_soft_invalid_lcpl) { - TESTING_2("H5Lcreate_soft with an invalid LCPL") + TESTING_2("H5Lcreate_soft with an invalid LCPL"); H5E_BEGIN_TRY { @@ -1952,8 +1905,8 @@ test_create_soft_link_invalid_params(void) PART_BEGIN(H5Lcreate_soft_invalid_lapl) { - TESTING_2("H5Lcreate_soft with an invalid LAPL") -#ifndef NO_INVALID_PROPERTY_LIST_TESTS + TESTING_2("H5Lcreate_soft with an invalid LAPL"); + H5E_BEGIN_TRY { err_ret = H5Lcreate_soft("/", group_id, SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME, H5P_DEFAULT, @@ -1969,16 +1922,12 @@ test_create_soft_link_invalid_params(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lcreate_soft_invalid_lapl); -#endif } PART_END(H5Lcreate_soft_invalid_lapl); PART_BEGIN(H5Lcreate_soft_invalid_existence) { - TESTING_2("invalid link existence after previous invalid H5Lcreate_soft calls") + TESTING_2("invalid link existence after previous invalid H5Lcreate_soft calls"); /* Verify the link hasn't been created */ if ((link_exists = H5Lexists(group_id, SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME, H5P_DEFAULT)) < @@ -2001,14 +1950,14 @@ test_create_soft_link_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2033,26 +1982,23 @@ test_create_soft_link_invalid_params(void) static int test_create_external_link(void) { -#ifndef NO_EXTERNAL_LINKS htri_t link_exists; hid_t file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t root_id = H5I_INVALID_HID; char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; -#endif - TESTING("external link creation to existing object") + TESTING("external link creation to existing object"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, basic link, or external link aren't supported " + HDprintf(" API functions for basic file, group, link, or external link aren't supported " "with this connector\n"); return 0; } -#ifndef NO_EXTERNAL_LINKS HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -2062,7 +2008,7 @@ test_create_external_link(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2111,13 +2057,13 @@ test_create_external_link(void) } if (H5Gclose(root_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2134,10 +2080,6 @@ test_create_external_link(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -2148,22 +2090,19 @@ test_create_external_link(void) static int test_create_external_link_dangling(void) { -#ifndef NO_EXTERNAL_LINKS htri_t link_exists; hid_t file_id = H5I_INVALID_HID, ext_file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t object_id = H5I_INVALID_HID; char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; -#endif - TESTING("dangling external link creation") + TESTING("dangling external link creation"); -#ifndef NO_EXTERNAL_LINKS /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, basic link, or external link aren't supported " + HDprintf(" API functions for basic file, group, link, or external link aren't supported " "with this connector\n"); return 0; } @@ -2238,7 +2177,7 @@ test_create_external_link_dangling(void) } if (H5Gclose(object_id) < 0) - TEST_ERROR + TEST_ERROR; if ((object_id = H5Gopen2(group_id, EXTERNAL_LINK_TEST_DANGLING_LINK_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2248,15 +2187,15 @@ test_create_external_link_dangling(void) } if (H5Gclose(object_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(ext_file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2274,10 +2213,6 @@ test_create_external_link_dangling(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -2287,7 +2222,6 @@ test_create_external_link_dangling(void) static int test_create_external_link_multi(void) { -#ifndef NO_EXTERNAL_LINKS hid_t file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t group_id2 = H5I_INVALID_HID, group_id3 = H5I_INVALID_HID; @@ -2296,11 +2230,9 @@ test_create_external_link_multi(void) char ext_link_filename2[VOL_TEST_FILENAME_MAX_LENGTH]; char ext_link_filename3[VOL_TEST_FILENAME_MAX_LENGTH]; char objname[EXTERNAL_LINK_TEST_MULTI_NAME_BUF_SIZE]; -#endif - TESTING_MULTIPART("external link creation to an object across several files") + TESTING_MULTIPART("external link creation to an object across several files"); -#ifndef NO_EXTERNAL_LINKS /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { @@ -2314,7 +2246,7 @@ test_create_external_link_multi(void) { PART_BEGIN(H5Lcreate_external_first_file) { - TESTING_2("Create the first external file to be pointed to") + TESTING_2("Create the first external file to be pointed to"); HDsnprintf(ext_link_filename1, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -2375,7 +2307,7 @@ test_create_external_link_multi(void) PART_BEGIN(H5Lcreate_external_second_file) { - TESTING_2("Create the second external file to be pointed to") + TESTING_2("Create the second external file to be pointed to"); HDsnprintf(ext_link_filename2, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME2); @@ -2432,7 +2364,7 @@ test_create_external_link_multi(void) PART_BEGIN(H5Lcreate_external_third_file) { - TESTING_2("Create the third external file to be pointed to") + TESTING_2("Create the third external file to be pointed to"); HDsnprintf(ext_link_filename3, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME3); @@ -2489,7 +2421,7 @@ test_create_external_link_multi(void) PART_BEGIN(H5Lcreate_external_final_file) { - TESTING_2("Open the file and create the final external link") + TESTING_2("Open the file and create the final external link"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2580,7 +2512,7 @@ test_create_external_link_multi(void) PART_BEGIN(H5Lcreate_external_object_created) { - TESTING_2("Check the group being created through the external link") + TESTING_2("Check the group being created through the external link"); if ((file_id = H5Fopen(ext_link_filename1, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2640,10 +2572,6 @@ test_create_external_link_multi(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -2660,18 +2588,15 @@ test_create_external_link_multi(void) static int test_create_external_link_ping_pong(void) { -#ifndef NO_EXTERNAL_LINKS hid_t file_id = H5I_INVALID_HID; hid_t group_id = H5I_INVALID_HID; hid_t group_id2 = H5I_INVALID_HID; char ext_link_filename1[VOL_TEST_FILENAME_MAX_LENGTH]; char ext_link_filename2[VOL_TEST_FILENAME_MAX_LENGTH]; char objname[EXTERNAL_LINK_TEST_MULTI_NAME_BUF_SIZE]; -#endif - TESTING_MULTIPART("external link creation to an object in ping pong style") + TESTING_MULTIPART("external link creation to an object in ping pong style"); -#ifndef NO_EXTERNAL_LINKS /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { @@ -2688,7 +2613,7 @@ test_create_external_link_ping_pong(void) { PART_BEGIN(H5Lcreate_external_first_file) { - TESTING_2("Create the first external file") + TESTING_2("Create the first external file"); /* Create the first file */ if ((file_id = H5Fcreate(ext_link_filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -2746,7 +2671,7 @@ test_create_external_link_ping_pong(void) PART_BEGIN(H5Lcreate_external_second_file) { - TESTING_2("Create the second external file") + TESTING_2("Create the second external file"); /* Create the second file */ if ((file_id = H5Fcreate(ext_link_filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -2790,7 +2715,7 @@ test_create_external_link_ping_pong(void) PART_BEGIN(H5Lcreate_external_verify) { - TESTING_2("Open the first file to verify the object being pointed to") + TESTING_2("Open the first file to verify the object being pointed to"); if ((file_id = H5Fopen(ext_link_filename1, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2850,7 +2775,7 @@ test_create_external_link_ping_pong(void) PART_BEGIN(H5Lcreate_external_verify_again) { - TESTING_2("Open the first file to verify the object being created") + TESTING_2("Open the first file to verify the object being created"); if ((file_id = H5Fopen(ext_link_filename1, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2909,10 +2834,6 @@ test_create_external_link_ping_pong(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -2934,12 +2855,12 @@ test_create_external_link_invalid_params(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, or basic link or external link aren't supported " + HDprintf(" API functions for basic file, group, link, or external link aren't supported " "with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_INVALID_PARAMS_TEST_FILE_NAME); @@ -2951,7 +2872,7 @@ test_create_external_link_invalid_params(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2979,7 +2900,7 @@ test_create_external_link_invalid_params(void) { PART_BEGIN(H5Lcreate_external_invalid_file_name) { - TESTING_2("H5Lcreate_external with an invalid file name") + TESTING_2("H5Lcreate_external with an invalid file name"); H5E_BEGIN_TRY { @@ -3015,7 +2936,7 @@ test_create_external_link_invalid_params(void) PART_BEGIN(H5Lcreate_external_invalid_ext_obj_name) { - TESTING_2("H5Lcreate_external with an invalid external object name") + TESTING_2("H5Lcreate_external with an invalid external object name"); H5E_BEGIN_TRY { @@ -3053,7 +2974,7 @@ test_create_external_link_invalid_params(void) PART_BEGIN(H5Lcreate_external_invalid_link_loc_id) { - TESTING_2("H5Lcreate_external with an invalid link_loc_id") + TESTING_2("H5Lcreate_external with an invalid link_loc_id"); H5E_BEGIN_TRY { @@ -3076,7 +2997,7 @@ test_create_external_link_invalid_params(void) PART_BEGIN(H5Lcreate_external_invalid_link_name) { - TESTING_2("H5Lcreate_external with an invalid link name") + TESTING_2("H5Lcreate_external with an invalid link name"); H5E_BEGIN_TRY { @@ -3111,7 +3032,7 @@ test_create_external_link_invalid_params(void) PART_BEGIN(H5Lcreate_external_invalid_lcpl) { - TESTING_2("H5Lcreate_external with an invalid LCPL") + TESTING_2("H5Lcreate_external with an invalid LCPL"); H5E_BEGIN_TRY { @@ -3134,7 +3055,7 @@ test_create_external_link_invalid_params(void) PART_BEGIN(H5Lcreate_external_invalid_lapl) { - TESTING_2("H5Lcreate_external with an invalid LAPL") + TESTING_2("H5Lcreate_external with an invalid LAPL"); H5E_BEGIN_TRY { @@ -3157,7 +3078,7 @@ test_create_external_link_invalid_params(void) PART_BEGIN(H5Lcreate_external_invalid_existence) { - TESTING_2("invalid link existence after previous invalid H5Lcreate_external calls") + TESTING_2("invalid link existence after previous invalid H5Lcreate_external calls"); /* Verify the link hasn't been created */ if ((link_exists = @@ -3180,14 +3101,14 @@ test_create_external_link_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3211,23 +3132,21 @@ test_create_external_link_invalid_params(void) static int test_create_user_defined_link(void) { -#ifndef NO_USER_DEFINED_LINKS ssize_t udata_size; htri_t link_exists; hid_t file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; char udata[UD_LINK_TEST_UDATA_MAX_SIZE]; -#endif - TESTING("user-defined link creation") + TESTING("user-defined link creation"); -#ifndef NO_USER_DEFINED_LINKS /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, or user-defined link aren't supported with this " - "connector\n"); + HDprintf( + " API functions for basic file, group, link, or user-defined link aren't supported with this " + "connector\n"); return 0; } @@ -3251,7 +3170,7 @@ test_create_user_defined_link(void) } if ((udata_size = HDsnprintf(udata, UD_LINK_TEST_UDATA_MAX_SIZE, "udata")) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_ud(group_id, UD_LINK_TEST_LINK_NAME, H5L_TYPE_EXTERNAL, udata, (size_t)udata_size, H5P_DEFAULT, H5P_DEFAULT) < 0) { @@ -3274,11 +3193,11 @@ test_create_user_defined_link(void) } if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3294,10 +3213,6 @@ test_create_user_defined_link(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -3320,11 +3235,12 @@ test_create_user_defined_link_invalid_params(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, or link aren't supported with this connector\n"); + HDprintf(" API functions for basic file, group, or user-defined link aren't supported with this " + "connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3346,7 +3262,7 @@ test_create_user_defined_link_invalid_params(void) } if ((udata_size = HDsnprintf(udata, UD_LINK_INVALID_PARAMS_TEST_UDATA_MAX_SIZE, "udata")) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3354,7 +3270,7 @@ test_create_user_defined_link_invalid_params(void) { PART_BEGIN(H5Lcreate_ud_invalid_link_loc_id) { - TESTING_2("H5Lcreate_ud with an invalid link location ID") + TESTING_2("H5Lcreate_ud with an invalid link location ID"); H5E_BEGIN_TRY { @@ -3377,7 +3293,7 @@ test_create_user_defined_link_invalid_params(void) PART_BEGIN(H5Lcreate_ud_invalid_link_name) { - TESTING_2("H5Lcreate_ud with an invalid link name") + TESTING_2("H5Lcreate_ud with an invalid link name"); H5E_BEGIN_TRY { @@ -3413,7 +3329,7 @@ test_create_user_defined_link_invalid_params(void) PART_BEGIN(H5Lcreate_ud_invalid_link_type) { - TESTING_2("H5Lcreate_ud with an invalid link type") + TESTING_2("H5Lcreate_ud with an invalid link type"); H5E_BEGIN_TRY { @@ -3435,7 +3351,7 @@ test_create_user_defined_link_invalid_params(void) PART_BEGIN(H5Lcreate_ud_invalid_udata_pointer) { - TESTING_2("H5Lcreate_ud with an invalid udata pointer") + TESTING_2("H5Lcreate_ud with an invalid udata pointer"); H5E_BEGIN_TRY { @@ -3457,7 +3373,7 @@ test_create_user_defined_link_invalid_params(void) PART_BEGIN(H5Lcreate_ud_invalid_lcpl) { - TESTING_2("H5Lcreate_ud with an invalid LCPL") + TESTING_2("H5Lcreate_ud with an invalid LCPL"); H5E_BEGIN_TRY { @@ -3479,7 +3395,7 @@ test_create_user_defined_link_invalid_params(void) PART_BEGIN(H5Lcreate_ud_invalid_lapl) { - TESTING_2("H5Lcreate_ud with an invalid LAPL") + TESTING_2("H5Lcreate_ud with an invalid LAPL"); H5E_BEGIN_TRY { @@ -3501,7 +3417,7 @@ test_create_user_defined_link_invalid_params(void) PART_BEGIN(H5Lcreate_ud_invalid_existence) { - TESTING_2("invalid link existence after previous invalid H5Lcreate_ud calls") + TESTING_2("invalid link existence after previous invalid H5Lcreate_ud calls"); /* Verify the link hasn't been created */ if ((link_exists = H5Lexists(group_id, UD_LINK_INVALID_PARAMS_TEST_LINK_NAME, H5P_DEFAULT)) < 0) { @@ -3523,14 +3439,14 @@ test_create_user_defined_link_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3561,9 +3477,7 @@ test_delete_link(void) hid_t subgroup_id = H5I_INVALID_HID; hid_t nested_grp_id = H5I_INVALID_HID; hid_t gcpl_id = H5I_INVALID_HID; -#ifndef NO_EXTERNAL_LINKS - char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; -#endif + char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; TESTING_MULTIPART("link deletion"); @@ -3571,14 +3485,14 @@ test_delete_link(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, or link, hard, soft, or external link aren't " - "supported with this connector\n"); + HDprintf(" API functions for basic file, group, link, hard link, soft link, or external link " + "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3598,10 +3512,12 @@ test_delete_link(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set link creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set link creation order tracking\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, LINK_DELETE_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id, @@ -3617,7 +3533,7 @@ test_delete_link(void) { PART_BEGIN(H5Ldelete_hard) { - TESTING_2("H5Ldelete on hard link") + TESTING_2("H5Ldelete on hard link"); if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP1_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -3685,7 +3601,7 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_hard_indirect) { - TESTING_2("H5Ldelete on nested hard link") + TESTING_2("H5Ldelete on nested hard link"); if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_NESTED_SUBGROUP_NAME1, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -3768,7 +3684,7 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_soft) { - TESTING_2("H5Ldelete on soft link") + TESTING_2("H5Ldelete on soft link"); if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP2_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -3837,8 +3753,8 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_external) { - TESTING_2("H5Ldelete on external link") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Ldelete on external link"); + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -3910,10 +3826,6 @@ test_delete_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Ldelete_external); -#endif } PART_END(H5Ldelete_external); @@ -3928,7 +3840,7 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_ud) { - TESTING_2("H5Ldelete on user-defined link") + TESTING_2("H5Ldelete on user-defined link"); /* TODO */ @@ -3946,7 +3858,13 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_hard_crt_order_increasing) { - TESTING_2("H5Ldelete_by_idx on hard link by creation order in increasing order") + TESTING_2("H5Ldelete_by_idx on hard link by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Ldelete_by_idx_hard_crt_order_increasing); + } if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP5_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -4186,7 +4104,13 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_hard_crt_order_decreasing) { - TESTING_2("H5Ldelete_by_idx on hard link by creation order in decreasing order") + TESTING_2("H5Ldelete_by_idx on hard link by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Ldelete_by_idx_hard_crt_order_decreasing); + } if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP6_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -4426,7 +4350,7 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_hard_name_order_increasing) { - TESTING_2("H5Ldelete_by_idx on hard link by alphabetical order in increasing order") + TESTING_2("H5Ldelete_by_idx on hard link by alphabetical order in increasing order"); if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP7_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -4666,8 +4590,8 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_hard_name_order_decreasing) { - TESTING_2("H5Ldelete_by_idx on hard link by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Ldelete_by_idx on hard link by alphabetical order in decreasing order"); + if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP8_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -4894,10 +4818,6 @@ test_delete_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Ldelete_by_idx_hard_name_order_decreasing); -#endif } PART_END(H5Ldelete_by_idx_hard_name_order_decreasing); @@ -4910,7 +4830,13 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_soft_crt_order_increasing) { - TESTING_2("H5Ldelete_by_idx on soft link by creation order in increasing order") + TESTING_2("H5Ldelete_by_idx on soft link by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Ldelete_by_idx_soft_crt_order_increasing); + } if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP9_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -5153,7 +5079,13 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_soft_crt_order_decreasing) { - TESTING_2("H5Ldelete_by_idx on soft link by creation order in decreasing order") + TESTING_2("H5Ldelete_by_idx on soft link by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Ldelete_by_idx_soft_crt_order_decreasing); + } if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP10_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -5396,7 +5328,7 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_soft_name_order_increasing) { - TESTING_2("H5Ldelete_by_idx on soft link by alphabetical order in increasing order") + TESTING_2("H5Ldelete_by_idx on soft link by alphabetical order in increasing order"); if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP11_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -5639,8 +5571,8 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_soft_name_order_decreasing) { - TESTING_2("H5Ldelete_by_idx on soft link by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Ldelete_by_idx on soft link by alphabetical order in decreasing order"); + if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP12_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -5870,10 +5802,6 @@ test_delete_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Ldelete_by_idx_soft_name_order_decreasing); -#endif } PART_END(H5Ldelete_by_idx_soft_name_order_decreasing); @@ -5886,8 +5814,14 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_external_crt_order_increasing) { - TESTING_2("H5Ldelete_by_idx on external link by creation order in increasing order") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Ldelete_by_idx on external link by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Ldelete_by_idx_external_crt_order_increasing); + } + /* Create file for external link to reference */ HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -6147,10 +6081,6 @@ test_delete_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Ldelete_by_idx_external_crt_order_increasing); -#endif } PART_END(H5Ldelete_by_idx_external_crt_order_increasing); @@ -6165,8 +6095,14 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_external_crt_order_decreasing) { - TESTING_2("H5Ldelete_by_idx on external link by creation order in decreasing order") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Ldelete_by_idx on external link by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Ldelete_by_idx_external_crt_order_decreasing); + } + /* Create file for external link to reference */ HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -6426,10 +6362,6 @@ test_delete_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Ldelete_by_idx_external_crt_order_decreasing); -#endif } PART_END(H5Ldelete_by_idx_external_crt_order_decreasing); @@ -6444,8 +6376,8 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_external_name_order_increasing) { - TESTING_2("H5Ldelete_by_idx on external link by alphabetical order in increasing order") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Ldelete_by_idx on external link by alphabetical order in increasing order"); + /* Create file for external link to reference */ HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -6705,10 +6637,6 @@ test_delete_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Ldelete_by_idx_external_name_order_increasing); -#endif } PART_END(H5Ldelete_by_idx_external_name_order_increasing); @@ -6723,8 +6651,8 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_external_name_order_decreasing) { - TESTING_2("H5Ldelete_by_idx on external link by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Ldelete_by_idx on external link by alphabetical order in decreasing order"); + /* Create file for external link to reference */ HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -6984,10 +6912,6 @@ test_delete_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Ldelete_by_idx_external_name_order_decreasing); -#endif } PART_END(H5Ldelete_by_idx_external_name_order_decreasing); @@ -7002,7 +6926,7 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_ud_crt_order_increasing) { - TESTING_2("H5Ldelete_by_idx on user-defined link by creation order in increasing order") + TESTING_2("H5Ldelete_by_idx on user-defined link by creation order in increasing order"); /* TODO */ @@ -7020,7 +6944,7 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_ud_crt_order_decreasing) { - TESTING_2("H5Ldelete_by_idx on user-defined link by creation order in decreasing order") + TESTING_2("H5Ldelete_by_idx on user-defined link by creation order in decreasing order"); /* TODO */ @@ -7038,7 +6962,7 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_ud_name_order_increasing) { - TESTING_2("H5Ldelete_by_idx on user-defined link by alphabetical order in increasing order") + TESTING_2("H5Ldelete_by_idx on user-defined link by alphabetical order in increasing order"); /* TODO */ @@ -7056,7 +6980,7 @@ test_delete_link(void) PART_BEGIN(H5Ldelete_by_idx_ud_name_order_decreasing) { - TESTING_2("H5Ldelete_by_idx on user-defined link by alphabetical order in decreasing order") + TESTING_2("H5Ldelete_by_idx on user-defined link by alphabetical order in decreasing order"); /* TODO */ @@ -7074,16 +6998,16 @@ test_delete_link(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -7112,7 +7036,6 @@ test_delete_link(void) static int test_delete_link_reset_grp_max_crt_order(void) { -#ifndef NO_MAX_LINK_CRT_ORDER_RESET H5G_info_t grp_info; size_t i; hid_t file_id = H5I_INVALID_HID; @@ -7120,21 +7043,20 @@ test_delete_link_reset_grp_max_crt_order(void) hid_t subgroup_id = H5I_INVALID_HID; hid_t gcpl_id = H5I_INVALID_HID; char link_name[LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_BUF_SIZE]; -#endif - TESTING_MULTIPART("H5Ldelete of all links in group resets group's maximum link creation order value") + TESTING_MULTIPART("H5Ldelete of all links in group resets group's maximum link creation order value"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { SKIPPED(); - HDprintf(" API functions for basic file, basic and more group, or basic link aren't supported " - "with this connector\n"); + HDprintf(" API functions for basic file, group, link, or creation order " + "aren't supported with this connector\n"); return 0; } -#ifndef NO_MAX_LINK_CRT_ORDER_RESET - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -7174,7 +7096,7 @@ test_delete_link_reset_grp_max_crt_order(void) { PART_BEGIN(H5Ldelete_links_bottom_up) { - TESTING_2("H5Ldelete from least-recently created link to most-recently created link") + TESTING_2("H5Ldelete from least-recently created link to most-recently created link"); if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_SUBGROUP1_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -7208,7 +7130,7 @@ test_delete_link_reset_grp_max_crt_order(void) if (grp_info.max_corder != LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS) { H5_FAILED(); HDprintf(" group's maximum creation order value got adjusted to %lld during link " - "deletion; value should have remained at %lld\n", + "deletion; value should have remained at %d\n", (long long)grp_info.max_corder, LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS); PART_ERROR(H5Ldelete_links_bottom_up); } @@ -7253,7 +7175,7 @@ test_delete_link_reset_grp_max_crt_order(void) PART_BEGIN(H5Ldelete_links_top_down) { - TESTING_2("H5Ldelete from most-recently created link to least-recently created link") + TESTING_2("H5Ldelete from most-recently created link to least-recently created link"); if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_SUBGROUP2_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -7287,7 +7209,7 @@ test_delete_link_reset_grp_max_crt_order(void) if (grp_info.max_corder != LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS) { H5_FAILED(); HDprintf(" group's maximum creation order value got adjusted to %lld during link " - "deletion; value should have remained at %lld\n", + "deletion; value should have remained at %d\n", (long long)grp_info.max_corder, LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS); PART_ERROR(H5Ldelete_links_top_down); } @@ -7333,16 +7255,16 @@ test_delete_link_reset_grp_max_crt_order(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -7360,10 +7282,6 @@ test_delete_link_reset_grp_max_crt_order(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } static int @@ -7381,11 +7299,12 @@ test_delete_link_invalid_params(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_BY_IDX) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, or link aren't supported with this connector\n"); + HDprintf(" API functions for basic file, group, link, flag by index, or hard link aren't " + "supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -7434,7 +7353,7 @@ test_delete_link_invalid_params(void) { PART_BEGIN(H5Ldelete_invalid_loc_id) { - TESTING_2("H5Ldelete with an invalid location ID") + TESTING_2("H5Ldelete with an invalid location ID"); H5E_BEGIN_TRY { @@ -7455,7 +7374,7 @@ test_delete_link_invalid_params(void) PART_BEGIN(H5Ldelete_invalid_link_name) { - TESTING_2("H5Ldelete with an invalid link name") + TESTING_2("H5Ldelete with an invalid link name"); H5E_BEGIN_TRY { @@ -7487,8 +7406,8 @@ test_delete_link_invalid_params(void) PART_BEGIN(H5Ldelete_invalid_lapl) { - TESTING_2("H5Ldelete with an invalid LAPL") -#ifndef NO_INVALID_PROPERTY_LIST_TESTS + TESTING_2("H5Ldelete with an invalid LAPL"); + H5E_BEGIN_TRY { err_ret = @@ -7503,16 +7422,12 @@ test_delete_link_invalid_params(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Ldelete_invalid_lapl); -#endif } PART_END(H5Ldelete_invalid_lapl); PART_BEGIN(H5Ldelete_by_idx_invalid_loc_id) { - TESTING_2("H5Ldelete_by_idx with an invalid location ID") + TESTING_2("H5Ldelete_by_idx with an invalid location ID"); H5E_BEGIN_TRY { @@ -7532,7 +7447,7 @@ test_delete_link_invalid_params(void) PART_BEGIN(H5Ldelete_by_idx_invalid_grp_name) { - TESTING_2("H5Ldelete_by_idx with an invalid group name") + TESTING_2("H5Ldelete_by_idx with an invalid group name"); H5E_BEGIN_TRY { @@ -7564,7 +7479,7 @@ test_delete_link_invalid_params(void) PART_BEGIN(H5Ldelete_by_idx_invalid_index_type) { - TESTING_2("H5Ldelete_by_idx with an invalid index type") + TESTING_2("H5Ldelete_by_idx with an invalid index type"); H5E_BEGIN_TRY { @@ -7596,7 +7511,7 @@ test_delete_link_invalid_params(void) PART_BEGIN(H5Ldelete_by_idx_invalid_index_order) { - TESTING_2("H5Ldelete_by_idx with an invalid iteration ordering") + TESTING_2("H5Ldelete_by_idx with an invalid iteration ordering"); H5E_BEGIN_TRY { @@ -7628,8 +7543,8 @@ test_delete_link_invalid_params(void) PART_BEGIN(H5Ldelete_by_idx_invalid_lapl) { - TESTING_2("H5Ldelete_by_idx with an invalid LAPL") -#ifndef NO_INVALID_PROPERTY_LIST_TESTS + TESTING_2("H5Ldelete_by_idx with an invalid LAPL"); + H5E_BEGIN_TRY { err_ret = H5Ldelete_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, H5I_INVALID_HID); @@ -7643,16 +7558,12 @@ test_delete_link_invalid_params(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Ldelete_by_idx_invalid_lapl); -#endif } PART_END(H5Ldelete_by_idx_invalid_lapl); PART_BEGIN(H5Ldelete_by_idx_link_existence) { - TESTING_2("valid link existence after previous invalid H5Ldelete(_by_idx) calls") + TESTING_2("valid link existence after previous invalid H5Ldelete(_by_idx) calls"); /* Verify that the link hasn't been deleted */ if ((link_exists = @@ -7675,14 +7586,14 @@ test_delete_link_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -7710,11 +7621,9 @@ test_copy_link(void) hid_t file_id = H5I_INVALID_HID, ext_file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t src_grp_id = H5I_INVALID_HID, dst_grp_id = H5I_INVALID_HID; -#ifndef NO_EXTERNAL_LINKS - char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; -#endif + char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; - TESTING_MULTIPART("link copying") + TESTING_MULTIPART("link copying"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -7722,12 +7631,13 @@ test_copy_link(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, or link, hard, soft, or external link aren't " - "supported with this connector\n"); + HDprintf( + " API functions for basic file, group, link, hard link, soft link, or external link aren't " + "supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -7768,7 +7678,7 @@ test_copy_link(void) { PART_BEGIN(H5Lcopy_hard_no_check) { - TESTING_2("H5Lcopy on hard link (copied link's properties not checked)") + TESTING_2("H5Lcopy on hard link (copied link's properties not checked)"); /* Try to copy a hard link */ if (H5Lcreate_hard(group_id, ".", src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME, H5P_DEFAULT, @@ -7848,7 +7758,7 @@ test_copy_link(void) H5L_info2_t orig_info, new_info; int cmp_value; - TESTING_2("H5Lcopy on hard link (copied link's properties checked)") + TESTING_2("H5Lcopy on hard link (copied link's properties checked)"); /* Try to copy a hard link */ if (H5Lcreate_hard(group_id, ".", src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME2, H5P_DEFAULT, @@ -7951,19 +7861,22 @@ test_copy_link(void) PART_ERROR(H5Lcopy_hard_check); } - if (new_info.corder_valid != orig_info.corder_valid) { - H5_FAILED(); - HDprintf(" copied link's 'corder_valid' field doesn't match original link's " - "'corder_valid' field\n"); - PART_ERROR(H5Lcopy_hard_check); - } + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (new_info.corder_valid != orig_info.corder_valid) { + H5_FAILED(); + HDprintf(" copied link's 'corder_valid' field doesn't match original link's " + "'corder_valid' field\n"); + PART_ERROR(H5Lcopy_hard_check); + } - if (new_info.corder_valid && orig_info.corder_valid && (new_info.corder != orig_info.corder)) { - H5_FAILED(); - HDprintf(" copied link's creation order value %" PRId64 - " doesn't match original link's creation order value %" PRId64 "\n", - new_info.corder, orig_info.corder); - PART_ERROR(H5Lcopy_hard_check); + if (new_info.corder_valid && orig_info.corder_valid && + (new_info.corder != orig_info.corder)) { + H5_FAILED(); + HDprintf(" copied link's creation order value %" PRId64 + " doesn't match original link's creation order value %" PRId64 "\n", + new_info.corder, orig_info.corder); + PART_ERROR(H5Lcopy_hard_check); + } } if (new_info.cset != orig_info.cset) { @@ -7978,7 +7891,7 @@ test_copy_link(void) PART_BEGIN(H5Lcopy_hard_same_loc) { - TESTING_2("H5Lcopy on hard link using H5L_SAME_LOC") + TESTING_2("H5Lcopy on hard link using H5L_SAME_LOC"); /* Try to copy a hard link */ if (H5Lcreate_hard(group_id, ".", src_grp_id, COPY_LINK_TEST_HARD_LINK_NAME3, H5P_DEFAULT, @@ -8098,7 +8011,7 @@ test_copy_link(void) PART_BEGIN(H5Lcopy_soft_no_check) { - TESTING_2("H5Lcopy on soft link (copied link's properties not checked)") + TESTING_2("H5Lcopy on soft link (copied link's properties not checked)"); /* Try to copy a soft link */ if (H5Lcreate_soft(COPY_LINK_TEST_SOFT_LINK_TARGET_PATH, src_grp_id, @@ -8179,7 +8092,7 @@ test_copy_link(void) char orig_link_val[COPY_LINK_TEST_LINK_VAL_BUF_SIZE]; char new_link_val[COPY_LINK_TEST_LINK_VAL_BUF_SIZE]; - TESTING_2("H5Lcopy on soft link (copied link's properties checked)") + TESTING_2("H5Lcopy on soft link (copied link's properties checked)"); /* Try to copy a soft link */ if (H5Lcreate_soft(COPY_LINK_TEST_SOFT_LINK_TARGET_PATH, src_grp_id, @@ -8286,19 +8199,22 @@ test_copy_link(void) PART_ERROR(H5Lcopy_soft_check); } - if (new_info.corder_valid != orig_info.corder_valid) { - H5_FAILED(); - HDprintf(" copied link's 'corder_valid' field doesn't match original link's " - "'corder_valid' field\n"); - PART_ERROR(H5Lcopy_soft_check); - } + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (new_info.corder_valid != orig_info.corder_valid) { + H5_FAILED(); + HDprintf(" copied link's 'corder_valid' field doesn't match original link's " + "'corder_valid' field\n"); + PART_ERROR(H5Lcopy_soft_check); + } - if (new_info.corder_valid && orig_info.corder_valid && (new_info.corder != orig_info.corder)) { - H5_FAILED(); - HDprintf(" copied link's creation order value %" PRId64 - " doesn't match original link's creation order value %" PRId64 "\n", - new_info.corder, orig_info.corder); - PART_ERROR(H5Lcopy_soft_check); + if (new_info.corder_valid && orig_info.corder_valid && + (new_info.corder != orig_info.corder)) { + H5_FAILED(); + HDprintf(" copied link's creation order value %" PRId64 + " doesn't match original link's creation order value %" PRId64 "\n", + new_info.corder, orig_info.corder); + PART_ERROR(H5Lcopy_soft_check); + } } if (new_info.cset != orig_info.cset) { @@ -8329,7 +8245,7 @@ test_copy_link(void) PART_BEGIN(H5Lcopy_soft_same_loc) { - TESTING_2("H5Lcopy on soft link using H5L_SAME_LOC") + TESTING_2("H5Lcopy on soft link using H5L_SAME_LOC"); /* Try to copy a soft link */ if (H5Lcreate_soft(COPY_LINK_TEST_SOFT_LINK_TARGET_PATH, src_grp_id, @@ -8449,8 +8365,8 @@ test_copy_link(void) PART_BEGIN(H5Lcopy_external_no_check) { - TESTING_2("H5Lcopy on external link (copied link's properties not checked)") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lcopy on external link (copied link's properties not checked)"); + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -8538,10 +8454,6 @@ test_copy_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lcopy_external_no_check); -#endif } PART_END(H5Lcopy_external_no_check); @@ -8554,17 +8466,15 @@ test_copy_link(void) PART_BEGIN(H5Lcopy_external_check) { -#ifndef NO_EXTERNAL_LINKS H5L_info2_t orig_info, new_info; const char *orig_filename, *new_filename; const char *orig_objname, *new_objname; unsigned unpack_flags = 0; char orig_link_val[COPY_LINK_TEST_LINK_VAL_BUF_SIZE]; char new_link_val[COPY_LINK_TEST_LINK_VAL_BUF_SIZE]; -#endif - TESTING_2("H5Lcopy on external link (copied link's properties checked)") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lcopy on external link (copied link's properties checked)"); + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -8697,19 +8607,23 @@ test_copy_link(void) PART_ERROR(H5Lcopy_external_check); } - if (new_info.corder_valid != orig_info.corder_valid) { - H5_FAILED(); - HDprintf(" copied link's 'corder_valid' field doesn't match original link's " - "'corder_valid' field\n"); - PART_ERROR(H5Lcopy_external_check); - } + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (new_info.corder_valid != orig_info.corder_valid) { + H5_FAILED(); + HDprintf(" copied link's 'corder_valid' field doesn't match original link's " + "'corder_valid' field\n"); + PART_ERROR(H5Lcopy_external_check); + } - if (new_info.corder_valid && orig_info.corder_valid && (new_info.corder != orig_info.corder)) { - H5_FAILED(); - HDprintf(" copied link's creation order value %lld doesn't match original link's creation " - "order value %lld\n", - new_info.corder, orig_info.corder); - PART_ERROR(H5Lcopy_external_check); + if (new_info.corder_valid && orig_info.corder_valid && + (new_info.corder != orig_info.corder)) { + H5_FAILED(); + HDprintf(" copied link's creation order value %" PRId64 + " doesn't match original link's creation " + "order value %" PRId64 "\n", + new_info.corder, orig_info.corder); + PART_ERROR(H5Lcopy_external_check); + } } if (new_info.cset != orig_info.cset) { @@ -8751,10 +8665,6 @@ test_copy_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lcopy_external_check); -#endif } PART_END(H5Lcopy_external_check); @@ -8767,8 +8677,8 @@ test_copy_link(void) PART_BEGIN(H5Lcopy_external_same_loc) { - TESTING_2("H5Lcopy on external link using H5L_SAME_LOC") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lcopy on external link using H5L_SAME_LOC"); + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -8897,10 +8807,6 @@ test_copy_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lcopy_external_same_loc); -#endif } PART_END(H5Lcopy_external_same_loc); @@ -8913,7 +8819,7 @@ test_copy_link(void) PART_BEGIN(H5Lcopy_ud_no_check) { - TESTING_2("H5Lcopy on user-defined link (copied link's properties not checked)") + TESTING_2("H5Lcopy on user-defined link (copied link's properties not checked)"); /* TODO */ @@ -8924,7 +8830,7 @@ test_copy_link(void) PART_BEGIN(H5Lcopy_ud_check) { - TESTING_2("H5Lcopy on user-defined link (copied link's properties checked)") + TESTING_2("H5Lcopy on user-defined link (copied link's properties checked)"); /* TODO */ @@ -8935,7 +8841,7 @@ test_copy_link(void) PART_BEGIN(H5Lcopy_ud_same_loc) { - TESTING_2("H5Lcopy on user-defined link using H5L_SAME_LOC") + TESTING_2("H5Lcopy on user-defined link using H5L_SAME_LOC"); /* TODO */ @@ -8946,18 +8852,18 @@ test_copy_link(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(dst_grp_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(src_grp_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -8990,7 +8896,7 @@ test_copy_link(void) static int test_copy_links_into_group_with_links(void) { - TESTING("H5Lcopy adjusting creation order values for copied links") + TESTING("H5Lcopy adjusting creation order values for copied links"); SKIPPED(); @@ -9009,7 +8915,7 @@ test_copy_links_into_group_with_links(void) static int test_copy_link_across_files(void) { - TESTING("link copying across files") + TESTING("link copying across files"); /* TODO */ @@ -9040,12 +8946,12 @@ test_copy_link_invalid_params(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, or basic and more link aren't supported with this " + HDprintf(" API functions for basic file, group, link, or hard links aren't supported with this " "connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -9108,7 +9014,7 @@ test_copy_link_invalid_params(void) { PART_BEGIN(H5Lcopy_invalid_src_loc_id) { - TESTING_2("H5Lcopy with an invalid source location ID") + TESTING_2("H5Lcopy with an invalid source location ID"); H5E_BEGIN_TRY { @@ -9130,7 +9036,7 @@ test_copy_link_invalid_params(void) PART_BEGIN(H5Lcopy_invalid_src_name) { - TESTING_2("H5Lcopy with an invalid source name") + TESTING_2("H5Lcopy with an invalid source name"); H5E_BEGIN_TRY { @@ -9166,7 +9072,7 @@ test_copy_link_invalid_params(void) PART_BEGIN(H5Lcopy_invalid_dst_loc_id) { - TESTING_2("H5Lcopy with an invalid destination location ID") + TESTING_2("H5Lcopy with an invalid destination location ID"); H5E_BEGIN_TRY { @@ -9188,7 +9094,7 @@ test_copy_link_invalid_params(void) PART_BEGIN(H5Lcopy_invalid_dst_name) { - TESTING_2("H5Lcopy with an invalid destination name") + TESTING_2("H5Lcopy with an invalid destination name"); H5E_BEGIN_TRY { @@ -9222,7 +9128,7 @@ test_copy_link_invalid_params(void) PART_BEGIN(H5Lcopy_invalid_lcpl) { - TESTING_2("H5Lcopy with an invalid LCPL") + TESTING_2("H5Lcopy with an invalid LCPL"); H5E_BEGIN_TRY { @@ -9244,8 +9150,8 @@ test_copy_link_invalid_params(void) PART_BEGIN(H5Lcopy_invalid_lapl) { - TESTING_2("H5Lcopy with an invalid LAPL") -#ifndef NO_INVALID_PROPERTY_LIST_TESTS + TESTING_2("H5Lcopy with an invalid LAPL"); + H5E_BEGIN_TRY { err_ret = @@ -9261,16 +9167,12 @@ test_copy_link_invalid_params(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lcopy_invalid_lapl); -#endif } PART_END(H5Lcopy_invalid_lapl); PART_BEGIN(H5Lcopy_invalid_same_location) { - TESTING_2("H5Lcopy with an invalid same location") + TESTING_2("H5Lcopy with an invalid same location"); H5E_BEGIN_TRY { @@ -9292,7 +9194,7 @@ test_copy_link_invalid_params(void) PART_BEGIN(H5Lcopy_invalid_across_files) { - TESTING_2("H5Lcopy invalid across files") + TESTING_2("H5Lcopy invalid across files"); HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -9328,18 +9230,18 @@ test_copy_link_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(dst_grp_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(src_grp_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -9373,7 +9275,7 @@ test_move_link(void) char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; hid_t ext_file_id = H5I_INVALID_HID; - TESTING_MULTIPART("link moving") + TESTING_MULTIPART("link moving"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -9381,12 +9283,13 @@ test_move_link(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, or link, hard, soft, or external link aren't " - "supported with this connector\n"); + HDprintf( + " API functions for basic file, group, link, hard link, soft link, or external link aren't " + "supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -9429,7 +9332,7 @@ test_move_link(void) { PART_BEGIN(H5Lmove_hard_no_check) { - TESTING_2("H5Lmove on hard link (moved link's properties not checked)") + TESTING_2("H5Lmove on hard link (moved link's properties not checked)"); /* Try to move a hard link */ if (H5Lcreate_hard(group_id, ".", src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME, H5P_DEFAULT, @@ -9509,7 +9412,7 @@ test_move_link(void) H5L_info2_t orig_info, new_info; int cmp_value; - TESTING_2("H5Lmove on hard link (moved link's properties checked)") + TESTING_2("H5Lmove on hard link (moved link's properties checked)"); /* Try to move a hard link */ if (H5Lcreate_hard(group_id, ".", src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME2, H5P_DEFAULT, @@ -9612,19 +9515,23 @@ test_move_link(void) PART_ERROR(H5Lmove_hard_check); } - if (new_info.corder_valid != orig_info.corder_valid) { - H5_FAILED(); - HDprintf(" moved link's 'corder_valid' field doesn't match original link's 'corder_valid' " - "field\n"); - PART_ERROR(H5Lmove_hard_check); - } + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (new_info.corder_valid != orig_info.corder_valid) { + H5_FAILED(); + HDprintf( + " moved link's 'corder_valid' field doesn't match original link's 'corder_valid' " + "field\n"); + PART_ERROR(H5Lmove_hard_check); + } - if (new_info.corder_valid && orig_info.corder_valid && (new_info.corder != orig_info.corder)) { - H5_FAILED(); - HDprintf(" moved link's creation order value %" PRId64 - " doesn't match original link's creation order value %" PRId64 "\n", - new_info.corder, orig_info.corder); - PART_ERROR(H5Lmove_hard_check); + if (new_info.corder_valid && orig_info.corder_valid && + (new_info.corder != orig_info.corder)) { + H5_FAILED(); + HDprintf(" moved link's creation order value %" PRId64 + " doesn't match original link's creation order value %" PRId64 "\n", + new_info.corder, orig_info.corder); + PART_ERROR(H5Lmove_hard_check); + } } if (new_info.cset != orig_info.cset) { @@ -9639,7 +9546,7 @@ test_move_link(void) PART_BEGIN(H5Lmove_hard_same_loc) { - TESTING_2("H5Lmove on hard link using H5L_SAME_LOC") + TESTING_2("H5Lmove on hard link using H5L_SAME_LOC"); /* Try to move a hard link */ if (H5Lcreate_hard(group_id, ".", src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME3, H5P_DEFAULT, @@ -9755,7 +9662,7 @@ test_move_link(void) PART_BEGIN(H5Lmove_hard_rename) { - TESTING_2("H5Lmove to rename hard link without moving it") + TESTING_2("H5Lmove to rename hard link without moving it"); /* Try to rename a hard link */ if (H5Lcreate_hard(group_id, ".", src_grp_id, MOVE_LINK_TEST_HARD_LINK_NAME4, H5P_DEFAULT, @@ -9834,7 +9741,7 @@ test_move_link(void) PART_BEGIN(H5Lmove_soft_no_check) { - TESTING_2("H5Lmove on soft link (moved link's properties not checked)") + TESTING_2("H5Lmove on soft link (moved link's properties not checked)"); /* Try to move a soft link */ if (H5Lcreate_soft(MOVE_LINK_TEST_SOFT_LINK_TARGET_PATH, src_grp_id, @@ -9915,7 +9822,7 @@ test_move_link(void) char orig_link_val[MOVE_LINK_TEST_LINK_VAL_BUF_SIZE]; char new_link_val[MOVE_LINK_TEST_LINK_VAL_BUF_SIZE]; - TESTING_2("H5Lmove on soft link (moved link's properties checked)") + TESTING_2("H5Lmove on soft link (moved link's properties checked)"); /* Try to move a soft link */ if (H5Lcreate_soft(MOVE_LINK_TEST_SOFT_LINK_TARGET_PATH, src_grp_id, @@ -10022,19 +9929,23 @@ test_move_link(void) PART_ERROR(H5Lmove_soft_check); } - if (new_info.corder_valid != orig_info.corder_valid) { - H5_FAILED(); - HDprintf(" moved link's 'corder_valid' field doesn't match original link's 'corder_valid' " - "field\n"); - PART_ERROR(H5Lmove_soft_check); - } + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (new_info.corder_valid != orig_info.corder_valid) { + H5_FAILED(); + HDprintf( + " moved link's 'corder_valid' field doesn't match original link's 'corder_valid' " + "field\n"); + PART_ERROR(H5Lmove_soft_check); + } - if (new_info.corder_valid && orig_info.corder_valid && (new_info.corder != orig_info.corder)) { - H5_FAILED(); - HDprintf(" moved link's creation order value %" PRId64 - " doesn't match original link's creation order value %" PRId64 "\n", - new_info.corder, orig_info.corder); - PART_ERROR(H5Lmove_soft_check); + if (new_info.corder_valid && orig_info.corder_valid && + (new_info.corder != orig_info.corder)) { + H5_FAILED(); + HDprintf(" moved link's creation order value %" PRId64 + " doesn't match original link's creation order value %" PRId64 "\n", + new_info.corder, orig_info.corder); + PART_ERROR(H5Lmove_soft_check); + } } if (new_info.cset != orig_info.cset) { @@ -10064,7 +9975,7 @@ test_move_link(void) PART_BEGIN(H5Lmove_soft_same_loc) { - TESTING_2("H5Lmove on soft link using H5L_SAME_LOC") + TESTING_2("H5Lmove on soft link using H5L_SAME_LOC"); /* Try to move a soft link */ if (H5Lcreate_soft(MOVE_LINK_TEST_SOFT_LINK_TARGET_PATH, src_grp_id, @@ -10180,7 +10091,7 @@ test_move_link(void) PART_BEGIN(H5Lmove_soft_rename) { - TESTING_2("H5Lmove to rename soft link without moving it") + TESTING_2("H5Lmove to rename soft link without moving it"); /* Try to rename a soft link */ if (H5Lcreate_soft(MOVE_LINK_TEST_SOFT_LINK_TARGET_PATH, src_grp_id, @@ -10259,8 +10170,8 @@ test_move_link(void) PART_BEGIN(H5Lmove_external_no_check) { - TESTING_2("H5Lmove on external link (moved link's properties not checked)") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lmove on external link (moved link's properties not checked)"); + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -10348,10 +10259,6 @@ test_move_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lmove_external_no_check); -#endif } PART_END(H5Lmove_external_no_check); @@ -10364,17 +10271,15 @@ test_move_link(void) PART_BEGIN(H5Lmove_external_check) { -#ifndef NO_EXTERNAL_LINKS H5L_info2_t orig_info, new_info; const char *orig_filename, *new_filename; const char *orig_objname, *new_objname; unsigned unpack_flags = 0; char orig_link_val[MOVE_LINK_TEST_LINK_VAL_BUF_SIZE]; char new_link_val[MOVE_LINK_TEST_LINK_VAL_BUF_SIZE]; -#endif - TESTING_2("H5Lmove on external link (moved link's properties checked)") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lmove on external link (moved link's properties checked)"); + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -10505,19 +10410,24 @@ test_move_link(void) PART_ERROR(H5Lmove_external_check); } - if (new_info.corder_valid != orig_info.corder_valid) { - H5_FAILED(); - HDprintf(" moved link's 'corder_valid' field doesn't match original link's 'corder_valid' " - "field\n"); - PART_ERROR(H5Lmove_external_check); - } + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (new_info.corder_valid != orig_info.corder_valid) { + H5_FAILED(); + HDprintf( + " moved link's 'corder_valid' field doesn't match original link's 'corder_valid' " + "field\n"); + PART_ERROR(H5Lmove_external_check); + } - if (new_info.corder_valid && orig_info.corder_valid && (new_info.corder != orig_info.corder)) { - H5_FAILED(); - HDprintf(" moved link's creation order value %lld doesn't match original link's creation " - "order value %lld\n", - new_info.corder, orig_info.corder); - PART_ERROR(H5Lmove_external_check); + if (new_info.corder_valid && orig_info.corder_valid && + (new_info.corder != orig_info.corder)) { + H5_FAILED(); + HDprintf(" moved link's creation order value %" PRId64 + " doesn't match original link's creation " + "order value %" PRId64 "\n", + new_info.corder, orig_info.corder); + PART_ERROR(H5Lmove_external_check); + } } if (new_info.cset != orig_info.cset) { @@ -10559,10 +10469,6 @@ test_move_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lmove_external_check); -#endif } PART_END(H5Lmove_external_check); @@ -10575,8 +10481,8 @@ test_move_link(void) PART_BEGIN(H5Lmove_external_same_loc) { - TESTING_2("H5Lmove on external link using H5L_SAME_LOC") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lmove on external link using H5L_SAME_LOC"); + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -10701,10 +10607,6 @@ test_move_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lmove_external_same_loc); -#endif } PART_END(H5Lmove_external_same_loc); @@ -10717,8 +10619,8 @@ test_move_link(void) PART_BEGIN(H5Lmove_external_rename) { - TESTING_2("H5Lmove to rename external link without moving it") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lmove to rename external link without moving it"); + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -10806,10 +10708,6 @@ test_move_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lmove_external_rename); -#endif } PART_END(H5Lmove_external_rename); @@ -10822,7 +10720,7 @@ test_move_link(void) PART_BEGIN(H5Lmove_ud_no_check) { - TESTING_2("H5Lmove on user-defined link (moved link's properties not checked)") + TESTING_2("H5Lmove on user-defined link (moved link's properties not checked)"); /* TODO */ @@ -10833,7 +10731,7 @@ test_move_link(void) PART_BEGIN(H5Lmove_ud_check) { - TESTING_2("H5Lmove on user-defined link (moved link's properties checked)") + TESTING_2("H5Lmove on user-defined link (moved link's properties checked)"); /* TODO */ @@ -10844,7 +10742,7 @@ test_move_link(void) PART_BEGIN(H5Lmove_ud_same_loc) { - TESTING_2("H5Lmove on user-defined link using H5L_SAME_LOC") + TESTING_2("H5Lmove on user-defined link using H5L_SAME_LOC"); /* TODO */ @@ -10855,7 +10753,7 @@ test_move_link(void) PART_BEGIN(H5Lmove_ud_rename) { - TESTING_2("H5Lmove to rename user-defined link without moving it") + TESTING_2("H5Lmove to rename user-defined link without moving it"); /* TODO */ @@ -10866,18 +10764,18 @@ test_move_link(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(dst_grp_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(src_grp_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -10918,14 +10816,14 @@ test_move_links_into_group_with_links(void) hid_t gcpl_id = H5I_INVALID_HID; char link_name[MOVE_LINK_INTO_GRP_WITH_LINKS_TEST_BUF_SIZE]; - TESTING("H5Lmove adjusting creation order values for moved links") + TESTING("H5Lmove adjusting creation order values for moved links"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { SKIPPED(); - HDprintf(" API functions for basic file, group, or basic or hard link, or creation order aren't " + HDprintf(" API functions for basic file, group, link, hard link, or creation order aren't " "supported with this connector\n"); return 0; } @@ -11054,17 +10952,17 @@ test_move_links_into_group_with_links(void) } if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(dst_grp_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(src_grp_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -11096,7 +10994,7 @@ test_move_links_into_group_with_links(void) static int test_move_link_across_files(void) { - TESTING("link moving across files") + TESTING("link moving across files"); /* TODO */ @@ -11113,7 +11011,6 @@ test_move_link_across_files(void) static int test_move_link_reset_grp_max_crt_order(void) { -#ifndef NO_MAX_LINK_CRT_ORDER_RESET H5G_info_t grp_info; size_t i; hid_t file_id = H5I_INVALID_HID; @@ -11121,21 +11018,19 @@ test_move_link_reset_grp_max_crt_order(void) hid_t src_grp_id = H5I_INVALID_HID, dst_grp_id = H5I_INVALID_HID; hid_t gcpl_id = H5I_INVALID_HID; char link_name[MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_BUF_SIZE]; -#endif - TESTING("H5Lmove of all links out of group resets group's maximum link creation order value") + TESTING("H5Lmove of all links out of group resets group's maximum link creation order value"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { SKIPPED(); - HDprintf(" API functions for basic file, group, more or hard link, or creation order aren't " + HDprintf(" API functions for basic file, group, link, hard link, or creation order aren't " "supported with this connector\n"); return 0; } -#ifndef NO_MAX_LINK_CRT_ORDER_RESET if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); HDprintf(" couldn't open file '%s'\n", vol_test_filename); @@ -11209,7 +11104,7 @@ test_move_link_reset_grp_max_crt_order(void) if (grp_info.max_corder != MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS) { H5_FAILED(); HDprintf(" source group's maximum creation order value got adjusted to %lld during link " - "moving; value should have remained at %lld\n", + "moving; value should have remained at %d\n", (long long)grp_info.max_corder, MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS); goto error; } @@ -11255,23 +11150,23 @@ test_move_link_reset_grp_max_crt_order(void) if (grp_info.max_corder != MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS) { H5_FAILED(); HDprintf(" destination group's maximum creation order value of %lld didn't match expected value " - "of %lld after moving all links into it\n", + "of %d after moving all links into it\n", (long long)grp_info.max_corder, MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS); goto error; } if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(dst_grp_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(src_grp_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -11290,10 +11185,6 @@ test_move_link_reset_grp_max_crt_order(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -11317,12 +11208,12 @@ test_move_link_invalid_params(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, more or hard link aren't supported with this " + HDprintf(" API functions for basic file, group, link, or hard link aren't supported with this " "connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -11400,7 +11291,7 @@ test_move_link_invalid_params(void) { PART_BEGIN(H5Lmove_invalid_src_loc_id) { - TESTING_2("H5Lmove with an invalid source location ID") + TESTING_2("H5Lmove with an invalid source location ID"); H5E_BEGIN_TRY { @@ -11421,7 +11312,7 @@ test_move_link_invalid_params(void) PART_BEGIN(H5Lmove_invalid_src_name) { - TESTING_2("H5Lmove with an invalid source name") + TESTING_2("H5Lmove with an invalid source name"); H5E_BEGIN_TRY { @@ -11455,7 +11346,7 @@ test_move_link_invalid_params(void) PART_BEGIN(H5Lmove_invalid_dst_loc_id) { - TESTING_2("H5Lmove with an invalid destination location ID") + TESTING_2("H5Lmove with an invalid destination location ID"); H5E_BEGIN_TRY { @@ -11476,7 +11367,7 @@ test_move_link_invalid_params(void) PART_BEGIN(H5Lmove_invalid_dst_name) { - TESTING_2("H5Lmove with an invalid destination name") + TESTING_2("H5Lmove with an invalid destination name"); H5E_BEGIN_TRY { @@ -11510,7 +11401,7 @@ test_move_link_invalid_params(void) PART_BEGIN(H5Lmove_invalid_lcpl) { - TESTING_2("H5Lmove with an invalid LCPL") + TESTING_2("H5Lmove with an invalid LCPL"); H5E_BEGIN_TRY { @@ -11531,8 +11422,8 @@ test_move_link_invalid_params(void) PART_BEGIN(H5Lmove_invalid_lapl) { - TESTING_2("H5Lmove with an invalid LAPL") -#ifndef NO_INVALID_PROPERTY_LIST_TESTS + TESTING_2("H5Lmove with an invalid LAPL"); + H5E_BEGIN_TRY { err_ret = H5Lmove(src_grp_id, MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME, dst_grp_id, @@ -11547,16 +11438,12 @@ test_move_link_invalid_params(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lmove_invalid_lapl); -#endif } PART_END(H5Lmove_invalid_lapl); PART_BEGIN(H5Lmove_existence) { - TESTING_2("valid link existence in original group after previous invalid H5Lmove calls") + TESTING_2("valid link existence in original group after previous invalid H5Lmove calls"); /* Verify the link hasn't been moved */ if ((link_exists = @@ -11593,7 +11480,7 @@ test_move_link_invalid_params(void) PART_BEGIN(H5Lmove_same_location) { - TESTING_2("H5Lmove with an invalid same location") + TESTING_2("H5Lmove with an invalid same location"); /* Move a group within the file. Both of source and destination use * H5L_SAME_LOC. Should fail. */ @@ -11616,7 +11503,7 @@ test_move_link_invalid_params(void) PART_BEGIN(H5Lmove_across_files) { - TESTING_2("H5Lmove into another file") + TESTING_2("H5Lmove into another file"); HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -11668,18 +11555,18 @@ test_move_link_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(dst_grp_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(src_grp_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -11708,36 +11595,31 @@ static int test_get_link_val(void) { H5L_info2_t link_info; -#ifndef NO_EXTERNAL_LINKS const char *ext_link_filepath; const char *ext_link_val; unsigned ext_link_flags; -#endif - htri_t link_exists; - size_t link_val_size; - char link_val_buf[GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE]; - hid_t file_id = H5I_INVALID_HID, ext_file_id = H5I_INVALID_HID; - hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; - hid_t subgroup_id = H5I_INVALID_HID; - hid_t gcpl_id = H5I_INVALID_HID; -#ifndef NO_EXTERNAL_LINKS - char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; -#endif + htri_t link_exists; + size_t link_val_size; + char link_val_buf[GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE]; + hid_t file_id = H5I_INVALID_HID, ext_file_id = H5I_INVALID_HID; + hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; + hid_t subgroup_id = H5I_INVALID_HID; + hid_t gcpl_id = H5I_INVALID_HID; + char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; TESTING_MULTIPART("link value retrieval"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, basic, more, soft, external link, or creation " + HDprintf(" API functions for basic file, group, link, soft link, external link, or creation " "order aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -11757,10 +11639,12 @@ test_get_link_val(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set link creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set link creation order tracking\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, GET_LINK_VAL_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id, @@ -11778,7 +11662,7 @@ test_get_link_val(void) { const char *link_target = "/" LINK_TEST_GROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP_NAME; - TESTING_2("H5Lget_val on soft link") + TESTING_2("H5Lget_val on soft link"); HDmemset(&link_info, 0, sizeof(link_info)); @@ -11854,12 +11738,10 @@ test_get_link_val(void) PART_BEGIN(H5Lget_val_external) { -#ifndef NO_EXTERNAL_LINKS const char *ext_obj_name = "/"; -#endif - TESTING_2("H5Lget_val on external link") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lget_val on external link"); + HDmemset(&link_info, 0, sizeof(link_info)); HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -11912,8 +11794,8 @@ test_get_link_val(void) link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link value size %lld did not match expected size of %lld\n", - link_info.u.val_size, link_val_size); + HDprintf(" link value size %zu did not match expected size of %zu\n", link_info.u.val_size, + link_val_size); PART_ERROR(H5Lget_val_external); } @@ -11952,10 +11834,6 @@ test_get_link_val(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_val_external); -#endif } PART_END(H5Lget_val_external); @@ -11970,7 +11848,7 @@ test_get_link_val(void) PART_BEGIN(H5Lget_val_ud) { - TESTING_2("H5Lget_val on user-defined link") + TESTING_2("H5Lget_val on user-defined link"); /* TODO */ @@ -11995,7 +11873,13 @@ test_get_link_val(void) const char *link_target_c = "/" LINK_TEST_GROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP4_NAME "C"; - TESTING_2("H5Lget_val_by_idx on soft link by creation order in increasing order") + TESTING_2("H5Lget_val_by_idx on soft link by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_val_by_idx_soft_crt_order_increasing); + } if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP4_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -12183,7 +12067,13 @@ test_get_link_val(void) const char *link_target_c = "/" LINK_TEST_GROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP5_NAME "C"; - TESTING_2("H5Lget_val_by_idx on soft link by creation order in decreasing order") + TESTING_2("H5Lget_val_by_idx on soft link by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_val_by_idx_soft_crt_order_decreasing); + } if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP5_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -12371,7 +12261,7 @@ test_get_link_val(void) const char *link_target_c = "/" LINK_TEST_GROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP6_NAME "C"; - TESTING_2("H5Lget_val_by_idx on soft link by alphabetical order in increasing order") + TESTING_2("H5Lget_val_by_idx on soft link by alphabetical order in increasing order"); if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP6_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -12552,17 +12442,15 @@ test_get_link_val(void) PART_BEGIN(H5Lget_val_by_idx_soft_name_order_decreasing) { -#ifndef NO_DECREASING_ALPHA_ITER_ORDER const char *link_target_a = "/" LINK_TEST_GROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP7_NAME "A"; const char *link_target_b = "/" LINK_TEST_GROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP7_NAME "B"; const char *link_target_c = "/" LINK_TEST_GROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP7_NAME "C"; -#endif - TESTING_2("H5Lget_val_by_idx on soft link by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lget_val_by_idx on soft link by alphabetical order in decreasing order"); + if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP7_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -12634,16 +12522,15 @@ test_get_link_val(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve soft link's info at index %lld\n", 2); + HDprintf(" failed to retrieve soft link's info at index %d\n", 2); PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing); } link_val_size = strlen(link_target_a) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf( - " link value size %lld for link at index %lld did not match expected size of %lld\n", - link_info.u.val_size, 2, link_val_size); + HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n", + link_info.u.val_size, 2, link_val_size); PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing); } @@ -12651,13 +12538,13 @@ test_get_link_val(void) if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, link_val_buf, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get soft link value at index %lld\n", 2); + HDprintf(" couldn't get soft link value at index %d\n", 2); PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing); } if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) { H5_FAILED(); - HDprintf(" link value '%s' for link at index %lld did not match expected value '%s'\n", + HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n", link_val_buf, 2, link_target_a); PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing); } @@ -12666,16 +12553,15 @@ test_get_link_val(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve soft link's info at index %lld\n", 1); + HDprintf(" failed to retrieve soft link's info at index %d\n", 1); PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing); } link_val_size = strlen(link_target_b) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf( - " link value size %lld for link at index %lld did not match expected size of %lld\n", - link_info.u.val_size, 1, link_val_size); + HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n", + link_info.u.val_size, 1, link_val_size); PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing); } @@ -12683,13 +12569,13 @@ test_get_link_val(void) if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, link_val_buf, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get soft link value at index %lld\n", 1); + HDprintf(" couldn't get soft link value at index %d\n", 1); PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing); } if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) { H5_FAILED(); - HDprintf(" link value '%s' for link at index %lld did not match expected value '%s'\n", + HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n", link_val_buf, 1, link_target_b); PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing); } @@ -12698,16 +12584,15 @@ test_get_link_val(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve soft link's info at index %lld\n", 0); + HDprintf(" failed to retrieve soft link's info at index %d\n", 0); PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing); } link_val_size = strlen(link_target_c) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf( - " link value size %lld for link at index %lld did not match expected size of %lld\n", - link_info.u.val_size, 0, link_val_size); + HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n", + link_info.u.val_size, 0, link_val_size); PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing); } @@ -12715,13 +12600,13 @@ test_get_link_val(void) if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, link_val_buf, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get soft link value at index %lld\n", 0); + HDprintf(" couldn't get soft link value at index %d\n", 0); PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing); } if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) { H5_FAILED(); - HDprintf(" link value '%s' for link at index %lld did not match expected value '%s'\n", + HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n", link_val_buf, 0, link_target_c); PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing); } @@ -12733,10 +12618,6 @@ test_get_link_val(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_val_by_idx_soft_name_order_decreasing); -#endif } PART_END(H5Lget_val_by_idx_soft_name_order_decreasing); @@ -12749,14 +12630,18 @@ test_get_link_val(void) PART_BEGIN(H5Lget_val_by_idx_external_crt_order_increasing) { -#ifndef NO_EXTERNAL_LINKS const char *ext_obj_name_a = "/A"; const char *ext_obj_name_b = "/B"; const char *ext_obj_name_c = "/C"; -#endif - TESTING_2("H5Lget_val_by_idx on external link by creation order in increasing order") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lget_val_by_idx on external link by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_val_by_idx_external_crt_order_increasing); + } + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -12842,16 +12727,15 @@ test_get_link_val(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve external link's info at index %lld\n", 0); + HDprintf(" failed to retrieve external link's info at index %d\n", 0); PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing); } link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_a) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf( - " link value size %lld for link at index %lld did not match expected size of %lld\n", - link_info.u.val_size, 0, link_val_size); + HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n", + link_info.u.val_size, 0, link_val_size); PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing); } @@ -12859,7 +12743,7 @@ test_get_link_val(void) if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, link_val_buf, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link value at index %lld\n", 0); + HDprintf(" couldn't get external link value at index %d\n", 0); PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing); } @@ -12888,16 +12772,15 @@ test_get_link_val(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve external link's info at index %lld\n", 1); + HDprintf(" failed to retrieve external link's info at index %d\n", 1); PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing); } link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_b) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf( - " link value size %lld for link at index %lld did not match expected size of %lld\n", - link_info.u.val_size, 1, link_val_size); + HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n", + link_info.u.val_size, 1, link_val_size); PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing); } @@ -12905,7 +12788,7 @@ test_get_link_val(void) if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, link_val_buf, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link value at index %lld\n", 1); + HDprintf(" couldn't get external link value at index %d\n", 1); PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing); } @@ -12934,16 +12817,15 @@ test_get_link_val(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve external link's info at index %lld\n", 2); + HDprintf(" failed to retrieve external link's info at index %d\n", 2); PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing); } link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_c) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf( - " link value size %lld for link at index %lld did not match expected size of %lld\n", - link_info.u.val_size, 2, link_val_size); + HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n", + link_info.u.val_size, 2, link_val_size); PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing); } @@ -12951,7 +12833,7 @@ test_get_link_val(void) if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, link_val_buf, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link value at index %lld\n", 2); + HDprintf(" couldn't get external link value at index %d\n", 2); PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing); } @@ -12983,10 +12865,6 @@ test_get_link_val(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_val_by_idx_external_crt_order_increasing); -#endif } PART_END(H5Lget_val_by_idx_external_crt_order_increasing); @@ -13001,14 +12879,18 @@ test_get_link_val(void) PART_BEGIN(H5Lget_val_by_idx_external_crt_order_decreasing) { -#ifndef NO_EXTERNAL_LINKS const char *ext_obj_name_a = "/A"; const char *ext_obj_name_b = "/B"; const char *ext_obj_name_c = "/C"; -#endif - TESTING_2("H5Lget_val_by_idx on external link by creation order in decreasing order") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lget_val_by_idx on external link by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_val_by_idx_external_crt_order_decreasing); + } + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -13094,16 +12976,15 @@ test_get_link_val(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve external link's info at index %lld\n", 2); + HDprintf(" failed to retrieve external link's info at index %d\n", 2); PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing); } link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_a) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf( - " link value size %lld for link at index %lld did not match expected size of %lld\n", - link_info.u.val_size, 2, link_val_size); + HDprintf(" link value size %zu for link at index %d not match expected size of %zu\n", + link_info.u.val_size, 2, link_val_size); PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing); } @@ -13111,7 +12992,7 @@ test_get_link_val(void) if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, link_val_buf, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link value at index %lld\n", 2); + HDprintf(" couldn't get external link value at index %d\n", 2); PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing); } @@ -13140,16 +13021,15 @@ test_get_link_val(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve external link's info at index %lld\n", 1); + HDprintf(" failed to retrieve external link's info at index %d\n", 1); PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing); } link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_b) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf( - " link value size %lld for link at index %lld did not match expected size of %lld\n", - link_info.u.val_size, 1, link_val_size); + HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n", + link_info.u.val_size, 1, link_val_size); PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing); } @@ -13157,7 +13037,7 @@ test_get_link_val(void) if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, link_val_buf, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link value at index %lld\n", 1); + HDprintf(" couldn't get external link value at index %d\n", 1); PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing); } @@ -13186,16 +13066,15 @@ test_get_link_val(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve external link's info at index %lld\n", 0); + HDprintf(" failed to retrieve external link's info at index %d\n", 0); PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing); } link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_c) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf( - " link value size %lld for link at index %lld did not match expected size of %lld\n", - link_info.u.val_size, 0, link_val_size); + HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n", + link_info.u.val_size, 0, link_val_size); PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing); } @@ -13203,7 +13082,7 @@ test_get_link_val(void) if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, link_val_buf, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link value at index %lld\n", 0); + HDprintf(" couldn't get external link value at index %d\n", 0); PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing); } @@ -13235,10 +13114,6 @@ test_get_link_val(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_val_by_idx_external_crt_order_decreasing); -#endif } PART_END(H5Lget_val_by_idx_external_crt_order_decreasing); @@ -13253,14 +13128,12 @@ test_get_link_val(void) PART_BEGIN(H5Lget_val_by_idx_external_name_order_increasing) { -#ifndef NO_EXTERNAL_LINKS const char *ext_obj_name_a = "/A"; const char *ext_obj_name_b = "/B"; const char *ext_obj_name_c = "/C"; -#endif - TESTING_2("H5Lget_val_by_idx on external link by alphabetical order in increasing order") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lget_val_by_idx on external link by alphabetical order in increasing order"); + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -13346,16 +13219,15 @@ test_get_link_val(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve external link's info at index %lld\n", 0); + HDprintf(" failed to retrieve external link's info at index %d\n", 0); PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing); } link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_a) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf( - " link value size %lld for link at index %lld did not match expected size of %lld\n", - link_info.u.val_size, 0, link_val_size); + HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n", + link_info.u.val_size, 0, link_val_size); PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing); } @@ -13363,7 +13235,7 @@ test_get_link_val(void) if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, link_val_buf, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link value at index %lld\n", 0); + HDprintf(" couldn't get external link value at index %d\n", 0); PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing); } @@ -13392,16 +13264,15 @@ test_get_link_val(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve external link's info at index %lld\n", 1); + HDprintf(" failed to retrieve external link's info at index %d\n", 1); PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing); } link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_b) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf( - " link value size %lld for link at index %lld did not match expected size of %lld\n", - link_info.u.val_size, 1, link_val_size); + HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n", + link_info.u.val_size, 1, link_val_size); PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing); } @@ -13409,7 +13280,7 @@ test_get_link_val(void) if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, link_val_buf, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link value at index %lld\n", 1); + HDprintf(" couldn't get external link value at index %d\n", 1); PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing); } @@ -13438,16 +13309,15 @@ test_get_link_val(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve external link's info at index %lld\n", 2); + HDprintf(" failed to retrieve external link's info at index %d\n", 2); PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing); } link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_c) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf( - " link value size %lld for link at index %lld did not match expected size of %lld\n", - link_info.u.val_size, 2, link_val_size); + HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n", + link_info.u.val_size, 2, link_val_size); PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing); } @@ -13455,7 +13325,7 @@ test_get_link_val(void) if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, link_val_buf, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link value at index %lld\n", 2); + HDprintf(" couldn't get external link value at index %d\n", 2); PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing); } @@ -13487,10 +13357,6 @@ test_get_link_val(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_val_by_idx_external_name_order_increasing); -#endif } PART_END(H5Lget_val_by_idx_external_name_order_increasing); @@ -13505,14 +13371,12 @@ test_get_link_val(void) PART_BEGIN(H5Lget_val_by_idx_external_name_order_decreasing) { -#ifndef NO_DECREASING_ALPHA_ITER_ORDER const char *ext_obj_name_a = "/A"; const char *ext_obj_name_b = "/B"; const char *ext_obj_name_c = "/C"; -#endif - TESTING_2("H5Lget_val_by_idx on external link by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lget_val_by_idx on external link by alphabetical order in decreasing order"); + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -13598,16 +13462,15 @@ test_get_link_val(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve external link's info at index %lld\n", 2); + HDprintf(" failed to retrieve external link's info at index %d\n", 2); PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing); } link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_a) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf( - " link value size %lld for link at index %lld did not match expected size of %lld\n", - link_info.u.val_size, 2, link_val_size); + HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n", + link_info.u.val_size, 2, link_val_size); PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing); } @@ -13615,7 +13478,7 @@ test_get_link_val(void) if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, link_val_buf, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link value at index %lld\n", 2); + HDprintf(" couldn't get external link value at index %d\n", 2); PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing); } @@ -13644,16 +13507,15 @@ test_get_link_val(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve external link's info at index %lld\n", 1); + HDprintf(" failed to retrieve external link's info at index %d\n", 1); PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing); } link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_b) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf( - " link value size %lld for link at index %lld did not match expected size of %lld\n", - link_info.u.val_size, 1, link_val_size); + HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n", + link_info.u.val_size, 1, link_val_size); PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing); } @@ -13661,7 +13523,7 @@ test_get_link_val(void) if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, link_val_buf, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link value at index %lld\n", 1); + HDprintf(" couldn't get external link value at index %d\n", 1); PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing); } @@ -13690,16 +13552,15 @@ test_get_link_val(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve external link's info at index %lld\n", 0); + HDprintf(" failed to retrieve external link's info at index %d\n", 0); PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing); } link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_c) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf( - " link value size %lld for link at index %lld did not match expected size of %lld\n", - link_info.u.val_size, 0, link_val_size); + HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n", + link_info.u.val_size, 0, link_val_size); PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing); } @@ -13707,7 +13568,7 @@ test_get_link_val(void) if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, link_val_buf, GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link value at index %lld\n", 0); + HDprintf(" couldn't get external link value at index %d\n", 0); PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing); } @@ -13739,10 +13600,6 @@ test_get_link_val(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_val_by_idx_external_name_order_decreasing); -#endif } PART_END(H5Lget_val_by_idx_external_name_order_decreasing); @@ -13757,7 +13614,7 @@ test_get_link_val(void) PART_BEGIN(H5Lget_val_by_idx_ud_crt_order_increasing) { - TESTING_2("H5Lget_val_by_idx on user-defined link by creation order in increasing order") + TESTING_2("H5Lget_val_by_idx on user-defined link by creation order in increasing order"); SKIPPED(); PART_EMPTY(H5Lget_val_by_idx_ud_crt_order_increasing); @@ -13773,7 +13630,7 @@ test_get_link_val(void) PART_BEGIN(H5Lget_val_by_idx_ud_crt_order_decreasing) { - TESTING_2("H5Lget_val_by_idx on user-defined link by creation order in decreasing order") + TESTING_2("H5Lget_val_by_idx on user-defined link by creation order in decreasing order"); SKIPPED(); PART_EMPTY(H5Lget_val_by_idx_ud_crt_order_decreasing); @@ -13789,7 +13646,7 @@ test_get_link_val(void) PART_BEGIN(H5Lget_val_by_idx_ud_name_order_increasing) { - TESTING_2("H5Lget_val_by_idx on user-defined link by alphabetical order in increasing order") + TESTING_2("H5Lget_val_by_idx on user-defined link by alphabetical order in increasing order"); SKIPPED(); PART_EMPTY(H5Lget_val_by_idx_ud_name_order_increasing); @@ -13805,7 +13662,7 @@ test_get_link_val(void) PART_BEGIN(H5Lget_val_by_idx_ud_name_order_decreasing) { - TESTING_2("H5Lget_val_by_idx on user-defined link by alphabetical order in decreasing order") + TESTING_2("H5Lget_val_by_idx on user-defined link by alphabetical order in decreasing order"); SKIPPED(); PART_EMPTY(H5Lget_val_by_idx_ud_name_order_decreasing); @@ -13821,16 +13678,16 @@ test_get_link_val(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -13872,14 +13729,14 @@ test_get_link_val_invalid_params(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, basic, more, soft, external link, or creation " + HDprintf(" API functions for basic file, group, link, soft link, external link, or creation " "order aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -13899,12 +13756,6 @@ test_get_link_val_invalid_params(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { - H5_FAILED(); - HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); - goto error; - } - if ((group_id = H5Gcreate2(container_group, GET_LINK_VAL_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -13935,23 +13786,23 @@ test_get_link_val_invalid_params(void) goto error; } + link_val_buf_size = 100; + if (NULL == (link_val_buf = (char *)HDmalloc(link_val_buf_size))) { + H5_FAILED(); + HDprintf(" couldn't allocate buffer for storing link value\n"); + goto error; + } + PASSED(); BEGIN_MULTIPART { PART_BEGIN(H5Lget_val_invalid_loc_id) { - TESTING_2("H5Lget_val with an invalid location ID") + TESTING_2("H5Lget_val with an invalid location ID"); HDmemset(&link_info, 0, sizeof(link_info)); - link_val_buf_size = link_info.u.val_size; - if (NULL == (link_val_buf = (char *)HDmalloc(link_val_buf_size))) { - H5_FAILED(); - HDprintf(" couldn't allocate buffer for storing link value\n"); - PART_ERROR(H5Lget_val_invalid_loc_id); - } - H5E_BEGIN_TRY { err_ret = H5Lget_val(H5I_INVALID_HID, GET_LINK_VAL_INVALID_PARAMS_TEST_SOFT_LINK_NAME, @@ -13971,7 +13822,7 @@ test_get_link_val_invalid_params(void) PART_BEGIN(H5Lget_val_invalid_link_name) { - TESTING_2("H5Lget_val with an invalid link name") + TESTING_2("H5Lget_val with an invalid link name"); H5E_BEGIN_TRY { @@ -14003,7 +13854,7 @@ test_get_link_val_invalid_params(void) PART_BEGIN(H5Lget_val_invalid_lapl) { - TESTING_2("H5Lget_val with an invalid LAPL") + TESTING_2("H5Lget_val with an invalid LAPL"); H5E_BEGIN_TRY { @@ -14024,28 +13875,14 @@ test_get_link_val_invalid_params(void) PART_BEGIN(H5Lget_val_by_idx_invalid_loc_id) { - TESTING_2("H5Lget_val_by_idx with an invalid location ID") + TESTING_2("H5Lget_val_by_idx with an invalid location ID"); HDmemset(&link_info, 0, sizeof(link_info)); - while (link_info.u.val_size > link_val_buf_size) { - char *tmp_realloc; - - link_val_buf_size *= 2; - - if (NULL == (tmp_realloc = (char *)HDrealloc(link_val_buf, link_val_buf_size))) { - H5_FAILED(); - HDprintf(" couldn't reallocate buffer for storing link value\n"); - PART_ERROR(H5Lget_val_by_idx_invalid_loc_id); - } - - link_val_buf = tmp_realloc; - } - H5E_BEGIN_TRY { - err_ret = H5Lget_val_by_idx(H5I_INVALID_HID, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, - link_val_buf, link_val_buf_size, H5P_DEFAULT); + err_ret = H5Lget_val_by_idx(H5I_INVALID_HID, ".", H5_INDEX_NAME, H5_ITER_INC, 0, link_val_buf, + link_val_buf_size, H5P_DEFAULT); } H5E_END_TRY; @@ -14061,11 +13898,11 @@ test_get_link_val_invalid_params(void) PART_BEGIN(H5Lget_val_by_idx_invalid_grp_name) { - TESTING_2("H5Lget_val_by_idx with an invalid group name") + TESTING_2("H5Lget_val_by_idx with an invalid group name"); H5E_BEGIN_TRY { - err_ret = H5Lget_val_by_idx(group_id, NULL, H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, link_val_buf, + err_ret = H5Lget_val_by_idx(group_id, NULL, H5_INDEX_NAME, H5_ITER_INC, 0, link_val_buf, link_val_buf_size, H5P_DEFAULT); } H5E_END_TRY; @@ -14078,7 +13915,7 @@ test_get_link_val_invalid_params(void) H5E_BEGIN_TRY { - err_ret = H5Lget_val_by_idx(group_id, "", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, link_val_buf, + err_ret = H5Lget_val_by_idx(group_id, "", H5_INDEX_NAME, H5_ITER_INC, 0, link_val_buf, link_val_buf_size, H5P_DEFAULT); } H5E_END_TRY; @@ -14095,7 +13932,7 @@ test_get_link_val_invalid_params(void) PART_BEGIN(H5Lget_val_by_idx_invalid_index_type) { - TESTING_2("H5Lget_val_by_idx with an invalid index type") + TESTING_2("H5Lget_val_by_idx with an invalid index type"); H5E_BEGIN_TRY { @@ -14129,12 +13966,12 @@ test_get_link_val_invalid_params(void) PART_BEGIN(H5Lget_val_by_idx_invalid_iter_order) { - TESTING_2("H5Lget_val_by_idx with an invalid iteration ordering") + TESTING_2("H5Lget_val_by_idx with an invalid iteration ordering"); H5E_BEGIN_TRY { - err_ret = H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_UNKNOWN, 0, - link_val_buf, link_val_buf_size, H5P_DEFAULT); + err_ret = H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_UNKNOWN, 0, link_val_buf, + link_val_buf_size, H5P_DEFAULT); } H5E_END_TRY; @@ -14147,7 +13984,7 @@ test_get_link_val_invalid_params(void) H5E_BEGIN_TRY { - err_ret = H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_N, 0, link_val_buf, + err_ret = H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_N, 0, link_val_buf, link_val_buf_size, H5P_DEFAULT); } H5E_END_TRY; @@ -14164,11 +14001,11 @@ test_get_link_val_invalid_params(void) PART_BEGIN(H5Lget_val_by_idx_invalid_lapl) { - TESTING_2("H5Lget_val_by_idx with an invalid LAPL") + TESTING_2("H5Lget_val_by_idx with an invalid LAPL"); H5E_BEGIN_TRY { - err_ret = H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, link_val_buf, + err_ret = H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, link_val_buf, link_val_buf_size, H5I_INVALID_HID); } H5E_END_TRY; @@ -14185,7 +14022,7 @@ test_get_link_val_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (link_val_buf) { HDfree(link_val_buf); @@ -14193,13 +14030,13 @@ test_get_link_val_invalid_params(void) } if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -14228,16 +14065,14 @@ static int test_get_link_info(void) { H5L_info2_t link_info; + const char *ext_objname = "/"; htri_t link_exists; size_t link_val_size; hid_t file_id = H5I_INVALID_HID, ext_file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t subgroup_id = H5I_INVALID_HID; hid_t gcpl_id = H5I_INVALID_HID; -#ifndef NO_EXTERNAL_LINKS - char *ext_objname; - char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; -#endif + char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; TESTING_MULTIPART("link info retrieval"); @@ -14245,14 +14080,14 @@ test_get_link_info(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, basic, more, soft, hard, external link, or " - "creation order aren't supported with this connector\n"); + HDprintf(" API functions for basic file, group, link, soft link, hard link, or external link " + "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -14272,10 +14107,12 @@ test_get_link_info(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set link creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set link creation order tracking\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, GET_LINK_INFO_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id, @@ -14291,7 +14128,7 @@ test_get_link_info(void) { PART_BEGIN(H5Lget_info_hard) { - TESTING_2("H5Lget_info2 on hard link") + TESTING_2("H5Lget_info2 on hard link"); HDmemset(&link_info, 0, sizeof(link_info)); @@ -14334,11 +14171,13 @@ test_get_link_info(void) PART_ERROR(H5Lget_info_hard); } - if (link_info.corder_valid && (link_info.corder != 0)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)0); - PART_ERROR(H5Lget_info_hard); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 0)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)0); + PART_ERROR(H5Lget_info_hard); + } } if (H5Gclose(subgroup_id) < 0) { @@ -14360,7 +14199,7 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_soft) { - TESTING_2("H5Lget_info2 on soft link") + TESTING_2("H5Lget_info2 on soft link"); HDmemset(&link_info, 0, sizeof(link_info)); @@ -14415,11 +14254,13 @@ test_get_link_info(void) PART_ERROR(H5Lget_info_soft); } - if (link_info.corder_valid && (link_info.corder != 0)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)0); - PART_ERROR(H5Lget_info_soft); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 0)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)0); + PART_ERROR(H5Lget_info_soft); + } } if (H5Gclose(subgroup_id) < 0) { @@ -14441,8 +14282,8 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_external) { - TESTING_2("H5Lget_info2 on external link") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lget_info2 on external link"); + HDmemset(&link_info, 0, sizeof(link_info)); HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -14466,7 +14307,6 @@ test_get_link_info(void) PART_ERROR(H5Lget_info_external); } - ext_objname = "/"; if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); @@ -14502,16 +14342,18 @@ test_get_link_info(void) link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_external); } - if (link_info.corder_valid && (link_info.corder != 0)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)0); - PART_ERROR(H5Lget_info_external); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 0)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)0); + PART_ERROR(H5Lget_info_external); + } } if (H5Gclose(subgroup_id) < 0) { @@ -14521,10 +14363,6 @@ test_get_link_info(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_info_external); -#endif } PART_END(H5Lget_info_external); @@ -14539,7 +14377,7 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_ud) { - TESTING_2("H5Lget_info2 on user-defined link") + TESTING_2("H5Lget_info2 on user-defined link"); /* TODO */ @@ -14557,7 +14395,13 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_hard_crt_order_increasing) { - TESTING_2("H5Lget_info_by_idx2 on hard link by creation order in increasing order") + TESTING_2("H5Lget_info_by_idx2 on hard link by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_info_by_idx_hard_crt_order_increasing); + } if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP5_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -14714,7 +14558,13 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_hard_crt_order_decreasing) { - TESTING_2("H5Lget_info_by_idx2 on hard link by creation order in decreasing order") + TESTING_2("H5Lget_info_by_idx2 on hard link by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_info_by_idx_hard_crt_order_decreasing); + } if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP6_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -14871,7 +14721,7 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_hard_name_order_increasing) { - TESTING_2("H5Lget_info_by_idx2 on hard link by alphabetical order in increasing order") + TESTING_2("H5Lget_info_by_idx2 on hard link by alphabetical order in increasing order"); if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP7_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -14960,11 +14810,13 @@ test_get_link_info(void) PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing); } - if (link_info.corder_valid && (link_info.corder != 0)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)0); - PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 0)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)0); + PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing); + } } HDmemset(&link_info, 0, sizeof(link_info)); @@ -14981,11 +14833,13 @@ test_get_link_info(void) PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing); } - if (link_info.corder_valid && (link_info.corder != 1)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)1); - PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 1)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)1); + PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing); + } } HDmemset(&link_info, 0, sizeof(link_info)); @@ -15002,11 +14856,13 @@ test_get_link_info(void) PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing); } - if (link_info.corder_valid && (link_info.corder != 2)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)2); - PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 2)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)2); + PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing); + } } if (H5Gclose(subgroup_id) < 0) { @@ -15028,8 +14884,8 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_hard_name_order_decreasing) { - TESTING_2("H5Lget_info_by_idx2 on hard link by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lget_info_by_idx2 on hard link by alphabetical order in decreasing order"); + if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP8_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -15107,7 +14963,7 @@ test_get_link_info(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get hard link info for index %lld\n", 2); + HDprintf(" couldn't get hard link info for index %d\n", 2); PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing); } @@ -15117,18 +14973,20 @@ test_get_link_info(void) PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing); } - if (link_info.corder_valid && (link_info.corder != 0)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)0); - PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 0)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)0); + PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing); + } } HDmemset(&link_info, 0, sizeof(link_info)); if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get hard link info for index %lld\n", 1); + HDprintf(" couldn't get hard link info for index %d\n", 1); PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing); } @@ -15138,18 +14996,20 @@ test_get_link_info(void) PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing); } - if (link_info.corder_valid && (link_info.corder != 1)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)1); - PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 1)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)1); + PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing); + } } HDmemset(&link_info, 0, sizeof(link_info)); if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get hard link info for index %lld\n", 0); + HDprintf(" couldn't get hard link info for index %d\n", 0); PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing); } @@ -15159,11 +15019,13 @@ test_get_link_info(void) PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing); } - if (link_info.corder_valid && (link_info.corder != 2)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)2); - PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 2)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)2); + PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing); + } } if (H5Gclose(subgroup_id) < 0) { @@ -15173,10 +15035,6 @@ test_get_link_info(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_info_by_idx_hard_name_order_decreasing); -#endif } PART_END(H5Lget_info_by_idx_hard_name_order_decreasing); @@ -15189,7 +15047,13 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_soft_crt_order_increasing) { - TESTING_2("H5Lget_info_by_idx2 on soft link by creation order in increasing order") + TESTING_2("H5Lget_info_by_idx2 on soft link by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_info_by_idx_soft_crt_order_increasing); + } if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP9_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -15382,7 +15246,13 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_soft_crt_order_decreasing) { - TESTING_2("H5Lget_info_by_idx2 on soft link by creation order in decreasing order") + TESTING_2("H5Lget_info_by_idx2 on soft link by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_info_by_idx_soft_crt_order_decreasing); + } if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP10_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -15575,7 +15445,7 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_soft_name_order_increasing) { - TESTING_2("H5Lget_info_by_idx2 on soft link by alphabetical order in increasing order") + TESTING_2("H5Lget_info_by_idx2 on soft link by alphabetical order in increasing order"); if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP11_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -15680,11 +15550,13 @@ test_get_link_info(void) PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing); } - if (link_info.corder_valid && (link_info.corder != 0)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)0); - PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 0)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)0); + PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing); + } } HDmemset(&link_info, 0, sizeof(link_info)); @@ -15711,11 +15583,13 @@ test_get_link_info(void) PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing); } - if (link_info.corder_valid && (link_info.corder != 1)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)1); - PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 1)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)1); + PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing); + } } HDmemset(&link_info, 0, sizeof(link_info)); @@ -15742,11 +15616,13 @@ test_get_link_info(void) PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing); } - if (link_info.corder_valid && (link_info.corder != 2)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)2); - PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 2)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)2); + PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing); + } } if (H5Gclose(subgroup_id) < 0) { @@ -15768,8 +15644,8 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_soft_name_order_decreasing) { - TESTING_2("H5Lget_info_by_idx2 on soft link by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lget_info_by_idx2 on soft link by alphabetical order in decreasing order"); + if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP12_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -15853,7 +15729,7 @@ test_get_link_info(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get soft link info for index %lld\n", 2); + HDprintf(" couldn't get soft link info for index %d\n", 2); PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing); } @@ -15868,23 +15744,25 @@ test_get_link_info(void) 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing); } - if (link_info.corder_valid && (link_info.corder != 0)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)0); - PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 0)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)0); + PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing); + } } HDmemset(&link_info, 0, sizeof(link_info)); if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get soft link info for index %lld\n", 1); + HDprintf(" couldn't get soft link info for index %d\n", 1); PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing); } @@ -15899,23 +15777,25 @@ test_get_link_info(void) 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing); } - if (link_info.corder_valid && (link_info.corder != 1)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)1); - PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 1)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)1); + PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing); + } } HDmemset(&link_info, 0, sizeof(link_info)); if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get soft link info for index %lld\n", 0); + HDprintf(" couldn't get soft link info for index %d\n", 0); PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing); } @@ -15930,16 +15810,18 @@ test_get_link_info(void) 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing); } - if (link_info.corder_valid && (link_info.corder != 2)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)2); - PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 2)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)2); + PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing); + } } if (H5Gclose(subgroup_id) < 0) { @@ -15949,10 +15831,6 @@ test_get_link_info(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_info_by_idx_soft_name_order_decreasing); -#endif } PART_END(H5Lget_info_by_idx_soft_name_order_decreasing); @@ -15965,8 +15843,14 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_external_crt_order_increasing) { - TESTING_2("H5Lget_info_by_idx2 on external link by creation order in increasing order") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lget_info_by_idx2 on external link by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_info_by_idx_external_crt_order_increasing); + } + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -15989,7 +15873,6 @@ test_get_link_info(void) } /* Create several external links */ - ext_objname = "/"; if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); @@ -16059,7 +15942,7 @@ test_get_link_info(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link info for index %lld\n", 0); + HDprintf(" couldn't get external link info for index %d\n", 0); PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing); } @@ -16072,7 +15955,7 @@ test_get_link_info(void) link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing); } @@ -16088,7 +15971,7 @@ test_get_link_info(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link info for index %lld\n", 1); + HDprintf(" couldn't get external link info for index %d\n", 1); PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing); } @@ -16101,7 +15984,7 @@ test_get_link_info(void) link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing); } @@ -16117,7 +16000,7 @@ test_get_link_info(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link info for index %lld\n", 2); + HDprintf(" couldn't get external link info for index %d\n", 2); PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing); } @@ -16130,7 +16013,7 @@ test_get_link_info(void) link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing); } @@ -16149,10 +16032,6 @@ test_get_link_info(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_info_by_idx_external_crt_order_increasing); -#endif } PART_END(H5Lget_info_by_idx_external_crt_order_increasing); @@ -16167,8 +16046,14 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_external_crt_order_decreasing) { - TESTING_2("H5Lget_info_by_idx2 on external link by creation order in decreasing order") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lget_info_by_idx2 on external link by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_info_by_idx_external_crt_order_decreasing); + } + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -16191,7 +16076,6 @@ test_get_link_info(void) } /* Create several external links */ - ext_objname = "/"; if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); @@ -16261,7 +16145,7 @@ test_get_link_info(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link info for index %lld\n", 2); + HDprintf(" couldn't get external link info for index %d\n", 2); PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing); } @@ -16274,7 +16158,7 @@ test_get_link_info(void) link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing); } @@ -16290,7 +16174,7 @@ test_get_link_info(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link info for index %lld\n", 1); + HDprintf(" couldn't get external link info for index %d\n", 1); PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing); } @@ -16303,7 +16187,7 @@ test_get_link_info(void) link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing); } @@ -16319,7 +16203,7 @@ test_get_link_info(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link info for index %lld\n", 0); + HDprintf(" couldn't get external link info for index %d\n", 0); PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing); } @@ -16332,7 +16216,7 @@ test_get_link_info(void) link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing); } @@ -16351,10 +16235,6 @@ test_get_link_info(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_info_by_idx_external_crt_order_decreasing); -#endif } PART_END(H5Lget_info_by_idx_external_crt_order_decreasing); @@ -16369,8 +16249,8 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_external_name_order_increasing) { - TESTING_2("H5Lget_info_by_idx2 on external link by alphabetical order in increasing order") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lget_info_by_idx2 on external link by alphabetical order in increasing order"); + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -16393,7 +16273,6 @@ test_get_link_info(void) } /* Create several external links */ - ext_objname = "/"; if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); @@ -16463,7 +16342,7 @@ test_get_link_info(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link info for index %lld\n", 0); + HDprintf(" couldn't get external link info for index %d\n", 0); PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing); } @@ -16476,23 +16355,25 @@ test_get_link_info(void) link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing); } - if (link_info.corder_valid && (link_info.corder != 0)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)0); - PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 0)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)0); + PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing); + } } HDmemset(&link_info, 0, sizeof(link_info)); if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link info for index %lld\n", 1); + HDprintf(" couldn't get external link info for index %d\n", 1); PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing); } @@ -16505,23 +16386,25 @@ test_get_link_info(void) link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing); } - if (link_info.corder_valid && (link_info.corder != 1)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)1); - PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 1)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)1); + PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing); + } } HDmemset(&link_info, 0, sizeof(link_info)); if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link info for index %lld\n", 2); + HDprintf(" couldn't get external link info for index %d\n", 2); PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing); } @@ -16534,16 +16417,18 @@ test_get_link_info(void) link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing); } - if (link_info.corder_valid && (link_info.corder != 2)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)2); - PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 2)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)2); + PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing); + } } if (H5Gclose(subgroup_id) < 0) { @@ -16553,10 +16438,6 @@ test_get_link_info(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_info_by_idx_external_name_order_increasing); -#endif } PART_END(H5Lget_info_by_idx_external_name_order_increasing); @@ -16571,8 +16452,8 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_external_name_order_decreasing) { - TESTING_2("H5Lget_info_by_idx2 on external link by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lget_info_by_idx2 on external link by alphabetical order in decreasing order"); + HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -16595,7 +16476,6 @@ test_get_link_info(void) } /* Create several external links */ - ext_objname = "/"; if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id, GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); @@ -16665,7 +16545,7 @@ test_get_link_info(void) if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link info for index %lld\n", 2); + HDprintf(" couldn't get external link info for index %d\n", 2); PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing); } @@ -16678,23 +16558,25 @@ test_get_link_info(void) link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing); } - if (link_info.corder_valid && (link_info.corder != 0)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)0); - PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 0)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)0); + PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing); + } } HDmemset(&link_info, 0, sizeof(link_info)); if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link info for index %lld\n", 1); + HDprintf(" couldn't get external link info for index %d\n", 1); PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing); } @@ -16707,23 +16589,25 @@ test_get_link_info(void) link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing); } - if (link_info.corder_valid && (link_info.corder != 1)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)1); - PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 1)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)1); + PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing); + } } HDmemset(&link_info, 0, sizeof(link_info)); if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &link_info, H5P_DEFAULT) < 0) { H5_FAILED(); - HDprintf(" couldn't get external link info for index %lld\n", 0); + HDprintf(" couldn't get external link info for index %d\n", 0); PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing); } @@ -16736,16 +16620,18 @@ test_get_link_info(void) link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1; if (link_info.u.val_size != link_val_size) { H5_FAILED(); - HDprintf(" link's value size '%lld' did not match expected value '%lld'\n", + HDprintf(" link's value size '%lld' did not match expected value '%zu'\n", (long long)link_info.u.val_size, link_val_size); PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing); } - if (link_info.corder_valid && (link_info.corder != 2)) { - H5_FAILED(); - HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", - (long long)link_info.corder, (long long)2); - PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing); + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (link_info.corder_valid && (link_info.corder != 2)) { + H5_FAILED(); + HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n", + (long long)link_info.corder, (long long)2); + PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing); + } } if (H5Gclose(subgroup_id) < 0) { @@ -16755,10 +16641,6 @@ test_get_link_info(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_info_by_idx_external_name_order_decreasing); -#endif } PART_END(H5Lget_info_by_idx_external_name_order_decreasing); @@ -16773,7 +16655,7 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_ud_crt_order_increasing) { - TESTING_2("H5Lget_info_by_idx2 on user-defined link by creation order in increasing order") + TESTING_2("H5Lget_info_by_idx2 on user-defined link by creation order in increasing order"); SKIPPED(); PART_EMPTY(H5Lget_info_by_idx_ud_crt_order_increasing); @@ -16789,7 +16671,7 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_ud_crt_order_decreasing) { - TESTING_2("H5Lget_info_by_idx2 on user-defined link by creation order in decreasing order") + TESTING_2("H5Lget_info_by_idx2 on user-defined link by creation order in decreasing order"); SKIPPED(); PART_EMPTY(H5Lget_info_by_idx_ud_crt_order_decreasing); @@ -16805,7 +16687,7 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_ud_name_order_increasing) { - TESTING_2("H5Lget_info_by_idx2 on user-defined link by alphabetical order in increasing order") + TESTING_2("H5Lget_info_by_idx2 on user-defined link by alphabetical order in increasing order"); SKIPPED(); PART_EMPTY(H5Lget_info_by_idx_ud_name_order_increasing); @@ -16821,7 +16703,7 @@ test_get_link_info(void) PART_BEGIN(H5Lget_info_by_idx_ud_name_order_decreasing) { - TESTING_2("H5Lget_info_by_idx2 on user-defined link by alphabetical order in decreasing order") + TESTING_2("H5Lget_info_by_idx2 on user-defined link by alphabetical order in decreasing order"); SKIPPED(); PART_EMPTY(H5Lget_info_by_idx_ud_name_order_decreasing); @@ -16837,16 +16719,16 @@ test_get_link_info(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -16886,14 +16768,14 @@ test_get_link_info_invalid_params(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, basic, more, soft, hard, external link, or " - "creation order aren't supported with this connector\n"); + HDprintf(" API functions for basic file, group, link, or hard link " + "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -16913,12 +16795,6 @@ test_get_link_info_invalid_params(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { - H5_FAILED(); - HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); - goto error; - } - if ((group_id = H5Gcreate2(container_group, GET_LINK_INFO_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -16955,7 +16831,7 @@ test_get_link_info_invalid_params(void) { PART_BEGIN(H5Lget_info_invalid_loc_id) { - TESTING_2("H5Lget_info2 with an invalid location ID") + TESTING_2("H5Lget_info2 with an invalid location ID"); HDmemset(&link_info, 0, sizeof(link_info)); @@ -16978,7 +16854,7 @@ test_get_link_info_invalid_params(void) PART_BEGIN(H5Lget_info_invalid_link_name) { - TESTING_2("H5Lget_info2 with an invalid link name") + TESTING_2("H5Lget_info2 with an invalid link name"); H5E_BEGIN_TRY { @@ -17010,7 +16886,7 @@ test_get_link_info_invalid_params(void) PART_BEGIN(H5Lget_info_invalid_lapl) { - TESTING_2("H5Lget_info2 with an invalid LAPL") + TESTING_2("H5Lget_info2 with an invalid LAPL"); H5E_BEGIN_TRY { @@ -17033,12 +16909,12 @@ test_get_link_info_invalid_params(void) PART_BEGIN(H5Lget_info_by_idx_invalid_loc_id) { - TESTING_2("H5Lget_info_by_idx2 with an invalid location ID") + TESTING_2("H5Lget_info_by_idx2 with an invalid location ID"); H5E_BEGIN_TRY { - err_ret = H5Lget_info_by_idx2(H5I_INVALID_HID, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, - &link_info, H5P_DEFAULT); + err_ret = H5Lget_info_by_idx2(H5I_INVALID_HID, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &link_info, + H5P_DEFAULT); } H5E_END_TRY; @@ -17054,11 +16930,11 @@ test_get_link_info_invalid_params(void) PART_BEGIN(H5Lget_info_by_idx_invalid_grp_name) { - TESTING_2("H5Lget_info_by_idx2 with an invalid group name") + TESTING_2("H5Lget_info_by_idx2 with an invalid group name"); H5E_BEGIN_TRY { - err_ret = H5Lget_info_by_idx2(group_id, NULL, H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &link_info, + err_ret = H5Lget_info_by_idx2(group_id, NULL, H5_INDEX_NAME, H5_ITER_INC, 0, &link_info, H5P_DEFAULT); } H5E_END_TRY; @@ -17071,8 +16947,8 @@ test_get_link_info_invalid_params(void) H5E_BEGIN_TRY { - err_ret = H5Lget_info_by_idx2(group_id, "", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &link_info, - H5P_DEFAULT); + err_ret = + H5Lget_info_by_idx2(group_id, "", H5_INDEX_NAME, H5_ITER_INC, 0, &link_info, H5P_DEFAULT); } H5E_END_TRY; @@ -17088,7 +16964,7 @@ test_get_link_info_invalid_params(void) PART_BEGIN(H5Lget_info_by_idx_invalid_index_type) { - TESTING_2("H5Lget_info_by_idx2 with an invalid index type") + TESTING_2("H5Lget_info_by_idx2 with an invalid index type"); H5E_BEGIN_TRY { @@ -17122,12 +16998,12 @@ test_get_link_info_invalid_params(void) PART_BEGIN(H5Lget_info_by_idx_invalid_iter_order) { - TESTING_2("H5Lget_info_by_idx2 with an invalid iteration ordering") + TESTING_2("H5Lget_info_by_idx2 with an invalid iteration ordering"); H5E_BEGIN_TRY { - err_ret = H5Lget_info_by_idx2(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_UNKNOWN, 0, - &link_info, H5P_DEFAULT); + err_ret = H5Lget_info_by_idx2(group_id, ".", H5_INDEX_NAME, H5_ITER_UNKNOWN, 0, &link_info, + H5P_DEFAULT); } H5E_END_TRY; @@ -17140,8 +17016,8 @@ test_get_link_info_invalid_params(void) H5E_BEGIN_TRY { - err_ret = H5Lget_info_by_idx2(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_N, 0, &link_info, - H5P_DEFAULT); + err_ret = + H5Lget_info_by_idx2(group_id, ".", H5_INDEX_NAME, H5_ITER_N, 0, &link_info, H5P_DEFAULT); } H5E_END_TRY; @@ -17157,11 +17033,11 @@ test_get_link_info_invalid_params(void) PART_BEGIN(H5Lget_info_by_idx_invalid_lapl) { - TESTING_2("H5Lget_info_by_idx2 with an invalid LAPL") + TESTING_2("H5Lget_info_by_idx2 with an invalid LAPL"); H5E_BEGIN_TRY { - err_ret = H5Lget_info_by_idx2(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &link_info, + err_ret = H5Lget_info_by_idx2(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &link_info, H5I_INVALID_HID); } H5E_END_TRY; @@ -17178,16 +17054,16 @@ test_get_link_info_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -17220,24 +17096,22 @@ test_get_link_name(void) hid_t subgroup_id = H5I_INVALID_HID; hid_t gcpl_id = H5I_INVALID_HID; char link_name_buf[GET_LINK_NAME_TEST_BUF_SIZE]; -#ifndef NO_EXTERNAL_LINKS - char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; -#endif + char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; - TESTING_MULTIPART("link name retrieval") + TESTING_MULTIPART("link name retrieval"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, basic, more, soft, hard, external link, or " - "creation order aren't supported with this connector\n"); + HDprintf(" API functions for basic file, group, link, soft link, hard link, or external link " + "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -17257,10 +17131,12 @@ test_get_link_name(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set link creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set link creation order tracking\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, GET_LINK_NAME_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id, @@ -17276,7 +17152,13 @@ test_get_link_name(void) { PART_BEGIN(H5Lget_name_by_idx_hard_crt_order_increasing) { - TESTING_2("H5Lget_name_by_idx on hard link by creation order in increasing order") + TESTING_2("H5Lget_name_by_idx on hard link by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_name_by_idx_hard_crt_order_increasing); + } /* Create group to hold some links */ if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME, H5P_DEFAULT, @@ -17438,7 +17320,13 @@ test_get_link_name(void) PART_BEGIN(H5Lget_name_by_idx_hard_crt_order_decreasing) { - TESTING_2("H5Lget_name_by_idx on hard link by creation order in decreasing order") + TESTING_2("H5Lget_name_by_idx on hard link by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_name_by_idx_hard_crt_order_decreasing); + } /* Create group to hold some links */ if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME2, H5P_DEFAULT, @@ -17600,7 +17488,7 @@ test_get_link_name(void) PART_BEGIN(H5Lget_name_by_idx_hard_name_order_increasing) { - TESTING_2("H5Lget_name_by_idx on hard link by alphabetical order in increasing order") + TESTING_2("H5Lget_name_by_idx on hard link by alphabetical order in increasing order"); /* Create group to hold some links */ if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME3, H5P_DEFAULT, @@ -17762,8 +17650,8 @@ test_get_link_name(void) PART_BEGIN(H5Lget_name_by_idx_hard_name_order_decreasing) { - TESTING_2("H5Lget_name_by_idx on hard link by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lget_name_by_idx on hard link by alphabetical order in decreasing order"); + /* Create group to hold some links */ if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME4, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -17912,10 +17800,6 @@ test_get_link_name(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_name_by_idx_hard_name_order_decreasing); -#endif } PART_END(H5Lget_name_by_idx_hard_name_order_decreasing); @@ -17928,7 +17812,13 @@ test_get_link_name(void) PART_BEGIN(H5Lget_name_by_idx_soft_crt_order_increasing) { - TESTING_2("H5Lget_name_by_idx on soft link by creation order in increasing order") + TESTING_2("H5Lget_name_by_idx on soft link by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_name_by_idx_soft_crt_order_increasing); + } /* Create group to hold some links */ if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME, H5P_DEFAULT, @@ -18090,7 +17980,13 @@ test_get_link_name(void) PART_BEGIN(H5Lget_name_by_idx_soft_crt_order_decreasing) { - TESTING_2("H5Lget_name_by_idx on soft link by creation order in decreasing order") + TESTING_2("H5Lget_name_by_idx on soft link by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_name_by_idx_soft_crt_order_decreasing); + } /* Create group to hold some links */ if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME2, H5P_DEFAULT, @@ -18252,7 +18148,7 @@ test_get_link_name(void) PART_BEGIN(H5Lget_name_by_idx_soft_name_order_increasing) { - TESTING_2("H5Lget_name_by_idx on soft link by alphabetical order in increasing order") + TESTING_2("H5Lget_name_by_idx on soft link by alphabetical order in increasing order"); /* Create group to hold some links */ if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME3, H5P_DEFAULT, @@ -18414,8 +18310,8 @@ test_get_link_name(void) PART_BEGIN(H5Lget_name_by_idx_soft_name_order_decreasing) { - TESTING_2("H5Lget_name_by_idx on soft link by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lget_name_by_idx on soft link by alphabetical order in decreasing order"); + /* Create group to hold some links */ if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME4, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) { @@ -18564,10 +18460,6 @@ test_get_link_name(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_name_by_idx_soft_name_order_decreasing); -#endif } PART_END(H5Lget_name_by_idx_soft_name_order_decreasing); @@ -18580,8 +18472,14 @@ test_get_link_name(void) PART_BEGIN(H5Lget_name_by_idx_external_crt_order_increasing) { - TESTING_2("H5Lget_name_by_idx on external link by creation order in increasing order") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lget_name_by_idx on external link by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_name_by_idx_external_crt_order_increasing); + } + /* Create file for external link to reference */ HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -18748,10 +18646,6 @@ test_get_link_name(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_name_by_idx_external_crt_order_increasing); -#endif } PART_END(H5Lget_name_by_idx_external_crt_order_increasing); @@ -18766,8 +18660,14 @@ test_get_link_name(void) PART_BEGIN(H5Lget_name_by_idx_external_crt_order_decreasing) { - TESTING_2("H5Lget_name_by_idx on external link by creation order in decreasing order") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lget_name_by_idx on external link by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lget_name_by_idx_external_crt_order_decreasing); + } + /* Create file for external link to reference */ HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -18934,10 +18834,6 @@ test_get_link_name(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_name_by_idx_external_crt_order_decreasing); -#endif } PART_END(H5Lget_name_by_idx_external_crt_order_decreasing); @@ -18952,8 +18848,8 @@ test_get_link_name(void) PART_BEGIN(H5Lget_name_by_idx_external_name_order_increasing) { - TESTING_2("H5Lget_name_by_idx on external link by alphabetical order in increasing order") -#ifndef NO_EXTERNAL_LINKS + TESTING_2("H5Lget_name_by_idx on external link by alphabetical order in increasing order"); + /* Create file for external link to reference */ HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -19120,10 +19016,6 @@ test_get_link_name(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_name_by_idx_external_name_order_increasing); -#endif } PART_END(H5Lget_name_by_idx_external_name_order_increasing); @@ -19138,8 +19030,8 @@ test_get_link_name(void) PART_BEGIN(H5Lget_name_by_idx_external_name_order_decreasing) { - TESTING_2("H5Lget_name_by_idx on external link by alphabetical order in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lget_name_by_idx on external link by alphabetical order in decreasing order"); + /* Create file for external link to reference */ HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -19306,10 +19198,6 @@ test_get_link_name(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lget_name_by_idx_external_name_order_decreasing); -#endif } PART_END(H5Lget_name_by_idx_external_name_order_decreasing); @@ -19324,7 +19212,7 @@ test_get_link_name(void) PART_BEGIN(H5Lget_name_by_idx_ud_crt_order_increasing) { - TESTING_2("H5Lget_name_by_idx on user-defined link by creation order in increasing order") + TESTING_2("H5Lget_name_by_idx on user-defined link by creation order in increasing order"); /* TODO */ @@ -19342,7 +19230,7 @@ test_get_link_name(void) PART_BEGIN(H5Lget_name_by_idx_ud_crt_order_decreasing) { - TESTING_2("H5Lget_name_by_idx on user-defined link by creation order in decreasing order") + TESTING_2("H5Lget_name_by_idx on user-defined link by creation order in decreasing order"); /* TODO */ @@ -19360,7 +19248,7 @@ test_get_link_name(void) PART_BEGIN(H5Lget_name_by_idx_ud_name_order_increasing) { - TESTING_2("H5Lget_name_by_idx on user-defined link by alphabetical order in increasing order") + TESTING_2("H5Lget_name_by_idx on user-defined link by alphabetical order in increasing order"); /* TODO */ @@ -19378,7 +19266,7 @@ test_get_link_name(void) PART_BEGIN(H5Lget_name_by_idx_ud_name_order_decreasing) { - TESTING_2("H5Lget_name_by_idx on user-defined link by alphabetical order in decreasing order") + TESTING_2("H5Lget_name_by_idx on user-defined link by alphabetical order in decreasing order"); /* TODO */ @@ -19396,16 +19284,16 @@ test_get_link_name(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -19437,8 +19325,9 @@ test_get_link_name_invalid_params(void) htri_t link_exists; size_t link_name_buf_size = 0; hid_t file_id = H5I_INVALID_HID; - hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; - char *link_name_buf = NULL; + hid_t container_group = H5I_INVALID_HID; + hid_t group_id = H5I_INVALID_HID; + char *link_name_buf = NULL; TESTING_MULTIPART("link name retrieval with invalid parameters"); @@ -19446,14 +19335,14 @@ test_get_link_name_invalid_params(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, basic, more, soft, hard, external link, or " - "creation order aren't supported with this connector\n"); + HDprintf(" API functions for basic file, group, link, soft link, hard link, or external link " + "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -19505,7 +19394,7 @@ test_get_link_name_invalid_params(void) link_name_buf_size = (size_t)ret; if (NULL == (link_name_buf = (char *)HDmalloc(link_name_buf_size + 1))) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -19513,7 +19402,7 @@ test_get_link_name_invalid_params(void) { PART_BEGIN(H5Lget_name_by_idx_invalid_loc_id) { - TESTING_2("H5Lget_name_by_idx with an invalid location ID") + TESTING_2("H5Lget_name_by_idx with an invalid location ID"); H5E_BEGIN_TRY { @@ -19534,7 +19423,7 @@ test_get_link_name_invalid_params(void) PART_BEGIN(H5Lget_name_by_idx_invalid_grp_name) { - TESTING_2("H5Lget_name_by_idx with an invalid group name") + TESTING_2("H5Lget_name_by_idx with an invalid group name"); H5E_BEGIN_TRY { @@ -19568,7 +19457,7 @@ test_get_link_name_invalid_params(void) PART_BEGIN(H5Lget_name_by_idx_invalid_index_type) { - TESTING_2("H5Lget_name_by_idx with an invalid index type") + TESTING_2("H5Lget_name_by_idx with an invalid index type"); H5E_BEGIN_TRY { @@ -19602,7 +19491,7 @@ test_get_link_name_invalid_params(void) PART_BEGIN(H5Lget_name_by_idx_invalid_iter_order) { - TESTING_2("H5Lget_name_by_idx with an invalid iteration ordering") + TESTING_2("H5Lget_name_by_idx with an invalid iteration ordering"); H5E_BEGIN_TRY { @@ -19637,7 +19526,7 @@ test_get_link_name_invalid_params(void) PART_BEGIN(H5Lget_name_by_idx_invalid_lapl) { - TESTING_2("H5Lget_name_by_idx with an invalid LAPL") + TESTING_2("H5Lget_name_by_idx with an invalid LAPL"); H5E_BEGIN_TRY { @@ -19658,7 +19547,7 @@ test_get_link_name_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (link_name_buf) { HDfree(link_name_buf); @@ -19666,11 +19555,11 @@ test_get_link_name_invalid_params(void) } if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -19709,19 +19598,19 @@ test_link_iterate_hard_links(void) hid_t dset_dtype = H5I_INVALID_HID; hid_t dset_dspace = H5I_INVALID_HID; - TESTING_MULTIPART("link iteration (only hard links)") + TESTING_MULTIPART("link iteration (only hard links)"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, dataset, link, or iterate aren't supported with " - "this connector\n"); + HDprintf(" API functions for basic file, group, dataset, link, or iterate aren't " + "supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -19741,10 +19630,12 @@ test_link_iterate_hard_links(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set link creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set link creation order tracking\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, LINK_ITER_HARD_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id, @@ -19755,11 +19646,11 @@ test_link_iterate_hard_links(void) } if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dspace = generate_random_dataspace(LINK_ITER_HARD_LINKS_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; for (i = 0; i < LINK_ITER_HARD_LINKS_TEST_NUM_LINKS; i++) { char dset_name[LINK_ITER_HARD_LINKS_TEST_BUF_SIZE]; @@ -19808,7 +19699,7 @@ test_link_iterate_hard_links(void) PART_BEGIN(H5Literate_link_name_increasing) { - TESTING_2("H5Literate2 by link name in increasing order") + TESTING_2("H5Literate2 by link name in increasing order"); i = 0; @@ -19831,8 +19722,8 @@ test_link_iterate_hard_links(void) PART_BEGIN(H5Literate_link_name_decreasing) { - TESTING_2("H5Literate2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Literate2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_ITER_HARD_LINKS_TEST_NUM_LINKS; @@ -19849,16 +19740,18 @@ test_link_iterate_hard_links(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Literate_link_name_decreasing); -#endif } PART_END(H5Literate_link_name_decreasing); PART_BEGIN(H5Literate_link_creation_increasing) { - TESTING_2("H5Literate2 by creation order in increasing order") + TESTING_2("H5Literate2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_ITER_HARD_LINKS_TEST_NUM_LINKS; @@ -19882,7 +19775,13 @@ test_link_iterate_hard_links(void) PART_BEGIN(H5Literate_link_creation_decreasing) { - TESTING_2("H5Literate2 by creation order in decreasing order") + TESTING_2("H5Literate2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_ITER_HARD_LINKS_TEST_NUM_LINKS; @@ -19906,7 +19805,7 @@ test_link_iterate_hard_links(void) PART_BEGIN(H5Literate_by_name_link_name_increasing) { - TESTING_2("H5Literate_by_name2 by link name in increasing order") + TESTING_2("H5Literate_by_name2 by link name in increasing order"); /* Reset the counter to the appropriate value for the next test */ i = 0; @@ -19931,8 +19830,8 @@ test_link_iterate_hard_links(void) PART_BEGIN(H5Literate_by_name_link_name_decreasing) { - TESTING_2("H5Literate_by_name2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Literate_by_name2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_ITER_HARD_LINKS_TEST_NUM_LINKS; @@ -19951,16 +19850,18 @@ test_link_iterate_hard_links(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Literate_by_name_link_name_decreasing); -#endif } PART_END(H5Literate_by_name_link_name_decreasing); PART_BEGIN(H5Literate_by_name_creation_increasing) { - TESTING_2("H5Literate_by_name2 by creation order in increasing order") + TESTING_2("H5Literate_by_name2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_by_name_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_ITER_HARD_LINKS_TEST_NUM_LINKS; @@ -19985,7 +19886,13 @@ test_link_iterate_hard_links(void) PART_BEGIN(H5Literate_by_name_creation_decreasing) { - TESTING_2("H5Literate_by_name2 by creation order in decreasing order") + TESTING_2("H5Literate_by_name2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_by_name_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_ITER_HARD_LINKS_TEST_NUM_LINKS; @@ -20010,20 +19917,20 @@ test_link_iterate_hard_links(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(dset_dspace) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -20061,19 +19968,19 @@ test_link_iterate_soft_links(void) hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t gcpl_id = H5I_INVALID_HID; - TESTING_MULTIPART("link iteration (only soft links)") + TESTING_MULTIPART("link iteration (only soft links)"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, link, or iterate aren't supported with this " - "connector\n"); + HDprintf(" API functions for basic file, group, link, soft link, or iterate " + "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -20093,10 +20000,12 @@ test_link_iterate_soft_links(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set link creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set link creation order tracking\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, LINK_ITER_SOFT_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id, @@ -20150,7 +20059,7 @@ test_link_iterate_soft_links(void) PART_BEGIN(H5Literate_link_name_increasing) { - TESTING_2("H5Literate2 by link name in increasing order") + TESTING_2("H5Literate2 by link name in increasing order"); i = 0; @@ -20173,8 +20082,8 @@ test_link_iterate_soft_links(void) PART_BEGIN(H5Literate_link_name_decreasing) { - TESTING_2("H5Literate2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Literate2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS; @@ -20191,16 +20100,18 @@ test_link_iterate_soft_links(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Literate_link_name_decreasing); -#endif } PART_END(H5Literate_link_name_decreasing); PART_BEGIN(H5Literate_link_creation_increasing) { - TESTING_2("H5Literate2 by creation order in increasing order") + TESTING_2("H5Literate2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS; @@ -20224,7 +20135,13 @@ test_link_iterate_soft_links(void) PART_BEGIN(H5Literate_link_creation_decreasing) { - TESTING_2("H5Literate2 by creation order in decreasing order") + TESTING_2("H5Literate2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS; @@ -20248,7 +20165,7 @@ test_link_iterate_soft_links(void) PART_BEGIN(H5Literate_by_name_link_name_increasing) { - TESTING_2("H5Literate_by_name2 by link name in increasing order") + TESTING_2("H5Literate_by_name2 by link name in increasing order"); /* Reset the counter to the appropriate value for the next test */ i = 0; @@ -20273,8 +20190,8 @@ test_link_iterate_soft_links(void) PART_BEGIN(H5Literate_by_name_link_name_decreasing) { - TESTING_2("H5Literate_by_name2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Literate_by_name2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS; @@ -20293,16 +20210,18 @@ test_link_iterate_soft_links(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Literate_by_name_link_name_decreasing); -#endif } PART_END(H5Literate_by_name_link_name_decreasing); PART_BEGIN(H5Literate_by_name_creation_increasing) { - TESTING_2("H5Literate_by_name2 by creation order in increasing order") + TESTING_2("H5Literate_by_name2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_by_name_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS; @@ -20327,7 +20246,13 @@ test_link_iterate_soft_links(void) PART_BEGIN(H5Literate_by_name_creation_decreasing) { - TESTING_2("H5Literate_by_name2 by creation order in decreasing order") + TESTING_2("H5Literate_by_name2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_by_name_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS; @@ -20352,16 +20277,16 @@ test_link_iterate_soft_links(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -20390,29 +20315,26 @@ test_link_iterate_soft_links(void) static int test_link_iterate_external_links(void) { -#ifndef NO_EXTERNAL_LINKS size_t i; htri_t link_exists; hid_t file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t gcpl_id = H5I_INVALID_HID; char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; -#endif - TESTING_MULTIPART("link iteration (only external links)") + TESTING_MULTIPART("link iteration (only external links)"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, link, or iterate aren't supported with this " - "connector\n"); + HDprintf(" API functions for basic file, group, link, external link, or iterate " + "aren't supported with this connector\n"); return 0; } -#ifndef NO_EXTERNAL_LINKS - TESTING_2("test setup") + TESTING_2("test setup"); HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -20423,7 +20345,7 @@ test_link_iterate_external_links(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -20443,10 +20365,12 @@ test_link_iterate_external_links(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set link creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set link creation order tracking\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, LINK_ITER_EXT_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id, @@ -20496,7 +20420,7 @@ test_link_iterate_external_links(void) PART_BEGIN(H5Literate_link_name_increasing) { - TESTING_2("H5Literate2 by link name in increasing order") + TESTING_2("H5Literate2 by link name in increasing order"); i = 0; @@ -20520,8 +20444,8 @@ test_link_iterate_external_links(void) PART_BEGIN(H5Literate_link_name_decreasing) { - TESTING_2("H5Literate2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Literate2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_ITER_EXT_LINKS_TEST_NUM_LINKS; @@ -20539,16 +20463,18 @@ test_link_iterate_external_links(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Literate_link_name_decreasing); -#endif } PART_END(H5Literate_link_name_decreasing); PART_BEGIN(H5Literate_link_creation_increasing) { - TESTING_2("H5Literate2 by creation order in increasing order") + TESTING_2("H5Literate2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_ITER_EXT_LINKS_TEST_NUM_LINKS; @@ -20572,7 +20498,13 @@ test_link_iterate_external_links(void) PART_BEGIN(H5Literate_link_creation_decreasing) { - TESTING_2("H5Literate2 by creation order in decreasing order") + TESTING_2("H5Literate2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_ITER_EXT_LINKS_TEST_NUM_LINKS; @@ -20596,7 +20528,7 @@ test_link_iterate_external_links(void) PART_BEGIN(H5Literate_by_name_link_name_increasing) { - TESTING_2("H5Literate_by_name2 by link name in increasing order") + TESTING_2("H5Literate_by_name2 by link name in increasing order"); /* Reset the counter to the appropriate value for the next test */ i = 0; @@ -20621,8 +20553,8 @@ test_link_iterate_external_links(void) PART_BEGIN(H5Literate_by_name_link_name_decreasing) { - TESTING_2("H5Literate_by_name2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Literate_by_name2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_ITER_EXT_LINKS_TEST_NUM_LINKS; @@ -20641,16 +20573,18 @@ test_link_iterate_external_links(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Literate_by_name_link_name_decreasing); -#endif } PART_END(H5Literate_by_name_link_name_decreasing); PART_BEGIN(H5Literate_by_name_creation_increasing) { - TESTING_2("H5Literate_by_name2 by creation order in increasing order") + TESTING_2("H5Literate_by_name2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_by_name_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_ITER_EXT_LINKS_TEST_NUM_LINKS; @@ -20676,7 +20610,13 @@ test_link_iterate_external_links(void) PART_BEGIN(H5Literate_by_name_creation_decreasing) { - TESTING_2("H5Literate_by_name2 by creation order in decreasing order") + TESTING_2("H5Literate_by_name2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_by_name_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_ITER_EXT_LINKS_TEST_NUM_LINKS; @@ -20702,16 +20642,16 @@ test_link_iterate_external_links(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -20728,10 +20668,6 @@ test_link_iterate_external_links(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -20747,7 +20683,7 @@ test_link_iterate_external_links(void) static int test_link_iterate_ud_links(void) { - TESTING("link iteration (only user-defined links)") + TESTING("link iteration (only user-defined links)"); SKIPPED(); @@ -20771,7 +20707,6 @@ test_link_iterate_ud_links(void) static int test_link_iterate_mixed_links(void) { -#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS) hsize_t saved_idx; size_t i; htri_t link_exists; @@ -20783,23 +20718,20 @@ test_link_iterate_mixed_links(void) hid_t dset_dspace = H5I_INVALID_HID; int halted; char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; -#endif - TESTING_MULTIPART("link iteration (mixed link types)") + TESTING_MULTIPART("link iteration (mixed link types)"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, link, soft or external link, iterate, or creation " - "order aren't supported with this connector\n"); + HDprintf(" API functions for basic file, group, link, soft link, external link, or iterate " + "aren't supported with this connector\n"); return 0; } -#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS) - TESTING_2("test setup") + TESTING_2("test setup"); HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -20810,7 +20742,7 @@ test_link_iterate_mixed_links(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -20830,10 +20762,12 @@ test_link_iterate_mixed_links(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set link creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set link creation order tracking\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, LINK_ITER_MIXED_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, @@ -20844,11 +20778,11 @@ test_link_iterate_mixed_links(void) } if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dspace = generate_random_dataspace(LINK_ITER_MIXED_LINKS_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME, dset_dtype, dset_dspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -20922,7 +20856,7 @@ test_link_iterate_mixed_links(void) PART_BEGIN(H5Literate_link_name_increasing) { - TESTING_2("H5Literate2 by link name in increasing order") + TESTING_2("H5Literate2 by link name in increasing order"); i = 0; @@ -20945,8 +20879,8 @@ test_link_iterate_mixed_links(void) PART_BEGIN(H5Literate_link_name_decreasing) { - TESTING_2("H5Literate2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Literate2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS; @@ -20963,16 +20897,18 @@ test_link_iterate_mixed_links(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Literate_link_name_decreasing); -#endif } PART_END(H5Literate_link_name_decreasing); PART_BEGIN(H5Literate_link_creation_increasing) { - TESTING_2("H5Literate2 by creation order in increasing order") + TESTING_2("H5Literate2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS; @@ -20996,7 +20932,13 @@ test_link_iterate_mixed_links(void) PART_BEGIN(H5Literate_link_creation_decreasing) { - TESTING_2("H5Literate2 by creation order in decreasing order") + TESTING_2("H5Literate2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS; @@ -21020,7 +20962,7 @@ test_link_iterate_mixed_links(void) PART_BEGIN(H5Literate_by_name_link_name_increasing) { - TESTING_2("H5Literate_by_name2 by link name in increasing order") + TESTING_2("H5Literate_by_name2 by link name in increasing order"); i = 0; @@ -21044,8 +20986,8 @@ test_link_iterate_mixed_links(void) PART_BEGIN(H5Literate_by_name_link_name_decreasing) { - TESTING_2("H5Literate_by_name2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Literate_by_name2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS; @@ -21064,16 +21006,18 @@ test_link_iterate_mixed_links(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Literate_by_name_link_name_decreasing); -#endif } PART_END(H5Literate_by_name_link_name_decreasing); PART_BEGIN(H5Literate_by_name_creation_increasing) { - TESTING_2("H5Literate_by_name2 by creation order in increasing order") + TESTING_2("H5Literate_by_name2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_by_name_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS; @@ -21098,7 +21042,13 @@ test_link_iterate_mixed_links(void) PART_BEGIN(H5Literate_by_name_creation_decreasing) { - TESTING_2("H5Literate_by_name2 by creation order in decreasing order") + TESTING_2("H5Literate_by_name2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_by_name_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS; @@ -21123,7 +21073,13 @@ test_link_iterate_mixed_links(void) PART_BEGIN(H5Literate_index_saving_increasing) { - TESTING_2("H5Literate2 index-saving capabilities in increasing order") + TESTING_2("H5Literate2 index-saving capabilities in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_index_saving_increasing); + } /* Test the H5Literate2 index-saving capabilities */ saved_idx = 0; @@ -21152,10 +21108,16 @@ test_link_iterate_mixed_links(void) PASSED(); } PART_END(H5Literate_index_saving_increasing); - +#ifdef BROKEN PART_BEGIN(H5Literate_index_saving_decreasing) { - TESTING_2("H5Literate2 index-saving capabilities in decreasing order") + TESTING_2("H5Literate2 index-saving capabilities in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_index_saving_decreasing); + } saved_idx = LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS - 1; halted = 0; @@ -21183,25 +21145,26 @@ test_link_iterate_mixed_links(void) PASSED(); } PART_END(H5Literate_index_saving_decreasing); +#endif } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(dset_dspace) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -21221,10 +21184,6 @@ test_link_iterate_mixed_links(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -21238,11 +21197,11 @@ test_link_iterate_invalid_params(void) size_t i; htri_t link_exists; hid_t file_id = H5I_INVALID_HID; - hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; - hid_t gcpl_id = H5I_INVALID_HID; - hid_t dset_id = H5I_INVALID_HID; - hid_t dset_dtype = H5I_INVALID_HID; - hid_t dset_dspace = H5I_INVALID_HID; + hid_t container_group = H5I_INVALID_HID; + hid_t group_id = H5I_INVALID_HID; + hid_t dset_id = H5I_INVALID_HID; + hid_t dset_dtype = H5I_INVALID_HID; + hid_t dset_dspace = H5I_INVALID_HID; char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; TESTING_MULTIPART("link iteration with invalid parameters"); @@ -21251,15 +21210,15 @@ test_link_iterate_invalid_params(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { SKIPPED(); - HDprintf(" API functions for basic file, group, dataset, link, soft or external link, iterate, or " - "creation order aren't supported with this connector\n"); + HDprintf( + " API functions for basic file, group, dataset, link, soft link, external link, or iterate " + "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -21270,7 +21229,7 @@ test_link_iterate_invalid_params(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -21284,20 +21243,8 @@ test_link_iterate_invalid_params(void) goto error; } - if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) { - H5_FAILED(); - HDprintf(" couldn't create GCPL for link creation order tracking\n"); - goto error; - } - - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set link creation order tracking\n"); - goto error; - } - if ((group_id = H5Gcreate2(container_group, LINK_ITER_INVALID_PARAMS_TEST_SUBGROUP_NAME, H5P_DEFAULT, - gcpl_id, H5P_DEFAULT)) < 0) { + H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); HDprintf(" couldn't create container subgroup '%s'\n", LINK_ITER_INVALID_PARAMS_TEST_SUBGROUP_NAME); @@ -21305,11 +21252,11 @@ test_link_iterate_invalid_params(void) } if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dspace = generate_random_dataspace(LINK_ITER_INVALID_PARAMS_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, LINK_ITER_INVALID_PARAMS_TEST_HARD_LINK_NAME, dset_dtype, dset_dspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -21326,14 +21273,12 @@ test_link_iterate_invalid_params(void) HDprintf(" couldn't create soft link '%s'\n", LINK_ITER_INVALID_PARAMS_TEST_SOFT_LINK_NAME); goto error; } -#ifndef NO_EXTERNAL_LINKS if (H5Lcreate_external(ext_link_filename, "/", group_id, LINK_ITER_INVALID_PARAMS_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); HDprintf(" couldn't create external link '%s'\n", LINK_ITER_INVALID_PARAMS_TEST_EXT_LINK_NAME); goto error; } -#endif /* Verify the links have been created */ if ((link_exists = H5Lexists(group_id, LINK_ITER_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -21360,7 +21305,6 @@ test_link_iterate_invalid_params(void) HDprintf(" second link did not exist\n"); goto error; } -#ifndef NO_EXTERNAL_LINKS if ((link_exists = H5Lexists(group_id, LINK_ITER_INVALID_PARAMS_TEST_EXT_LINK_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); HDprintf(" couldn't determine if link '%s' exists\n", LINK_ITER_INVALID_PARAMS_TEST_EXT_LINK_NAME); @@ -21372,7 +21316,6 @@ test_link_iterate_invalid_params(void) HDprintf(" third link did not exist\n"); goto error; } -#endif PASSED(); @@ -21382,7 +21325,7 @@ test_link_iterate_invalid_params(void) PART_BEGIN(H5Literate_invalid_grp_id) { - TESTING_2("H5Literate2 with an invalid group ID") + TESTING_2("H5Literate2 with an invalid group ID"); H5E_BEGIN_TRY { @@ -21403,7 +21346,7 @@ test_link_iterate_invalid_params(void) PART_BEGIN(H5Literate_invalid_index_type) { - TESTING_2("H5Literate2 with an invalid index type") + TESTING_2("H5Literate2 with an invalid index type"); H5E_BEGIN_TRY { @@ -21437,7 +21380,7 @@ test_link_iterate_invalid_params(void) PART_BEGIN(H5Literate_invalid_iter_order) { - TESTING_2("H5Literate2 with an invalid iteration ordering") + TESTING_2("H5Literate2 with an invalid iteration ordering"); H5E_BEGIN_TRY { @@ -21471,7 +21414,7 @@ test_link_iterate_invalid_params(void) PART_BEGIN(H5Literate_by_name_invalid_loc_id) { - TESTING_2("H5Literate_by_name2 with an invalid location ID") + TESTING_2("H5Literate_by_name2 with an invalid location ID"); H5E_BEGIN_TRY { @@ -21493,7 +21436,7 @@ test_link_iterate_invalid_params(void) PART_BEGIN(H5Literate_by_name_invalid_grp_name) { - TESTING_2("H5Literate_by_name2 with an invalid group name") + TESTING_2("H5Literate_by_name2 with an invalid group name"); H5E_BEGIN_TRY { @@ -21527,7 +21470,7 @@ test_link_iterate_invalid_params(void) PART_BEGIN(H5Literate_by_name_invalid_index_type) { - TESTING_2("H5Literate_by_name2 with an invalid index type") + TESTING_2("H5Literate_by_name2 with an invalid index type"); H5E_BEGIN_TRY { @@ -21563,7 +21506,7 @@ test_link_iterate_invalid_params(void) PART_BEGIN(H5Literate_by_name_invalid_iter_order) { - TESTING_2("H5Literate_by_name2 with an invalid iteration ordering") + TESTING_2("H5Literate_by_name2 with an invalid iteration ordering"); H5E_BEGIN_TRY { @@ -21600,7 +21543,7 @@ test_link_iterate_invalid_params(void) PART_BEGIN(H5Literate_by_name_invalid_lapl) { - TESTING_2("H5Literate_by_name2 with an invalid LAPL") + TESTING_2("H5Literate_by_name2 with an invalid LAPL"); H5E_BEGIN_TRY { @@ -21622,22 +21565,20 @@ test_link_iterate_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(dset_dspace) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR - if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -21649,7 +21590,6 @@ test_link_iterate_invalid_params(void) H5Sclose(dset_dspace); H5Tclose(dset_dtype); H5Dclose(dset_id); - H5Pclose(gcpl_id); H5Gclose(group_id); H5Gclose(container_group); H5Fclose(file_id); @@ -21674,14 +21614,14 @@ test_link_iterate_0_links(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, link iterate, or creation order aren't supported " + HDprintf(" API functions for basic file, group, or iterate aren't supported " "with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -21701,10 +21641,12 @@ test_link_iterate_0_links(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { - H5_FAILED(); - HDprintf(" couldn't set link creation order tracking\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) { + H5_FAILED(); + HDprintf(" couldn't set link creation order tracking\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id, @@ -21720,7 +21662,7 @@ test_link_iterate_0_links(void) { PART_BEGIN(H5Literate_0_links_name_increasing) { - TESTING_2("H5Literate2 by link name in increasing order") + TESTING_2("H5Literate2 by link name in increasing order"); /* Test basic link iteration capability using both index types and both index orders */ if (H5Literate2(group_id, H5_INDEX_NAME, H5_ITER_INC, NULL, link_iter_0_links_cb, NULL) < 0) { @@ -21735,8 +21677,8 @@ test_link_iterate_0_links(void) PART_BEGIN(H5Literate_0_links_name_decreasing) { - TESTING_2("H5Literate2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Literate2 by link name in decreasing order"); + if (H5Literate2(group_id, H5_INDEX_NAME, H5_ITER_DEC, NULL, link_iter_0_links_cb, NULL) < 0) { H5_FAILED(); HDprintf(" H5Literate2 by index type name in decreasing order failed\n"); @@ -21744,16 +21686,18 @@ test_link_iterate_0_links(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Literate_0_links_name_decreasing); -#endif } PART_END(H5Literate_0_links_name_decreasing); PART_BEGIN(H5Literate_0_links_creation_increasing) { - TESTING_2("H5Literate2 by creation order in increasing order") + TESTING_2("H5Literate2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_0_links_creation_increasing); + } if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, link_iter_0_links_cb, NULL) < 0) { @@ -21768,7 +21712,13 @@ test_link_iterate_0_links(void) PART_BEGIN(H5Literate_0_links_creation_decreasing) { - TESTING_2("H5Literate2 by creation order in decreasing order") + TESTING_2("H5Literate2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_0_links_creation_decreasing); + } if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, link_iter_0_links_cb, NULL) < 0) { @@ -21783,7 +21733,7 @@ test_link_iterate_0_links(void) PART_BEGIN(H5Literate_by_name_0_links_name_increasing) { - TESTING_2("H5Literate_by_name2 by link name in increasing order") + TESTING_2("H5Literate_by_name2 by link name in increasing order"); if (H5Literate_by_name2( file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME, H5_INDEX_NAME, @@ -21799,8 +21749,8 @@ test_link_iterate_0_links(void) PART_BEGIN(H5Literate_by_name_0_links_name_decreasing) { - TESTING_2("H5Literate_by_name2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Literate_by_name2 by link name in decreasing order"); + if (H5Literate_by_name2( file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME, H5_INDEX_NAME, H5_ITER_DEC, NULL, link_iter_0_links_cb, NULL, H5P_DEFAULT) < 0) { @@ -21810,16 +21760,18 @@ test_link_iterate_0_links(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Literate_by_name_0_links_name_decreasing); -#endif } PART_END(H5Literate_by_name_0_links_name_decreasing); PART_BEGIN(H5Literate_by_name_0_links_creation_increasing) { - TESTING_2("H5Literate_by_name2 by creation order in increasing order") + TESTING_2("H5Literate_by_name2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_by_name_0_links_creation_increasing); + } if (H5Literate_by_name2( file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME, @@ -21835,7 +21787,13 @@ test_link_iterate_0_links(void) PART_BEGIN(H5Literate_by_name_0_links_creation_decreasing) { - TESTING_2("H5Literate_by_name2 by creation order in decreasing order") + TESTING_2("H5Literate_by_name2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_by_name_0_links_creation_decreasing); + } if (H5Literate_by_name2( file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME, @@ -21851,16 +21809,16 @@ test_link_iterate_0_links(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -21900,19 +21858,18 @@ test_link_visit_hard_links_no_cycles(void) hid_t dset_dtype = H5I_INVALID_HID; hid_t dset_dspace = H5I_INVALID_HID; - TESTING_MULTIPART("link visiting without cycles (only hard links)") + TESTING_MULTIPART("link visiting without cycles (only hard links)"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, link iterate, or creation order aren't supported " - "with this connector\n"); + HDprintf(" API functions for basic file, group, dataset, or link iterate aren't " + "supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -21932,10 +21889,12 @@ test_link_visit_hard_links_no_cycles(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { - H5_FAILED(); - HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { + H5_FAILED(); + HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME, @@ -21947,11 +21906,11 @@ test_link_visit_hard_links_no_cycles(void) } if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dspace = generate_random_dataspace(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; for (i = 0; i < LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS; i++) { size_t j; @@ -22023,7 +21982,7 @@ test_link_visit_hard_links_no_cycles(void) PART_BEGIN(H5Lvisit_no_cycles_link_name_increasing) { - TESTING_2("H5Lvisit2 by link name in increasing order") + TESTING_2("H5Lvisit2 by link name in increasing order"); i = 0; @@ -22045,8 +22004,8 @@ test_link_visit_hard_links_no_cycles(void) PART_BEGIN(H5Lvisit_no_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22063,16 +22022,18 @@ test_link_visit_hard_links_no_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_no_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_no_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_no_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit2 by creation order in increasing order") + TESTING_2("H5Lvisit2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_no_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22096,7 +22057,13 @@ test_link_visit_hard_links_no_cycles(void) PART_BEGIN(H5Lvisit_no_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit2 by creation order in decreasing order") + TESTING_2("H5Lvisit2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_no_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22120,7 +22087,7 @@ test_link_visit_hard_links_no_cycles(void) PART_BEGIN(H5Lvisit_by_name_no_cycles_link_name_increasing) { - TESTING_2("H5Lvisit_by_name2 by link name in increasing order") + TESTING_2("H5Lvisit_by_name2 by link name in increasing order"); /* Reset the counter to the appropriate value for the next test */ i = 0; @@ -22145,8 +22112,8 @@ test_link_visit_hard_links_no_cycles(void) PART_BEGIN(H5Lvisit_by_name_no_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit_by_name2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit_by_name2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22165,16 +22132,18 @@ test_link_visit_hard_links_no_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_by_name_no_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_by_name_no_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_by_name_no_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in increasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22200,7 +22169,13 @@ test_link_visit_hard_links_no_cycles(void) PART_BEGIN(H5Lvisit_by_name_no_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22226,20 +22201,20 @@ test_link_visit_hard_links_no_cycles(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(dset_dspace) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -22280,19 +22255,19 @@ test_link_visit_soft_links_no_cycles(void) hid_t subgroup_id = H5I_INVALID_HID; hid_t gcpl_id = H5I_INVALID_HID; - TESTING_MULTIPART("link visiting without cycles (only soft links)") + TESTING_MULTIPART("link visiting without cycles (only soft links)"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, link, soft link, iterate, or creation order " + HDprintf(" API functions for basic file, group, link, soft link, or iterate " "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -22312,10 +22287,12 @@ test_link_visit_soft_links_no_cycles(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { - H5_FAILED(); - HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { + H5_FAILED(); + HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME, @@ -22393,7 +22370,7 @@ test_link_visit_soft_links_no_cycles(void) PART_BEGIN(H5Lvisit_no_cycles_link_name_increasing) { - TESTING_2("H5Lvisit2 by link name in increasing order") + TESTING_2("H5Lvisit2 by link name in increasing order"); i = 0; @@ -22415,8 +22392,8 @@ test_link_visit_soft_links_no_cycles(void) PART_BEGIN(H5Lvisit_no_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22433,16 +22410,18 @@ test_link_visit_soft_links_no_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_no_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_no_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_no_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit2 by creation order in increasing order") + TESTING_2("H5Lvisit2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_no_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22466,7 +22445,13 @@ test_link_visit_soft_links_no_cycles(void) PART_BEGIN(H5Lvisit_no_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit2 by creation order in decreasing order") + TESTING_2("H5Lvisit2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_no_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22490,7 +22475,7 @@ test_link_visit_soft_links_no_cycles(void) PART_BEGIN(H5Lvisit_by_name_no_cycles_link_name_increasing) { - TESTING_2("H5Lvisit_by_name2 by link name in increasing order") + TESTING_2("H5Lvisit_by_name2 by link name in increasing order"); i = 0; @@ -22514,8 +22499,8 @@ test_link_visit_soft_links_no_cycles(void) PART_BEGIN(H5Lvisit_by_name_no_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit_by_name2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit_by_name2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22534,16 +22519,18 @@ test_link_visit_soft_links_no_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_by_name_no_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_by_name_no_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_by_name_no_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in increasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22569,7 +22556,13 @@ test_link_visit_soft_links_no_cycles(void) PART_BEGIN(H5Lvisit_by_name_no_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22595,16 +22588,16 @@ test_link_visit_soft_links_no_cycles(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -22635,7 +22628,6 @@ test_link_visit_soft_links_no_cycles(void) static int test_link_visit_external_links_no_cycles(void) { -#ifndef NO_EXTERNAL_LINKS size_t i; htri_t link_exists; hid_t file_id = H5I_INVALID_HID; @@ -22643,22 +22635,20 @@ test_link_visit_external_links_no_cycles(void) hid_t subgroup_id = H5I_INVALID_HID; hid_t gcpl_id = H5I_INVALID_HID; char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; -#endif - TESTING_MULTIPART("link visiting without cycles (only external links)") + TESTING_MULTIPART("link visiting without cycles (only external links)"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, link, external link, iterate, or creation order " + HDprintf(" API functions for basic file, group, link, external link, or iterate " "aren't supported with this connector\n"); return 0; } -#ifndef NO_EXTERNAL_LINKS - TESTING_2("test setup") + TESTING_2("test setup"); HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -22669,7 +22659,7 @@ test_link_visit_external_links_no_cycles(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -22689,10 +22679,12 @@ test_link_visit_external_links_no_cycles(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { - H5_FAILED(); - HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { + H5_FAILED(); + HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME, H5P_DEFAULT, @@ -22767,7 +22759,7 @@ test_link_visit_external_links_no_cycles(void) PART_BEGIN(H5Lvisit_no_cycles_link_name_increasing) { - TESTING_2("H5Lvisit2 by link name in increasing order") + TESTING_2("H5Lvisit2 by link name in increasing order"); i = 0; @@ -22790,8 +22782,8 @@ test_link_visit_external_links_no_cycles(void) PART_BEGIN(H5Lvisit_no_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22809,16 +22801,18 @@ test_link_visit_external_links_no_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_no_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_no_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_no_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit2 by creation order in increasing order") + TESTING_2("H5Lvisit2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_no_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22842,7 +22836,13 @@ test_link_visit_external_links_no_cycles(void) PART_BEGIN(H5Lvisit_no_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit2 by creation order in decreasing order") + TESTING_2("H5Lvisit2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_no_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22866,7 +22866,7 @@ test_link_visit_external_links_no_cycles(void) PART_BEGIN(H5Lvisit_by_name_no_cycles_link_name_increasing) { - TESTING_2("H5Lvisit_by_name2 by link name in increasing order") + TESTING_2("H5Lvisit_by_name2 by link name in increasing order"); /* Reset the counter to the appropriate value for the next test */ i = 0; @@ -22892,8 +22892,8 @@ test_link_visit_external_links_no_cycles(void) PART_BEGIN(H5Lvisit_by_name_no_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit_by_name2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit_by_name2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22913,16 +22913,18 @@ test_link_visit_external_links_no_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_by_name_no_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_by_name_no_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_by_name_no_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in increasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22948,7 +22950,13 @@ test_link_visit_external_links_no_cycles(void) PART_BEGIN(H5Lvisit_by_name_no_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -22974,16 +22982,16 @@ test_link_visit_external_links_no_cycles(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -23001,10 +23009,6 @@ test_link_visit_external_links_no_cycles(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -23021,7 +23025,7 @@ test_link_visit_external_links_no_cycles(void) static int test_link_visit_ud_links_no_cycles(void) { - TESTING("link visiting without cycles (only user-defined links)") + TESTING("link visiting without cycles (only user-defined links)"); SKIPPED(); @@ -23046,7 +23050,6 @@ test_link_visit_ud_links_no_cycles(void) static int test_link_visit_mixed_links_no_cycles(void) { -#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS) size_t i; htri_t link_exists; hid_t file_id = H5I_INVALID_HID; @@ -23057,24 +23060,23 @@ test_link_visit_mixed_links_no_cycles(void) hid_t dset_dtype = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID; char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; -#endif - TESTING_MULTIPART("link visiting without cycles (mixed link types)") + TESTING_MULTIPART("link visiting without cycles (mixed link types)"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, link, hard, soft, external link, iterate, or " - "creation order aren't supported with this connector\n"); + HDprintf( + " API functions for basic file, group, link, hard link, soft link, external link, or iterate " + "aren't supported with this connector\n"); return 0; } -#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS) - TESTING_2("test setup") + TESTING_2("test setup"); HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -23085,7 +23087,7 @@ test_link_visit_mixed_links_no_cycles(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -23105,10 +23107,12 @@ test_link_visit_mixed_links_no_cycles(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { - H5_FAILED(); - HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { + H5_FAILED(); + HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME, @@ -23136,11 +23140,11 @@ test_link_visit_mixed_links_no_cycles(void) } if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = generate_random_dataspace(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(subgroup1, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -23149,7 +23153,7 @@ test_link_visit_mixed_links_no_cycles(void) } if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(subgroup2, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -23158,7 +23162,7 @@ test_link_visit_mixed_links_no_cycles(void) } if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(subgroup1, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME, subgroup1, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1, H5P_DEFAULT, H5P_DEFAULT) < 0) { @@ -23260,7 +23264,7 @@ test_link_visit_mixed_links_no_cycles(void) PART_BEGIN(H5Lvisit_no_cycles_link_name_increasing) { - TESTING_2("H5Lvisit2 by link name in increasing order") + TESTING_2("H5Lvisit2 by link name in increasing order"); i = 0; @@ -23283,8 +23287,8 @@ test_link_visit_mixed_links_no_cycles(void) PART_BEGIN(H5Lvisit_no_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS; @@ -23302,16 +23306,18 @@ test_link_visit_mixed_links_no_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_no_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_no_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_no_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit2 by creation order in increasing order") + TESTING_2("H5Lvisit2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_no_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS; @@ -23335,7 +23341,13 @@ test_link_visit_mixed_links_no_cycles(void) PART_BEGIN(H5Lvisit_no_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit2 by creation order in decreasing order") + TESTING_2("H5Lvisit2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_no_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS; @@ -23359,7 +23371,7 @@ test_link_visit_mixed_links_no_cycles(void) PART_BEGIN(H5Lvisit_by_name_no_cycles_link_name_increasing) { - TESTING_2("H5Lvisit_by_name2 by link name in increasing order") + TESTING_2("H5Lvisit_by_name2 by link name in increasing order"); i = 0; @@ -23383,8 +23395,8 @@ test_link_visit_mixed_links_no_cycles(void) PART_BEGIN(H5Lvisit_by_name_no_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit_by_name2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit_by_name2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS; @@ -23403,16 +23415,18 @@ test_link_visit_mixed_links_no_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_by_name_no_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_by_name_no_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_by_name_no_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in increasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS; @@ -23438,7 +23452,13 @@ test_link_visit_mixed_links_no_cycles(void) PART_BEGIN(H5Lvisit_by_name_no_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_no_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS; @@ -23464,24 +23484,24 @@ test_link_visit_mixed_links_no_cycles(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(subgroup1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(subgroup2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -23503,10 +23523,6 @@ test_link_visit_mixed_links_no_cycles(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -23526,19 +23542,19 @@ test_link_visit_hard_links_cycles(void) hid_t subgroup_id = H5I_INVALID_HID; hid_t gcpl_id = H5I_INVALID_HID; - TESTING_MULTIPART("link visiting with cycles (only hard links)") + TESTING_MULTIPART("link visiting with cycles (only hard links)"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, link, hard link, iterate, or creation order " + HDprintf(" API functions for basic file, group, link, hard link, or iterate " "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -23558,10 +23574,12 @@ test_link_visit_hard_links_cycles(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { - H5_FAILED(); - HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { + H5_FAILED(); + HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, LINK_VISIT_HARD_LINKS_CYCLE_TEST_SUBGROUP_NAME, H5P_DEFAULT, @@ -23635,7 +23653,7 @@ test_link_visit_hard_links_cycles(void) PART_BEGIN(H5Lvisit_cycles_link_name_increasing) { - TESTING_2("H5Lvisit2 by link name in increasing order") + TESTING_2("H5Lvisit2 by link name in increasing order"); i = 0; @@ -23657,8 +23675,8 @@ test_link_visit_hard_links_cycles(void) PART_BEGIN(H5Lvisit_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -23675,16 +23693,18 @@ test_link_visit_hard_links_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit2 by creation order in increasing order") + TESTING_2("H5Lvisit2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -23708,7 +23728,13 @@ test_link_visit_hard_links_cycles(void) PART_BEGIN(H5Lvisit_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit2 by creation order in decreasing order") + TESTING_2("H5Lvisit2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -23732,7 +23758,7 @@ test_link_visit_hard_links_cycles(void) PART_BEGIN(H5Lvisit_by_name_cycles_link_name_increasing) { - TESTING_2("H5Lvisit_by_name2 by link name in increasing order") + TESTING_2("H5Lvisit_by_name2 by link name in increasing order"); i = 0; @@ -23756,8 +23782,8 @@ test_link_visit_hard_links_cycles(void) PART_BEGIN(H5Lvisit_by_name_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit_by_name2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit_by_name2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -23776,16 +23802,18 @@ test_link_visit_hard_links_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_by_name_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_by_name_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_by_name_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in increasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -23810,7 +23838,13 @@ test_link_visit_hard_links_cycles(void) PART_BEGIN(H5Lvisit_by_name_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -23835,16 +23869,16 @@ test_link_visit_hard_links_cycles(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -23881,19 +23915,19 @@ test_link_visit_soft_links_cycles(void) hid_t subgroup_id = H5I_INVALID_HID; hid_t gcpl_id = H5I_INVALID_HID; - TESTING_MULTIPART("link visiting with cycles (only soft links)") + TESTING_MULTIPART("link visiting with cycles (only soft links)"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, link, soft link, iterate, or creation order " + HDprintf(" API functions for basic file, group, link, soft link, or iterate " "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -23913,10 +23947,12 @@ test_link_visit_soft_links_cycles(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { - H5_FAILED(); - HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { + H5_FAILED(); + HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_SUBGROUP_NAME, H5P_DEFAULT, @@ -23995,7 +24031,7 @@ test_link_visit_soft_links_cycles(void) PART_BEGIN(H5Lvisit_cycles_link_name_increasing) { - TESTING_2("H5Lvisit2 by link name in increasing order") + TESTING_2("H5Lvisit2 by link name in increasing order"); i = 0; @@ -24017,8 +24053,8 @@ test_link_visit_soft_links_cycles(void) PART_BEGIN(H5Lvisit_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -24035,16 +24071,18 @@ test_link_visit_soft_links_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit2 by creation order in increasing order") + TESTING_2("H5Lvisit2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -24068,7 +24106,13 @@ test_link_visit_soft_links_cycles(void) PART_BEGIN(H5Lvisit_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit2 by creation order in decreasing order") + TESTING_2("H5Lvisit2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -24092,7 +24136,7 @@ test_link_visit_soft_links_cycles(void) PART_BEGIN(H5Lvisit_by_name_cycles_link_name_increasing) { - TESTING_2("H5Lvisit_by_name2 by link name in increasing order") + TESTING_2("H5Lvisit_by_name2 by link name in increasing order"); /* Reset the counter to the appropriate value for the next test */ i = 0; @@ -24117,8 +24161,8 @@ test_link_visit_soft_links_cycles(void) PART_BEGIN(H5Lvisit_by_name_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit_by_name2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit_by_name2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -24137,16 +24181,18 @@ test_link_visit_soft_links_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_by_name_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_by_name_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_by_name_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in increasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -24171,7 +24217,13 @@ test_link_visit_soft_links_cycles(void) PART_BEGIN(H5Lvisit_by_name_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -24196,16 +24248,16 @@ test_link_visit_soft_links_cycles(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -24236,29 +24288,26 @@ test_link_visit_soft_links_cycles(void) static int test_link_visit_external_links_cycles(void) { -#ifndef NO_EXTERNAL_LINKS size_t i; htri_t link_exists; hid_t file_id = H5I_INVALID_HID; hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID; hid_t subgroup_id = H5I_INVALID_HID; hid_t gcpl_id = H5I_INVALID_HID; -#endif - TESTING_MULTIPART("link visiting with cycles (only external links)") + TESTING_MULTIPART("link visiting with cycles (only external links)"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, link, external link, iterate, or creation order " + HDprintf(" API functions for basic file, group, link, external link, or iterate " "aren't supported with this connector\n"); return 0; } -#ifndef NO_EXTERNAL_LINKS - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -24278,10 +24327,12 @@ test_link_visit_external_links_cycles(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { - H5_FAILED(); - HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { + H5_FAILED(); + HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, LINK_VISIT_EXT_LINKS_CYCLE_TEST_SUBGROUP_NAME, H5P_DEFAULT, @@ -24361,7 +24412,7 @@ test_link_visit_external_links_cycles(void) PART_BEGIN(H5Lvisit_cycles_link_name_increasing) { - TESTING_2("H5Lvisit2 by link name in increasing order") + TESTING_2("H5Lvisit2 by link name in increasing order"); i = 0; @@ -24384,8 +24435,8 @@ test_link_visit_external_links_cycles(void) PART_BEGIN(H5Lvisit_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -24403,16 +24454,18 @@ test_link_visit_external_links_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit2 by creation order in increasing order") + TESTING_2("H5Lvisit2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -24436,7 +24489,13 @@ test_link_visit_external_links_cycles(void) PART_BEGIN(H5Lvisit_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit2 by creation order in decreasing order") + TESTING_2("H5Lvisit2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -24460,7 +24519,7 @@ test_link_visit_external_links_cycles(void) PART_BEGIN(H5Lvisit_by_name_cycles_link_name_increasing) { - TESTING_2("H5Lvisit_by_name2 by link name in increasing order") + TESTING_2("H5Lvisit_by_name2 by link name in increasing order"); /* Reset the counter to the appropriate value for the next test */ i = 0; @@ -24485,8 +24544,8 @@ test_link_visit_external_links_cycles(void) PART_BEGIN(H5Lvisit_by_name_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit_by_name2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit_by_name2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -24505,16 +24564,18 @@ test_link_visit_external_links_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_by_name_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_by_name_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_by_name_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in increasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -24540,7 +24601,13 @@ test_link_visit_external_links_cycles(void) PART_BEGIN(H5Lvisit_by_name_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST; @@ -24566,16 +24633,16 @@ test_link_visit_external_links_cycles(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -24593,10 +24660,6 @@ test_link_visit_external_links_cycles(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -24613,7 +24676,7 @@ test_link_visit_external_links_cycles(void) static int test_link_visit_ud_links_cycles(void) { - TESTING("link visiting with cycles (only user-defined links)") + TESTING("link visiting with cycles (only user-defined links)"); SKIPPED(); @@ -24633,7 +24696,6 @@ test_link_visit_ud_links_cycles(void) static int test_link_visit_mixed_links_cycles(void) { -#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS) htri_t link_exists; size_t i; hid_t file_id = H5I_INVALID_HID; @@ -24641,23 +24703,22 @@ test_link_visit_mixed_links_cycles(void) hid_t subgroup1 = H5I_INVALID_HID, subgroup2 = H5I_INVALID_HID; hid_t gcpl_id = H5I_INVALID_HID; char ext_link_filename[VOL_TEST_FILENAME_MAX_LENGTH]; -#endif - TESTING_MULTIPART("link visiting with cycles (mixed link types)") + TESTING_MULTIPART("link visiting with cycles (mixed link types)"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, link, hard, soft, external link, iterate, or " - "creation order aren't supported with this connector\n"); + HDprintf( + " API functions for basic file, group, link, hard link, soft link, external link, iterate, " + "or user defined link aren't supported with this connector\n"); return 0; } -#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS) - TESTING_2("test setup") + TESTING_2("test setup"); HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -24668,7 +24729,7 @@ test_link_visit_mixed_links_cycles(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -24688,10 +24749,12 @@ test_link_visit_mixed_links_cycles(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { - H5_FAILED(); - HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { + H5_FAILED(); + HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME, H5P_DEFAULT, @@ -24814,7 +24877,7 @@ test_link_visit_mixed_links_cycles(void) PART_BEGIN(H5Lvisit_cycles_link_name_increasing) { - TESTING_2("H5Lvisit2 by link name in increasing order") + TESTING_2("H5Lvisit2 by link name in increasing order"); i = 0; @@ -24836,8 +24899,8 @@ test_link_visit_mixed_links_cycles(void) PART_BEGIN(H5Lvisit_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS; @@ -24854,16 +24917,18 @@ test_link_visit_mixed_links_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit2 by creation order in increasing order") + TESTING_2("H5Lvisit2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS; @@ -24887,7 +24952,13 @@ test_link_visit_mixed_links_cycles(void) PART_BEGIN(H5Lvisit_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit2 by creation order in decreasing order") + TESTING_2("H5Lvisit2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS; @@ -24911,7 +24982,7 @@ test_link_visit_mixed_links_cycles(void) PART_BEGIN(H5Lvisit_by_name_cycles_link_name_increasing) { - TESTING_2("H5Lvisit_by_name2 by link name in increasing order") + TESTING_2("H5Lvisit_by_name2 by link name in increasing order"); i = 0; @@ -24935,8 +25006,8 @@ test_link_visit_mixed_links_cycles(void) PART_BEGIN(H5Lvisit_by_name_cycles_link_name_decreasing) { - TESTING_2("H5Lvisit_by_name2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit_by_name2 by link name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS; @@ -24955,16 +25026,18 @@ test_link_visit_mixed_links_cycles(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_by_name_cycles_link_name_decreasing); -#endif } PART_END(H5Lvisit_by_name_cycles_link_name_decreasing); PART_BEGIN(H5Lvisit_by_name_cycles_link_creation_increasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in increasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS; @@ -24989,7 +25062,13 @@ test_link_visit_mixed_links_cycles(void) PART_BEGIN(H5Lvisit_by_name_cycles_link_creation_decreasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_cycles_link_creation_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS; @@ -25014,20 +25093,20 @@ test_link_visit_mixed_links_cycles(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(subgroup1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(subgroup2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -25046,10 +25125,6 @@ test_link_visit_mixed_links_cycles(void) H5E_END_TRY; return 1; -#else - SKIPPED(); - return 0; -#endif } /* @@ -25074,15 +25149,14 @@ test_link_visit_invalid_params(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, dataset, link, external link, iterate, or " - "creation order aren't supported with this connector\n"); + HDprintf(" API functions for basic file, group, dataset, link, external link, or iterate " + "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); HDsnprintf(ext_link_filename, VOL_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); @@ -25093,7 +25167,7 @@ test_link_visit_invalid_params(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -25130,11 +25204,11 @@ test_link_visit_invalid_params(void) } if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = generate_random_dataspace(LINK_VISIT_INVALID_PARAMS_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(subgroup1, LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -25143,7 +25217,7 @@ test_link_visit_invalid_params(void) } if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(subgroup2, LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -25152,7 +25226,7 @@ test_link_visit_invalid_params(void) } if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_hard(subgroup1, LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME, subgroup1, LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME1, H5P_DEFAULT, H5P_DEFAULT) < 0) { @@ -25167,14 +25241,12 @@ test_link_visit_invalid_params(void) HDprintf(" couldn't create soft link '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME2); goto error; } -#ifndef NO_EXTERNAL_LINKS if (H5Lcreate_external(ext_link_filename, "/", subgroup2, LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME3, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); HDprintf(" couldn't create external link '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME3); goto error; } -#endif if (H5Lcreate_hard(subgroup2, LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME, subgroup2, LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME4, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); @@ -25208,7 +25280,7 @@ test_link_visit_invalid_params(void) HDprintf(" link 2 did not exist\n"); goto error; } -#ifndef NO_EXTERNAL_LINKS + if ((link_exists = H5Lexists(subgroup2, LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME3, H5P_DEFAULT)) < 0) { H5_FAILED(); HDprintf(" couldn't determine if third link '%s' exists\n", @@ -25221,7 +25293,7 @@ test_link_visit_invalid_params(void) HDprintf(" link 3 did not exist\n"); goto error; } -#endif + if ((link_exists = H5Lexists(subgroup2, LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME4, H5P_DEFAULT)) < 0) { H5_FAILED(); HDprintf(" couldn't determine if fourth link '%s' exists\n", @@ -25241,7 +25313,7 @@ test_link_visit_invalid_params(void) { PART_BEGIN(H5Lvisit_invalid_grp_id) { - TESTING_2("H5Lvisit2 with an invalid group ID") + TESTING_2("H5Lvisit2 with an invalid group ID"); H5E_BEGIN_TRY { @@ -25262,7 +25334,7 @@ test_link_visit_invalid_params(void) PART_BEGIN(H5Lvisit_invalid_index_type) { - TESTING_2("H5Lvisit2 with an invalid index type") + TESTING_2("H5Lvisit2 with an invalid index type"); H5E_BEGIN_TRY { @@ -25295,7 +25367,7 @@ test_link_visit_invalid_params(void) PART_BEGIN(H5Lvisit_invalid_iter_order) { - TESTING_2("H5Lvisit2 with an invalid iteration ordering") + TESTING_2("H5Lvisit2 with an invalid iteration ordering"); H5E_BEGIN_TRY { @@ -25328,7 +25400,7 @@ test_link_visit_invalid_params(void) PART_BEGIN(H5Lvisit_by_name_invalid_loc_id) { - TESTING_2("H5Lvisit_by_name2 with an invalid location ID") + TESTING_2("H5Lvisit_by_name2 with an invalid location ID"); H5E_BEGIN_TRY { @@ -25351,7 +25423,7 @@ test_link_visit_invalid_params(void) PART_BEGIN(H5Lvisit_by_name_invalid_grp_name) { - TESTING_2("H5Lvisit_by_name2 with an invalid group name") + TESTING_2("H5Lvisit_by_name2 with an invalid group name"); H5E_BEGIN_TRY { @@ -25385,7 +25457,7 @@ test_link_visit_invalid_params(void) PART_BEGIN(H5Lvisit_by_name_invalid_index_type) { - TESTING_2("H5Lvisit_by_name2 with an invalid index type") + TESTING_2("H5Lvisit_by_name2 with an invalid index type"); H5E_BEGIN_TRY { @@ -25421,7 +25493,7 @@ test_link_visit_invalid_params(void) PART_BEGIN(H5Lvisit_by_name_invalid_iter_order) { - TESTING_2("H5Lvisit_by_name2 with an invalid iteration ordering") + TESTING_2("H5Lvisit_by_name2 with an invalid iteration ordering"); H5E_BEGIN_TRY { @@ -25458,7 +25530,7 @@ test_link_visit_invalid_params(void) PART_BEGIN(H5Lvisit_by_name_invalid_lapl) { - TESTING_2("H5Lvisit_by_name2 with an invalid LAPL") + TESTING_2("H5Lvisit_by_name2 with an invalid LAPL"); H5E_BEGIN_TRY { @@ -25480,22 +25552,22 @@ test_link_visit_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(subgroup1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(subgroup2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -25534,14 +25606,14 @@ test_link_visit_0_links(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) { SKIPPED(); - HDprintf(" API functions for basic file, group, link iterate, or creation order aren't supported " + HDprintf(" API functions for basic file, group, or link iterate aren't supported " "with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -25561,10 +25633,12 @@ test_link_visit_0_links(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { - H5_FAILED(); - HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { + H5_FAILED(); + HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, LINK_VISIT_0_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id, @@ -25580,7 +25654,7 @@ test_link_visit_0_links(void) { PART_BEGIN(H5Lvisit_0_links_name_increasing) { - TESTING_2("H5Lvisit2 by link name in increasing order") + TESTING_2("H5Lvisit2 by link name in increasing order"); if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_INC, link_visit_0_links_cb, NULL) < 0) { H5_FAILED(); @@ -25594,8 +25668,8 @@ test_link_visit_0_links(void) PART_BEGIN(H5Lvisit_0_links_name_decreasing) { - TESTING_2("H5Lvisit2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit2 by link name in decreasing order"); + if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_DEC, link_visit_0_links_cb, NULL) < 0) { H5_FAILED(); HDprintf(" H5Lvisit2 by index type name in decreasing order failed\n"); @@ -25603,16 +25677,18 @@ test_link_visit_0_links(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_0_links_name_decreasing); -#endif } PART_END(H5Lvisit_0_links_name_decreasing); PART_BEGIN(H5Lvisit_0_links_creation_increasing) { - TESTING_2("H5Lvisit2 by creation order in increasing order") + TESTING_2("H5Lvisit2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_0_links_creation_increasing); + } if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_0_links_cb, NULL) < 0) { H5_FAILED(); @@ -25626,7 +25702,13 @@ test_link_visit_0_links(void) PART_BEGIN(H5Lvisit_0_links_creation_decreasing) { - TESTING_2("H5Lvisit2 by creation order in decreasing order") + TESTING_2("H5Lvisit2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_0_links_creation_decreasing); + } if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_0_links_cb, NULL) < 0) { H5_FAILED(); @@ -25640,7 +25722,7 @@ test_link_visit_0_links(void) PART_BEGIN(H5Lvisit_by_name_0_links_name_increasing) { - TESTING_2("H5Lvisit_by_name2 by link name in increasing order") + TESTING_2("H5Lvisit_by_name2 by link name in increasing order"); if (H5Lvisit_by_name2(file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_0_LINKS_TEST_SUBGROUP_NAME, H5_INDEX_NAME, H5_ITER_INC, link_visit_0_links_cb, NULL, H5P_DEFAULT) < 0) { @@ -25655,8 +25737,8 @@ test_link_visit_0_links(void) PART_BEGIN(H5Lvisit_by_name_0_links_name_decreasing) { - TESTING_2("H5Lvisit_by_name2 by link name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Lvisit_by_name2 by link name in decreasing order"); + if (H5Lvisit_by_name2(file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_0_LINKS_TEST_SUBGROUP_NAME, H5_INDEX_NAME, H5_ITER_DEC, link_visit_0_links_cb, NULL, H5P_DEFAULT) < 0) { H5_FAILED(); @@ -25665,16 +25747,18 @@ test_link_visit_0_links(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Lvisit_by_name_0_links_name_decreasing); -#endif } PART_END(H5Lvisit_by_name_0_links_name_decreasing); PART_BEGIN(H5Lvisit_by_name_0_links_creation_increasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in increasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_0_links_creation_increasing); + } if (H5Lvisit_by_name2(file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_0_LINKS_TEST_SUBGROUP_NAME, H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_0_links_cb, NULL, @@ -25690,7 +25774,13 @@ test_link_visit_0_links(void) PART_BEGIN(H5Lvisit_by_name_0_links_creation_decreasing) { - TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order") + TESTING_2("H5Lvisit_by_name2 by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Lvisit_by_name_0_links_creation_decreasing); + } if (H5Lvisit_by_name2(file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_0_LINKS_TEST_SUBGROUP_NAME, H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_0_links_cb, NULL, @@ -25706,16 +25796,16 @@ test_link_visit_0_links(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -25859,7 +25949,6 @@ link_iter_soft_links_cb(hid_t group_id, const char *name, const H5L_info2_t *inf * through all of the links in the test group and checks to make sure * their names and link classes match what is expected. */ -#ifndef NO_EXTERNAL_LINKS static herr_t link_iter_external_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data) { @@ -25869,6 +25958,13 @@ link_iter_external_links_cb(hid_t group_id, const char *name, const H5L_info2_t char expected_link_name[LINK_ITER_EXT_LINKS_TEST_BUF_SIZE]; herr_t ret_val = H5_ITER_CONT; + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { + SKIPPED(); + HDprintf(" API functions for external links aren't supported with this " + "connector\n"); + return 1; + } + UNUSED(group_id); UNUSED(op_data); @@ -25914,16 +26010,12 @@ link_iter_external_links_cb(hid_t group_id, const char *name, const H5L_info2_t return ret_val; } -#endif -#ifndef NO_USER_DEFINED_LINKS -static herr_t link_iter_ud_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data); -#endif + /* * Link iteration callback for the mixed link types test which iterates * through all of the links in the test group and checks to make sure * their names and link classes match what is expected. */ -#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS) static herr_t link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data) { @@ -25931,6 +26023,13 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in size_t counter_val = *((size_t *)op_data); herr_t ret_val = 0; + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) { + SKIPPED(); + HDprintf(" API functions for external or user-defined link aren't supported with this " + "connector\n"); + return 1; + } + UNUSED(group_id); if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME, @@ -25973,7 +26072,6 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in return ret_val; } -#endif /* * Link iteration callback for the H5Literate(_by_name)2 invalid @@ -26009,12 +26107,18 @@ link_iter_0_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, * Link iteration callback to test that the index-saving behavior of H5Literate2 * works correctly. */ -#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS) static herr_t link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data) { int *broken = (int *)op_data; + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) { + SKIPPED(); + HDprintf(" API functions for external or user-defined link aren't supported with this " + "connector\n"); + return 1; + } + UNUSED(group_id); if (broken && !*broken && @@ -26058,7 +26162,6 @@ link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *inf error: return -1; } -#endif /* * Link visiting callback for the hard links + no cycles test which @@ -26281,7 +26384,6 @@ link_visit_soft_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_i * iterates recursively through all of the links in the test group and * checks to make sure their names and link classes match what is expected. */ -#ifndef NO_EXTERNAL_LINKS static herr_t link_visit_external_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data) @@ -26295,6 +26397,13 @@ link_visit_external_links_no_cycles_cb(hid_t group_id, const char *name, const H char expected_link_name[LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE]; herr_t ret_val = H5_ITER_CONT; + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { + SKIPPED(); + HDprintf(" API functions for external links aren't supported with this " + "connector\n"); + return 1; + } + UNUSED(group_id); UNUSED(op_data); @@ -26390,17 +26499,12 @@ link_visit_external_links_no_cycles_cb(hid_t group_id, const char *name, const H return ret_val; } -#endif -#ifndef NO_USER_DEFINED_LINKS -static herr_t link_visit_ud_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, - void *op_data); -#endif + /* * Link visiting callback for the mixed link types + no cycles test which * iterates recursively through all of the links in the test group and * checks to make sure their names and link classes match what is expected. */ -#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS) static herr_t link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data) { @@ -26408,6 +26512,13 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_ size_t counter_val = *((size_t *)op_data); herr_t ret_val = 0; + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) { + SKIPPED(); + HDprintf(" API functions for external or user-defined link aren't supported with this " + "connector\n"); + return 1; + } + UNUSED(group_id); UNUSED(op_data); @@ -26539,7 +26650,6 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_ return ret_val; } -#endif /* * Link visiting callback for the hard links + cycles test which @@ -26762,7 +26872,6 @@ link_visit_soft_links_cycles_cb(hid_t group_id, const char *name, const H5L_info * iterates recursively through all of the links in the test group and * checks to make sure their names and link classes match what is expected. */ -#ifndef NO_EXTERNAL_LINKS static herr_t link_visit_external_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data) { @@ -26775,6 +26884,13 @@ link_visit_external_links_cycles_cb(hid_t group_id, const char *name, const H5L_ char expected_link_name[LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE]; herr_t ret_val = H5_ITER_CONT; + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { + SKIPPED(); + HDprintf(" API functions for external links aren't supported with this " + "connector\n"); + return 1; + } + UNUSED(group_id); UNUSED(op_data); @@ -26870,17 +26986,12 @@ link_visit_external_links_cycles_cb(hid_t group_id, const char *name, const H5L_ return ret_val; } -#endif -#ifndef NO_USER_DEFINED_LINKS -static herr_t link_visit_ud_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, - void *op_data); -#endif + /* * Link visiting callback for the mixed link types + cycles test which * iterates recursively through all of the links in the test group and * checks to make sure their names and link classes match what is expected. */ -#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS) static herr_t link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data) { @@ -26888,6 +26999,13 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf size_t counter_val = *((size_t *)op_data); herr_t ret_val = 0; + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) { + SKIPPED(); + HDprintf(" API functions for external or user-defined link aren't supported with this " + "connector\n"); + return 1; + } + UNUSED(group_id); UNUSED(op_data); @@ -26987,7 +27105,6 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf return ret_val; } -#endif /* * Link visiting callback for the H5Lvisit(_by_name)2 invalid diff --git a/vol_misc_test.c b/vol_misc_test.c index 8ad3f19..d338d45 100644 --- a/vol_misc_test.c +++ b/vol_misc_test.c @@ -38,7 +38,7 @@ test_open_link_without_leading_slash(void) hid_t dset_dtype = H5I_INVALID_HID; hid_t space_id = H5I_INVALID_HID; - TESTING("opening a link without a leading slash") + TESTING("opening a link without a leading slash"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -63,10 +63,10 @@ test_open_link_without_leading_slash(void) if ((space_id = generate_random_dataspace(OPEN_LINK_WITHOUT_SLASH_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(container_group, OPEN_LINK_WITHOUT_SLASH_DSET_NAME, dset_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -76,13 +76,13 @@ test_open_link_without_leading_slash(void) } if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -104,13 +104,13 @@ test_open_link_without_leading_slash(void) } if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -142,7 +142,7 @@ test_object_creation_by_absolute_path(void) hid_t dtype_id = H5I_INVALID_HID; hid_t dset_dtype = H5I_INVALID_HID; - TESTING_MULTIPART("object creation by absolute path") + TESTING_MULTIPART("object creation by absolute path"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -154,7 +154,7 @@ test_object_creation_by_absolute_path(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -197,7 +197,7 @@ test_object_creation_by_absolute_path(void) { PART_BEGIN(H5Gcreate_using_absolute_path) { - TESTING_2("creation of group using absolute pathname") + TESTING_2("creation of group using absolute pathname"); /* Try to create a group under the container group by using an absolute pathname */ if ((sub_group_id = H5Gcreate2(file_id, @@ -232,7 +232,7 @@ test_object_creation_by_absolute_path(void) PART_BEGIN(H5Dcreate_using_absolute_path) { - TESTING_2("creation of dataset using absolute pathname") + TESTING_2("creation of dataset using absolute pathname"); /* Try to create a dataset nested at the end of this group chain by using an absolute pathname */ if ((fspace_id = generate_random_dataspace(OBJECT_CREATE_BY_ABSOLUTE_PATH_TEST_DSET_SPACE_RANK, @@ -282,7 +282,7 @@ test_object_creation_by_absolute_path(void) PART_BEGIN(H5Tcommit_using_absolute_path) { - TESTING_2("creation of committed datatype using absolute pathname") + TESTING_2("creation of committed datatype using absolute pathname"); /* Try to create a committed datatype in the same fashion as the preceding dataset */ if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) { @@ -325,24 +325,24 @@ test_object_creation_by_absolute_path(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dtype_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(sub_group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -378,7 +378,7 @@ test_absolute_vs_relative_path(void) dset_dtype4 = H5I_INVALID_HID, dset_dtype5 = H5I_INVALID_HID, dset_dtype6 = H5I_INVALID_HID; hid_t fspace_id = H5I_INVALID_HID; - TESTING_MULTIPART("absolute vs. relative pathnames") + TESTING_MULTIPART("absolute vs. relative pathnames"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -389,7 +389,7 @@ test_absolute_vs_relative_path(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -413,20 +413,20 @@ test_absolute_vs_relative_path(void) if ((fspace_id = generate_random_dataspace(ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype1 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype2 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype3 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype4 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype5 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype6 = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -434,7 +434,7 @@ test_absolute_vs_relative_path(void) { PART_BEGIN(H5Dcreate_absolute_from_root) { - TESTING_2("dataset creation by absolute path from root group") + TESTING_2("dataset creation by absolute path from root group"); /* Create a dataset by absolute path in the form "/group/dataset" starting from the root group */ if ((dset_id1 = H5Dcreate2(file_id, @@ -469,7 +469,7 @@ test_absolute_vs_relative_path(void) PART_BEGIN(H5Dcreate_absolute_from_nonroot) { - TESTING_2("dataset creation by absolute path from non-root group") + TESTING_2("dataset creation by absolute path from non-root group"); /* Create a dataset by absolute path in the form "/group/dataset" starting from the container * group */ @@ -505,7 +505,7 @@ test_absolute_vs_relative_path(void) PART_BEGIN(H5Dcreate_relative_from_root) { - TESTING_2("dataset creation by relative path from root group") + TESTING_2("dataset creation by relative path from root group"); /* TODO: */ @@ -516,7 +516,7 @@ test_absolute_vs_relative_path(void) PART_BEGIN(H5Dcreate_relative_from_nonroot) { - TESTING_2("dataset creation by relative path from non-root group") + TESTING_2("dataset creation by relative path from non-root group"); /* Create a dataset by relative path in the form "dataset" starting from the test container group */ @@ -576,7 +576,7 @@ test_absolute_vs_relative_path(void) PART_BEGIN(H5Dcreate_relative_leading_dot_root) { - TESTING_2("dataset creation by path with leading '.' from root group") + TESTING_2("dataset creation by path with leading '.' from root group"); /* Create a dataset by relative path in the form "./group/dataset" starting from the root group */ if ((dset_id3 = H5Dcreate2(file_id, @@ -611,7 +611,7 @@ test_absolute_vs_relative_path(void) PART_BEGIN(H5Dcreate_relative_leading_dot_nonroot) { - TESTING_2("dataset creation by path with leading '.' from non-root group") + TESTING_2("dataset creation by path with leading '.' from non-root group"); /* Create a dataset by relative path in the form "./dataset" starting from the container group */ if ((dset_id6 = H5Dcreate2(group_id, "./" ABSOLUTE_VS_RELATIVE_PATH_TEST_DSET6_NAME, dset_dtype6, @@ -644,40 +644,40 @@ test_absolute_vs_relative_path(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype4) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype5) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype6) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id4) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id5) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id6) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -734,7 +734,7 @@ test_dot_for_object_name(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -767,7 +767,7 @@ test_dot_for_object_name(void) { PART_BEGIN(H5Gcreate_dot_as_name) { - TESTING_2("invalid creation of group with '.' as name") + TESTING_2("invalid creation of group with '.' as name"); /* Create a group with the "." as the name. It should fail. */ H5E_BEGIN_TRY @@ -788,7 +788,7 @@ test_dot_for_object_name(void) PART_BEGIN(H5Dcreate_dot_as_name) { - TESTING_2("invalid creation of dataset with '.' as name") + TESTING_2("invalid creation of dataset with '.' as name"); /* Create a dataset with the "." as the name. It should fail. */ H5E_BEGIN_TRY @@ -810,7 +810,7 @@ test_dot_for_object_name(void) PART_BEGIN(H5Tcommit_dot_as_name) { - TESTING_2("invalid creation of committed datatype with '.' as name") + TESTING_2("invalid creation of committed datatype with '.' as name"); if ((dtype_id = H5Tcopy(H5T_NATIVE_INT)) < 0) { H5_FAILED(); @@ -843,16 +843,16 @@ test_dot_for_object_name(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(dspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(subgroup_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -886,7 +886,7 @@ test_dot_for_object_name(void) static int test_double_init_term(void) { - TESTING("double init/term correctness") + TESTING("double init/term correctness"); SKIPPED(); @@ -912,7 +912,7 @@ test_symbols_in_compound_field_name(void) hid_t type_pool[COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_NUM_SUBTYPES]; char member_names[COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_NUM_SUBTYPES][256]; - TESTING("usage of '{', '}' and '\\\"' symbols in compound field name") + TESTING("usage of '{', '}' and '\\\"' symbols in compound field name"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -977,11 +977,11 @@ test_symbols_in_compound_field_name(void) } if (H5Tpack(compound_type) < 0) - TEST_ERROR + TEST_ERROR; if ((fspace_id = generate_random_dataspace(COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_DSET_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_DSET_NAME, compound_type, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -991,7 +991,7 @@ test_symbols_in_compound_field_name(void) } if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_id = H5Dopen2(group_id, COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { @@ -1002,20 +1002,20 @@ test_symbols_in_compound_field_name(void) for (i = 0; i < COMPOUND_WITH_SYMBOLS_IN_MEMBER_NAMES_TEST_NUM_SUBTYPES; i++) if (type_pool[i] >= 0 && H5Tclose(type_pool[i]) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(compound_type) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); diff --git a/vol_object_test.c b/vol_object_test.c index 2b7e6df..855e5a7 100644 --- a/vol_object_test.c +++ b/vol_object_test.c @@ -119,7 +119,7 @@ test_open_object(void) TESTING_MULTIPART("object opening"); - TESTING_2("test setup") + TESTING_2("test setup"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -151,10 +151,10 @@ test_open_object(void) } if ((fspace_id = generate_random_dataspace(OBJECT_OPEN_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -162,7 +162,7 @@ test_open_object(void) { PART_BEGIN(H5Oopen_group) { - TESTING_2("H5Oopen on a group") + TESTING_2("H5Oopen on a group"); if ((group_id2 = H5Gcreate2(group_id, OBJECT_OPEN_TEST_GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -201,7 +201,7 @@ test_open_object(void) PART_BEGIN(H5Oopen_dset) { - TESTING_2("H5Oopen on a dataset") + TESTING_2("H5Oopen on a dataset"); if ((dset_id = H5Dcreate2(group_id, OBJECT_OPEN_TEST_DSET_NAME, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -240,7 +240,7 @@ test_open_object(void) PART_BEGIN(H5Oopen_dtype) { - TESTING_2("H5Oopen on a committed datatype") + TESTING_2("H5Oopen on a committed datatype"); if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) { H5_FAILED(); @@ -310,7 +310,7 @@ test_open_object(void) PART_BEGIN(H5Oopen_by_idx_group) { - TESTING_2("H5Oopen_by_idx on a group") + TESTING_2("H5Oopen_by_idx on a group"); if ((group_id2 = H5Oopen_by_idx(container_group, OBJECT_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME, H5_ITER_INC, 1, H5P_DEFAULT)) < 0) { @@ -325,7 +325,7 @@ test_open_object(void) PART_BEGIN(H5Oopen_by_idx_dset) { - TESTING_2("H5Oopen_by_idx on a dataset") + TESTING_2("H5Oopen_by_idx on a dataset"); if ((dset_id = H5Oopen_by_idx(container_group, OBJECT_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME, H5_ITER_INC, 0, H5P_DEFAULT)) < 0) { @@ -340,7 +340,7 @@ test_open_object(void) PART_BEGIN(H5Oopen_by_idx_dtype) { - TESTING_2("H5Oopen_by_idx on a committed datatype") + TESTING_2("H5Oopen_by_idx on a committed datatype"); if ((type_id = H5Oopen_by_idx(container_group, OBJECT_OPEN_TEST_GROUP_NAME, H5_INDEX_NAME, H5_ITER_INC, 2, H5P_DEFAULT)) < 0) { @@ -381,18 +381,18 @@ test_open_object(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -432,15 +432,14 @@ test_open_object_invalid_params(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_BASIC)) { SKIPPED(); - HDprintf(" API functions for basic file, group, object, or creation order aren't supported with " + HDprintf(" API functions for basic file, group, or object aren't supported with " "this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -460,10 +459,12 @@ test_open_object_invalid_params(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { - H5_FAILED(); - HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { + H5_FAILED(); + HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, OBJECT_OPEN_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT, @@ -482,7 +483,7 @@ test_open_object_invalid_params(void) } if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -490,7 +491,7 @@ test_open_object_invalid_params(void) { PART_BEGIN(H5Oopen_invalid_loc_id) { - TESTING_2("H5Oopen with an invalid location ID") + TESTING_2("H5Oopen with an invalid location ID"); H5E_BEGIN_TRY { @@ -511,7 +512,7 @@ test_open_object_invalid_params(void) PART_BEGIN(H5Oopen_invalid_obj_name) { - TESTING_2("H5Oopen with an invalid object name") + TESTING_2("H5Oopen with an invalid object name"); H5E_BEGIN_TRY { @@ -545,7 +546,7 @@ test_open_object_invalid_params(void) PART_BEGIN(H5Oopen_invalid_lapl) { - TESTING_2("H5Oopen with an invalid LAPL") + TESTING_2("H5Oopen with an invalid LAPL"); H5E_BEGIN_TRY { @@ -566,7 +567,7 @@ test_open_object_invalid_params(void) PART_BEGIN(H5Oopen_by_idx_invalid_loc_id) { - TESTING_2("H5Oopen_by_idx with an invalid location ID") + TESTING_2("H5Oopen_by_idx with an invalid location ID"); H5E_BEGIN_TRY { @@ -588,7 +589,7 @@ test_open_object_invalid_params(void) PART_BEGIN(H5Oopen_by_idx_invalid_grp_name) { - TESTING_2("H5Oopen_by_idx with an invalid group name") + TESTING_2("H5Oopen_by_idx with an invalid group name"); H5E_BEGIN_TRY { @@ -622,7 +623,7 @@ test_open_object_invalid_params(void) PART_BEGIN(H5Oopen_by_idx_invalid_index_type) { - TESTING_2("H5Oopen_by_idx with an invalid index type") + TESTING_2("H5Oopen_by_idx with an invalid index type"); H5E_BEGIN_TRY { @@ -658,7 +659,7 @@ test_open_object_invalid_params(void) PART_BEGIN(H5Oopen_by_idx_invalid_iter_order) { - TESTING_2("H5Oopen_by_idx with an invalid iteration order") + TESTING_2("H5Oopen_by_idx with an invalid iteration order"); H5E_BEGIN_TRY { @@ -695,7 +696,7 @@ test_open_object_invalid_params(void) PART_BEGIN(H5Oopen_by_idx_invalid_lapl) { - TESTING_2("H5Oopen_by_idx with an invalid LAPL") + TESTING_2("H5Oopen_by_idx with an invalid LAPL"); H5E_BEGIN_TRY { @@ -717,7 +718,7 @@ test_open_object_invalid_params(void) PART_BEGIN(H5Oopen_by_token_invalid_loc_id) { - TESTING_2("H5Oopen_by_token with an invalid location ID") + TESTING_2("H5Oopen_by_token with an invalid location ID"); H5E_BEGIN_TRY { @@ -738,7 +739,7 @@ test_open_object_invalid_params(void) PART_BEGIN(H5Oopen_by_token_invalid_token) { - TESTING_2("H5Oopen_by_token with an invalid token") + TESTING_2("H5Oopen_by_token with an invalid token"); H5E_BEGIN_TRY { @@ -759,16 +760,16 @@ test_open_object_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -816,7 +817,7 @@ test_object_exists(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -838,10 +839,10 @@ test_object_exists(void) } if ((fspace_id = generate_random_dataspace(OBJECT_EXISTS_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -853,7 +854,7 @@ test_object_exists(void) { PART_BEGIN(H5Oexists_by_name_group) { - TESTING_2("H5Oexists_by_name on a group") + TESTING_2("H5Oexists_by_name on a group"); if ((group_id2 = H5Gcreate2(group_id, OBJECT_EXISTS_TEST_GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -886,7 +887,7 @@ test_object_exists(void) PART_BEGIN(H5Oexists_by_name_dset) { - TESTING_2("H5Oexists_by_name on a dataset") + TESTING_2("H5Oexists_by_name on a dataset"); if ((dset_id = H5Dcreate2(group_id, OBJECT_EXISTS_TEST_DSET_NAME, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -920,7 +921,7 @@ test_object_exists(void) PART_BEGIN(H5Oexists_by_name_dtype) { - TESTING_2("H5Oexists_by_name on a committed datatype") + TESTING_2("H5Oexists_by_name on a committed datatype"); if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) { H5_FAILED(); @@ -960,7 +961,7 @@ test_object_exists(void) PART_BEGIN(H5Oexists_by_name_soft_link) { - TESTING_2("H5Oexists_by_name for a soft link") + TESTING_2("H5Oexists_by_name for a soft link"); if (H5Lcreate_soft("/" OBJECT_TEST_GROUP_NAME "/" OBJECT_EXISTS_TEST_SUBGROUP_NAME, group_id, OBJECT_EXISTS_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) { @@ -988,7 +989,7 @@ test_object_exists(void) PART_BEGIN(H5Oexists_by_name_dangling_soft_link) { - TESTING_2("H5Oexists_by_name for a dangling soft link") + TESTING_2("H5Oexists_by_name for a dangling soft link"); if (H5Lcreate_soft( "/" OBJECT_TEST_GROUP_NAME "/" OBJECT_EXISTS_TEST_SUBGROUP_NAME "/non_existent_object", @@ -1019,18 +1020,18 @@ test_object_exists(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1075,7 +1076,7 @@ test_object_exists_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1105,7 +1106,7 @@ test_object_exists_invalid_params(void) } if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1113,7 +1114,7 @@ test_object_exists_invalid_params(void) { PART_BEGIN(H5Oexists_by_name_invalid_loc_id) { - TESTING_2("H5Oexists_by_name with an invalid location ID") + TESTING_2("H5Oexists_by_name with an invalid location ID"); H5E_BEGIN_TRY { @@ -1134,7 +1135,7 @@ test_object_exists_invalid_params(void) PART_BEGIN(H5Oexists_by_name_invalid_obj_name) { - TESTING_2("H5Oexists_by_name with an invalid object name") + TESTING_2("H5Oexists_by_name with an invalid object name"); H5E_BEGIN_TRY { @@ -1166,7 +1167,7 @@ test_object_exists_invalid_params(void) PART_BEGIN(H5Oexists_by_name_invalid_lapl) { - TESTING_2("H5Oexists_by_name with an invalid LAPL") + TESTING_2("H5Oexists_by_name with an invalid LAPL"); H5E_BEGIN_TRY { @@ -1187,14 +1188,14 @@ test_object_exists_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1219,7 +1220,7 @@ test_object_exists_invalid_params(void) static int test_get_object_info(void) { - TESTING("object info retrieval") + TESTING("object info retrieval"); SKIPPED(); @@ -1234,7 +1235,7 @@ test_get_object_info(void) static int test_get_object_info_invalid_params(void) { - TESTING("object info retrieval with invalid parameters") + TESTING("object info retrieval with invalid parameters"); SKIPPED(); @@ -1267,7 +1268,7 @@ test_link_object(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1289,10 +1290,10 @@ test_link_object(void) } if ((fspace_id = generate_random_dataspace(OBJECT_LINK_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1300,7 +1301,7 @@ test_link_object(void) { PART_BEGIN(H5Olink_group) { - TESTING_2("H5Olink an anonymous group") + TESTING_2("H5Olink an anonymous group"); if ((group_id2 = H5Gcreate_anon(group_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1320,7 +1321,7 @@ test_link_object(void) PART_BEGIN(H5Olink_dataset) { - TESTING_2("H5Olink an anonymous dataset") + TESTING_2("H5Olink an anonymous dataset"); if ((dset_id = H5Dcreate_anon(group_id, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1340,7 +1341,7 @@ test_link_object(void) PART_BEGIN(H5Olink_datatype) { - TESTING_2("H5Olink an anonymous datatype") + TESTING_2("H5Olink an anonymous datatype"); if (H5Tcommit_anon(group_id, dset_dtype, H5P_DEFAULT, H5P_DEFAULT) < 0) { H5_FAILED(); @@ -1360,22 +1361,22 @@ test_link_object(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1421,7 +1422,7 @@ test_link_object_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1454,7 +1455,7 @@ test_link_object_invalid_params(void) { PART_BEGIN(H5Olink_invalid_object_id) { - TESTING_2("H5Olink with an invalid object ID") + TESTING_2("H5Olink with an invalid object ID"); H5E_BEGIN_TRY { @@ -1475,7 +1476,7 @@ test_link_object_invalid_params(void) PART_BEGIN(H5Olink_invalid_location) { - TESTING_2("H5Olink with an invalid location ID") + TESTING_2("H5Olink with an invalid location ID"); H5E_BEGIN_TRY { @@ -1496,7 +1497,7 @@ test_link_object_invalid_params(void) PART_BEGIN(H5Olink_invalid_name) { - TESTING_2("H5Olink with an invalid name") + TESTING_2("H5Olink with an invalid name"); H5E_BEGIN_TRY { @@ -1528,7 +1529,7 @@ test_link_object_invalid_params(void) PART_BEGIN(H5Olink_invalid_lcpl) { - TESTING_2("H5Olink with an invalid LCPL") + TESTING_2("H5Olink with an invalid LCPL"); H5E_BEGIN_TRY { @@ -1549,8 +1550,8 @@ test_link_object_invalid_params(void) PART_BEGIN(H5Olink_invalid_lapl) { - TESTING_2("H5Olink with an invalid LAPL") -#ifndef NO_INVALID_PROPERTY_LIST_TESTS + TESTING_2("H5Olink with an invalid LAPL"); + H5E_BEGIN_TRY { status = @@ -1565,25 +1566,21 @@ test_link_object_invalid_params(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Olink_invalid_lapl); -#endif } PART_END(H5Olink_invalid_lapl); } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1624,12 +1621,12 @@ test_incr_decr_object_refcount(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) { SKIPPED(); - HDprintf(" API functions for basic file, group, dataset, stored datatype, basic or more object " + HDprintf(" API functions for basic file, group, dataset, stored datatype, or object " "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1651,10 +1648,10 @@ test_incr_decr_object_refcount(void) } if ((fspace_id = generate_random_dataspace(OBJECT_REF_COUNT_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1662,7 +1659,7 @@ test_incr_decr_object_refcount(void) { PART_BEGIN(H5Oincr_decr_refcount_group) { - TESTING_2("H5Oincr_refcount/H5Odecr_refcount on a group") + TESTING_2("H5Oincr_refcount/H5Odecr_refcount on a group"); if ((group_id2 = H5Gcreate2(group_id, OBJECT_REF_COUNT_TEST_GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -1731,7 +1728,7 @@ test_incr_decr_object_refcount(void) PART_BEGIN(H5Oincr_decr_refcount_dset) { - TESTING_2("H5Oincr_refcount/H5Odecr_refcount on a dataset") + TESTING_2("H5Oincr_refcount/H5Odecr_refcount on a dataset"); if ((dset_id = H5Dcreate2(group_id, OBJECT_REF_COUNT_TEST_DSET_NAME, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -1800,7 +1797,7 @@ test_incr_decr_object_refcount(void) PART_BEGIN(H5Oincr / decr_refcount_dtype) { - TESTING_2("H5Oincr_refcount/H5Odecr_refcount on a committed datatype") + TESTING_2("H5Oincr_refcount/H5Odecr_refcount on a committed datatype"); if (H5Tcommit2(group_id, OBJECT_REF_COUNT_TEST_TYPE_NAME, dset_dtype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) { @@ -1869,16 +1866,16 @@ test_incr_decr_object_refcount(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -1922,7 +1919,7 @@ test_incr_decr_object_refcount_invalid_params(void) { PART_BEGIN(H5Oincr_refcount_invalid_param) { - TESTING_2("H5Oincr_refcount with invalid object ID") + TESTING_2("H5Oincr_refcount with invalid object ID"); H5E_BEGIN_TRY { @@ -1942,7 +1939,7 @@ test_incr_decr_object_refcount_invalid_params(void) PART_BEGIN(H5Odecr_refcount_invalid_param) { - TESTING_2("H5Odecr_refcount with invalid object ID") + TESTING_2("H5Odecr_refcount with invalid object ID"); H5E_BEGIN_TRY { @@ -1992,7 +1989,7 @@ test_object_copy_basic(void) hid_t attr_space_id = H5I_INVALID_HID; hid_t space_id = H5I_INVALID_HID; - TESTING_MULTIPART("basic object copying") + TESTING_MULTIPART("basic object copying"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -2006,7 +2003,7 @@ test_object_copy_basic(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2028,12 +2025,12 @@ test_object_copy_basic(void) } if ((space_id = generate_random_dataspace(OBJECT_COPY_BASIC_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_BASIC_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the test group object, along with its nested members and the attributes attached to it. */ if ((group_id2 = H5Gcreate2(group_id, OBJECT_COPY_BASIC_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, @@ -2161,7 +2158,7 @@ test_object_copy_basic(void) { PART_BEGIN(H5Ocopy_group) { - TESTING_2("H5Ocopy on a group (default copy options)") + TESTING_2("H5Ocopy on a group (default copy options)"); if (H5Ocopy(group_id, OBJECT_COPY_BASIC_TEST_GROUP_NAME, group_id, OBJECT_COPY_BASIC_TEST_NEW_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) { @@ -2319,7 +2316,7 @@ test_object_copy_basic(void) PART_BEGIN(H5Ocopy_dset) { - TESTING_2("H5Ocopy on a dataset (default copy options)") + TESTING_2("H5Ocopy on a dataset (default copy options)"); if (H5Ocopy(group_id, OBJECT_COPY_BASIC_TEST_DSET_NAME, group_id, OBJECT_COPY_BASIC_TEST_NEW_DSET_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) { @@ -2409,7 +2406,7 @@ test_object_copy_basic(void) PART_BEGIN(H5Ocopy_dtype) { - TESTING_2("H5Ocopy on a committed datatype (default copy options)") + TESTING_2("H5Ocopy on a committed datatype (default copy options)"); if (H5Ocopy(group_id, OBJECT_COPY_BASIC_TEST_DTYPE_NAME, group_id, OBJECT_COPY_BASIC_TEST_NEW_DTYPE_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) { @@ -2500,26 +2497,26 @@ test_object_copy_basic(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(attr_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dtype_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2564,7 +2561,7 @@ test_object_copy_already_existing(void) hid_t dset_dtype = H5I_INVALID_HID; hid_t space_id = H5I_INVALID_HID; - TESTING_MULTIPART("object copying to location where objects already exist") + TESTING_MULTIPART("object copying to location where objects already exist"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -2577,7 +2574,7 @@ test_object_copy_already_existing(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2601,9 +2598,9 @@ test_object_copy_already_existing(void) if ((space_id = generate_random_dataspace(OBJECT_COPY_ALREADY_EXISTING_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the test group object */ if ((group_id2 = H5Gcreate2(group_id, OBJECT_COPY_ALREADY_EXISTING_TEST_GROUP_NAME, H5P_DEFAULT, @@ -2641,7 +2638,7 @@ test_object_copy_already_existing(void) { PART_BEGIN(H5Ocopy_already_existing_group) { - TESTING_2("H5Ocopy group to location where group already exists") + TESTING_2("H5Ocopy group to location where group already exists"); H5E_BEGIN_TRY { @@ -2662,7 +2659,7 @@ test_object_copy_already_existing(void) PART_BEGIN(H5Ocopy_already_existing_dset) { - TESTING_2("H5Ocopy dataset to location where dataset already exists") + TESTING_2("H5Ocopy dataset to location where dataset already exists"); H5E_BEGIN_TRY { @@ -2683,7 +2680,7 @@ test_object_copy_already_existing(void) PART_BEGIN(H5Ocopy_already_existing_dtype) { - TESTING_2("H5Ocopy committed datatype to location where committed datatype already exists") + TESTING_2("H5Ocopy committed datatype to location where committed datatype already exists"); H5E_BEGIN_TRY { @@ -2705,24 +2702,24 @@ test_object_copy_already_existing(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dtype_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2762,7 +2759,7 @@ test_object_copy_shallow_group_copy(void) hid_t tmp_group_id = H5I_INVALID_HID; hid_t ocpypl_id = H5I_INVALID_HID; - TESTING("object copying with H5O_COPY_SHALLOW_HIERARCHY_FLAG flag") + TESTING("object copying with H5O_COPY_SHALLOW_HIERARCHY_FLAG flag"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -2896,63 +2893,62 @@ test_object_copy_shallow_group_copy(void) } if (H5Gclose(tmp_group_id) < 0) - TEST_ERROR + TEST_ERROR; - /* - * Ensure that the last immediate member of the copied group doesn't - * contain any members after the shallow copy. - */ - { - char grp_name[OBJECT_COPY_SHALLOW_TEST_BUF_SIZE]; + /* + * Ensure that the last immediate member of the copied group doesn't + * contain any members after the shallow copy. + */ + { + char grp_name[OBJECT_COPY_SHALLOW_TEST_BUF_SIZE]; - snprintf(grp_name, OBJECT_COPY_SHALLOW_TEST_BUF_SIZE, - OBJECT_COPY_SHALLOW_TEST_NEW_GROUP_NAME "/grp%d", - OBJECT_COPY_SHALLOW_TEST_NUM_NESTED_OBJS - 1); + snprintf(grp_name, OBJECT_COPY_SHALLOW_TEST_BUF_SIZE, + OBJECT_COPY_SHALLOW_TEST_NEW_GROUP_NAME "/grp%d", + OBJECT_COPY_SHALLOW_TEST_NUM_NESTED_OBJS - 1); - if ((tmp_group_id = H5Gopen2(group_id, grp_name, H5P_DEFAULT)) < 0) { - H5_FAILED(); - HDprintf(" failed to open group '%s'\n", grp_name); - goto error; - } + if ((tmp_group_id = H5Gopen2(group_id, grp_name, H5P_DEFAULT)) < 0) { + H5_FAILED(); + HDprintf(" failed to open group '%s'\n", grp_name); + goto error; + } - memset(&group_info, 0, sizeof(group_info)); + memset(&group_info, 0, sizeof(group_info)); - /* - * Set link count to non-zero in case the connector doesn't support - * retrieval of group info. - */ - group_info.nlinks = 1; + /* + * Set link count to non-zero in case the connector doesn't support + * retrieval of group info. + */ + group_info.nlinks = 1; - if (H5Gget_info(tmp_group_id, &group_info) < 0) { - H5_FAILED(); - HDprintf(" failed to retrieve group info\n"); - goto error; - } + if (H5Gget_info(tmp_group_id, &group_info) < 0) { + H5_FAILED(); + HDprintf(" failed to retrieve group info\n"); + goto error; + } - if (group_info.nlinks != 0) { - H5_FAILED(); - HDprintf( - " copied group's immediate members contained nested members after a shallow copy!\n"); - goto error; - } + if (group_info.nlinks != 0) { + H5_FAILED(); + HDprintf(" copied group's immediate members contained nested members after a shallow copy!\n"); + goto error; + } - if (H5Gclose(tmp_group_id) < 0) { - H5_FAILED(); - HDprintf(" failed to close group '%s'\n", grp_name); - goto error; - } + if (H5Gclose(tmp_group_id) < 0) { + H5_FAILED(); + HDprintf(" failed to close group '%s'\n", grp_name); + goto error; } + } if (H5Pclose(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -2974,7 +2970,7 @@ test_object_copy_shallow_group_copy(void) } /* - * Tests to excercise the H5O_COPY_WITHOUT_ATTR_FLAG flag + * Tests to exercise the H5O_COPY_WITHOUT_ATTR_FLAG flag * of H5Ocopy. */ static int @@ -2998,7 +2994,7 @@ test_object_copy_no_attributes(void) hid_t space_id = H5I_INVALID_HID; hid_t ocpypl_id = H5I_INVALID_HID; - TESTING_MULTIPART("object copying with H5O_COPY_WITHOUT_ATTR_FLAG flag") + TESTING_MULTIPART("object copying with H5O_COPY_WITHOUT_ATTR_FLAG flag"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -3012,7 +3008,7 @@ test_object_copy_no_attributes(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3034,13 +3030,13 @@ test_object_copy_no_attributes(void) } if ((space_id = generate_random_dataspace(OBJECT_COPY_NO_ATTRS_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_NO_ATTRS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the test group object, along with the attributes attached to it. */ if ((group_id2 = H5Gcreate2(group_id, OBJECT_COPY_NO_ATTRS_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, @@ -3138,7 +3134,7 @@ test_object_copy_no_attributes(void) { PART_BEGIN(H5Ocopy_group_no_attributes) { - TESTING_2("H5Ocopy on a group (without attributes)") + TESTING_2("H5Ocopy on a group (without attributes)"); if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) { H5_FAILED(); @@ -3238,7 +3234,7 @@ test_object_copy_no_attributes(void) PART_BEGIN(H5Ocopy_dset_no_attributes) { - TESTING_2("H5Ocopy on a dataset (without attributes)") + TESTING_2("H5Ocopy on a dataset (without attributes)"); if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) { H5_FAILED(); @@ -3338,7 +3334,7 @@ test_object_copy_no_attributes(void) PART_BEGIN(H5Ocopy_dtype_no_attributes) { - TESTING_2("H5Ocopy on a committed datatype (without attributes)") + TESTING_2("H5Ocopy on a committed datatype (without attributes)"); if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) { H5_FAILED(); @@ -3438,26 +3434,26 @@ test_object_copy_no_attributes(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(attr_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dtype_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3506,7 +3502,7 @@ test_object_copy_by_soft_link(void) hid_t attr_id = H5I_INVALID_HID; hid_t attr_space_id = H5I_INVALID_HID; - TESTING_MULTIPART("object copying through use of soft links") + TESTING_MULTIPART("object copying through use of soft links"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -3520,7 +3516,7 @@ test_object_copy_by_soft_link(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3543,7 +3539,7 @@ test_object_copy_by_soft_link(void) if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_SOFT_LINK_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the test group object, along with its nested members and the attributes attached to it. */ if ((group_id2 = H5Gcreate2(group_id, OBJECT_COPY_SOFT_LINK_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, @@ -3609,7 +3605,7 @@ test_object_copy_by_soft_link(void) { PART_BEGIN(H5Ocopy_through_soft_link) { - TESTING_2("H5Ocopy through use of a soft link") + TESTING_2("H5Ocopy through use of a soft link"); if (H5Lcreate_soft("/" OBJECT_TEST_GROUP_NAME "/" OBJECT_COPY_SOFT_LINK_TEST_SUBGROUP_NAME "/" OBJECT_COPY_SOFT_LINK_TEST_GROUP_NAME, @@ -3754,7 +3750,7 @@ test_object_copy_by_soft_link(void) { herr_t err_ret; - TESTING_2("H5Ocopy through use of a dangling soft link") + TESTING_2("H5Ocopy through use of a dangling soft link"); if (H5Lcreate_soft("/" OBJECT_TEST_GROUP_NAME "/" OBJECT_COPY_SOFT_LINK_TEST_SUBGROUP_NAME "/nonexistent_object", @@ -3786,18 +3782,18 @@ test_object_copy_by_soft_link(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(attr_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -3837,7 +3833,7 @@ test_object_copy_group_with_soft_links(void) hid_t tmp_group_id = H5I_INVALID_HID; hid_t ocpypl_id = H5I_INVALID_HID; - TESTING_MULTIPART("group copying when group contains soft links") + TESTING_MULTIPART("group copying when group contains soft links"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -3845,12 +3841,13 @@ test_object_copy_group_with_soft_links(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, object, link, or soft link aren't supported with " + HDprintf(" API functions for basic file, group, object, link, iterate, or soft link aren't " + "supported with " "this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -3920,7 +3917,7 @@ test_object_copy_group_with_soft_links(void) { PART_BEGIN(H5Ocopy_dont_expand_soft_links) { - TESTING_2("H5Ocopy on group with soft links (soft links not expanded)") + TESTING_2("H5Ocopy on group with soft links (soft links not expanded)"); if (H5Ocopy(group_id, OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_GROUP_NAME, group_id, OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NON_EXPAND_GROUP_NAME, H5P_DEFAULT, @@ -4021,7 +4018,7 @@ test_object_copy_group_with_soft_links(void) PART_BEGIN(H5Ocopy_expand_soft_links) { - TESTING_2("H5Ocopy on group with soft links (soft links expanded)") + TESTING_2("H5Ocopy on group with soft links (soft links expanded)"); if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) { H5_FAILED(); @@ -4147,16 +4144,16 @@ test_object_copy_group_with_soft_links(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -4204,7 +4201,7 @@ test_object_copy_between_files(void) hid_t space_id = H5I_INVALID_HID; hid_t ocpypl_id = H5I_INVALID_HID; - TESTING_MULTIPART("object copying between files") + TESTING_MULTIPART("object copying between files"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || @@ -4219,7 +4216,7 @@ test_object_copy_between_files(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); /* * Create the second file for the between file copying tests. @@ -4253,13 +4250,13 @@ test_object_copy_between_files(void) if ((space_id = generate_random_dataspace(OBJECT_COPY_BETWEEN_FILES_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_space_id = generate_random_dataspace(OBJECT_COPY_BETWEEN_FILES_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; /* Create the test group object, along with its nested members and the attributes attached to it. */ if ((group_id2 = H5Gcreate2(group_id, OBJECT_COPY_BETWEEN_FILES_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, @@ -4387,7 +4384,7 @@ test_object_copy_between_files(void) { PART_BEGIN(H5Ocopy_group_between_files) { - TESTING_2("H5Ocopy on group between different files") + TESTING_2("H5Ocopy on group between different files"); if (H5Ocopy(group_id, OBJECT_COPY_BETWEEN_FILES_TEST_GROUP_NAME, file_id2, OBJECT_COPY_BETWEEN_FILES_TEST_NEW_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) { @@ -4547,7 +4544,7 @@ test_object_copy_between_files(void) PART_BEGIN(H5Ocopy_dset_between_files) { - TESTING_2("H5Ocopy on dataset between different files") + TESTING_2("H5Ocopy on dataset between different files"); if (H5Ocopy(group_id, OBJECT_COPY_BETWEEN_FILES_TEST_DSET_NAME, file_id2, OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DSET_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) { @@ -4641,7 +4638,7 @@ test_object_copy_between_files(void) PART_BEGIN(H5Ocopy_dtype_between_files) { - TESTING_2("H5Ocopy on committed datatype between different files") + TESTING_2("H5Ocopy on committed datatype between different files"); if (H5Ocopy(group_id, OBJECT_COPY_BETWEEN_FILES_TEST_DTYPE_NAME, file_id2, OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DTYPE_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) { @@ -4737,28 +4734,28 @@ test_object_copy_between_files(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(attr_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dtype_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -4810,7 +4807,7 @@ test_object_copy_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -4845,7 +4842,7 @@ test_object_copy_invalid_params(void) { PART_BEGIN(H5Ocopy_invalid_src_loc_id) { - TESTING_2("H5Ocopy with an invalid source location ID") + TESTING_2("H5Ocopy with an invalid source location ID"); H5E_BEGIN_TRY { @@ -4866,7 +4863,7 @@ test_object_copy_invalid_params(void) PART_BEGIN(H5Ocopy_invalid_src_obj_name) { - TESTING_2("H5Ocopy with an invalid source object name") + TESTING_2("H5Ocopy with an invalid source object name"); H5E_BEGIN_TRY { @@ -4900,7 +4897,7 @@ test_object_copy_invalid_params(void) PART_BEGIN(H5Ocopy_invalid_dst_loc_id) { - TESTING_2("H5Ocopy with an invalid destination location ID") + TESTING_2("H5Ocopy with an invalid destination location ID"); H5E_BEGIN_TRY { @@ -4921,7 +4918,7 @@ test_object_copy_invalid_params(void) PART_BEGIN(H5Ocopy_invalid_dst_obj_name) { - TESTING_2("H5Ocopy with an invalid destination object name") + TESTING_2("H5Ocopy with an invalid destination object name"); H5E_BEGIN_TRY { @@ -4955,7 +4952,7 @@ test_object_copy_invalid_params(void) PART_BEGIN(H5Ocopy_invalid_ocpypl) { - TESTING_2("H5Ocopy with an invalid OcpyPL") + TESTING_2("H5Ocopy with an invalid OcpyPL"); H5E_BEGIN_TRY { @@ -4976,7 +4973,7 @@ test_object_copy_invalid_params(void) PART_BEGIN(H5Ocopy_invalid_lcpl) { - TESTING_2("H5Ocopy with an invalid LCPL") + TESTING_2("H5Ocopy with an invalid LCPL"); H5E_BEGIN_TRY { @@ -4997,16 +4994,16 @@ test_object_copy_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -5031,7 +5028,7 @@ test_object_copy_invalid_params(void) static int test_object_comments(void) { - TESTING("object comments") + TESTING("object comments"); SKIPPED(); @@ -5045,7 +5042,7 @@ test_object_comments(void) static int test_object_comments_invalid_params(void) { - TESTING("object comment ") + TESTING("object comment "); SKIPPED(); @@ -5076,16 +5073,14 @@ test_object_visit(void) if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_STORED_DATATYPES)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { SKIPPED(); - HDprintf(" API functions for basic file, group, object, dataset, attribute, stored datatype, " - "iterate, or creation order aren't supported with this connector\n"); + HDprintf(" API functions for basic file, group, object, dataset, attribute, stored datatype, or " + "iterate aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -5105,10 +5100,12 @@ test_object_visit(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { - H5_FAILED(); - HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { + H5_FAILED(); + HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, OBJECT_VISIT_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id, @@ -5119,10 +5116,10 @@ test_object_visit(void) } if ((fspace_id = generate_random_dataspace(OBJECT_VISIT_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) { H5_FAILED(); @@ -5164,7 +5161,7 @@ test_object_visit(void) PART_BEGIN(H5Ovisit_obj_name_increasing) { - TESTING_2("H5Ovisit by object name in increasing order") + TESTING_2("H5Ovisit by object name in increasing order"); i = 0; @@ -5187,8 +5184,8 @@ test_object_visit(void) PART_BEGIN(H5Ovisit_obj_name_decreasing) { - TESTING_2("H5Ovisit by object name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Ovisit by object name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = OBJECT_VISIT_TEST_NUM_OBJS_VISITED; @@ -5206,16 +5203,18 @@ test_object_visit(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Ovisit_obj_name_decreasing); -#endif } PART_END(H5Ovisit_obj_name_decreasing); PART_BEGIN(H5Ovisit_create_order_increasing) { - TESTING_2("H5Ovisit by creation order in increasing order") + TESTING_2("H5Ovisit by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Ovisit_create_order_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * OBJECT_VISIT_TEST_NUM_OBJS_VISITED; @@ -5239,7 +5238,13 @@ test_object_visit(void) PART_BEGIN(H5Ovisit_create_order_decreasing) { - TESTING_2("H5Ovisit by creation order in decreasing order") + TESTING_2("H5Ovisit by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Ovisit_create_order_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * OBJECT_VISIT_TEST_NUM_OBJS_VISITED; @@ -5263,7 +5268,7 @@ test_object_visit(void) PART_BEGIN(H5Ovisit_file) { - TESTING_2("H5Ovisit on a file ID") + TESTING_2("H5Ovisit on a file ID"); /* * XXX: @@ -5276,7 +5281,7 @@ test_object_visit(void) PART_BEGIN(H5Ovisit_dset) { - TESTING_2("H5Ovisit on a dataset ID") + TESTING_2("H5Ovisit on a dataset ID"); if (H5Ovisit3(dset_id, H5_INDEX_NAME, H5_ITER_INC, object_visit_dset_callback, NULL, H5O_INFO_ALL) < 0) { @@ -5291,7 +5296,7 @@ test_object_visit(void) PART_BEGIN(H5Ovisit_dtype) { - TESTING_2("H5Ovisit on a committed datatype ID") + TESTING_2("H5Ovisit on a committed datatype ID"); if (H5Ovisit3(type_id, H5_INDEX_NAME, H5_ITER_INC, object_visit_dtype_callback, NULL, H5O_INFO_ALL) < 0) { @@ -5306,7 +5311,7 @@ test_object_visit(void) PART_BEGIN(H5Ovisit_by_name_obj_name_increasing) { - TESTING_2("H5Ovisit_by_name by object name in increasing order") + TESTING_2("H5Ovisit_by_name by object name in increasing order"); /* Reset the counter to the appropriate value for the next test */ i = 0; @@ -5347,8 +5352,8 @@ test_object_visit(void) PART_BEGIN(H5Ovisit_by_name_obj_name_decreasing) { - TESTING_2("H5Ovisit_by_name by object name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Ovisit_by_name by object name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = OBJECT_VISIT_TEST_NUM_OBJS_VISITED; @@ -5383,16 +5388,18 @@ test_object_visit(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Ovisit_by_name_obj_name_decreasing); -#endif } PART_END(H5Ovisit_by_name_obj_name_decreasing); PART_BEGIN(H5Ovisit_by_name_create_order_increasing) { - TESTING_2("H5Ovisit_by_name by creation order in increasing order") + TESTING_2("H5Ovisit_by_name by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Ovisit_by_name_create_order_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * OBJECT_VISIT_TEST_NUM_OBJS_VISITED; @@ -5433,7 +5440,13 @@ test_object_visit(void) PART_BEGIN(H5Ovisit_by_name_create_order_decreasing) { - TESTING_2("H5Ovisit_by_name by creation order in decreasing order") + TESTING_2("H5Ovisit_by_name by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Ovisit_by_name_create_order_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * OBJECT_VISIT_TEST_NUM_OBJS_VISITED; @@ -5474,7 +5487,7 @@ test_object_visit(void) PART_BEGIN(H5Ovisit_by_name_file) { - TESTING_2("H5Ovisit_by_name on a file ID") + TESTING_2("H5Ovisit_by_name on a file ID"); /* * XXX: @@ -5487,7 +5500,7 @@ test_object_visit(void) PART_BEGIN(H5Ovisit_by_name_dset) { - TESTING_2("H5Ovisit_by_name on a dataset ID") + TESTING_2("H5Ovisit_by_name on a dataset ID"); if (H5Ovisit_by_name3(group_id, OBJECT_VISIT_TEST_DSET_NAME, H5_INDEX_NAME, H5_ITER_INC, object_visit_dset_callback, NULL, H5O_INFO_ALL, H5P_DEFAULT) < 0) { @@ -5502,7 +5515,7 @@ test_object_visit(void) PART_BEGIN(H5Ovisit_by_name_dtype) { - TESTING_2("H5Ovisit_by_name on a committed datatype ID") + TESTING_2("H5Ovisit_by_name on a committed datatype ID"); if (H5Ovisit_by_name3(group_id, OBJECT_VISIT_TEST_TYPE_NAME, H5_INDEX_NAME, H5_ITER_INC, object_visit_dtype_callback, NULL, H5O_INFO_ALL, H5P_DEFAULT) < 0) { @@ -5517,26 +5530,26 @@ test_object_visit(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(type_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dset_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -5584,14 +5597,14 @@ test_object_visit_soft_link(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || - !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { + !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) { SKIPPED(); - HDprintf(" API functions for basic file, group, object, soft link, iterate, or creation order " + HDprintf(" API functions for basic file, group, object, soft link, or iterate " "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -5611,10 +5624,12 @@ test_object_visit_soft_link(void) goto error; } - if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { - H5_FAILED(); - HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); - goto error; + if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) { + if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) { + H5_FAILED(); + HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n"); + goto error; + } } if ((group_id = H5Gcreate2(container_group, OBJECT_VISIT_SOFT_LINK_TEST_SUBGROUP_NAME, H5P_DEFAULT, @@ -5724,7 +5739,7 @@ test_object_visit_soft_link(void) PART_BEGIN(H5Ovisit_obj_name_increasing) { - TESTING_2("H5Ovisit by object name in increasing order") + TESTING_2("H5Ovisit by object name in increasing order"); i = 0; @@ -5747,8 +5762,8 @@ test_object_visit_soft_link(void) PART_BEGIN(H5Ovisit_obj_name_decreasing) { - TESTING_2("H5Ovisit by object name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Ovisit by object name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED; @@ -5766,16 +5781,18 @@ test_object_visit_soft_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Ovisit_obj_name_decreasing); -#endif } PART_END(H5Ovisit_obj_name_decreasing); PART_BEGIN(H5Ovisit_create_order_increasing) { - TESTING_2("H5Ovisit by creation order in increasing order") + TESTING_2("H5Ovisit by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Ovisit_create_order_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED; @@ -5799,7 +5816,13 @@ test_object_visit_soft_link(void) PART_BEGIN(H5Ovisit_create_order_decreasing) { - TESTING_2("H5Ovisit by creation order in decreasing order") + TESTING_2("H5Ovisit by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Ovisit_create_order_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED; @@ -5823,7 +5846,7 @@ test_object_visit_soft_link(void) PART_BEGIN(H5Ovisit_by_name_obj_name_increasing) { - TESTING_2("H5Ovisit_by_name by object name in increasing order") + TESTING_2("H5Ovisit_by_name by object name in increasing order"); /* Reset the counter to the appropriate value for the next test */ i = 0; @@ -5866,8 +5889,8 @@ test_object_visit_soft_link(void) PART_BEGIN(H5Ovisit_by_name_obj_name_decreasing) { - TESTING_2("H5Ovisit_by_name by object name in decreasing order") -#ifndef NO_DECREASING_ALPHA_ITER_ORDER + TESTING_2("H5Ovisit_by_name by object name in decreasing order"); + /* Reset the counter to the appropriate value for the next test */ i = OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED; @@ -5904,16 +5927,18 @@ test_object_visit_soft_link(void) } PASSED(); -#else - SKIPPED(); - PART_EMPTY(H5Ovisit_by_name_obj_name_decreasing); -#endif } PART_END(H5Ovisit_by_name_obj_name_decreasing); PART_BEGIN(H5Ovisit_by_name_create_order_increasing) { - TESTING_2("H5Ovisit_by_name by creation order in increasing order") + TESTING_2("H5Ovisit_by_name by creation order in increasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Ovisit_by_name_create_order_increasing); + } /* Reset the counter to the appropriate value for the next test */ i = 2 * OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED; @@ -5956,7 +5981,13 @@ test_object_visit_soft_link(void) PART_BEGIN(H5Ovisit_by_name_create_order_decreasing) { - TESTING_2("H5Ovisit_by_name by creation order in decreasing order") + TESTING_2("H5Ovisit_by_name by creation order in decreasing order"); + + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + SKIPPED(); + HDprintf(" creation order tracking isn't supported with this VOL connector\n"); + PART_EMPTY(H5Ovisit_by_name_create_order_decreasing); + } /* Reset the counter to the appropriate value for the next test */ i = 3 * OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED; @@ -5999,18 +6030,18 @@ test_object_visit_soft_link(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Pclose(gcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(subgroup_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -6055,7 +6086,7 @@ test_object_visit_invalid_params(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -6090,7 +6121,7 @@ test_object_visit_invalid_params(void) { PART_BEGIN(H5Ovisit_invalid_obj_id) { - TESTING_2("H5Ovisit with an invalid object ID") + TESTING_2("H5Ovisit with an invalid object ID"); H5E_BEGIN_TRY { @@ -6111,7 +6142,7 @@ test_object_visit_invalid_params(void) PART_BEGIN(H5Ovisit_invalid_index_type) { - TESTING_2("H5Ovisit with an invalid index type") + TESTING_2("H5Ovisit with an invalid index type"); H5E_BEGIN_TRY { @@ -6145,7 +6176,7 @@ test_object_visit_invalid_params(void) PART_BEGIN(H5Ovisit_invalid_iter_order) { - TESTING_2("H5Ovisit with an invalid iteration ordering") + TESTING_2("H5Ovisit with an invalid iteration ordering"); H5E_BEGIN_TRY { @@ -6179,7 +6210,7 @@ test_object_visit_invalid_params(void) PART_BEGIN(H5Ovisit_by_name_invalid_loc_id) { - TESTING_2("H5Ovisit_by_name with an invalid location ID") + TESTING_2("H5Ovisit_by_name with an invalid location ID"); H5E_BEGIN_TRY { @@ -6200,7 +6231,7 @@ test_object_visit_invalid_params(void) PART_BEGIN(H5Ovisit_by_name_invalid_obj_name) { - TESTING_2("H5Ovisit_by_name with an invalid object name") + TESTING_2("H5Ovisit_by_name with an invalid object name"); H5E_BEGIN_TRY { @@ -6234,7 +6265,7 @@ test_object_visit_invalid_params(void) PART_BEGIN(H5Ovisit_by_name_invalid_index_type) { - TESTING_2("H5Ovisit_by_name with an invalid index type") + TESTING_2("H5Ovisit_by_name with an invalid index type"); H5E_BEGIN_TRY { @@ -6268,7 +6299,7 @@ test_object_visit_invalid_params(void) PART_BEGIN(H5Ovisit_by_name_invalid_iter_order) { - TESTING_2("H5Ovisit_by_name with an invalid iteration ordering") + TESTING_2("H5Ovisit_by_name with an invalid iteration ordering"); H5E_BEGIN_TRY { @@ -6302,7 +6333,7 @@ test_object_visit_invalid_params(void) PART_BEGIN(H5Ovisit_by_name_invalid_lapl) { - TESTING_2("H5Ovisit_by_name with an invalid LAPL") + TESTING_2("H5Ovisit_by_name with an invalid LAPL"); H5E_BEGIN_TRY { @@ -6323,16 +6354,16 @@ test_object_visit_invalid_params(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Gclose(group_id2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -6378,7 +6409,7 @@ test_close_object(void) return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -6400,10 +6431,10 @@ test_close_object(void) } if ((fspace_id = generate_random_dataspace(OBJECT_CLOSE_TEST_SPACE_RANK, NULL, NULL, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -6411,7 +6442,7 @@ test_close_object(void) { PART_BEGIN(H5Oclose_group) { - TESTING_2("H5Oclose on a group") + TESTING_2("H5Oclose on a group"); if ((group_id2 = H5Gcreate2(group_id, OBJECT_CLOSE_TEST_GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -6444,7 +6475,7 @@ test_close_object(void) PART_BEGIN(H5Oclose_dset) { - TESTING_2("H5Oclose on a dataset") + TESTING_2("H5Oclose on a dataset"); if ((dset_id = H5Dcreate2(group_id, OBJECT_CLOSE_TEST_DSET_NAME, dset_dtype, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -6477,7 +6508,7 @@ test_close_object(void) PART_BEGIN(H5Oclose_dtype) { - TESTING_2("H5Oclose on a committed datatype") + TESTING_2("H5Oclose on a committed datatype"); if ((dtype_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) { H5_FAILED(); @@ -6516,18 +6547,18 @@ test_close_object(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Sclose(fspace_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(dset_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -6560,7 +6591,7 @@ test_close_object_invalid_params(void) herr_t err_ret = -1; hid_t file_id = H5I_INVALID_HID; - TESTING("H5Oclose with an invalid object ID") + TESTING("H5Oclose with an invalid object ID"); /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_BASIC)) { @@ -6588,7 +6619,7 @@ test_close_object_invalid_params(void) } if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -6625,15 +6656,15 @@ test_close_invalid_objects(void) if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_OBJECT_BASIC)) { SKIPPED(); - HDprintf(" API functions for basic file, group, object, dataset, attribute, or stored datatype " + HDprintf(" API functions for basic file, group, or object " "aren't supported with this connector\n"); return 0; } - TESTING_2("test setup") + TESTING_2("test setup"); if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_id = H5Fopen(vol_test_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); @@ -6656,14 +6687,14 @@ test_close_invalid_objects(void) if ((attr_space_id = generate_random_dataspace(OBJECT_CLOSE_INVALID_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) - TEST_ERROR + TEST_ERROR; if ((attr_id = H5Acreate2(group_id, OBJECT_CLOSE_INVALID_TEST_ATTRIBUTE_NAME, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -6671,7 +6702,7 @@ test_close_invalid_objects(void) { PART_BEGIN(H5Oclose_file) { - TESTING_2("H5Oclose with an invalid object - file") + TESTING_2("H5Oclose with an invalid object - file"); H5E_BEGIN_TRY { @@ -6691,7 +6722,7 @@ test_close_invalid_objects(void) PART_BEGIN(H5Oclose_plist) { - TESTING_2("H5Oclose with an invalid object - property list") + TESTING_2("H5Oclose with an invalid object - property list"); H5E_BEGIN_TRY { @@ -6711,7 +6742,7 @@ test_close_invalid_objects(void) PART_BEGIN(H5Oclose_dspace) { - TESTING_2("H5Oclose with an invalid object - data space") + TESTING_2("H5Oclose with an invalid object - data space"); H5E_BEGIN_TRY { @@ -6731,7 +6762,7 @@ test_close_invalid_objects(void) PART_BEGIN(H5Oclose_attribute) { - TESTING_2("H5Oclose with an invalid object - attribute") + TESTING_2("H5Oclose with an invalid object - attribute"); H5E_BEGIN_TRY { @@ -6751,22 +6782,22 @@ test_close_invalid_objects(void) } END_MULTIPART; - TESTING_2("test cleanup") + TESTING_2("test cleanup"); if (H5Tclose(attr_dtype) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(attr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(attr_space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(group_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(container_group) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(file_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(fapl_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); @@ -6794,7 +6825,7 @@ test_close_invalid_objects(void) static int test_flush_object(void) { - TESTING("H5Oflush") + TESTING("H5Oflush"); SKIPPED(); @@ -6808,7 +6839,7 @@ test_flush_object(void) static int test_flush_object_invalid_params(void) { - TESTING("H5Oflush with invalid parameters") + TESTING("H5Oflush with invalid parameters"); SKIPPED(); @@ -6821,7 +6852,7 @@ test_flush_object_invalid_params(void) static int test_refresh_object(void) { - TESTING("H5Orefresh") + TESTING("H5Orefresh"); SKIPPED(); @@ -6835,7 +6866,7 @@ test_refresh_object(void) static int test_refresh_object_invalid_params(void) { - TESTING("H5Orefresh with invalid parameters") + TESTING("H5Orefresh with invalid parameters"); SKIPPED(); diff --git a/vol_test.c b/vol_test.c index 4dcadf8..26afe50 100644 --- a/vol_test.c +++ b/vol_test.c @@ -12,16 +12,17 @@ /* * A test suite which only makes public HDF5 API calls and which is meant - * to test a specified HDF5 VOL connector or set of VOL connectors. This - * test suite must assume that a VOL connector could only implement the File - * interface. Therefore, the suite should check that a particular piece of - * functionality is supported by the VOL connector before actually testing - * it. If the functionality is not supported, the test should simply be - * skipped, perhaps with a note as to why the test was skipped, if possible. + * to test the native VOL connector or a specified HDF5 VOL connector (or + * set of connectors stacked with each other). This test suite must assume + * that a VOL connector could only implement the File interface. Therefore, + * the suite should check that a particular piece of functionality is supported + * by the VOL connector before actually testing it. If the functionality is + * not supported, the test should simply be skipped, perhaps with a note as + * to why the test was skipped, if possible. * * If the VOL connector being used supports the creation of groups, this * test suite will attempt to organize the output of these various tests - * into groups based on their respective interface. + * into groups based on their respective HDF5 interface. */ #include "vol_test.h" diff --git a/vol_test.h b/vol_test.h index e574b38..df5c342 100644 --- a/vol_test.h +++ b/vol_test.h @@ -18,7 +18,6 @@ #include "h5vl_test_config.h" #include "vol_test_util.h" -#include "vol_tests_disabled.h" /* Define H5VL_VERSION if not already defined */ #ifndef H5VL_VERSION diff --git a/vol_test_parallel.h b/vol_test_parallel.h index 96296d2..e0a6481 100644 --- a/vol_test_parallel.h +++ b/vol_test_parallel.h @@ -15,9 +15,10 @@ #include -#include "vol_test.h" #include "testpar.h" +#include "vol_test.h" + /* Define H5VL_VERSION if not already defined */ #ifndef H5VL_VERSION #define H5VL_VERSION 0 diff --git a/vol_tests_disabled.h b/vol_tests_disabled.h deleted file mode 100644 index 22d19ab..0000000 --- a/vol_tests_disabled.h +++ /dev/null @@ -1,46 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#ifndef VOL_TESTS_DISABLED_H -#define VOL_TESTS_DISABLED_H - -#include "h5vl_test_config.h" - -/* Contains #defines to temporarily disable VOL tests based - * on problematic or unsupported functionality */ - -#define NO_LARGE_TESTS -#define NO_ATTR_FILL_VALUE_SUPPORT -#define NO_DECREASING_ALPHA_ITER_ORDER -#define NO_USER_DEFINED_LINKS -#define NO_EXTERNAL_LINKS -#define NO_ITERATION_RESTART -#define NO_FILE_MOUNTS -#define NO_CLEAR_ON_SHRINK -#define NO_DOUBLE_OBJECT_OPENS -#define NO_OBJECT_GET_NAME -#define WRONG_DATATYPE_OBJ_COUNT -#define NO_SHARED_DATATYPES -#define NO_INVALID_PROPERTY_LIST_TESTS -#define NO_MAX_LINK_CRT_ORDER_RESET -#define NO_PREVENT_HARD_LINKS_ACROSS_FILES -#define NO_SOFT_LINK_MANY_DANGLING -#define NO_ID_PREVENTS_OBJ_DELETE -#define NO_WRITE_SAME_ELEMENT_TWICE -#define NO_PREVENT_CREATE_SAME_ATTRIBUTE_TWICE -#define NO_DELETE_NONEXISTENT_ATTRIBUTE -#define NO_TRUNCATE_OPEN_FILE -#define NO_CHECK_SELECTION_BOUNDS -#define NO_VALIDATE_DATASPACE -#define NO_REFERENCE_TO_DELETED - -#endif /* VOL_TESTS_DISABLED_H */