summaryrefslogtreecommitdiffstats
path: root/.gitignore
Commit message (Expand)AuthorAgeFilesLines
* added fullbench-dll.sln that works with gcc/MinGWPrzemyslaw Skibinski2016-11-151-0/+1
* updated frametestYann Collet2016-11-111-0/+1
* Merge branch 'dev' of github.com:Cyan4973/lz4 into devYann Collet2016-11-091-2/+0
|\
| * update .gitignorePrzemyslaw Skibinski2016-11-091-2/+0
* | updated NEWSYann Collet2016-11-091-0/+3
|/
* fixes static compilation under Windows (#246)Yann Collet2016-10-211-0/+1
* fix bug #232 at https://github.com/Cyan4973/lz4/issues/232inikep2016-09-061-0/+2
* lz4cli version number from lz4.hYann Collet2016-09-031-3/+2
* fix mingw64 compilation warningsinikep2016-09-021-0/+3
* Makefile : lz4 at rootYann Collet2016-08-201-0/+1
* Added .gitignoreYann Collet2015-08-151-0/+22
itch (express_test) { case 0: @@ -442,10 +448,16 @@ smoke_check_2(int express_test, unsigned paged) H5F_t * file_ptr = NULL; if(paged) - TESTING("smoke check #2 -- ~1/2 dirty, ins, dest, ren, 4/2 MB cache, paged aggregation") + TESTING("smoke check #2P -- ~1/2 dirty, ins, dest, ren, 4/2 MB cache") else TESTING("smoke check #2 -- ~1/2 dirty, ins, dest, ren, 4/2 MB cache") + if ( paged && ( express_test > 0 ) ) { + + SKIPPED(); + return(0); + } + switch (express_test) { case 0: @@ -642,10 +654,16 @@ smoke_check_3(int express_test, unsigned paged) H5F_t * file_ptr = NULL; if(paged) - TESTING("smoke check #3 -- all clean, ins, dest, ren, 2/1 KB cache, paged aggregation") + TESTING("smoke check #3P -- all clean, ins, dest, ren, 2/1 KB cache") else TESTING("smoke check #3 -- all clean, ins, dest, ren, 2/1 KB cache") + if ( paged && ( express_test > 0 ) ) { + + SKIPPED(); + return(0); + } + switch (express_test) { case 0: @@ -843,10 +861,16 @@ smoke_check_4(int express_test, unsigned paged) H5F_t * file_ptr = NULL; if(paged) - TESTING("smoke check #4 -- ~1/2 dirty, ins, dest, ren, 2/1 KB cache, paged aggregation") + TESTING("smoke check #4P -- ~1/2 dirty, ins, dest, ren, 2/1 KB cache") else TESTING("smoke check #4 -- ~1/2 dirty, ins, dest, ren, 2/1 KB cache") + if ( paged && ( express_test > 0 ) ) { + + SKIPPED(); + return(0); + } + switch (express_test) { case 0: @@ -1092,10 +1116,16 @@ smoke_check_5(int express_test, unsigned paged) }; if(paged) - TESTING("smoke check #5 -- all clean, ins, prot, unprot, AR cache 1, paged aggregation") + TESTING("smoke check #5P -- all clean, ins, prot, unprot, AR cache 1") else TESTING("smoke check #5 -- all clean, ins, prot, unprot, AR cache 1") + if ( paged && ( express_test > 0 ) ) { + + SKIPPED(); + return(0); + } + switch (express_test) { case 0: @@ -1330,10 +1360,16 @@ smoke_check_6(int express_test, unsigned paged) }; if(paged) - TESTING("smoke check #6 -- ~1/2 dirty, ins, prot, unprot, AR cache 1, paged aggregation") + TESTING("smoke check #6P -- ~1/2 dirty, ins, prot, unprot, AR cache 1") else TESTING("smoke check #6 -- ~1/2 dirty, ins, prot, unprot, AR cache 1") + if ( paged && ( express_test > 0 ) ) { + + SKIPPED(); + return(0); + } + pass = TRUE; switch (express_test) @@ -1569,10 +1605,16 @@ smoke_check_7(int express_test, unsigned paged) }; if(paged) - TESTING("smoke check #7 -- all clean, ins, prot, unprot, AR cache 2, paged aggregation") + TESTING("smoke check #7P -- all clean, ins, prot, unprot, AR cache 2") else TESTING("smoke check #7 -- all clean, ins, prot, unprot, AR cache 2") + if ( paged && ( express_test > 0 ) ) { + + SKIPPED(); + return(0); + } + switch (express_test) { case 0: @@ -1808,10 +1850,16 @@ smoke_check_8(int express_test, unsigned paged) }; if(paged) - TESTING("smoke check #8 -- ~1/2 dirty, ins, prot, unprot, AR cache 2, paged aggregation") + TESTING("smoke check #8P -- ~1/2 dirty, ins, prot, unprot, AR cache 2") else TESTING("smoke check #8 -- ~1/2 dirty, ins, prot, unprot, AR cache 2") + if ( paged && ( express_test > 0 ) ) { + + SKIPPED(); + return(0); + } + switch (express_test) { case 0: @@ -2008,10 +2056,16 @@ smoke_check_9(int express_test, unsigned paged) H5C_t * cache_ptr = NULL; if(paged) - TESTING("smoke check #9 -- all clean, ins, dest, ren, 4/2 MB, corked, paged aggregation") + TESTING("smoke check #9P -- all clean, ins, dest, ren, 4/2 MB, corked") else TESTING("smoke check #9 -- all clean, ins, dest, ren, 4/2 MB, corked") + if ( paged && ( express_test > 0 ) ) { + + SKIPPED(); + return(0); + } + switch (express_test) { case 0: @@ -2330,10 +2384,16 @@ smoke_check_10(int express_test, unsigned paged) H5C_t * cache_ptr = NULL; if(paged) - TESTING("smoke check #10 -- ~1/2 dirty, ins, dest, ren, 4/2 MB, corked, paged aggregation") + TESTING("smoke check #10P -- ~1/2 dirty, ins, dest, ren, 4/2 MB, corked") else TESTING("smoke check #10 -- ~1/2 dirty, ins, dest, ren, 4/2 MB, corked") + if ( paged && ( express_test > 0 ) ) { + + SKIPPED(); + return(0); + } + switch (express_test) { case 0: @@ -2646,7 +2706,7 @@ express_test, unsigned paged) #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ if(paged) - TESTING("write permitted check -- 1/0 MB cache, paged aggregation") + TESTING("write permitted check -- 1/0 MB cache (paged aggregation)") else TESTING("write permitted check -- 1/0 MB cache") @@ -13329,7 +13389,7 @@ check_multiple_read_protect(unsigned paged) test_entry_t * entry_ptr; if(paged) - TESTING("multiple read only protects on a single entry (paged aggregation)") + TESTING("multiple read only protects on a single entry (paged aggr)") else TESTING("multiple read only protects on a single entry") @@ -15954,7 +16014,7 @@ check_destroy_pinned_err(unsigned paged) H5F_t * file_ptr = NULL; if(paged) - TESTING("destroy cache with permanently pinned entry error (paged aggregation)") + TESTING("destroy cache with permanently pinned entry error (pgd aggr)") else TESTING("destroy cache with permanently pinned entry error") @@ -24438,7 +24498,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged) }; if(paged) - TESTING("automatic cache resize epoch marker management (paged aggregation)") + TESTING("automatic cache resize epoch marker management (paged aggr)") else TESTING("automatic cache resize epoch marker management") @@ -28230,13 +28290,13 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) if(fill_via_insertion) { if(paged) - TESTING("to ensure metadata blizzard absence when inserting (paged aggregation)") + TESTING("to ensure metadata blizzard absence when inserting (pgd aggr)") else TESTING("to ensure metadata blizzard absence when inserting") } /* end if */ else { if(paged) - TESTING("to ensure metadata blizzard absence on protect/unprotect (paged aggregation)") + TESTING("to ensure metadata blizzard absence on protect/unprotect (pa)") else TESTING("to ensure metadata blizzard absence on protect/unprotect") } /* end else */ @@ -34383,7 +34443,7 @@ check_entry_deletions_during_scans(unsigned paged) H5F_t * file_ptr = NULL; if(paged) - TESTING("entry deletion during list scan detection and adaption (paged aggregation)") + TESTING("entry deletion during list scan detection and adaption (par)") else TESTING("entry deletion during list scan detection and adaption") @@ -36394,6 +36454,18 @@ main(void) /* Test with paged aggregation enabled or not */ /* Each test will call setup_cache() which set up the file space strategy according to "paged" */ for(paged = FALSE; paged <= TRUE; paged++) { + + if ( paged ) { + + HDfprintf(stdout, + "\n\nRe-running tests with paged aggregation:\n"); + + if ( express_test > 0 ) + HDfprintf(stdout, " Skipping smoke checks.\n"); + + HDfprintf(stdout, "\n"); + } + nerrs += smoke_check_1(express_test, paged); nerrs += smoke_check_2(express_test, paged); nerrs += smoke_check_3(express_test, paged); -- cgit v0.12 From 6bbc8b69cfe1992d34e28d9f4c532323a412bbdf Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 17 Apr 2017 11:32:32 -0500 Subject: HDFFV-10173 fix compile on VS2008 --- src/H5ACpublic.h | 236 +++++++++++++++++++++++++++---------------------------- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/src/H5ACpublic.h b/src/H5ACpublic.h index 5fdb3f4..ca0e63f 100644 --- a/src/H5ACpublic.h +++ b/src/H5ACpublic.h @@ -70,65 +70,65 @@ extern "C" { * version number, or an error will be flagged. * * rpt_fcn_enabled: Boolean field used to enable and disable the default - * reporting function. This function is invoked every time the - * automatic cache resize code is run, and reports on its activities. + * reporting function. This function is invoked every time the + * automatic cache resize code is run, and reports on its activities. * - * This is a debugging function, and should normally be turned off. + * This is a debugging function, and should normally be turned off. * * open_trace_file: Boolean field indicating whether the trace_file_name - * field should be used to open a trace file for the cache. + * field should be used to open a trace file for the cache. * * *** DEPRECATED *** Use H5Fstart/stop logging functions instead * - * The trace file is a debuging feature that allow the capture of - * top level metadata cache requests for purposes of debugging and/or - * optimization. This field should normally be set to FALSE, as - * trace file collection imposes considerable overhead. + * The trace file is a debuging feature that allow the capture of + * top level metadata cache requests for purposes of debugging and/or + * optimization. This field should normally be set to FALSE, as + * trace file collection imposes considerable overhead. * - * This field should only be set to TRUE when the trace_file_name - * contains the full path of the desired trace file, and either - * there is no open trace file on the cache, or the close_trace_file - * field is also TRUE. + * This field should only be set to TRUE when the trace_file_name + * contains the full path of the desired trace file, and either + * there is no open trace file on the cache, or the close_trace_file + * field is also TRUE. * * close_trace_file: Boolean field indicating whether the current trace - * file (if any) should be closed. + * file (if any) should be closed. * * *** DEPRECATED *** Use H5Fstart/stop logging functions instead * - * See the above comments on the open_trace_file field. This field - * should be set to FALSE unless there is an open trace file on the - * cache that you wish to close. + * See the above comments on the open_trace_file field. This field + * should be set to FALSE unless there is an open trace file on the + * cache that you wish to close. * * trace_file_name: Full path of the trace file to be opened if the - * open_trace_file field is TRUE. + * open_trace_file field is TRUE. * * *** DEPRECATED *** Use H5Fstart/stop logging functions instead * - * In the parallel case, an ascii representation of the mpi rank of - * the process will be appended to the file name to yield a unique - * trace file name for each process. + * In the parallel case, an ascii representation of the mpi rank of + * the process will be appended to the file name to yield a unique + * trace file name for each process. * - * The length of the path must not exceed H5AC__MAX_TRACE_FILE_NAME_LEN - * characters. + * The length of the path must not exceed H5AC__MAX_TRACE_FILE_NAME_LEN + * characters. * * evictions_enabled: Boolean field used to either report the current - * evictions enabled status of the cache, or to set the cache's - * evictions enabled status. - * - * In general, the metadata cache should always be allowed to - * evict entries. However, in some cases it is advantageous to - * disable evictions briefly, and thereby postpone metadata - * writes. However, this must be done with care, as the cache - * can grow quickly. If you do this, re-enable evictions as - * soon as possible and monitor cache size. - * - * At present, evictions can only be disabled if automatic - * cache resizing is also disabled (that is, ( incr_mode == - * H5C_incr__off ) && ( decr_mode == H5C_decr__off )). There - * is no logical reason why this should be so, but it simplifies - * implementation and testing, and I can't think of any reason - * why it would be desireable. If you can think of one, I'll - * revisit the issue. + * evictions enabled status of the cache, or to set the cache's + * evictions enabled status. + * + * In general, the metadata cache should always be allowed to + * evict entries. However, in some cases it is advantageous to + * disable evictions briefly, and thereby postpone metadata + * writes. However, this must be done with care, as the cache + * can grow quickly. If you do this, re-enable evictions as + * soon as possible and monitor cache size. + * + * At present, evictions can only be disabled if automatic + * cache resizing is also disabled (that is, ( incr_mode == + * H5C_incr__off ) && ( decr_mode == H5C_decr__off )). There + * is no logical reason why this should be so, but it simplifies + * implementation and testing, and I can't think of any reason + * why it would be desireable. If you can think of one, I'll + * revisit the issue. * * set_initial_size: Boolean flag indicating whether the size of the * initial size of the cache is to be set to the value given in @@ -368,80 +368,80 @@ extern "C" { * * PHDF5 uses several strategies to prevent such inconsistencies in metadata, * all of which use the fact that the same stream of dirty metadata is seen - * by all processes for purposes of synchronization. This is done by + * by all processes for purposes of synchronization. This is done by * having each process count the number of bytes of dirty metadata generated, - * and then running a "sync point" whenever this count exceeds a user + * and then running a "sync point" whenever this count exceeds a user * specified threshold (see dirty_bytes_threshold below). * - * The current metadata write strategy is indicated by the + * The current metadata write strategy is indicated by the * metadata_write_strategy field. The possible values of this field, along * with the associated metadata write strategies are discussed below. * * dirty_bytes_threshold: Threshold of dirty byte creation used to - * synchronize updates between caches. (See above for outline and - * motivation.) + * synchronize updates between caches. (See above for outline and + * motivation.) * - * This value MUST be consistant across all processes accessing the - * file. This field is ignored unless HDF5 has been compiled for - * parallel. + * This value MUST be consistant across all processes accessing the + * file. This field is ignored unless HDF5 has been compiled for + * parallel. * * metadata_write_strategy: Integer field containing a code indicating the - * desired metadata write strategy. The valid values of this field - * are enumerated and discussed below: + * desired metadata write strategy. The valid values of this field + * are enumerated and discussed below: * * - * H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: + * H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: * - * When metadata_write_strategy is set to this value, only process - * zero is allowed to write dirty metadata to disk. All other - * processes must retain dirty metadata until they are informed at - * a sync point that the dirty metadata in question has been written - * to disk. + * When metadata_write_strategy is set to this value, only process + * zero is allowed to write dirty metadata to disk. All other + * processes must retain dirty metadata until they are informed at + * a sync point that the dirty metadata in question has been written + * to disk. * - * When the sync point is reached (or when there is a user generated - * flush), process zero flushes sufficient entries to bring it into - * complience with its min clean size (or flushes all dirty entries in - * the case of a user generated flush), broad casts the list of - * entries just cleaned to all the other processes, and then exits - * the sync point. + * When the sync point is reached (or when there is a user generated + * flush), process zero flushes sufficient entries to bring it into + * complience with its min clean size (or flushes all dirty entries in + * the case of a user generated flush), broad casts the list of + * entries just cleaned to all the other processes, and then exits + * the sync point. * - * Upon receipt of the broadcast, the other processes mark the indicated - * entries as clean, and leave the sync point as well. + * Upon receipt of the broadcast, the other processes mark the indicated + * entries as clean, and leave the sync point as well. * * - * H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: + * H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: * - * In the distributed metadata write strategy, process zero still makes - * the decisions as to what entries should be flushed, but the actual - * flushes are distributed across the processes in the computation to - * the extent possible. + * In the distributed metadata write strategy, process zero still makes + * the decisions as to what entries should be flushed, but the actual + * flushes are distributed across the processes in the computation to + * the extent possible. * - * In this strategy, when a sync point is triggered (either by dirty - * metadata creation or manual flush), all processes enter a barrier. + * In this strategy, when a sync point is triggered (either by dirty + * metadata creation or manual flush), all processes enter a barrier. * - * On the other side of the barrier, process 0 constructs an ordered - * list of the entries to be flushed, and then broadcasts this list - * to the caches in all the processes. + * On the other side of the barrier, process 0 constructs an ordered + * list of the entries to be flushed, and then broadcasts this list + * to the caches in all the processes. * - * All processes then scan the list of entries to be flushed, flushing - * some, and marking the rest as clean. The algorithm for this purpose - * ensures that each entry in the list is flushed exactly once, and - * all are marked clean in each cache. + * All processes then scan the list of entries to be flushed, flushing + * some, and marking the rest as clean. The algorithm for this purpose + * ensures that each entry in the list is flushed exactly once, and + * all are marked clean in each cache. * - * Note that in the case of a flush of the cache, no message passing - * is necessary, as all processes have the same list of dirty entries, - * and all of these entries must be flushed. Thus in this case it is - * sufficient for each process to sort its list of dirty entries after - * leaving the initial barrier, and use this list as if it had been - * received from process zero. + * Note that in the case of a flush of the cache, no message passing + * is necessary, as all processes have the same list of dirty entries, + * and all of these entries must be flushed. Thus in this case it is + * sufficient for each process to sort its list of dirty entries after + * leaving the initial barrier, and use this list as if it had been + * received from process zero. + * + * To avoid possible messages from the past/future, all caches must + * wait until all caches are done before leaving the sync point. * - * To avoid possible messages from the past/future, all caches must - * wait until all caches are done before leaving the sync point. - * ****************************************************************************/ -#define H5AC__CURR_CACHE_CONFIG_VERSION 1 -#define H5AC__MAX_TRACE_FILE_NAME_LEN 1024 +#define H5AC__CURR_CACHE_CONFIG_VERSION 1 +#define H5AC__MAX_TRACE_FILE_NAME_LEN 1024 #define H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY 0 #define H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED 1 @@ -451,9 +451,9 @@ typedef struct H5AC_cache_config_t /* general configuration fields: */ int version; - hbool_t rpt_fcn_enabled; + hbool_t rpt_fcn_enabled; - hbool_t open_trace_file; + hbool_t open_trace_file; hbool_t close_trace_file; char trace_file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + 1]; @@ -512,7 +512,7 @@ typedef struct H5AC_cache_config_t * * structure H5AC_cache_image_config_t * - * H5AC_cache_image_ctl_t is a public structure intended for use in public + * H5AC_cache_image_ctl_t is a public structure intended for use in public * APIs. At least in its initial incarnation, it is a copy of struct * H5C_cache_image_ctl_t. * @@ -526,47 +526,47 @@ typedef struct H5AC_cache_config_t * generate_image: Boolean flag indicating whether a cache image should * be created on file close. * - * save_resize_status: Boolean flag indicating whether the cache image - * should include the adaptive cache resize configuration and status. - * Note that this field is ignored at present. + * save_resize_status: Boolean flag indicating whether the cache image + * should include the adaptive cache resize configuration and status. + * Note that this field is ignored at present. * - * entry_ageout: Integer field indicating the maximum number of - * times a prefetched entry can appear in subsequent cache images. - * This field exists to allow the user to avoid the buildup of - * infrequently used entries in long sequences of cache images. + * entry_ageout: Integer field indicating the maximum number of + * times a prefetched entry can appear in subsequent cache images. + * This field exists to allow the user to avoid the buildup of + * infrequently used entries in long sequences of cache images. * - * The value of this field must lie in the range - * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE (-1) to - * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX (100). + * The value of this field must lie in the range + * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE (-1) to + * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX (100). * - * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE means that no limit - * is imposed on number of times a prefeteched entry can appear - * in subsequent cache images. + * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE means that no limit + * is imposed on number of times a prefeteched entry can appear + * in subsequent cache images. * - * A value of 0 prevents prefetched entries from being included - * in cache images. + * A value of 0 prevents prefetched entries from being included + * in cache images. * - * Positive integers restrict prefetched entries to the specified - * number of appearances. + * Positive integers restrict prefetched entries to the specified + * number of appearances. * - * Note that the number of subsequent cache images that a prefetched - * entry has appeared in is tracked in an 8 bit field. Thus, while - * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX can be increased from its - * current value, any value in excess of 255 will be the functional - * equivalent of H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE. + * Note that the number of subsequent cache images that a prefetched + * entry has appeared in is tracked in an 8 bit field. Thus, while + * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX can be increased from its + * current value, any value in excess of 255 will be the functional + * equivalent of H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE. * ****************************************************************************/ -#define H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION 1 +#define H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION 1 -#define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE -1 -#define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX 100 +#define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE -1 +#define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX 100 typedef struct H5AC_cache_image_config_t { - int32_t version; + int version; hbool_t generate_image; hbool_t save_resize_status; - int32_t entry_ageout; + int entry_ageout; } H5AC_cache_image_config_t; #ifdef __cplusplus -- cgit v0.12 From 7c5a425360d17aa02a9bed31a396e954a9dda898 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 17 Apr 2017 13:19:20 -0500 Subject: ignore java classpath --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7424325..3caf16a 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ src/H5config.h.in src/H5overflow.h src/H5version.h +/.classpath -- cgit v0.12 From e718e2ab319d398ed28d39e6119e9a128990311e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 17 Apr 2017 13:51:45 -0500 Subject: HDFFV-10170 fix command syntax --- test/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Makefile.am b/test/Makefile.am index 7d4fc7c..49b251a 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -106,7 +106,7 @@ if HAVE_SHARED_CONDITIONAL # The libdynlib1, libdynlib2, libdynlib3, and libdynlib4 library for testing plugin module plugin.c. # Build it as shared library if configure is enabled for shared library. - noinst_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la + noinst_LTLIBRARIES+=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la libdynlib1_la_SOURCES=dynlib1.c libdynlib2_la_SOURCES=dynlib2.c libdynlib3_la_SOURCES=dynlib3.c -- cgit v0.12 From 32b8d5ffc897adae1507c5552383ca25dc6a83b8 Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Tue, 18 Apr 2017 09:21:36 -0500 Subject: added point to build script repo. --- release_docs/INSTALL_parallel | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/release_docs/INSTALL_parallel b/release_docs/INSTALL_parallel index e4c540c..5a8b603 100644 --- a/release_docs/INSTALL_parallel +++ b/release_docs/INSTALL_parallel @@ -1,6 +1,18 @@ Installation instructions for Parallel HDF5 ------------------------------------------- +0. Use Build Scripts +-------------------- +The HDF Group is accumulating build scripts to handle building parallel HDF5 +on various platforms (Cray, IBM, SGI, etc...). These scripts are being +maintained and updated continuously for current and future systems. The reader +is strongly encouraged to consult the repository at, + +https://github.com/HDFGroup/build_hdf5 + +for building parallel HDF5 on these system. All contributions, additions +and fixes to the repository are welcomed and encouraged. + 1. Overview ----------- -- cgit v0.12 From 9b234d74bb99c8656b5bee137a37edd35d3a6c9a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 18 Apr 2017 10:38:14 -0500 Subject: Add plugin options for libs --- java/src/jni/Makefile.am | 2 +- test/Makefile.am | 4 ++++ tools/test/h5dump/Makefile.am | 4 ++-- tools/test/h5repack/Makefile.am | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/java/src/jni/Makefile.am b/java/src/jni/Makefile.am index 4667407..cf627ef 100644 --- a/java/src/jni/Makefile.am +++ b/java/src/jni/Makefile.am @@ -31,7 +31,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/java/src/jni $(JNIFLAGS) lib_LTLIBRARIES=libhdf5_java.la # Add libtool numbers to the HDF5 Java (JNI) library (from config/lt_vers.am) -libhdf5_java_la_LDFLAGS= -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS) +libhdf5_java_la_LDFLAGS = -module -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS) # Source files for the library libhdf5_java_la_SOURCES=exceptionImp.c h5Constants.c nativeData.c h5util.c h5Imp.c \ diff --git a/test/Makefile.am b/test/Makefile.am index 49b251a..376291a 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -111,6 +111,10 @@ if HAVE_SHARED_CONDITIONAL libdynlib2_la_SOURCES=dynlib2.c libdynlib3_la_SOURCES=dynlib3.c libdynlib4_la_SOURCES=dynlib4.c + libdynlib1_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlib2_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic else # The libh5test library provides common support code for the tests. diff --git a/tools/test/h5dump/Makefile.am b/tools/test/h5dump/Makefile.am index a3d1df7..6d8205d 100644 --- a/tools/test/h5dump/Makefile.am +++ b/tools/test/h5dump/Makefile.am @@ -41,9 +41,9 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - lib_LTLIBRARIES=libdynlibdump.la + noinst_LTLIBRARIES=libdynlibdump.la libdynlibdump_la_SOURCES=dynlib_dump.c - + libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic install-exec-hook: $(RM) $(DESTDIR)$(libdir)/*dynlib* endif diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am index 22c6d96..a15f4a6 100644 --- a/tools/test/h5repack/Makefile.am +++ b/tools/test/h5repack/Makefile.am @@ -50,7 +50,8 @@ if HAVE_SHARED_CONDITIONAL noinst_LTLIBRARIES=libdynlibadd.la libdynlibvers.la libdynlibadd_la_SOURCES=dynlib_rpk.c libdynlibvers_la_SOURCES=dynlib_vrpk.c - + libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic endif # Temporary files. *.h5 are generated by h5repack. They should -- cgit v0.12 From 0b226bd28beb02165f18a9e3fdc985028ce37946 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 18 Apr 2017 11:04:22 -0500 Subject: HDFFV-10170 undo patch --- test/Makefile.am | 13 ++++++------- tools/test/h5dump/Makefile.am | 3 ++- tools/test/h5repack/Makefile.am | 5 ++++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index 376291a..79dc17f 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -100,13 +100,13 @@ if BUILD_ALL_CONDITIONAL noinst_PROGRAMS=$(BUILD_ALL_PROGS) endif -if HAVE_SHARED_CONDITIONAL - # The libh5test library provides common support code for the tests. - noinst_LTLIBRARIES=libh5test.la +# The libh5test library provides common support code for the tests. +noinst_LTLIBRARIES=libh5test.la +if HAVE_SHARED_CONDITIONAL # The libdynlib1, libdynlib2, libdynlib3, and libdynlib4 library for testing plugin module plugin.c. # Build it as shared library if configure is enabled for shared library. - noinst_LTLIBRARIES+=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la + lib_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la libdynlib1_la_SOURCES=dynlib1.c libdynlib2_la_SOURCES=dynlib2.c libdynlib3_la_SOURCES=dynlib3.c @@ -116,9 +116,8 @@ if HAVE_SHARED_CONDITIONAL libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -else - # The libh5test library provides common support code for the tests. - noinst_LTLIBRARIES=libh5test.la +install-exec-hook: + $(RM) $(DESTDIR)$(libdir)/*dynlib* endif libh5test_la_SOURCES=h5test.c testframe.c cache_common.c swmr_common.c diff --git a/tools/test/h5dump/Makefile.am b/tools/test/h5dump/Makefile.am index 6d8205d..8723c65 100644 --- a/tools/test/h5dump/Makefile.am +++ b/tools/test/h5dump/Makefile.am @@ -41,9 +41,10 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - noinst_LTLIBRARIES=libdynlibdump.la + lib_LTLIBRARIES=libdynlibdump.la libdynlibdump_la_SOURCES=dynlib_dump.c libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + install-exec-hook: $(RM) $(DESTDIR)$(libdir)/*dynlib* endif diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am index a15f4a6..375df47 100644 --- a/tools/test/h5repack/Makefile.am +++ b/tools/test/h5repack/Makefile.am @@ -47,11 +47,14 @@ h5repacktst_SOURCES=h5repacktst.c if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - noinst_LTLIBRARIES=libdynlibadd.la libdynlibvers.la + lib_LTLIBRARIES=libdynlibadd.la libdynlibvers.la libdynlibadd_la_SOURCES=dynlib_rpk.c libdynlibvers_la_SOURCES=dynlib_vrpk.c libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + +install-exec-hook: + $(RM) $(DESTDIR)$(libdir)/*dynlib* endif # Temporary files. *.h5 are generated by h5repack. They should -- cgit v0.12 From 5bbaae4495eb6f2eea309e886bccbc6051b6f534 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 18 Apr 2017 11:44:47 -0500 Subject: java jni lib also needs to avoid the version-info --- java/src/jni/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/jni/Makefile.am b/java/src/jni/Makefile.am index cf627ef..5672864 100644 --- a/java/src/jni/Makefile.am +++ b/java/src/jni/Makefile.am @@ -31,7 +31,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/java/src/jni $(JNIFLAGS) lib_LTLIBRARIES=libhdf5_java.la # Add libtool numbers to the HDF5 Java (JNI) library (from config/lt_vers.am) -libhdf5_java_la_LDFLAGS = -module -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS) +libhdf5_java_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS) # Source files for the library libhdf5_java_la_SOURCES=exceptionImp.c h5Constants.c nativeData.c h5util.c h5Imp.c \ -- cgit v0.12 From b7aeefbbc95bb44ee293760461d716d4b5fc0df3 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Tue, 18 Apr 2017 13:24:00 -0500 Subject: Fix for DAILYTEST-259 h5clear test failure Deposit the test files in test/misc/testfiles for testh5clear.sh to use instead of depending on h5clear_gentest. Tested on kituo, osx1010test, quail, platypus and ostrich. --- MANIFEST | 11 ++- tools/test/misc/testfiles/h5clear_log_v3.h5 | Bin 0 -> 2048 bytes tools/test/misc/testfiles/h5clear_mdc_image.h5 | Bin 0 -> 23467 bytes tools/test/misc/testfiles/h5clear_sec2_v0.h5 | Bin 0 -> 800 bytes tools/test/misc/testfiles/h5clear_sec2_v2.h5 | Bin 0 -> 830 bytes tools/test/misc/testfiles/h5clear_sec2_v3.h5 | Bin 0 -> 195 bytes tools/test/misc/testfiles/latest_h5clear_log_v3.h5 | Bin 0 -> 2048 bytes .../test/misc/testfiles/latest_h5clear_sec2_v3.h5 | Bin 0 -> 195 bytes tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 | Bin 22048 -> 0 bytes tools/test/misc/testfiles/orig_h5clear_sec2_v0.h5 | Bin 800 -> 0 bytes tools/test/misc/testfiles/orig_h5clear_sec2_v2.h5 | Bin 830 -> 0 bytes tools/test/misc/testfiles/orig_h5clear_sec2_v3.h5 | Bin 195 -> 0 bytes tools/test/misc/testh5clear.sh.in | 84 +++++++++++---------- 13 files changed, 51 insertions(+), 44 deletions(-) create mode 100644 tools/test/misc/testfiles/h5clear_log_v3.h5 create mode 100644 tools/test/misc/testfiles/h5clear_mdc_image.h5 create mode 100644 tools/test/misc/testfiles/h5clear_sec2_v0.h5 create mode 100644 tools/test/misc/testfiles/h5clear_sec2_v2.h5 create mode 100644 tools/test/misc/testfiles/h5clear_sec2_v3.h5 create mode 100644 tools/test/misc/testfiles/latest_h5clear_log_v3.h5 create mode 100644 tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5 delete mode 100644 tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 delete mode 100644 tools/test/misc/testfiles/orig_h5clear_sec2_v0.h5 delete mode 100644 tools/test/misc/testfiles/orig_h5clear_sec2_v2.h5 delete mode 100644 tools/test/misc/testfiles/orig_h5clear_sec2_v3.h5 diff --git a/MANIFEST b/MANIFEST index 5710f6c..5f549f4 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1471,10 +1471,13 @@ ./tools/test/misc/testfiles/h5clear_no_mdc_image.ddl ./tools/test/misc/testfiles/h5clear_open_fail.ddl ./tools/test/misc/testfiles/h5clear_usage.ddl -./tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 -./tools/test/misc/testfiles/orig_h5clear_sec2_v0.h5 -./tools/test/misc/testfiles/orig_h5clear_sec2_v2.h5 -./tools/test/misc/testfiles/orig_h5clear_sec2_v3.h5 +./tools/test/misc/testfiles/h5clear_log_v3.h5 +./tools/test/misc/testfiles/h5clear_mdc_image.h5 +./tools/test/misc/testfiles/h5clear_sec2_v0.h5 +./tools/test/misc/testfiles/h5clear_sec2_v2.h5 +./tools/test/misc/testfiles/h5clear_sec2_v3.h5 +./tools/test/misc/testfiles/latest_h5clear_log_v3.h5 +./tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5 ./tools/test/misc/testfiles/h5mkgrp_help.txt ./tools/test/misc/testfiles/h5mkgrp_version.txt.in ./tools/test/misc/h5perf_gentest.c diff --git a/tools/test/misc/testfiles/h5clear_log_v3.h5 b/tools/test/misc/testfiles/h5clear_log_v3.h5 new file mode 100644 index 0000000..aed33a4 Binary files /dev/null and b/tools/test/misc/testfiles/h5clear_log_v3.h5 differ diff --git a/tools/test/misc/testfiles/h5clear_mdc_image.h5 b/tools/test/misc/testfiles/h5clear_mdc_image.h5 new file mode 100644 index 0000000..6ed8b70 Binary files /dev/null and b/tools/test/misc/testfiles/h5clear_mdc_image.h5 differ diff --git a/tools/test/misc/testfiles/h5clear_sec2_v0.h5 b/tools/test/misc/testfiles/h5clear_sec2_v0.h5 new file mode 100644 index 0000000..571fd46 Binary files /dev/null and b/tools/test/misc/testfiles/h5clear_sec2_v0.h5 differ diff --git a/tools/test/misc/testfiles/h5clear_sec2_v2.h5 b/tools/test/misc/testfiles/h5clear_sec2_v2.h5 new file mode 100644 index 0000000..92833e6 Binary files /dev/null and b/tools/test/misc/testfiles/h5clear_sec2_v2.h5 differ diff --git a/tools/test/misc/testfiles/h5clear_sec2_v3.h5 b/tools/test/misc/testfiles/h5clear_sec2_v3.h5 new file mode 100644 index 0000000..9f1e6ce Binary files /dev/null and b/tools/test/misc/testfiles/h5clear_sec2_v3.h5 differ diff --git a/tools/test/misc/testfiles/latest_h5clear_log_v3.h5 b/tools/test/misc/testfiles/latest_h5clear_log_v3.h5 new file mode 100644 index 0000000..da5c426 Binary files /dev/null and b/tools/test/misc/testfiles/latest_h5clear_log_v3.h5 differ diff --git a/tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5 b/tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5 new file mode 100644 index 0000000..e511248 Binary files /dev/null and b/tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5 differ diff --git a/tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 b/tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 deleted file mode 100644 index 310134b..0000000 Binary files a/tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 and /dev/null differ diff --git a/tools/test/misc/testfiles/orig_h5clear_sec2_v0.h5 b/tools/test/misc/testfiles/orig_h5clear_sec2_v0.h5 deleted file mode 100644 index 571fd46..0000000 Binary files a/tools/test/misc/testfiles/orig_h5clear_sec2_v0.h5 and /dev/null differ diff --git a/tools/test/misc/testfiles/orig_h5clear_sec2_v2.h5 b/tools/test/misc/testfiles/orig_h5clear_sec2_v2.h5 deleted file mode 100644 index 92833e6..0000000 Binary files a/tools/test/misc/testfiles/orig_h5clear_sec2_v2.h5 and /dev/null differ diff --git a/tools/test/misc/testfiles/orig_h5clear_sec2_v3.h5 b/tools/test/misc/testfiles/orig_h5clear_sec2_v3.h5 deleted file mode 100644 index 9f1e6ce..0000000 Binary files a/tools/test/misc/testfiles/orig_h5clear_sec2_v3.h5 and /dev/null differ diff --git a/tools/test/misc/testh5clear.sh.in b/tools/test/misc/testh5clear.sh.in index 71d5cad..a31b824 100644 --- a/tools/test/misc/testh5clear.sh.in +++ b/tools/test/misc/testh5clear.sh.in @@ -68,10 +68,13 @@ $SRC_H5CLEAR_TESTFILES/h5clear_usage.ddl $SRC_H5CLEAR_TESTFILES/h5clear_open_fail.ddl $SRC_H5CLEAR_TESTFILES/h5clear_missing_file.ddl $SRC_H5CLEAR_TESTFILES/h5clear_no_mdc_image.ddl -$SRC_H5CLEAR_TESTFILES/orig_h5clear_sec2_v0.h5 -$SRC_H5CLEAR_TESTFILES/orig_h5clear_sec2_v2.h5 -$SRC_H5CLEAR_TESTFILES/orig_h5clear_sec2_v3.h5 -$SRC_H5CLEAR_TESTFILES/mod_h5clear_mdc_image.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_sec2_v0.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_sec2_v2.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_sec2_v3.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_log_v3.h5 +$SRC_H5CLEAR_TESTFILES/latest_h5clear_log_v3.h5 +$SRC_H5CLEAR_TESTFILES/latest_h5clear_sec2_v3.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_mdc_image.h5 " COPY_TESTFILES_TO_TESTDIR() @@ -121,8 +124,8 @@ CLEAN_TESTFILES_AND_TESTDIR() # beginning with the word "Testing". # TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' + SPACES=" " + echo "Testing $* $SPACES" | cut -c1-74 | tr -d '\012' } # $1 is the expected output @@ -226,29 +229,27 @@ COPY_TESTFILES_TO_TESTDIR # "h5clear -h" # "h5clear" (no options, no file) # "h5clear junk.h5" (no options, nonexisting file) -# "h5clear orig_h5clear_sec2_v3.h5" (no options, existing file) +# "h5clear h5clear_sec2_v3.h5" (no options, existing file) # "h5clear -m" (valid 1 option, no file) # "h5clear -s junk.h5" (valid 1 option, nonexisting file) -# "h5clear -m -s junk.h5" (valid 2 options, no file) +# "h5clear -m -s" (valid 2 options, no file) # "h5clear -m -s junk.h5" (valid 2 options, nonexisting file) -# "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) -# "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) +# "h5clear -m h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) +# "h5clear -s -m h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) TOOLTEST_OUT "" -h "" h5clear_usage.ddl TOOLTEST_OUT "" "" "" h5clear_usage.ddl TOOLTEST_OUT junk.h5 "" "" h5clear_usage.ddl -TOOLTEST_OUT $TESTDIR/orig_h5clear_sec2_v3.h5 "" "" h5clear_usage.ddl +TOOLTEST_OUT $TESTDIR/h5clear_sec2_v3.h5 "" "" h5clear_usage.ddl TOOLTEST_OUT "" -m "" h5clear_missing_file.ddl TOOLTEST_OUT junk.h5 -s "" h5clear_open_fail.ddl TOOLTEST_OUT "" -m -s h5clear_missing_file.ddl TOOLTEST_OUT junk.h5 -m -s h5clear_open_fail.ddl -TOOLTEST_OUT $TESTDIR/orig_h5clear_sec2_v2.h5 -m "" h5clear_no_mdc_image.ddl -TOOLTEST_OUT $TESTDIR/orig_h5clear_sec2_v0.h5 -s -m h5clear_no_mdc_image.ddl +TOOLTEST_OUT $TESTDIR/h5clear_sec2_v2.h5 -m "" h5clear_no_mdc_image.ddl +TOOLTEST_OUT $TESTDIR/h5clear_sec2_v0.h5 -s -m h5clear_no_mdc_image.ddl # # # # The following are tests to verify the expected exit code from h5clear: -# "h5clear -m h5clear_mdc_image.h5" (valid option, existing file, succeed exit code) -# "h5clear --vers" (valid option, version #, succeed exit code) # "h5clear -k" (invalid 1 option, no file, fail exit code) # "h5clear -k junk.h5" (invalid 1 option, nonexisting file, fail exit code) # "h5clear -l h5clear_sec2_v2.h5" (invalid 1 option, existing file, fail exit code) @@ -258,52 +259,55 @@ TOOLTEST_OUT $TESTDIR/orig_h5clear_sec2_v0.h5 -s -m h5clear_no_mdc_image.ddl # "h5clear -l -m junk.h5" (invalid/valid 2 options, nonexisting file, fail exit code) # "h5clear -m -k h5clear_sec2_v0.h5" (valid/invalid 2 options, existing file, fail exit code) # "h5clear -l -m h5clear_sec2_v0.h5" (invalid/valid 2 options, existing file, fail exit code) -TOOLTEST h5clear_mdc_image.h5 -m "" $SUCCEED -TOOLTEST "" --vers "" $SUCCEED TOOLTEST "" -k "" $FAIL TOOLTEST junk.h5 -k "" $FAIL TOOLTEST h5clear_sec2_v2.h5 -l "" $FAIL TOOLTEST "" -m -k $FAIL TOOLTEST "" -l -m $FAIL -TOOLTEST junk.h5 -m -l $FAIL +TOOLTEST junk.h5 -m -k $FAIL TOOLTEST junk.h5 -l -m $FAIL -TOOLTEST h5clear_sec2_v0.h5 -m -l $FAIL -TOOLTEST h5clear_sec2_v0.h5 -l -m $FAIL +TOOLTEST $TESTDIR/h5clear_sec2_v0.h5 -m -k $FAIL +TOOLTEST $TESTDIR/h5clear_sec2_v0.h5 -l -m $FAIL +# +# "h5clear --vers" (valid option, version #, succeed exit code) +# "h5clear -m h5clear_mdc_image.h5" (valid option, existing file, succeed exit code) +TOOLTEST "" --vers "" $SUCCEED +TOOLTEST $TESTDIR/h5clear_mdc_image.h5 -m "" $SUCCEED # # # # h5clear_mdc_image.h5 already has cache image removed earlier, verify the expected warning from h5clear: -TOOLTEST_OUT $TESTDIR/mod_h5clear_mdc_image.h5 -m "" h5clear_no_mdc_image.ddl -TOOLTEST_OUT $TESTDIR/mod_h5clear_mdc_image.h5 -s -m h5clear_no_mdc_image.ddl +TOOLTEST_OUT $TESTDIR/h5clear_mdc_image.h5 -m "" h5clear_no_mdc_image.ddl +TOOLTEST_OUT $TESTDIR/h5clear_mdc_image.h5 -s -m h5clear_no_mdc_image.ddl # # # # The following are tests to verify the status_flags field is cleared properly: -OPEN_CHK h5clear_sec2_v3.h5 $FAIL -TOOLTEST h5clear_sec2_v3.h5 -s "" $SUCCEED -OPEN_CHK h5clear_sec2_v3.h5 $SUCCEED +OPEN_CHK $TESTDIR/h5clear_sec2_v3.h5 $FAIL +TOOLTEST $TESTDIR/h5clear_sec2_v3.h5 -s "" $SUCCEED +OPEN_CHK $TESTDIR/h5clear_sec2_v3.h5 $SUCCEED # -OPEN_CHK h5clear_log_v3.h5 $FAIL -TOOLTEST h5clear_log_v3.h5 -s "" $SUCCEED -OPEN_CHK h5clear_log_v3.h5 $SUCCEED +OPEN_CHK $TESTDIR/h5clear_log_v3.h5 $FAIL +TOOLTEST $TESTDIR/h5clear_log_v3.h5 -s "" $SUCCEED +OPEN_CHK $TESTDIR/h5clear_log_v3.h5 $SUCCEED # -OPEN_CHK latest_h5clear_sec2_v3.h5 $FAIL -TOOLTEST latest_h5clear_sec2_v3.h5 -s "" $SUCCEED -OPEN_CHK latest_h5clear_sec2_v3.h5 $SUCCEED +OPEN_CHK $TESTDIR/latest_h5clear_sec2_v3.h5 $FAIL +TOOLTEST $TESTDIR/latest_h5clear_sec2_v3.h5 -s "" $SUCCEED +OPEN_CHK $TESTDIR/latest_h5clear_sec2_v3.h5 $SUCCEED # -OPEN_CHK latest_h5clear_log_v3.h5 $FAIL -TOOLTEST latest_h5clear_log_v3.h5 -s "" $SUCCEED -OPEN_CHK latest_h5clear_log_v3.h5 $SUCCEED +OPEN_CHK $TESTDIR/latest_h5clear_log_v3.h5 $FAIL +TOOLTEST $TESTDIR/latest_h5clear_log_v3.h5 -s "" $SUCCEED +OPEN_CHK $TESTDIR/latest_h5clear_log_v3.h5 $SUCCEED # # File open succeeds for the following 2 test files because the # library does not check status_flags for files with < v3 superblock: -OPEN_CHK h5clear_sec2_v0.h5 $SUCCEED -TOOLTEST h5clear_sec2_v0.h5 -s "" $SUCCEED -OPEN_CHK h5clear_sec2_v0.h5 $SUCCEED +OPEN_CHK $TESTDIR/h5clear_sec2_v0.h5 $SUCCEED +TOOLTEST $TESTDIR/h5clear_sec2_v0.h5 -s "" $SUCCEED +OPEN_CHK $TESTDIR/h5clear_sec2_v0.h5 $SUCCEED # -OPEN_CHK h5clear_sec2_v2.h5 $SUCCEED -TOOLTEST h5clear_sec2_v2.h5 -s "" $SUCCEED -OPEN_CHK h5clear_sec2_v2.h5 $SUCCEED +OPEN_CHK $TESTDIR/h5clear_sec2_v2.h5 $SUCCEED +TOOLTEST $TESTDIR/h5clear_sec2_v2.h5 -s "" $SUCCEED +OPEN_CHK $TESTDIR/h5clear_sec2_v2.h5 $SUCCEED # # # -- cgit v0.12 From 9f1fd68ce2918f9d67a5b93ffa3dee35d21f5848 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 18 Apr 2017 13:27:54 -0500 Subject: LDFLAGS module forces .so lib to be built on osx instead of .dylib --- java/src/jni/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/jni/Makefile.am b/java/src/jni/Makefile.am index 5672864..fdf6608 100644 --- a/java/src/jni/Makefile.am +++ b/java/src/jni/Makefile.am @@ -31,7 +31,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/java/src/jni $(JNIFLAGS) lib_LTLIBRARIES=libhdf5_java.la # Add libtool numbers to the HDF5 Java (JNI) library (from config/lt_vers.am) -libhdf5_java_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS) +libhdf5_java_la_LDFLAGS = -avoid-version -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS) # Source files for the library libhdf5_java_la_SOURCES=exceptionImp.c h5Constants.c nativeData.c h5util.c h5Imp.c \ -- cgit v0.12 From 62770c64326f844739c2753bfee49c297f2c7a39 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 18 Apr 2017 14:23:35 -0500 Subject: Update tool dyn lib --- tools/test/h5diff/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/test/h5diff/Makefile.am b/tools/test/h5diff/Makefile.am index 1d700ea..16897c6 100644 --- a/tools/test/h5diff/Makefile.am +++ b/tools/test/h5diff/Makefile.am @@ -54,6 +54,7 @@ if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. lib_LTLIBRARIES=libdynlibdiff.la libdynlibdiff_la_SOURCES=dynlib_diff.c + libdynlibdiff_la_LDFLAGS = -avoid-version -module -shared -export-dynamic install-exec-hook: $(RM) $(DESTDIR)$(libdir)/*dynlib* -- cgit v0.12 From d594cb2cc6d73ef2dd7ddfee689cdda23827e03e Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 19 Apr 2017 18:28:21 -0400 Subject: Added code to disable the evict-on-close feature in the parallel library. --- src/H5Pfapl.c | 21 ++++++++++- test/cache_image.c | 8 ++++ test/evict_on_close.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+), 2 deletions(-) diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 7865fdf..8bd53a9 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -4381,7 +4381,19 @@ H5P_facc_mdc_log_location_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_ *------------------------------------------------------------------------- */ herr_t -H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close) +H5Pset_evict_on_close( +#if defined(H5_HAVE_PARALLEL) && !defined(H5_DEBUG_BUILD) + hid_t H5_ATTR_UNUSED fapl_id, +#else + hid_t fapl_id, +#endif /* H5_HAVE_PARALLEL and !H5_DEBUG_BUILD */ + +#ifdef H5_HAVE_PARALLEL + hbool_t H5_ATTR_UNUSED evict_on_close +#else + hbool_t evict_on_close +#endif /* H5_HAVE_PARALLEL */ +) { H5P_genplist_t *plist; /* property list pointer */ herr_t ret_value = SUCCEED; /* return value */ @@ -4389,6 +4401,7 @@ H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close) FUNC_ENTER_API(FAIL) H5TRACE2("e", "ib", fapl_id, evict_on_close); + /* Compare the property list's class against the other class */ if(TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist") @@ -4397,9 +4410,13 @@ H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close) if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") - /* Set values */ +#ifndef H5_HAVE_PARALLEL + /* Set value */ if(H5P_set(plist, H5F_ACS_EVICT_ON_CLOSE_FLAG_NAME, &evict_on_close) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set evict on close property") +#else + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "evict on close is currently not supported in parallel HDF5") +#endif /* H5_HAVE_PARALLEL */ done: FUNC_LEAVE_API(ret_value) diff --git a/test/cache_image.c b/test/cache_image.c index dfbd02e..31d7705 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -62,7 +62,10 @@ static unsigned cache_image_api_error_check_3(void); static unsigned cache_image_api_error_check_4(void); static unsigned get_free_sections_test(void); + +#ifndef H5_HAVE_PARALLEL static unsigned evict_on_close_test(void); +#endif /* H5_HAVE_PARALLEL */ /****************************************************************************/ @@ -7711,6 +7714,7 @@ get_free_sections_test(void) * *------------------------------------------------------------------------- */ +#ifndef H5_HAVE_PARALLEL static unsigned evict_on_close_test(void) { @@ -8015,6 +8019,7 @@ evict_on_close_test(void) return !pass; } /* evict_on_close_test() */ +#endif /* H5_HAVE_PARALLEL */ /*------------------------------------------------------------------------- @@ -8066,7 +8071,10 @@ main(void) nerrs += cache_image_api_error_check_4(); nerrs += get_free_sections_test(); + +#ifndef H5_HAVE_PARALLEL nerrs += evict_on_close_test(); +#endif /* H5_HAVE_PARALLEL */ return(nerrs > 0); diff --git a/test/evict_on_close.c b/test/evict_on_close.c index b00c1e4..8196ea1 100644 --- a/test/evict_on_close.c +++ b/test/evict_on_close.c @@ -39,6 +39,12 @@ #include "H5Gpkg.h" #include "H5Ipkg.h" +/* Evict on close is not supported under parallel at this time. + * In the meantime, we just run a simple check that EoC can't be + * enabled in parallel HDF5. + */ +#ifndef H5_HAVE_PARALLEL + /* Uncomment to manually inspect cache states */ /* (Requires debug build of the library) */ /* #define EOC_MANUAL_INSPECTION */ @@ -802,6 +808,7 @@ error: } /* check_dset_scheme() */ + /*------------------------------------------------------------------------- * Function: check_evict_on_close_api() @@ -992,3 +999,96 @@ error: } /* end main() */ +#else + + +/*------------------------------------------------------------------------- + * Function: check_evict_on_close_parallel_fail() + * + * Purpose: Verify that the H5Pset_evict_on_close() call fails in + * parallel HDF5. + * + * Return: SUCCEED/FAIL + * + * Programmer: Dana Robinson + * Spring 2017 + * + *------------------------------------------------------------------------- + */ +static herr_t +check_evict_on_close_parallel_fail(void) +{ + hid_t fapl_id = -1; + hbool_t evict_on_close; + herr_t status; + + TESTING("evict on close fails in parallel"); + + /* Create a fapl */ + if((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) + TEST_ERROR; + + /* Set the evict on close property (should fail)*/ + evict_on_close = TRUE; + H5E_BEGIN_TRY { + status = H5Pset_evict_on_close(fapl_id, evict_on_close); + } H5E_END_TRY; + if(status >= 0) + FAIL_PUTS_ERROR("H5Pset_evict_on_close() did not fail in parallel HDF5."); + + /* close fapl */ + if(H5Pclose(fapl_id) < 0) + TEST_ERROR; + + PASSED(); + return SUCCEED; + +error: + H5_FAILED(); + return FAIL; + +} /* check_evict_on_close_parallel_fail() */ + + +/*------------------------------------------------------------------------- + * Function: main (parallel version) + * + * Return: EXIT_FAILURE/EXIT_SUCCESS + * + * Programmer: Dana Robinson + * Spring 2016 + * + *------------------------------------------------------------------------- + */ +int +main(void) +{ + unsigned nerrors = 0; /* number of test errors */ + + HDprintf("Testing evict-on-close cache behavior\n"); + + /* Initialize */ + h5_reset(); + + /* Test that EoC fails in parallel HDF5 */ + nerrors += check_evict_on_close_parallel_fail() < 0 ? 1 : 0; + + if(nerrors) + goto error; + + HDprintf("All evict-on-close tests passed.\n"); + HDprintf("Note that EoC is not supported under parallel so most tests are skipped.\n"); + + return EXIT_SUCCESS; + +error: + + HDprintf("***** %u evict-on-close test%s FAILED! *****\n", + nerrors, nerrors > 1 ? "S" : ""); + + return EXIT_FAILURE; + +} /* main() - parallel */ + +#endif /* H5_HAVE_PARALLEL */ + -- cgit v0.12 From 43e03c548ae2c405b92f95833251683d3eeb1440 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Wed, 19 Apr 2017 22:51:39 -0500 Subject: Modifications based on review comments from pull request. Made changes according to review comments and discussion with Allen. --- MANIFEST | 1 + tools/test/misc/h5clear_gentest.c | 118 ++++++++++----------- tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 | Bin 0 -> 22048 bytes tools/test/misc/testh5clear.sh.in | 104 ++++++++++-------- 4 files changed, 117 insertions(+), 106 deletions(-) create mode 100644 tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 diff --git a/MANIFEST b/MANIFEST index 5f549f4..27781b8 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1478,6 +1478,7 @@ ./tools/test/misc/testfiles/h5clear_sec2_v3.h5 ./tools/test/misc/testfiles/latest_h5clear_log_v3.h5 ./tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5 +./tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 ./tools/test/misc/testfiles/h5mkgrp_help.txt ./tools/test/misc/testfiles/h5mkgrp_version.txt.in ./tools/test/misc/h5perf_gentest.c diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c index f8b6a70..86ea3d2 100644 --- a/tools/test/misc/h5clear_gentest.c +++ b/tools/test/misc/h5clear_gentest.c @@ -142,7 +142,7 @@ error: * status_flags properly so users can open the files afterwards. * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Vailin Choi; July 2013 * @@ -167,65 +167,65 @@ main(void) /* Create a copy of the file access property list */ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) - goto error; + goto error; /* Copy the file access property list */ if((new_fapl = H5Pcopy(fapl)) < 0) - goto error; + goto error; /* Set to latest library format */ if(H5Pset_libver_bounds(new_fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) - goto error; + goto error; /* Files created within this for loop will have v3 superblock and nonzero status_flags */ for(new_format = FALSE; new_format <= TRUE; new_format++) { - hid_t fapl2, my_fapl; /* File access property lists */ - - /* Set to use the appropriate file access property list */ - if(new_format) - fapl2 = new_fapl; - else - fapl2 = fapl; - /* - * Create a sec2 file - */ - if((my_fapl = H5Pcopy(fapl2)) < 0) - goto error; - /* Create the file */ - sprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[0]); - if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0) - goto error; - - /* Flush the file */ - if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) - goto error; + hid_t fapl2, my_fapl; /* File access property lists */ + + /* Set to use the appropriate file access property list */ + if(new_format) + fapl2 = new_fapl; + else + fapl2 = fapl; + /* + * Create a sec2 file + */ + if((my_fapl = H5Pcopy(fapl2)) < 0) + goto error; + /* Create the file */ + sprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[0]); + if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0) + goto error; + + /* Flush the file */ + if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) + goto error; - /* Close the property list */ - if(H5Pclose(my_fapl) < 0) - goto error; - - /* - * Create a log file - */ - /* Create a copy of file access property list */ - if((my_fapl = H5Pcopy(fapl2)) < 0) - goto error; - - /* Setup the fapl for the log driver */ - if(H5Pset_fapl_log(my_fapl, "append.log", (unsigned long long)H5FD_LOG_ALL, (size_t)(4 * KB)) < 0) - goto error; - - /* Create the file */ - sprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[1]); - if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0) - goto error; - - /* Flush the file */ - if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) - goto error; - - /* Close the property list */ - if(H5Pclose(my_fapl) < 0) - goto error; + /* Close the property list */ + if(H5Pclose(my_fapl) < 0) + goto error; + + /* + * Create a log file + */ + /* Create a copy of file access property list */ + if((my_fapl = H5Pcopy(fapl2)) < 0) + goto error; + + /* Setup the fapl for the log driver */ + if(H5Pset_fapl_log(my_fapl, "append.log", (unsigned long long)H5FD_LOG_ALL, (size_t)(4 * KB)) < 0) + goto error; + + /* Create the file */ + sprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[1]); + if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0) + goto error; + + /* Flush the file */ + if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) + goto error; + + /* Close the property list */ + if(H5Pclose(my_fapl) < 0) + goto error; } /* end for */ @@ -233,38 +233,38 @@ main(void) * Create a sec2 file with v0 superblock but nonzero status_flags */ if((fid = H5Fcreate(FILENAME[2], H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - goto error; + goto error; /* Flush the file */ if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) - goto error; + goto error; /* * Create a sec2 file with v2 superblock but nonzero status_flags */ if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) - goto error; + goto error; if(H5Pset_shared_mesg_nindexes(fcpl, 1) < 0) goto error; if(H5Pset_shared_mesg_index(fcpl, 0, H5O_SHMESG_DTYPE_FLAG, 50) < 0) goto error; if((fid = H5Fcreate(FILENAME[3], H5F_ACC_TRUNC, fcpl, fapl)) < 0) - goto error; + goto error; /* Flush the file */ if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) - goto error; + goto error; /* Close the property lists */ if(H5Pclose(fapl) < 0) - goto error; + goto error; if(H5Pclose(new_fapl) < 0) - goto error; + goto error; if(H5Pclose(fcpl) < 0) - goto error; + goto error; fflush(stdout); fflush(stderr); diff --git a/tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 b/tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 new file mode 100644 index 0000000..310134b Binary files /dev/null and b/tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 differ diff --git a/tools/test/misc/testh5clear.sh.in b/tools/test/misc/testh5clear.sh.in index a31b824..b855572 100644 --- a/tools/test/misc/testh5clear.sh.in +++ b/tools/test/misc/testh5clear.sh.in @@ -75,6 +75,7 @@ $SRC_H5CLEAR_TESTFILES/h5clear_log_v3.h5 $SRC_H5CLEAR_TESTFILES/latest_h5clear_log_v3.h5 $SRC_H5CLEAR_TESTFILES/latest_h5clear_sec2_v3.h5 $SRC_H5CLEAR_TESTFILES/h5clear_mdc_image.h5 +$SRC_H5CLEAR_TESTFILES/mod_h5clear_mdc_image.h5 " COPY_TESTFILES_TO_TESTDIR() @@ -124,8 +125,8 @@ CLEAN_TESTFILES_AND_TESTDIR() # beginning with the word "Testing". # TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-74 | tr -d '\012' + SPACES=" " + echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' } # $1 is the expected output @@ -164,6 +165,7 @@ TOOLTEST_OUT() { # Run test. TESTING $H5CLEAR $option1 $option2 $fname ( + cd $TESTDIR $RUNSERIAL $H5CLEAR_BIN $option1 $option2 $fname ) >$actual 2>$actual_err cp $actual $actual_sav @@ -184,7 +186,10 @@ TOOLTEST_OUT() { OPEN_CHK() { fname=$1 expected=$2 - $OPENCHK_BIN $fname 2>/dev/null + ( + cd $TESTDIR + $OPENCHK_BIN $fname 2>/dev/null + ) actual=$? if test $actual -ne $expected; then echo "Unexpected return from $OPENCHK" @@ -204,9 +209,11 @@ TOOLTEST() { ret_expected=$4 # TESTING $H5CLEAR $option1 $option2 $fname - fname=$1 # h5clear $option1 $option2 $fname - $RUNSERIAL $H5CLEAR_BIN $option1 $option2 $fname 2>/dev/null 1>/dev/null + ( + cd $TESTDIR + $RUNSERIAL $H5CLEAR_BIN $option1 $option2 $fname 2>/dev/null 1>/dev/null + ) if test $? -ne $ret_expected; then echo "*FAILED*" nerrors=`expr $nerrors + 1` @@ -222,92 +229,95 @@ TOOLTEST() { ############################################################################## # prepare for testing COPY_TESTFILES_TO_TESTDIR +# For Cmake +$CP -f $TESTDIR/h5clear_sec2_v0.h5 $TESTDIR/orig_h5clear_sec2_v0.h5 +$CP -f $TESTDIR/h5clear_sec2_v2.h5 $TESTDIR/orig_h5clear_sec2_v2.h5 +$CP -f $TESTDIR/h5clear_sec2_v3.h5 $TESTDIR/orig_h5clear_sec2_v3.h5 # # # # The following are tests to verify the expected output from h5clear # "h5clear -h" -# "h5clear" (no options, no file) -# "h5clear junk.h5" (no options, nonexisting file) -# "h5clear h5clear_sec2_v3.h5" (no options, existing file) -# "h5clear -m" (valid 1 option, no file) -# "h5clear -s junk.h5" (valid 1 option, nonexisting file) -# "h5clear -m -s" (valid 2 options, no file) -# "h5clear -m -s junk.h5" (valid 2 options, nonexisting file) -# "h5clear -m h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) -# "h5clear -s -m h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) +# "h5clear" (no options, no file) +# "h5clear junk.h5" (no options, nonexisting file) +# "h5clear orig_h5clear_sec2_v3.h5" (no options, existing file) +# "h5clear -m" (valid 1 option, no file) +# "h5clear -s junk.h5" (valid 1 option, nonexisting file) +# "h5clear -m -s" (valid 2 options, no file) +# "h5clear -m -s junk.h5" (valid 2 options, nonexisting file) +# "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) +# "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) TOOLTEST_OUT "" -h "" h5clear_usage.ddl TOOLTEST_OUT "" "" "" h5clear_usage.ddl TOOLTEST_OUT junk.h5 "" "" h5clear_usage.ddl -TOOLTEST_OUT $TESTDIR/h5clear_sec2_v3.h5 "" "" h5clear_usage.ddl +TOOLTEST_OUT orig_h5clear_sec2_v3.h5 "" "" h5clear_usage.ddl TOOLTEST_OUT "" -m "" h5clear_missing_file.ddl TOOLTEST_OUT junk.h5 -s "" h5clear_open_fail.ddl TOOLTEST_OUT "" -m -s h5clear_missing_file.ddl TOOLTEST_OUT junk.h5 -m -s h5clear_open_fail.ddl -TOOLTEST_OUT $TESTDIR/h5clear_sec2_v2.h5 -m "" h5clear_no_mdc_image.ddl -TOOLTEST_OUT $TESTDIR/h5clear_sec2_v0.h5 -s -m h5clear_no_mdc_image.ddl +TOOLTEST_OUT orig_h5clear_sec2_v2.h5 -m "" h5clear_no_mdc_image.ddl +TOOLTEST_OUT orig_h5clear_sec2_v0.h5 -s -m h5clear_no_mdc_image.ddl # # # # The following are tests to verify the expected exit code from h5clear: +# "h5clear -m h5clear_mdc_image.h5" (valid option, existing file, succeed exit code) +# "h5clear --vers" (valid option, version #, succeed exit code) # "h5clear -k" (invalid 1 option, no file, fail exit code) # "h5clear -k junk.h5" (invalid 1 option, nonexisting file, fail exit code) # "h5clear -l h5clear_sec2_v2.h5" (invalid 1 option, existing file, fail exit code) # "h5clear -m -k" (valid/invalid 2 options, nofile, fail exit code) # "h5clear -l -m" (invalid/valid 2 options, nofile, fail exit code) -# "h5clear -m -k junk.h5" (valid/invalid 2 options, nonexisting file, fail exit code) +# "h5clear -m -l junk.h5" (valid/invalid 2 options, nonexisting file, fail exit code) # "h5clear -l -m junk.h5" (invalid/valid 2 options, nonexisting file, fail exit code) -# "h5clear -m -k h5clear_sec2_v0.h5" (valid/invalid 2 options, existing file, fail exit code) +# "h5clear -m -l h5clear_sec2_v0.h5" (valid/invalid 2 options, existing file, fail exit code) # "h5clear -l -m h5clear_sec2_v0.h5" (invalid/valid 2 options, existing file, fail exit code) +TOOLTEST h5clear_mdc_image.h5 -m "" $SUCCEED +TOOLTEST "" --vers "" $SUCCEED TOOLTEST "" -k "" $FAIL TOOLTEST junk.h5 -k "" $FAIL TOOLTEST h5clear_sec2_v2.h5 -l "" $FAIL TOOLTEST "" -m -k $FAIL TOOLTEST "" -l -m $FAIL -TOOLTEST junk.h5 -m -k $FAIL +TOOLTEST junk.h5 -m -l $FAIL TOOLTEST junk.h5 -l -m $FAIL -TOOLTEST $TESTDIR/h5clear_sec2_v0.h5 -m -k $FAIL -TOOLTEST $TESTDIR/h5clear_sec2_v0.h5 -l -m $FAIL -# -# "h5clear --vers" (valid option, version #, succeed exit code) -# "h5clear -m h5clear_mdc_image.h5" (valid option, existing file, succeed exit code) -TOOLTEST "" --vers "" $SUCCEED -TOOLTEST $TESTDIR/h5clear_mdc_image.h5 -m "" $SUCCEED +TOOLTEST h5clear_sec2_v0.h5 -m -l $FAIL +TOOLTEST h5clear_sec2_v0.h5 -l -m $FAIL # # # # h5clear_mdc_image.h5 already has cache image removed earlier, verify the expected warning from h5clear: -TOOLTEST_OUT $TESTDIR/h5clear_mdc_image.h5 -m "" h5clear_no_mdc_image.ddl -TOOLTEST_OUT $TESTDIR/h5clear_mdc_image.h5 -s -m h5clear_no_mdc_image.ddl +TOOLTEST_OUT mod_h5clear_mdc_image.h5 -m "" h5clear_no_mdc_image.ddl +TOOLTEST_OUT mod_h5clear_mdc_image.h5 -s -m h5clear_no_mdc_image.ddl # # # # The following are tests to verify the status_flags field is cleared properly: -OPEN_CHK $TESTDIR/h5clear_sec2_v3.h5 $FAIL -TOOLTEST $TESTDIR/h5clear_sec2_v3.h5 -s "" $SUCCEED -OPEN_CHK $TESTDIR/h5clear_sec2_v3.h5 $SUCCEED +OPEN_CHK h5clear_sec2_v3.h5 $FAIL +TOOLTEST h5clear_sec2_v3.h5 -s "" $SUCCEED +OPEN_CHK h5clear_sec2_v3.h5 $SUCCEED # -OPEN_CHK $TESTDIR/h5clear_log_v3.h5 $FAIL -TOOLTEST $TESTDIR/h5clear_log_v3.h5 -s "" $SUCCEED -OPEN_CHK $TESTDIR/h5clear_log_v3.h5 $SUCCEED +OPEN_CHK h5clear_log_v3.h5 $FAIL +TOOLTEST h5clear_log_v3.h5 -s "" $SUCCEED +OPEN_CHK h5clear_log_v3.h5 $SUCCEED # -OPEN_CHK $TESTDIR/latest_h5clear_sec2_v3.h5 $FAIL -TOOLTEST $TESTDIR/latest_h5clear_sec2_v3.h5 -s "" $SUCCEED -OPEN_CHK $TESTDIR/latest_h5clear_sec2_v3.h5 $SUCCEED +OPEN_CHK latest_h5clear_sec2_v3.h5 $FAIL +TOOLTEST latest_h5clear_sec2_v3.h5 -s "" $SUCCEED +OPEN_CHK latest_h5clear_sec2_v3.h5 $SUCCEED # -OPEN_CHK $TESTDIR/latest_h5clear_log_v3.h5 $FAIL -TOOLTEST $TESTDIR/latest_h5clear_log_v3.h5 -s "" $SUCCEED -OPEN_CHK $TESTDIR/latest_h5clear_log_v3.h5 $SUCCEED +OPEN_CHK latest_h5clear_log_v3.h5 $FAIL +TOOLTEST latest_h5clear_log_v3.h5 -s "" $SUCCEED +OPEN_CHK latest_h5clear_log_v3.h5 $SUCCEED # # File open succeeds for the following 2 test files because the # library does not check status_flags for files with < v3 superblock: -OPEN_CHK $TESTDIR/h5clear_sec2_v0.h5 $SUCCEED -TOOLTEST $TESTDIR/h5clear_sec2_v0.h5 -s "" $SUCCEED -OPEN_CHK $TESTDIR/h5clear_sec2_v0.h5 $SUCCEED +OPEN_CHK h5clear_sec2_v0.h5 $SUCCEED +TOOLTEST h5clear_sec2_v0.h5 -s "" $SUCCEED +OPEN_CHK h5clear_sec2_v0.h5 $SUCCEED # -OPEN_CHK $TESTDIR/h5clear_sec2_v2.h5 $SUCCEED -TOOLTEST $TESTDIR/h5clear_sec2_v2.h5 -s "" $SUCCEED -OPEN_CHK $TESTDIR/h5clear_sec2_v2.h5 $SUCCEED +OPEN_CHK h5clear_sec2_v2.h5 $SUCCEED +TOOLTEST h5clear_sec2_v2.h5 -s "" $SUCCEED +OPEN_CHK h5clear_sec2_v2.h5 $SUCCEED # # # -- cgit v0.12 From ea46fbe7c2bb3a8c8972c880f3609be20036d741 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 20 Apr 2017 12:19:28 -0500 Subject: Correct typo of file name --- config/cmake/HDF5_Examples.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index 04f72a0..2567bd8 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -87,6 +87,6 @@ if (WIN32) include (${CTEST_SCRIPT_DIRECTORY}\\HDF5_Examples_options.cmake) include (${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake) else () - include (${CTEST_SCRIPT_DIRECTORY}/HDF_Examples_options.cmake) + include (${CTEST_SCRIPT_DIRECTORY}/HDF5_Examples_options.cmake) include (${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake) endif () -- cgit v0.12 From 7ee229bceddc1c0cd8d9ba2b7382d6d74ba0527b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 20 Apr 2017 13:45:27 -0500 Subject: Updates to CMake for the changes in the autotools script --- tools/test/misc/CMakeLists.txt | 13 ++--- tools/test/misc/CMakeTestsClear.cmake | 94 +++++++++++++++++++++++++++++------ 2 files changed, 87 insertions(+), 20 deletions(-) diff --git a/tools/test/misc/CMakeLists.txt b/tools/test/misc/CMakeLists.txt index 97a6f0c..5e3c0a2 100644 --- a/tools/test/misc/CMakeLists.txt +++ b/tools/test/misc/CMakeLists.txt @@ -17,6 +17,13 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5repart_gentest COMMAND $) + add_executable (h5clear_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5clear_gentest.c) + TARGET_NAMING (h5clear_gentest STATIC) + TARGET_C_PROPERTIES (h5clear_gentest STATIC " " " ") + target_link_libraries (h5clear_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + set_target_properties (h5clear_gentest PROPERTIES FOLDER tools) + #add_test (NAME H5CLEAR-h5clear_gentest COMMAND $) + add_subdirectory (${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/vds) endif () @@ -27,12 +34,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) target_link_libraries (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart_test PROPERTIES FOLDER tools) - add_executable (h5clear_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5clear_gentest.c) - TARGET_NAMING (h5clear_gentest STATIC) - TARGET_C_PROPERTIES (h5clear_gentest STATIC " " " ") - target_link_libraries (h5clear_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) - set_target_properties (h5clear_gentest PROPERTIES FOLDER tools) - add_executable (clear_open_chk ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/clear_open_chk.c) TARGET_NAMING (clear_open_chk STATIC) TARGET_C_PROPERTIES (clear_open_chk STATIC " " " ") diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake index a92d523..5f40514 100644 --- a/tools/test/misc/CMakeTestsClear.cmake +++ b/tools/test/misc/CMakeTestsClear.cmake @@ -8,20 +8,32 @@ # -------------------------------------------------------------------- # Copy all the HDF5 files from the source directory into the test directory # -------------------------------------------------------------------- + set (HDF5_TEST_FILES + h5clear_log_v3.h5 + h5clear_mdc_image.h5 + mod_h5clear_mdc_image.h5 + latest_h5clear_log_v3.h5 + latest_h5clear_sec2_v3.h5 + ) + set (HDF5_SEC2_TEST_FILES + h5clear_sec2_v0.h5 + h5clear_sec2_v2.h5 + h5clear_sec2_v3.h5 + ) set (HDF5_REFERENCE_TEST_FILES h5clear_usage.ddl h5clear_open_fail.ddl h5clear_missing_file.ddl h5clear_no_mdc_image.ddl - orig_h5clear_sec2_v0.h5 - orig_h5clear_sec2_v2.h5 - orig_h5clear_sec2_v3.h5 - mod_h5clear_mdc_image.h5 ) - foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) + foreach (h5_file ${HDF5_TEST_FILES} ${HDF5_SEC2_TEST_FILES} ${HDF5_REFERENCE_TEST_FILES}) HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5clear_files") endforeach () + # make second copy of h5clear_sec2.h5 + foreach (h5_file ${HDF5_SEC2_TEST_FILES}) + HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/orig_${h5_file}" "h5clear_files") + endforeach () # make second copy of mod_h5clear_mdc_image.h5 HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/mod_h5clear_mdc_image.h5" "${PROJECT_BINARY_DIR}/testfiles/mod_h5clear_mdc_image2.h5" "h5clear_files") add_custom_target(h5clear_files ALL COMMENT "Copying files needed by h5clear tests" DEPENDS ${h5clear_files_list}) @@ -73,6 +85,16 @@ macro (ADD_H5_TEST testname resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) + add_test ( + NAME H5CLEAR-clear_open_chk-copy_${testname}.h5 + COMMAND ${CMAKE_COMMAND} + -E copy_if_different + "${PROJECT_SOURCE_DIR}/testfiles/${testname}.h5" "${PROJECT_BINARY_DIR}/testfiles/${testname}.h5" + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5CLEAR-clear_open_chk-copy_${testname}.h5 PROPERTIES DEPENDS ${last_test}) + endif () + set (last_test "H5CLEAR-clear_open_chk-copy_${testname}.h5") # Initial file open fails OR # File open succeeds because the library does not check status_flags for file with < v3 superblock add_test (NAME H5CLEAR-clear_open_chk-${testname}_${resultcode} COMMAND $ ${testname}.h5) @@ -101,6 +123,7 @@ # # # The following are tests to verify the status_flags field is cleared properly: +if (HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( NAME H5CLEAR-clearall-objects @@ -111,19 +134,66 @@ h5clear_sec2_v0.h5 h5clear_sec2_v2.h5 h5clear_sec2_v3.h5 + orig_h5clear_sec2_v0.h5 + orig_h5clear_sec2_v2.h5 + orig_h5clear_sec2_v3.h5 latest_h5clear_log_v3.h5 latest_h5clear_sec2_v3.h5 + mod_h5clear_mdc_image.h5 + mod_h5clear_mdc_image2.h5 ) if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5CLEAR-clearall-objects PROPERTIES DEPENDS ${last_test}) endif () set (last_test "H5CLEAR-clearall-objects") - # create the output files to be used. - add_test (NAME H5CLEAR-h5clear_gentest COMMAND $) - set_tests_properties (H5CLEAR-h5clear_gentest PROPERTIES DEPENDS "H5CLEAR-clearall-objects") - set_tests_properties (H5CLEAR-h5clear_gentest PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - set (last_test "H5CLEAR-h5clear_gentest") + foreach (h5_file ${HDF5_TEST_FILES} ${HDF5_SEC2_TEST_FILES}) + add_test ( + NAME H5CLEAR-copy_${h5_file} + COMMAND ${CMAKE_COMMAND} + -E copy_if_different + "${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5CLEAR-copy_${h5_file} PROPERTIES DEPENDS ${last_test}) + endif () + set (last_test "H5CLEAR-copy_${h5_file}") + endforeach () + # make second copy of h5clear_sec2.h5 + foreach (h5_file ${HDF5_SEC2_TEST_FILES}) + add_test ( + NAME H5CLEAR-copy_orig_${h5_file} + COMMAND ${CMAKE_COMMAND} + -E copy_if_different + "${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/orig_${h5_file}" + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5CLEAR-copy_orig_${h5_file} PROPERTIES DEPENDS ${last_test}) + endif () + set (last_test "H5CLEAR-copy_orig_${h5_file}") + endforeach () + add_test ( + NAME H5CLEAR-copy_mod_h5clear_mdc_image.h5 + COMMAND ${CMAKE_COMMAND} + -E copy_if_different + "${PROJECT_SOURCE_DIR}/testfiles/mod_h5clear_mdc_image.h5" "${PROJECT_BINARY_DIR}/testfiles/mod_h5clear_mdc_image.h5" + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5CLEAR-copy_mod_h5clear_mdc_image.h5 PROPERTIES DEPENDS ${last_test}) + endif () + set (last_test "H5CLEAR-copy_mod_h5clear_mdc_image.h5") + # make second copy of mod_h5clear_mdc_image.h5 + add_test ( + NAME H5CLEAR-copy_mod_h5clear_mdc_image2.h5 + COMMAND ${CMAKE_COMMAND} + -E copy_if_different + "${PROJECT_SOURCE_DIR}/testfiles/mod_h5clear_mdc_image.h5" "${PROJECT_BINARY_DIR}/testfiles/mod_h5clear_mdc_image2.h5" + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5CLEAR-copy_mod_h5clear_mdc_image2.h5 PROPERTIES DEPENDS ${last_test}) + endif () + set (last_test "H5CLEAR-copy_mod_h5clear_mdc_image2.h5") +endif() # # @@ -191,7 +261,3 @@ ADD_H5_TEST (latest_h5clear_log_v3 "true") ADD_H5_TEST (h5clear_sec2_v0 "false") ADD_H5_TEST (h5clear_sec2_v2 "false") - - set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} - h5clear_gentest - ) -- cgit v0.12 From 9a7b106d3776a8454b5cb9443f11aae2873cc617 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 20 Apr 2017 14:57:36 -0500 Subject: Correct test options to match autotools script --- tools/test/misc/CMakeTestsClear.cmake | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake index 5f40514..41aea4a 100644 --- a/tools/test/misc/CMakeTestsClear.cmake +++ b/tools/test/misc/CMakeTestsClear.cmake @@ -200,15 +200,15 @@ endif() # # The following are tests to verify the expected output from h5clear # "h5clear -h" -# "h5clear" (no options, no file) -# "h5clear junk.h5" (no options, nonexisting file) -# "h5clear orig_h5clear_sec2_v3.h5" (no options, existing file) -# "h5clear -m" (valid 1 option, no file) -# "h5clear -s junk.h5" (valid 1 option, nonexisting file) -# "h5clear -m -s junk.h5" (valid 2 options, no file) -# "h5clear -m -s junk.h5" (valid 2 options, nonexisting file) -# "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) -# "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) +# "h5clear" (no options, no file) +# "h5clear junk.h5" (no options, nonexisting file) +# "h5clear orig_h5clear_sec2_v3.h5" (no options, existing file) +# "h5clear -m" (valid 1 option, no file) +# "h5clear -s junk.h5" (valid 1 option, nonexisting file) +# "h5clear -m -s" (valid 2 options, no file) +# "h5clear -m -s junk.h5" (valid 2 options, nonexisting file) +# "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) +# "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) ADD_H5_CMP (h5clear_usage_h h5clear_usage 0 "-h") ADD_H5_CMP (h5clear_usage h5clear_usage 1 "") ADD_H5_CMP (h5clear_usage_junk h5clear_usage 1 "" junk.h5) @@ -218,7 +218,7 @@ endif() ADD_H5_CMP (h5clear_missing_file_ms h5clear_missing_file 1 "-m" "-s") ADD_H5_CMP (h5clear_open_fail_ms h5clear_open_fail 1 "-m" "-s" junk.h5) ADD_H5_CMP (h5clear_no_mdc_image_m h5clear_no_mdc_image 0 "-m" orig_h5clear_sec2_v2.h5) - ADD_H5_CMP (h5clear_no_mdc_image_ms h5clear_no_mdc_image 0 "-m" "-s" orig_h5clear_sec2_v0.h5) + ADD_H5_CMP (h5clear_no_mdc_image_ms h5clear_no_mdc_image 0 "-s" "-m" orig_h5clear_sec2_v0.h5) # # # @@ -230,9 +230,9 @@ endif() # "h5clear -l h5clear_sec2_v2.h5" (invalid 1 option, existing file, fail exit code) # "h5clear -m -k" (valid/invalid 2 options, nofile, fail exit code) # "h5clear -l -m" (invalid/valid 2 options, nofile, fail exit code) -# "h5clear -m -k junk.h5" (valid/invalid 2 options, nonexisting file, fail exit code) +# "h5clear -m -l junk.h5" (valid/invalid 2 options, nonexisting file, fail exit code) # "h5clear -l -m junk.h5" (invalid/valid 2 options, nonexisting file, fail exit code) -# "h5clear -m -k h5clear_sec2_v0.h5" (valid/invalid 2 options, existing file, fail exit code) +# "h5clear -m -l h5clear_sec2_v0.h5" (valid/invalid 2 options, existing file, fail exit code) # "h5clear -l -m h5clear_sec2_v0.h5" (invalid/valid 2 options, existing file, fail exit code) ADD_H5_RETTEST (h5clear_mdc_image "false" "-m" h5clear_mdc_image.h5) ADD_H5_RETTEST (h5clear_vers "false" "--vers") @@ -243,14 +243,14 @@ endif() ADD_H5_RETTEST (h5clear_lm "true" "-l" "-m") ADD_H5_RETTEST (h5clear_ml_junk "true" "-m" "-l" junk.h5) ADD_H5_RETTEST (h5clear_lm_junk "true" "-l" "-m" junk.h5) - ADD_H5_RETTEST (h5clear_ml_sec2 "true" "-m" "-l" h5clear_sec2_v2.h5) - ADD_H5_RETTEST (h5clear_lm_sec2 "true" "-l" "-m" h5clear_sec2_v2.h5) + ADD_H5_RETTEST (h5clear_ml_sec2 "true" "-m" "-l" h5clear_sec2_v0.h5) + ADD_H5_RETTEST (h5clear_lm_sec2 "true" "-l" "-m" h5clear_sec2_v0.h5) # # # # h5clear_mdc_image.h5 already has cache image removed earlier, verify the expected warning from h5clear: ADD_H5_CMP (h5clear_mdc_image_m h5clear_no_mdc_image 0 "-m" mod_h5clear_mdc_image.h5) - ADD_H5_CMP (h5clear_mdc_image_sm h5clear_no_mdc_image 0 "-m" "-s" mod_h5clear_mdc_image2.h5) + ADD_H5_CMP (h5clear_mdc_image_sm h5clear_no_mdc_image 0 "-s" "-m" mod_h5clear_mdc_image2.h5) # # # -- cgit v0.12 From 5ed622b9ca432f1b440e8903680695ac83e28301 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 20 Apr 2017 16:11:47 -0400 Subject: The cache_image test shows a skipped message about EoC in parallel. --- src/H5Pfapl.c | 1 - test/cache_image.c | 18 +++++++++--------- test/evict_on_close.c | 1 - 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 8bd53a9..e47a4b0 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -4401,7 +4401,6 @@ H5Pset_evict_on_close( FUNC_ENTER_API(FAIL) H5TRACE2("e", "ib", fapl_id, evict_on_close); - /* Compare the property list's class against the other class */ if(TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist") diff --git a/test/cache_image.c b/test/cache_image.c index 31d7705..378c21e 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -62,10 +62,7 @@ static unsigned cache_image_api_error_check_3(void); static unsigned cache_image_api_error_check_4(void); static unsigned get_free_sections_test(void); - -#ifndef H5_HAVE_PARALLEL static unsigned evict_on_close_test(void); -#endif /* H5_HAVE_PARALLEL */ /****************************************************************************/ @@ -7714,10 +7711,10 @@ get_free_sections_test(void) * *------------------------------------------------------------------------- */ -#ifndef H5_HAVE_PARALLEL static unsigned evict_on_close_test(void) { +#ifndef H5_HAVE_PARALLEL const char * fcn_name = "evict_on_close_test()"; char filename[512]; hbool_t show_progress = FALSE; @@ -7726,9 +7723,16 @@ evict_on_close_test(void) H5F_t *file_ptr = NULL; H5C_t *cache_ptr = NULL; int cp = 0; +#endif /* H5_HAVE_PARALLEL */ TESTING("Cache image / evict on close interaction"); +#ifdef H5_HAVE_PARALLEL + SKIPPED(); + HDputs(" EoC not supported in the parallel library."); + return 0; +#else + pass = TRUE; if ( show_progress ) @@ -8017,9 +8021,9 @@ evict_on_close_test(void) FUNC, failure_mssg); return !pass; +#endif /* H5_HAVE_PARALLEL */ } /* evict_on_close_test() */ -#endif /* H5_HAVE_PARALLEL */ /*------------------------------------------------------------------------- @@ -8071,13 +8075,9 @@ main(void) nerrs += cache_image_api_error_check_4(); nerrs += get_free_sections_test(); - -#ifndef H5_HAVE_PARALLEL nerrs += evict_on_close_test(); -#endif /* H5_HAVE_PARALLEL */ return(nerrs > 0); } /* main() */ - diff --git a/test/evict_on_close.c b/test/evict_on_close.c index 8196ea1..147976b 100644 --- a/test/evict_on_close.c +++ b/test/evict_on_close.c @@ -808,7 +808,6 @@ error: } /* check_dset_scheme() */ - /*------------------------------------------------------------------------- * Function: check_evict_on_close_api() -- cgit v0.12 From 6ef69b7b1748a48c236c60f45a1ee590de7b5194 Mon Sep 17 00:00:00 2001 From: lrknox Date: Thu, 20 Apr 2017 16:51:21 -0500 Subject: Add targets for plugin test libraries to avoid linking to external libs. --- config/conclude.am | 8 +++++--- test/Makefile.am | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/config/conclude.am b/config/conclude.am index 1ba56fb..1932170 100644 --- a/config/conclude.am +++ b/config/conclude.am @@ -18,13 +18,14 @@ ## Textually included at the end of most HDF5 Makefiles.am. ## Contains build rules. -# Automake needs to be taught how to build lib, progs, and tests targets. +# Automake needs to be taught how to build lib, pkglib, progs and tests targets. # These will be filled in automatically for the most part (e.g., # lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and # EXTRA_TEST variables are supplied to allow the user to force targets to -# be built at certain times. +# be built at certain times. LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) +PKGLIB = $(pkglib_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) @@ -36,6 +37,7 @@ AM_SH_LOG_FLAGS = # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. +build-pkglib: $(PKGLIB) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -43,7 +45,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib progs tests check-s check-p :: $(BUILT_SOURCES) +lib pkglib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/test/Makefile.am b/test/Makefile.am index 79dc17f..004fbfb 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -106,7 +106,7 @@ noinst_LTLIBRARIES=libh5test.la if HAVE_SHARED_CONDITIONAL # The libdynlib1, libdynlib2, libdynlib3, and libdynlib4 library for testing plugin module plugin.c. # Build it as shared library if configure is enabled for shared library. - lib_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la + pkglib_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la libdynlib1_la_SOURCES=dynlib1.c libdynlib2_la_SOURCES=dynlib2.c libdynlib3_la_SOURCES=dynlib3.c @@ -125,6 +125,8 @@ libh5test_la_SOURCES=h5test.c testframe.c cache_common.c swmr_common.c # Use libhd5test.la to compile all of the tests LDADD=libh5test.la $(LIBHDF5) +LIBADD=pkglib_LTLIBRARIES + # List the source files for tests that have more than one ttsafe_SOURCES=ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c \ ttsafe_acreate.c @@ -148,6 +150,18 @@ timings _timings: testmeta # The flush1 test must run before the flush2 test flush2.chkexe_: flush1.chkexe_ +libdynlib1.la: $(libdynlib1_la_OBJECTS) $(libdynlib1_la_DEPENDENCIES) $(EXTRA_libdynlib1_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlib1_la_LINK) $(am_libdynlib1_la_rpath) $(libdynlib1_la_OBJECTS) $(libdynlib1_la_LIBADD) + +libdynlib2.la: $(libdynlib2_la_OBJECTS) $(libdynlib2_la_DEPENDENCIES) $(EXTRA_libdynlib2_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlib2_la_LINK) $(am_libdynlib2_la_rpath) $(libdynlib2_la_OBJECTS) $(libdynlib2_la_LIBADD) + +libdynlib3.la: $(libdynlib3_la_OBJECTS) $(libdynlib3_la_DEPENDENCIES) $(EXTRA_libdynlib3_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlib3_la_LINK) $(am_libdynlib3_la_rpath) $(libdynlib3_la_OBJECTS) $(libdynlib3_la_LIBADD) + +libdynlib4.la: $(libdynlib4_la_OBJECTS) $(libdynlib4_la_DEPENDENCIES) $(EXTRA_libdynlib4_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlib4_la_LINK) $(am_libdynlib4_la_rpath) $(libdynlib4_la_OBJECTS) $(libdynlib4_la_LIBADD) + # Temporary files. These files are the ones created by setting the # HDF5_NOCLEANUP environment variable and running `make test' without # specifying a file prefix or low-level driver. Changing the file -- cgit v0.12 From 739f413b7803c1d8fb5d0cbaef6503785a18275c Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 20 Apr 2017 20:19:15 -0400 Subject: Fixed problems that prevent bin/trace from marking up some functions. --- src/H5.c | 6 +++--- src/H5PL.c | 22 ++++++++++++++++------ src/H5Pfapl.c | 14 +------------- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/H5.c b/src/H5.c index 41fb3ba..f41459c 100644 --- a/src/H5.c +++ b/src/H5.c @@ -944,7 +944,7 @@ H5allocate_memory(size_t size, hbool_t clear) { void *ret_value = NULL; - FUNC_ENTER_API_NOINIT; + FUNC_ENTER_API_NOINIT H5TRACE2("*x", "zb", size, clear); if(clear) @@ -985,7 +985,7 @@ H5resize_memory(void *mem, size_t size) { void *ret_value = NULL; - FUNC_ENTER_API_NOINIT; + FUNC_ENTER_API_NOINIT H5TRACE2("*x", "*xz", mem, size); ret_value = H5MM_realloc(mem, size); @@ -1009,7 +1009,7 @@ H5resize_memory(void *mem, size_t size) herr_t H5free_memory(void *mem) { - FUNC_ENTER_API_NOINIT; + FUNC_ENTER_API_NOINIT H5TRACE1("e", "*x", mem); /* At this time, it is impossible for this to fail. */ diff --git a/src/H5PL.c b/src/H5PL.c index a083f5a..3eb3392 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -417,12 +417,13 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLappend(const char* plugin_path) +H5PLappend(const char *plugin_path) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; FUNC_ENTER_API(FAIL) + H5TRACE1("e", "*s", plugin_path); if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table") if(NULL == plugin_path) @@ -450,13 +451,14 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLprepend(const char* plugin_path) +H5PLprepend(const char *plugin_path) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; unsigned int plindex; FUNC_ENTER_API(FAIL) + H5TRACE1("e", "*s", plugin_path); if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table") if(NULL == plugin_path) @@ -486,12 +488,13 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLreplace(const char* plugin_path, unsigned int index) +H5PLreplace(const char *plugin_path, unsigned int index) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; FUNC_ENTER_API(FAIL) + H5TRACE2("e", "*sIu", plugin_path, index); if(NULL == plugin_path) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no path provided") if(index >= H5PL_MAX_PATH_NUM) @@ -520,13 +523,14 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLinsert(const char* plugin_path, unsigned int index) +H5PLinsert(const char *plugin_path, unsigned int index) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; unsigned int plindex; FUNC_ENTER_API(FAIL) + H5TRACE2("e", "*sIu", plugin_path, index); if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table") if(NULL == plugin_path) @@ -636,14 +640,20 @@ done: * * Purpose: Query the size of the current list of plugin paths. * - * Return: Non-negative or success. + * Return: Plugin path size (can't indicate failure due to unsigned type) * *------------------------------------------------------------------------- */ unsigned int H5PLsize(void) { - return (unsigned int)H5PL_num_paths_g; + unsigned int ret_value = (unsigned int)H5PL_num_paths_g; + + FUNC_ENTER_API(0) + H5TRACE0("Iu",""); + +done: + FUNC_LEAVE_API(ret_value) } /* end H5PLsize() */ diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index e47a4b0..c69f3ef 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -4381,19 +4381,7 @@ H5P_facc_mdc_log_location_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_ *------------------------------------------------------------------------- */ herr_t -H5Pset_evict_on_close( -#if defined(H5_HAVE_PARALLEL) && !defined(H5_DEBUG_BUILD) - hid_t H5_ATTR_UNUSED fapl_id, -#else - hid_t fapl_id, -#endif /* H5_HAVE_PARALLEL and !H5_DEBUG_BUILD */ - -#ifdef H5_HAVE_PARALLEL - hbool_t H5_ATTR_UNUSED evict_on_close -#else - hbool_t evict_on_close -#endif /* H5_HAVE_PARALLEL */ -) +H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close) { H5P_genplist_t *plist; /* property list pointer */ herr_t ret_value = SUCCEED; /* return value */ -- cgit v0.12 From ae1144f8826dcecc68ec923bb7261f2a8153735c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 21 Apr 2017 10:02:43 -0500 Subject: HDFFV-9655 fix compile and test --- src/H5PL.c | 82 +++++++++++++++++++++++++++++--------------------- test/CMakeTests.cmake | 6 ++++ test/test_plugin.sh.in | 33 ++++++++++++-------- 3 files changed, 74 insertions(+), 47 deletions(-) diff --git a/src/H5PL.c b/src/H5PL.c index 79aa156..0cdbc93 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -105,7 +105,9 @@ typedef const void *(*H5PL_get_plugin_info_t)(void); #define H5PL_NO_PLUGIN "::" /* Special symbol to indicate relative path from environment */ -#define H5PL_PLUGIN_ENV_SPECIALCHAR '@' +/* Restrict usage of special char only for the default path H5_DEFAULT_PLUGINDIR + * or when using the environment variable HDF5_PLUGIN_PATH */ +#define H5PL_PLUGIN_ENV_RELEXEC_CHAR '@' /* Maximum size for path to executable */ #ifndef MAX_EXEC_PATH @@ -128,6 +130,7 @@ typedef struct H5PL_table_t { /* Local Prototypes */ /********************/ +static char *H5PL__env_strdup(const char *plpath); static herr_t H5PL__init_path_table(void); static htri_t H5PL__find(H5PL_type_t plugin_type, int type_id, char *dir, const void **info); static htri_t H5PL__open(H5PL_type_t pl_type, char *libname, int plugin_id, const void **pl_info); @@ -182,50 +185,54 @@ DESCRIPTION herr_t H5PL__init_package(void) { - char *preload_path; - char *tempbuf; + herr_t ret_value = SUCCEED; /* Return value */ + char *preload_path = NULL; + char *tempbuf = NULL; + char pathsep = '/'; + char *bs = NULL; + size_t ncopy = MAX_EXEC_PATH; - FUNC_ENTER_PACKAGE_NOERR + FUNC_ENTER_PACKAGE /* Retrieve pathnames from HDF5_PLUGIN_PRELOAD if the user sets it * to tell the library to load plugin libraries without search. */ if(NULL != (preload_path = HDgetenv("HDF5_PLUGIN_PRELOAD"))) - /* Special symbal "::" means no plugin during data reading. */ + /* Special symbol "::" means no plugin during data reading. */ if(!HDstrcmp(preload_path, H5PL_NO_PLUGIN)) H5PL_plugin_g = 0; - /* Retrieve the executable path for use with H5PL_PLUGIN_ENV_SPECIALCHAR + /* Retrieve the executable path for use with H5PL_PLUGIN_ENV_RELEXEC_CHAR * if the user uses it in a plugin path. */ if(NULL == (tempbuf = (char *)H5MM_malloc(MAX_EXEC_PATH))) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for executable path") -#if defined(_WIN32) || defined(_WIN64) || defined(H5_HAVE_WIN32_API) - const char PathSep = '\\'; +#if defined(_WIN32) || defined(_WIN64) || defined(H5_HAVE_WIN32_API) + pathsep = (char)'\\'; GetModuleFileName(NULL, tempbuf, MAX_EXEC_PATH); #elif defined(__APPLE__) - const char PathSep = '/'; - uint32_t size = sizeof(result); - _NSGetExecutablePath(tempbuf, &size); + pathsep = (char)'/'; + { + uint32_t size = sizeof(tempbuf); + _NSGetExecutablePath(tempbuf, &size); + } #else - const char PathSep = '/'; + pathsep = (char)'/'; { ssize_t count = readlink("/proc/self/exe", tempbuf, MAX_EXEC_PATH); tempbuf[count] = '\0'; } #endif - { - char *bs = strrchr(tempbuf, PathSep); - size_t ncopy = MAX_EXEC_PATH; - if (bs) - ncopy = bs - tempbuf; - tempbuf[ncopy] = '\0'; - } + if ((bs = HDstrrchr(tempbuf, pathsep))) + ncopy = (size_t)(bs - tempbuf); + tempbuf[ncopy] = '\0'; + H5PL_executable_path_g = H5MM_strdup(tempbuf); if(tempbuf) tempbuf = (char *)H5MM_xfree(tempbuf); - FUNC_LEAVE_NOAPI(SUCCEED) +done: + FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL__init_package() */ @@ -291,28 +298,33 @@ H5PL_term_package(void) } /* end H5PL_term_package() */ static char* -H5PL_env_strdup(const char *plpath) +H5PL__env_strdup(const char *plpath) { - char *dl_path = NULL; + char *ret_value = NULL; + + FUNC_ENTER_NOAPI_NOINIT + if(NULL == plpath) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no path provided") - if (*plpath == H5PL_PLUGIN_ENV_SPECIALCHAR) { + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, NULL, "no path provided") + if (*plpath == H5PL_PLUGIN_ENV_RELEXEC_CHAR) { char *tempbuf; - int ExecPathLength = strlen(H5PL_executable_path_g); - int PluginPathLength = strlen(plpath); + size_t ExecPathLength = HDstrlen(H5PL_executable_path_g); + size_t PluginPathLength = HDstrlen(plpath); if(NULL == (tempbuf = (char *)H5MM_malloc(ExecPathLength + PluginPathLength))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for plugin path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, NULL, "can't allocate memory for plugin path") HDstrncpy(tempbuf, H5PL_executable_path_g, ExecPathLength); - HDstrncpy(tempbuf+ExecPathLength, s+1, PluginPathLength-1); + HDstrncpy(tempbuf+ExecPathLength, plpath+2, PluginPathLength-1); tempbuf[ExecPathLength + PluginPathLength] = '\0'; - dl_path = H5MM_strdup(tempbuf); + ret_value = H5MM_strdup(tempbuf); tempbuf = (char *)H5MM_xfree(tempbuf); } else - dl_path = H5MM_strdup(plpath); - return dl_path; + ret_value = H5MM_strdup(plpath); + +done: + FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL_env_strdup() */ @@ -730,9 +742,9 @@ H5PLget(unsigned int index) FUNC_ENTER_API(NULL) if(H5PL_num_paths_g == 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "no directories in table") + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, NULL, "no directories in table") if(NULL == (ret_value = H5PL_path_table_g[index])) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no directory path at index") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, NULL, "no directory path at index") done: FUNC_LEAVE_API(ret_value) @@ -782,9 +794,9 @@ H5PL__init_path_table(void) */ origin_dl_path = HDgetenv("HDF5_PLUGIN_PATH"); if(NULL == origin_dl_path) - dl_path = H5MM_strdup(H5PL_DEFAULT_PATH); + dl_path = H5PL__env_strdup(H5PL_DEFAULT_PATH); else - dl_path = H5MM_strdup(origin_dl_path); + dl_path = H5PL__env_strdup(origin_dl_path); if(NULL == dl_path) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index f372acf..959fe64 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -996,6 +996,12 @@ set_tests_properties (H5PLUGIN-plugin PROPERTIES WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} ) +add_test (NAME H5PLUGIN-pluginRelative COMMAND $) +set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES + ENVIRONMENT "HDF5_PLUGIN_PATH=@/../testdir1${CMAKE_SEP}@/../testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} +) + ############################################################################## ### S W M R T E S T S ############################################################################## diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in index 1cd87e3..1e6d9d9 100644 --- a/test/test_plugin.sh.in +++ b/test/test_plugin.sh.in @@ -1,16 +1,16 @@ #! /bin/sh # -# 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 files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic document set and is -# linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access -# to either file, you may request a copy from help@hdfgroup.org. +# 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 files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic document set and is +# linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access +# to either file, you may request a copy from help@hdfgroup.org. # srcdir=@srcdir@ TOP_BUILDDIR=@top_builddir@ @@ -40,7 +40,7 @@ case $(uname) in esac PLUGIN_LIBDIR1=testdir1 PLUGIN_LIBDIR2=testdir2 -CP="cp -p" # Use -p to preserve mode,ownership,timestamps +CP="cp -p" # Use -p to preserve mode,ownership,timestamps RM="rm -rf" # Print a line-line message left justified in a field of 70 characters @@ -87,6 +87,15 @@ if [ $? != 0 ]; then nerrors=`expr $nerrors + 1` fi +# setup plugin path relative to test +ENVCMD="env HDF5_PLUGIN_PATH=@/${PLUGIN_LIBDIR1}:@/${PLUGIN_LIBDIR2}" + +# Run the test +$ENVCMD $TEST_BIN +if [ $? != 0 ]; then + nerrors=`expr $nerrors + 1` +fi + # print results if test $nerrors -ne 0 ; then echo "$nerrors errors encountered" -- cgit v0.12 From 3968c5c3bf16dc23a0a2ff1fa8d6c64dd2f8d32a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 21 Apr 2017 10:07:30 -0500 Subject: Fix parameter form --- src/H5PL.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/H5PL.c b/src/H5PL.c index a083f5a..9bdd0ba 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -417,7 +417,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLappend(const char* plugin_path) +H5PLappend(const char *plugin_path) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; @@ -450,7 +450,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLprepend(const char* plugin_path) +H5PLprepend(const char *plugin_path) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; @@ -486,7 +486,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLreplace(const char* plugin_path, unsigned int index) +H5PLreplace(const char *plugin_path, unsigned int index) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; @@ -520,7 +520,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLinsert(const char* plugin_path, unsigned int index) +H5PLinsert(const char *plugin_path, unsigned int index) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; -- cgit v0.12 From a995a63085d88e1a633770536efeff5b01569445 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 21 Apr 2017 10:58:32 -0500 Subject: HDFFV-9655 fix test and some warnings --- src/H5PL.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/H5PL.c b/src/H5PL.c index bca680e..2397bbd 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -333,7 +333,7 @@ H5PL__env_strdup(const char *plpath) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, NULL, "can't allocate memory for plugin path") HDstrncpy(tempbuf, H5PL_executable_path_g, ExecPathLength); - HDstrncpy(tempbuf+ExecPathLength, plpath+2, PluginPathLength-1); + HDstrncpy(tempbuf+ExecPathLength, plpath+1, PluginPathLength-1); tempbuf[ExecPathLength + PluginPathLength] = '\0'; ret_value = H5MM_strdup(tempbuf); tempbuf = (char *)H5MM_xfree(tempbuf); @@ -685,7 +685,7 @@ ssize_t H5PLget(unsigned int index, char *pathname/*out*/, size_t size) { ssize_t ret_value = 0; /* Return value */ - ssize_t len = 0; /* Length of pathname */ + size_t len = 0; /* Length of pathname */ char *dl_path = NULL; FUNC_ENTER_API(FAIL) @@ -704,7 +704,7 @@ H5PLget(unsigned int index, char *pathname/*out*/, size_t size) } /* end if */ /* Set return value */ - ret_value = len; + ret_value = (ssize_t)len; done: FUNC_LEAVE_API(ret_value) -- cgit v0.12 From abdb412d50bcdfc158e6efddc9eb4aba4f8bce1e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 21 Apr 2017 11:04:27 -0500 Subject: file already in list --- tools/test/misc/CMakeTestsClear.cmake | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake index 41aea4a..8a93660 100644 --- a/tools/test/misc/CMakeTestsClear.cmake +++ b/tools/test/misc/CMakeTestsClear.cmake @@ -172,16 +172,6 @@ if (HDF5_ENABLE_USING_MEMCHECKER) endif () set (last_test "H5CLEAR-copy_orig_${h5_file}") endforeach () - add_test ( - NAME H5CLEAR-copy_mod_h5clear_mdc_image.h5 - COMMAND ${CMAKE_COMMAND} - -E copy_if_different - "${PROJECT_SOURCE_DIR}/testfiles/mod_h5clear_mdc_image.h5" "${PROJECT_BINARY_DIR}/testfiles/mod_h5clear_mdc_image.h5" - ) - if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5CLEAR-copy_mod_h5clear_mdc_image.h5 PROPERTIES DEPENDS ${last_test}) - endif () - set (last_test "H5CLEAR-copy_mod_h5clear_mdc_image.h5") # make second copy of mod_h5clear_mdc_image.h5 add_test ( NAME H5CLEAR-copy_mod_h5clear_mdc_image2.h5 -- cgit v0.12 From 7bd516f2ead21e8470cc25c0b664ad6b56c723a0 Mon Sep 17 00:00:00 2001 From: lrknox Date: Fri, 21 Apr 2017 14:32:45 -0500 Subject: Our best effort to build dynamic plugin tests and not install them with "make install". It seems the install-exec-hook doesn't remove the last to be installed. --- config/conclude.am | 9 +++++---- test/Makefile.am | 30 ++++++++++++++---------------- tools/test/h5diff/Makefile.am | 7 +++++-- tools/test/h5dump/Makefile.am | 7 +++++-- tools/test/h5ls/Makefile.am | 9 +++++++-- tools/test/h5repack/Makefile.am | 10 ++++++++-- 6 files changed, 44 insertions(+), 28 deletions(-) diff --git a/config/conclude.am b/config/conclude.am index 1932170..cad55a3 100644 --- a/config/conclude.am +++ b/config/conclude.am @@ -18,18 +18,19 @@ ## Textually included at the end of most HDF5 Makefiles.am. ## Contains build rules. -# Automake needs to be taught how to build lib, pkglib, progs and tests targets. +# Automake needs to be taught how to build lib, dyn, progs and tests targets. # These will be filled in automatically for the most part (e.g., # lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and # EXTRA_TEST variables are supplied to allow the user to force targets to # be built at certain times. LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -PKGLIB = $(pkglib_LTLIBRARIES) +DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) TESTS = $(TEST_PROG) $(TEST_SCRIPT) $(EXTRA_TEST) +dyndir=$(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) @@ -37,7 +38,7 @@ AM_SH_LOG_FLAGS = # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-pkglib: $(PKGLIB) +build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -45,7 +46,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib pkglib progs tests check-s check-p :: $(BUILT_SOURCES) +lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/test/Makefile.am b/test/Makefile.am index 004fbfb..d5c3511 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -106,7 +106,7 @@ noinst_LTLIBRARIES=libh5test.la if HAVE_SHARED_CONDITIONAL # The libdynlib1, libdynlib2, libdynlib3, and libdynlib4 library for testing plugin module plugin.c. # Build it as shared library if configure is enabled for shared library. - pkglib_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la + dyn_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la libdynlib1_la_SOURCES=dynlib1.c libdynlib2_la_SOURCES=dynlib2.c libdynlib3_la_SOURCES=dynlib3.c @@ -116,8 +116,20 @@ if HAVE_SHARED_CONDITIONAL libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic +libdynlib1.la: $(libdynlib1_la_OBJECTS) $(libdynlib1_la_DEPENDENCIES) $(EXTRA_libdynlib1_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlib1_la_LINK) $(am_libdynlib1_la_rpath) $(libdynlib1_la_OBJECTS) $(libdynlib1_la_LIBADD) + +libdynlib2.la: $(libdynlib2_la_OBJECTS) $(libdynlib2_la_DEPENDENCIES) $(EXTRA_libdynlib2_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlib2_la_LINK) $(am_libdynlib2_la_rpath) $(libdynlib2_la_OBJECTS) $(libdynlib2_la_LIBADD) + +libdynlib3.la: $(libdynlib3_la_OBJECTS) $(libdynlib3_la_DEPENDENCIES) $(EXTRA_libdynlib3_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlib3_la_LINK) $(am_libdynlib3_la_rpath) $(libdynlib3_la_OBJECTS) $(libdynlib3_la_LIBADD) + +libdynlib4.la: $(libdynlib4_la_OBJECTS) $(libdynlib4_la_DEPENDENCIES) $(EXTRA_libdynlib4_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlib4_la_LINK) $(am_libdynlib4_la_rpath) $(libdynlib4_la_OBJECTS) $(libdynlib4_la_LIBADD) + install-exec-hook: - $(RM) $(DESTDIR)$(libdir)/*dynlib* + $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif libh5test_la_SOURCES=h5test.c testframe.c cache_common.c swmr_common.c @@ -125,8 +137,6 @@ libh5test_la_SOURCES=h5test.c testframe.c cache_common.c swmr_common.c # Use libhd5test.la to compile all of the tests LDADD=libh5test.la $(LIBHDF5) -LIBADD=pkglib_LTLIBRARIES - # List the source files for tests that have more than one ttsafe_SOURCES=ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c \ ttsafe_acreate.c @@ -150,18 +160,6 @@ timings _timings: testmeta # The flush1 test must run before the flush2 test flush2.chkexe_: flush1.chkexe_ -libdynlib1.la: $(libdynlib1_la_OBJECTS) $(libdynlib1_la_DEPENDENCIES) $(EXTRA_libdynlib1_la_DEPENDENCIES) - $(AM_V_CCLD)$(libdynlib1_la_LINK) $(am_libdynlib1_la_rpath) $(libdynlib1_la_OBJECTS) $(libdynlib1_la_LIBADD) - -libdynlib2.la: $(libdynlib2_la_OBJECTS) $(libdynlib2_la_DEPENDENCIES) $(EXTRA_libdynlib2_la_DEPENDENCIES) - $(AM_V_CCLD)$(libdynlib2_la_LINK) $(am_libdynlib2_la_rpath) $(libdynlib2_la_OBJECTS) $(libdynlib2_la_LIBADD) - -libdynlib3.la: $(libdynlib3_la_OBJECTS) $(libdynlib3_la_DEPENDENCIES) $(EXTRA_libdynlib3_la_DEPENDENCIES) - $(AM_V_CCLD)$(libdynlib3_la_LINK) $(am_libdynlib3_la_rpath) $(libdynlib3_la_OBJECTS) $(libdynlib3_la_LIBADD) - -libdynlib4.la: $(libdynlib4_la_OBJECTS) $(libdynlib4_la_DEPENDENCIES) $(EXTRA_libdynlib4_la_DEPENDENCIES) - $(AM_V_CCLD)$(libdynlib4_la_LINK) $(am_libdynlib4_la_rpath) $(libdynlib4_la_OBJECTS) $(libdynlib4_la_LIBADD) - # Temporary files. These files are the ones created by setting the # HDF5_NOCLEANUP environment variable and running `make test' without # specifying a file prefix or low-level driver. Changing the file diff --git a/tools/test/h5diff/Makefile.am b/tools/test/h5diff/Makefile.am index 16897c6..ad3f4ba 100644 --- a/tools/test/h5diff/Makefile.am +++ b/tools/test/h5diff/Makefile.am @@ -52,12 +52,15 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - lib_LTLIBRARIES=libdynlibdiff.la + dyn_LTLIBRARIES=libdynlibdiff.la libdynlibdiff_la_SOURCES=dynlib_diff.c libdynlibdiff_la_LDFLAGS = -avoid-version -module -shared -export-dynamic +libdynlibdiff.la: $(libdynlibdiff_la_OBJECTS) $(libdynlibdiff_la_DEPENDENCIES) $(EXTRA_libdynlibdiff_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlibdiff_la_LINK) $(am_libdynlibdiff_la_rpath) $(libdynlibdiff_la_OBJECTS) $(libdynlibdiff_la_LIBADD) + install-exec-hook: - $(RM) $(DESTDIR)$(libdir)/*dynlib* + $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif # Temporary files. *.h5 are generated by h5diff. They should diff --git a/tools/test/h5dump/Makefile.am b/tools/test/h5dump/Makefile.am index 8723c65..d42afb0 100644 --- a/tools/test/h5dump/Makefile.am +++ b/tools/test/h5dump/Makefile.am @@ -41,12 +41,15 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - lib_LTLIBRARIES=libdynlibdump.la + dyn_LTLIBRARIES=libdynlibdump.la libdynlibdump_la_SOURCES=dynlib_dump.c libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic +libdynlibdump.la: $(libdynlibdump_la_OBJECTS) $(libdynlibdump_la_DEPENDENCIES) $(EXTRA_libdynlibdump_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlibdump_la_LINK) $(am_libdynlibdump_la_rpath) $(libdynlibdump_la_OBJECTS) $(libdynlibdump_la_LIBADD) + install-exec-hook: - $(RM) $(DESTDIR)$(libdir)/*dynlib* + $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif # Temporary files. *.h5 are generated by h5dumpgentest. They should diff --git a/tools/test/h5ls/Makefile.am b/tools/test/h5ls/Makefile.am index 170aa63..e255f01 100644 --- a/tools/test/h5ls/Makefile.am +++ b/tools/test/h5ls/Makefile.am @@ -38,13 +38,18 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - lib_LTLIBRARIES=libdynlibls.la + dyn_LTLIBRARIES=libdynlibls.la libdynlibls_la_SOURCES=dynlib_ls.c + libdynlibls_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + +libdynlibls.la: $(libdynlibls_la_OBJECTS) $(libdynlibls_la_DEPENDENCIES) $(EXTRA_libdynlibls_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlibls_la_LINK) $(am_libdynlibls_la_rpath) $(libdynlibls_la_OBJECTS) $(libdynlibls_la_LIBADD) install-exec-hook: - $(RM) $(DESTDIR)$(libdir)/*dynlib* + $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif + DISTCLEANFILES=h5ls_plugin.sh include $(top_srcdir)/config/conclude.am diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am index 375df47..5080222 100644 --- a/tools/test/h5repack/Makefile.am +++ b/tools/test/h5repack/Makefile.am @@ -47,16 +47,22 @@ h5repacktst_SOURCES=h5repacktst.c if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - lib_LTLIBRARIES=libdynlibadd.la libdynlibvers.la + dyn_LTLIBRARIES=libdynlibadd.la libdynlibvers.la libdynlibadd_la_SOURCES=dynlib_rpk.c libdynlibvers_la_SOURCES=dynlib_vrpk.c libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic +libdynlibadd.la: $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_DEPENDENCIES) $(EXTRA_libdynlibadd_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlibadd_la_LINK) $(am_libdynlibadd_la_rpath) $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_LIBADD) +libdynlibvers.la: $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_DEPENDENCIES) $(EXTRA_libdynlibvers_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdynlibvers_la_LINK) $(am_libdynlibvers_la_rpath) $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_LIBADD) + install-exec-hook: - $(RM) $(DESTDIR)$(libdir)/*dynlib* + $(RM) $(DESTDIR)$(dyndir)/*dynlib* endif + # Temporary files. *.h5 are generated by h5repack. They should # copied to the testfiles/ directory if update is required. CHECK_CLEANFILES+=*.h5 *.bin testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5 -- cgit v0.12 From e9b289a3d1d031f594e8c5421144ac44f3d44bcb Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Fri, 21 Apr 2017 18:42:17 -0500 Subject: Fix for HDFFV-10166 h5watch tests fail randomly to match expected output files (1) Re-structure tests to do one "extend" action at a time (2) Re-try test till max limit before final failure --- hl/tools/h5watch/extend_dset.c | 307 ++++++++----------- hl/tools/h5watch/h5watch.c | 494 +++++++++++++++--------------- hl/tools/h5watch/testh5watch.sh.in | 163 +++++----- hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl | 5 - hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl | 5 - hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl | 10 +- hl/tools/testfiles/w-ext-cmpd-esc.ddl | 12 +- hl/tools/testfiles/w-ext-cmpd-f1.ddl | 10 +- hl/tools/testfiles/w-ext-cmpd-f2.ddl | 5 - hl/tools/testfiles/w-ext-cmpd-ff3.ddl | 8 - hl/tools/testfiles/w-ext-cmpd-label.ddl | 8 - hl/tools/testfiles/w-ext-cmpd-two-f1.ddl | 56 +--- hl/tools/testfiles/w-ext-cmpd-two-f3.ddl | 41 +-- hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl | 47 +-- hl/tools/testfiles/w-ext-cmpd-two.ddl | 66 +--- hl/tools/testfiles/w-ext-cmpd.ddl | 6 - hl/tools/testfiles/w-ext-early.ddl | 9 +- hl/tools/testfiles/w-ext-late.ddl | 8 - hl/tools/testfiles/w-ext-one-d.ddl | 3 - hl/tools/testfiles/w-ext-one-simple.ddl | 9 +- hl/tools/testfiles/w-ext-one.ddl | 5 - hl/tools/testfiles/w-ext-two-d.ddl | 18 +- hl/tools/testfiles/w-ext-two-width.ddl | 42 +-- hl/tools/testfiles/w-ext-two.ddl | 38 +-- 24 files changed, 508 insertions(+), 867 deletions(-) diff --git a/hl/tools/h5watch/extend_dset.c b/hl/tools/h5watch/extend_dset.c index f6b4161..ab086f6 100644 --- a/hl/tools/h5watch/extend_dset.c +++ b/hl/tools/h5watch/extend_dset.c @@ -34,27 +34,8 @@ /* Size of data buffer */ #define TEST_BUF_SIZE 100 -/* - * Test variations (incremental) for one-dimensional dataset: - * Varies from 10->13->12->12->1->3 - */ -#define ONE_NTESTS 5 -int one_tests[ONE_NTESTS] = {3, -1, 0, -11, 2}; - -/* - * Test variations (incremental) for two-dimensional dataset: - * Varies from {4,10}->{6,12}->{8,1}->{10,1}-> - * {3,3}->{2,2}->{1,2}-> - * {1,4}->{1,3}->{1,3} - */ -#define TWO_NTESTS 9 -int two_tests[TWO_NTESTS][2] = { {2, 2}, {2, -11}, {2, 0}, - {-7, 2}, {-1, -1}, {-1, 0}, - {0, 2}, {0, -1}, {0, 0} - }; - -static herr_t extend_dset_two(const char *file, char *dname); -static herr_t extend_dset_one(const char *file, char *dname); +static herr_t extend_dset_two(const char *file, char *dname, int action1, int action2); +static herr_t extend_dset_one(const char *file, char *dname, int action); /* Data structures for datasets with compound data type */ @@ -85,29 +66,13 @@ typedef struct set_t { /* *********************************************************************** * - * Extending a two-dimensional dataset: - * dims[0] dims[1] - * ------- ------- - * case #1: increase increase - * case #2: increase decrease - * case #3: increase same - * case #4: decrease increase - * case #5: decrease decrease (no action) - * case #6: decrease same (no action) - * case #7: same increase - * case #8: same decrease (no action) - * case #9: same same (no action) - * - * two_tests[TWO_NTESTS][2] = { {2,2}, {2,-11}, {2,0}, - * {-7,2}, {-1,-1}, {-1,0}, - * {0,2}, {0,-1}, {0,0} } - * varies from {4,10}->{6,12}->{8,1}->{10,1}-> - * {3,3}->{2,2}->{1,2}-> - * {1,4}->{1,3}->{1,3} + * Extending a two-dimensional dataset by action1 and action2. + * --action1 and action2 can be a positive # or negative # or 0. + * *********************************************************************** */ static herr_t -extend_dset_two(const char *file, char *dname) +extend_dset_two(const char *file, char *dname, int action1, int action2) { hid_t fid = -1; /* file id */ hid_t fapl = -1; /* file access property list id */ @@ -165,61 +130,57 @@ extend_dset_two(const char *file, char *dname) if(h5_wait_message(READER_MESSAGE) < 0) goto error; - /* Loop through different variations of extending the dataset */ - for(i = 0; i < TWO_NTESTS; i++) { + /* sleep to emulate about 2 seconds of application operation */ + HDsleep(2); - /* sleep to emulate about 2 seconds of application operation */ - HDsleep(2); + /* Get current dimension sizes */ + if(H5LDget_dset_dims(did, cur_dims) < 0) + goto error; - /* Get current dimension sizes */ - if(H5LDget_dset_dims(did, cur_dims) < 0) - goto error; + /* Set up the new extended dimension sizes */ + ext_dims[0] = cur_dims[0] + (hsize_t)action1; + ext_dims[1] = cur_dims[1] + (hsize_t)action2; - /* Set up the new extended dimension sizes */ - ext_dims[0] = cur_dims[0] + (hsize_t)two_tests[i][0]; - ext_dims[1] = cur_dims[1] + (hsize_t)two_tests[i][1]; + /* Extend the dataset */ + if(H5Dset_extent(did, ext_dims) < 0) + goto error; - /* Extend the dataset */ - if(H5Dset_extent(did, ext_dims) < 0) + num_elmts = 1; + for(j = 0; j < (unsigned)ndims; j++) + num_elmts *= (unsigned)ext_dims[j]; + + /* Compound type */ + if(!HDstrcmp(dname, DSET_CMPD_TWO)) { + + HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t)); + for(j = 0; j < num_elmts; j++) { + cbuf[j].field1 = action1; + cbuf[j].field2.a = action1; + cbuf[j].field2.c = action1; + cbuf[j].field2.b.a = action1; + cbuf[j].field2.b.b = action1; + cbuf[j].field2.b.c = action1; + cbuf[j].field3 = action1; + cbuf[j].field4.a = action1; + cbuf[j].field4.b = action1; + } /* end for */ + + /* Write to the dataset */ + if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, cbuf) < 0) goto error; - num_elmts = 1; - for(j = 0; j < (unsigned)ndims; j++) - num_elmts *= (unsigned)ext_dims[j]; - - /* Compound type */ - if(!HDstrcmp(dname, DSET_CMPD_TWO)) { - - HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t)); - for(j = 0; j < num_elmts; j++) { - cbuf[j].field1 = i + 1; - cbuf[j].field2.a = i + 1; - cbuf[j].field2.c = i + 1; - cbuf[j].field2.b.a = i + 1; - cbuf[j].field2.b.b = i + 1; - cbuf[j].field2.b.c = i + 1; - cbuf[j].field3 = i + 1; - cbuf[j].field4.a = i + 1; - cbuf[j].field4.b = i + 1; - } /* end for */ + } else { /* Integer type */ + HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int)); + for(j = 0; j < num_elmts; j++) + ibuf[j] = action1; - /* Write to the dataset */ - if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, cbuf) < 0) - goto error; - } else { /* Integer type */ - HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int)); - for(j = 0; j < num_elmts; j++) - ibuf[j] = (int)(i + 1); - - /* Write to the dataset */ - if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf) < 0) - goto error; - } /* end if-else */ - - if(H5Dflush(did) < 0) + /* Write to the dataset */ + if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf) < 0) goto error; + } /* end if-else */ - } /* end for TWO_NTESTS */ + if(H5Dflush(did) < 0) + goto error; /* Closing */ if(H5Tclose(dtid) < 0) goto error; @@ -227,8 +188,8 @@ extend_dset_two(const char *file, char *dname) if(H5Pclose(fapl) < 0) goto error; if(H5Fclose(fid) < 0) goto error; - HDfree(ibuf); - HDfree(cbuf); + if(ibuf) HDfree(ibuf); + if(cbuf) HDfree(cbuf); return SUCCEED; @@ -252,21 +213,13 @@ error: /* *********************************************************************** * - * Extending a one-dimensional dataset - * Test cases: - * #1: increase - * #2: decrease - * #3: same - * #4: decrease - * #5: increase - * - * one_tests[ONE_NTESTS] = {3, -1, 0, -11, 2} - * varies from 10->13->12->12->1->3 + * Extending a one-dimensional dataset by action: + * --action can be a positive # or negative # or 0. * *********************************************************************** */ static herr_t -extend_dset_one(const char *file, char *dname) +extend_dset_one(const char *file, char *dname, int action) { hid_t fid = -1; /* file id */ hid_t fapl = -1; /* file access property list id */ @@ -319,80 +272,75 @@ extend_dset_one(const char *file, char *dname) if(h5_wait_message(READER_MESSAGE) < 0) goto error; - /* Loop through different variations of extending the dataset */ - for(i = 0; i < ONE_NTESTS; i++) { + /* sleep to emulate about 2 seconds of application operation */ + HDsleep(2); + + /* Get current dimension sizes */ + if(H5LDget_dset_dims(did, cur_dims) < 0) + goto error; + + /* Set up the new extended dimension sizes */ + ext_dims[0] = cur_dims[0] + (hsize_t)action; - /* sleep to emulate about 2 seconds of application operation */ - HDsleep(2); + /* Extend the dataset */ + if(H5Dset_extent(did, ext_dims) < 0) + goto error; - /* Get current dimension sizes */ - if(H5LDget_dset_dims(did, cur_dims) < 0) - goto error; + /* Write to the new appended region of the dataset */ + if(action > 0) { - /* Set up the new extended dimension sizes */ - ext_dims[0] = cur_dims[0] + (hsize_t)one_tests[i]; + /* Select the extended region */ + offset[0] = cur_dims[0]; + count[0] = (hsize_t)action; + if((sid = H5Dget_space(did)) < 0) + goto error; + if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0) + goto error; - /* Extend the dataset */ - if(H5Dset_extent(did, ext_dims) < 0) + /* Set up memory space and get dataset's datatype */ + if((mid = H5Screate_simple(1, count, NULL)) < 0) goto error; - /* Write to the new appended region of the dataset */ - if(one_tests[i] > 0) { + /* Initialize data for the extended region of the dataset */ + /* Compound type */ + if(!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) { - /* Select the extended region */ - offset[0] = cur_dims[0]; - count[0] = (hsize_t)one_tests[i]; - if((sid = H5Dget_space(did)) < 0) - goto error; - if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0) + HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t)); + for(j = 0; j < (unsigned)action; j++) { + cbuf[j].field1 = j + 1; + cbuf[j].field2.a = j + 2; + cbuf[j].field2.b.a = j + 2; + cbuf[j].field2.b.b = j + 2; + cbuf[j].field2.b.c = j + 2; + cbuf[j].field2.c = j + 2; + + cbuf[j].field3 = j + 3; + + cbuf[j].field4.a = j + 4; + cbuf[j].field4.b = j + 4; + } /* end for */ + + /* Write to the extended region of the dataset */ + if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, cbuf) < 0) goto error; + } else { /* Integer type */ + + HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int)); + for(j = 0; j < (unsigned)action; j++) + ibuf[j] = (int)j; - /* Set up memory space and get dataset's datatype */ - if((mid = H5Screate_simple(1, count, NULL)) < 0) + /* Write to the extended region of the dataset */ + if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, ibuf) < 0) goto error; + } /* end if-else */ - /* Initialize data for the extended region of the dataset */ - /* Compound type */ - if(!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) { - - HDmemset(cbuf, 0, TEST_BUF_SIZE * sizeof(set_t)); - for(j = 0; j < (unsigned)one_tests[i]; j++) { - cbuf[j].field1 = j + 1; - cbuf[j].field2.a = j + 2; - cbuf[j].field2.b.a = j + 2; - cbuf[j].field2.b.b = j + 2; - cbuf[j].field2.b.c = j + 2; - cbuf[j].field2.c = j + 2; - - cbuf[j].field3 = j + 3; - - cbuf[j].field4.a = j + 4; - cbuf[j].field4.b = j + 4; - } /* end for */ - - /* Write to the extended region of the dataset */ - if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, cbuf) < 0) - goto error; - } else { /* Integer type */ - - HDmemset(ibuf, 0, TEST_BUF_SIZE * sizeof(int)); - for(j = 0; j < (unsigned)one_tests[i]; j++) - ibuf[j] = (int)j; - - /* Write to the extended region of the dataset */ - if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, ibuf) < 0) - goto error; - } /* end if-else */ - - /* Closing */ - if(H5Sclose(sid) < 0) goto error; - if(H5Sclose(mid) < 0) goto error; - } /* end if */ - - if(H5Dflush(did) < 0) - goto error; + /* Closing */ + if(H5Sclose(sid) < 0) goto error; + if(H5Sclose(mid) < 0) goto error; + } /* end if */ - } /* end for ONE_NTESTS */ + if(H5Dflush(did) < 0) + goto error; /* Closing */ if(H5Tclose(dtid) < 0) goto error; @@ -400,8 +348,8 @@ extend_dset_one(const char *file, char *dname) if(H5Pclose(fapl) < 0) goto error; if(H5Fclose(fid) < 0) goto error; - HDfree(ibuf); - HDfree(cbuf); + if(ibuf) HDfree(ibuf); + if(cbuf) HDfree(cbuf); return SUCCEED; @@ -423,30 +371,44 @@ error: return FAIL; } /* end extend_dset_one() */ -/* Usage: extend_dset xx.h5 dname */ + +/* + *********************************************************************** + * + * Usage: extend_dset xx.h5 dname action1 action2 + * --action1 and action2 can be a positive # or negative # or 0. + * + *********************************************************************** + */ int main(int argc, const char *argv[]) { char *dname = NULL; char *fname = NULL; + int action1, action2; - if(argc != 3) { - HDfprintf(stderr, "Should have file name and dataset name to be extended...\n"); + if(argc != 5) { + HDfprintf(stderr, "Should have file name, dataset name, and the extended amount...\n"); goto error; } /* end if */ /* Get the dataset name to be extended */ fname = HDstrdup(argv[1]); dname = HDstrdup(argv[2]); + action1 = HDatoi(argv[3]); + action2 = HDatoi(argv[4]); if(!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) { - if(extend_dset_one(fname, dname) < 0) + if(extend_dset_one(fname, dname, action1) < 0) goto error; - } else if(!HDstrcmp(dname, DSET_ONE) || !HDstrcmp(dname, DSET_ALLOC_LATE) || !HDstrcmp(dname, DSET_ALLOC_EARLY)) { - if(extend_dset_one(fname, dname) < 0) + } else if(!HDstrcmp(dname, DSET_ONE) || + !HDstrcmp(dname, DSET_ALLOC_LATE) || + !HDstrcmp(dname, DSET_ALLOC_EARLY)) { + if(extend_dset_one(fname, dname, action1) < 0) goto error; - } else if(!HDstrcmp(dname, DSET_TWO) || !HDstrcmp(dname, DSET_CMPD_TWO)) { - if(extend_dset_two(fname, dname) < 0) + } else if(!HDstrcmp(dname, DSET_TWO) || + !HDstrcmp(dname, DSET_CMPD_TWO)) { + if(extend_dset_two(fname, dname, action1, action2) < 0) goto error; } else { HDfprintf(stdout, "Dataset cannot be extended...\n"); @@ -462,4 +424,3 @@ error: HDfree(fname); HDexit(EXIT_FAILURE); } /* end main() */ - diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c index f37b2b4..7289c58 100644 --- a/hl/tools/h5watch/h5watch.c +++ b/hl/tools/h5watch/h5watch.c @@ -20,29 +20,30 @@ /* * Note: This tool used private routine */ -#define PROGRAMNAME "h5watch" /* Name of tool */ -#define FIELD_SEP "," /* nested field separator */ -#define DEFAULT_RETRY 50 /* number of times to try opening the file */ +#define PROGRAMNAME "h5watch" /* Name of tool */ +#define FIELD_SEP "," /* nested field separator */ +#define DEFAULT_RETRY 50 /* number of times to try opening the file */ /* * Note:(see comments in hl/src/H5LDprivate.h) - * This tool uses private routines H5LD_construct_vector()and H5LD_clean_vector() + * This tool uses private routines H5LD_construct_vector()and H5LD_clean_vector() * This tool uses H5LD_memb_t data structure declared in H5LDprivate.h */ -const char *progname = "h5watch"; /* tool name */ -static char *g_list_of_fields = NULL; /* command line input for "list_of_fields" */ -static char *g_dup_fields = NULL; /* copy of "list_of_fields" */ -static H5LD_memb_t **g_listv = NULL; /* vector info for "list_of_fields" */ +const char *progname = "h5watch"; /* tool name */ +static char *g_list_of_fields = NULL; /* command line input for "list_of_fields" */ +static char *g_dup_fields = NULL; /* copy of "list_of_fields" */ +static H5LD_memb_t **g_listv = NULL; /* vector info for "list_of_fields" */ static hbool_t g_monitor_size_only = FALSE; /* monitor changes in dataset dimension sizes */ static unsigned g_polling_interval = 1; /* polling interval to check appended data */ + static hbool_t g_label = FALSE; /* label compound values */ -static int g_display_width = 80; /* output width in characters */ +static int g_display_width = 80; /* output width in characters */ static hbool_t g_simple_output = FALSE; /* make output more machine-readable */ static unsigned g_retry = DEFAULT_RETRY; /* # of times to try opening the file if somehow file is unstable */ -static hbool_t g_display_hex = FALSE; /* display data in hexadecimal format : LATER */ +static hbool_t g_display_hex = FALSE; /* display data in hexadecimal format : LATER */ static hbool_t g_user_interrupt = FALSE; /* Flag to indicate that user interrupted execution */ static herr_t doprint(hid_t did, hsize_t *start, hsize_t *block, int rank); @@ -109,9 +110,9 @@ static struct long_options l_opts[] = { * Function: doprint() * * Purpose: Prepare to print the dataset's appended data. - * Call the tools library routine h5tools_dump_dset() to do the printing. - * (This routine is mostly copied from dump_dataset_values() in tools/h5ls/h5ls.c - * and modified accordingly). + * Call the tools library routine h5tools_dump_dset() to do the printing. + * (This routine is mostly copied from dump_dataset_values() in tools/h5ls/h5ls.c + * and modified accordingly). * * Return: 0 on success; negative on failure * @@ -234,17 +235,17 @@ doprint(hid_t did, hsize_t *start, hsize_t *block, int rank) * Function: slicendump * * Purpose: To dump the slice for each dimension - * For example: prev_dims[2] = {5, 4}; cur_dims[2] = {7, 8} - * This routine will dump data as follows: - * {0, 3} to {0, 7} (1x4 elements) - * {1, 3} to {0, 7} (1x4 elements) - * {2, 3} to {0, 7} (1x4 elements) - * {3, 3} to {0, 7} (1x4 elements) - * {4, 3} to {0, 7} (1x4 elements) - * {5, 0} to {6, 7} (2x8 elements) - * - * Return: Non-negative on success - * Negative on failure + * For example: prev_dims[2] = {5, 4}; cur_dims[2] = {7, 8} + * This routine will dump data as follows: + * {0, 3} to {0, 7} (1x4 elements) + * {1, 3} to {0, 7} (1x4 elements) + * {2, 3} to {0, 7} (1x4 elements) + * {3, 3} to {0, 7} (1x4 elements) + * {4, 3} to {0, 7} (1x4 elements) + * {5, 0} to {6, 7} (2x8 elements) + * + * Return: Non-negative on success + * Negative on failure * * Programmer: Vailin Choi; August 2010 * @@ -253,9 +254,9 @@ doprint(hid_t did, hsize_t *start, hsize_t *block, int rank) static herr_t slicendump(hid_t did, hsize_t *prev_dims, hsize_t *cur_dims, hsize_t *start, hsize_t *block, int rank, int subrank) { - int i; /* Local index variable */ - int ind; /* Index for the current rank */ - herr_t ret_value = SUCCEED; /* Return value */ + int i; /* Local index variable */ + int ind; /* Index for the current rank */ + herr_t ret_value = SUCCEED; /* Return value */ ind = rank - subrank; @@ -294,13 +295,13 @@ done: * Function: monitor_dataset * * Purpose: To poll a dataset periodically for changes in dimension sizes. - * For dataset with unchanged and/or decreased dimension sizes: - * it just prints the dimension size changes - * For dataset with increase in at least one of its dimension sizes: - * it will print the new appended data to the dataset + * For dataset with unchanged and/or decreased dimension sizes: + * it just prints the dimension size changes + * For dataset with increase in at least one of its dimension sizes: + * it will print the new appended data to the dataset * * Return: Non-negative on success: dataset can be monitored - * Negative on failure: dataset cannot be monitored + * Negative on failure: dataset cannot be monitored * * Programmer: Vailin Choi; August 2010 * @@ -321,95 +322,98 @@ monitor_dataset(hid_t fid, char *dsetname) /* Open the dataset for minitoring */ if((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) { - error_msg("error in opening dataset \"%s\"\n", dsetname); - ret_value = FAIL; - goto done; + error_msg("error in opening dataset \"%s\"\n", dsetname); + ret_value = FAIL; + goto done; } if((sid = H5Dget_space(did)) < 0) { - error_msg("error in getting dataspace id for dataset \"%s\"\n", dsetname); - ret_value = FAIL; - goto done; + error_msg("error in getting dataspace id for dataset \"%s\"\n", dsetname); + ret_value = FAIL; + goto done; } /* Get the dataset's dimension sizes */ if((ndims = H5Sget_simple_extent_dims(sid, prev_dims, NULL)) < 0) { - error_msg("unable to get dimensions sizes for \"%s\"\n", dsetname); - ret_value = FAIL; - goto done; + error_msg("unable to get dimensions sizes for \"%s\"\n", dsetname); + ret_value = FAIL; + goto done; } + HDfflush(stdout); /* Loop until an error occurs or the user interrupts execution */ while(!g_user_interrupt) { - /* Refreshes the dataset */ - if(H5Drefresh(did) < 0) { - ret_value = FAIL; - goto done; - } + /* Refreshes the dataset */ + if(H5Drefresh(did) < 0) { + ret_value = FAIL; + goto done; + } - /* Get the dataset's current dimension sizes */ - if(H5LDget_dset_dims(did, cur_dims) < 0) { - error_msg("unable to get dimension sizes for \"%s\"\n", dsetname); - ret_value = FAIL; - goto done; - } + /* Get the dataset's current dimension sizes */ + if(H5LDget_dset_dims(did, cur_dims) < 0) { + error_msg("unable to get dimension sizes for \"%s\"\n", dsetname); + ret_value = FAIL; + goto done; + } - /* Check the dimension sizes */ - for(i = 0; i < ndims; i++) - if(cur_dims[i] != prev_dims[i]) - break; - - /* at least one dimension has changed */ - if(i != ndims) { - /* Printing changes in dimension sizes */ - for(u = 0; u < ndims; u++) { - HDfprintf(stdout, "dimension %u: %Hu->%Hu", (unsigned)u, prev_dims[u], cur_dims[u]); - if(cur_dims[u] > prev_dims[u]) - HDfprintf(stdout, " (increases)\n"); - else if(cur_dims[u] < prev_dims[u]) - HDfprintf(stdout, " (decreases)\n"); - else - HDfprintf(stdout, " (unchanged)\n"); - } - - /* Printing elements appended to the dataset if there is */ - if(!g_monitor_size_only) { - - /* See if at least one dimension size has increased */ - for(u = 0; u < ndims; u++) { - int j; - hsize_t start[H5S_MAX_RANK]; - hsize_t block[H5S_MAX_RANK]; - - /* Print the new appended data to the dataset */ - if(cur_dims[u] > prev_dims[u]) { - HDfprintf(stdout, " Data:\n"); - - for(j = 0; j < ndims; j++) { - start[j] = 0; - block[j] = 1; - } - - if((ret_value = slicendump(did, prev_dims, cur_dims, start, block, ndims, ndims)) < 0) - goto done; - break; - } - } /* end for */ - } - HDfflush(stdout); - } + /* Check the dimension sizes */ + for(i = 0; i < ndims; i++) + if(cur_dims[i] != prev_dims[i]) + break; + + /* at least one dimension has changed */ + if(i != ndims) { + /* Printing changes in dimension sizes */ + for(u = 0; u < ndims; u++) { + HDfprintf(stdout, "dimension %u: %Hu->%Hu", (unsigned)u, prev_dims[u], cur_dims[u]); + if(cur_dims[u] > prev_dims[u]) + HDfprintf(stdout, " (increases)\n"); + else if(cur_dims[u] < prev_dims[u]) + HDfprintf(stdout, " (decreases)\n"); + else + HDfprintf(stdout, " (unchanged)\n"); + } + + /* Printing elements appended to the dataset if there is */ + if(!g_monitor_size_only) { + + /* See if at least one dimension size has increased */ + for(u = 0; u < ndims; u++) { + int j; + hsize_t start[H5S_MAX_RANK]; + hsize_t block[H5S_MAX_RANK]; + + /* Print the new appended data to the dataset */ + if(cur_dims[u] > prev_dims[u]) { + HDfprintf(stdout, " Data:\n"); + + for(j = 0; j < ndims; j++) { + start[j] = 0; + block[j] = 1; + } + + if((ret_value = slicendump(did, prev_dims, cur_dims, start, block, ndims, ndims)) < 0) + goto done; + break; + } + } /* end for */ + } + HDfflush(stdout); + } - /* Save the current dimension sizes */ - HDmemcpy(prev_dims, cur_dims, (size_t)ndims * sizeof(hsize_t)); + /* Save the current dimension sizes */ + HDmemcpy(prev_dims, cur_dims, (size_t)ndims * sizeof(hsize_t)); - /* Sleep before next monitor */ + /* Sleep before next monitor */ HDsleep(g_polling_interval); } /* end while */ + HDfflush(stdout); + done: /* Closing */ H5E_BEGIN_TRY - H5Dclose(did); + H5Dclose(did); H5E_END_TRY return(ret_value); @@ -419,7 +423,7 @@ done: * Function: process_cmpd_fields * * Purpose: To check whether the fields selected in "g_list_of_fields" - * are valid fields associated with the dataset. + * are valid fields associated with the dataset. * * Return: 0 on success; negative on failure * @@ -430,39 +434,39 @@ done: static herr_t process_cmpd_fields(hid_t fid, char *dsetname) { - hid_t did=-1; /* dataset id */ - hid_t dtid=-1, tid=-1; /* dataset's data type id */ - size_t len; /* number of comma-separated fields in "g_list_of_fields" */ - herr_t ret_value = SUCCEED; /* Return value */ + hid_t did=-1; /* dataset id */ + hid_t dtid=-1, tid=-1; /* dataset's data type id */ + size_t len; /* number of comma-separated fields in "g_list_of_fields" */ + herr_t ret_value = SUCCEED; /* Return value */ HDassert(g_list_of_fields && *g_list_of_fields); /* Open the dataset */ if((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) { - error_msg("error in opening dataset \"%s\"\n", dsetname); - ret_value = FAIL; - goto done; + error_msg("error in opening dataset \"%s\"\n", dsetname); + ret_value = FAIL; + goto done; } /* Get the dataset's datatype */ if(((dtid = H5Dget_type(did)) < 0) || (tid = H5Tget_native_type(dtid, H5T_DIR_DEFAULT)) < 0) { - error_msg("error in getting dataset's datatype\n"); + error_msg("error in getting dataset's datatype\n"); ret_value = FAIL; goto done; } /* Check to make sure that the dataset's datatype is compound type */ if(H5Tget_class(dtid) != H5T_COMPOUND) { - error_msg("dataset should be compound type for \n"); - ret_value = FAIL; - goto done; + error_msg("dataset should be compound type for \n"); + ret_value = FAIL; + goto done; } /* Make a copy of "g_list_of_fields" */ if((g_dup_fields = HDstrdup(g_list_of_fields)) == NULL) { - error_msg("error in duplicating g_list_of_fields\n"); + error_msg("error in duplicating g_list_of_fields\n"); ret_value = FAIL; - goto done; + goto done; } /* Estimate the number of comma-separated fields in "g_list of_fields" */ @@ -470,15 +474,15 @@ process_cmpd_fields(hid_t fid, char *dsetname) /* Allocate memory for a list vector of H5LD_memb_t structures to store "g_list_of_fields" info */ if((g_listv = (H5LD_memb_t **)HDcalloc(len, sizeof(H5LD_memb_t *))) == NULL) { - error_msg("error in allocating memory for H5LD_memb_t\n"); + error_msg("error in allocating memory for H5LD_memb_t\n"); ret_value = FAIL; - goto done; + goto done; } /* Process and store info for "g_listv" */ if(H5LD_construct_vector(g_dup_fields, g_listv, tid) < 0) { - error_msg("error in processing \n"); - ret_value = FAIL; + error_msg("error in processing \n"); + ret_value = FAIL; goto done; } @@ -486,9 +490,9 @@ process_cmpd_fields(hid_t fid, char *dsetname) done: /* Closing */ H5E_BEGIN_TRY - H5Tclose(dtid); - H5Tclose(tid); - H5Dclose(did); + H5Tclose(dtid); + H5Tclose(tid); + H5Dclose(did); H5E_END_TRY return(ret_value); } /* process_cmpd_fields() */ @@ -498,15 +502,13 @@ done: * Function: check_dataset * * Purpose: To check whether a dataset can be monitored: - A chunked dataset with unlimited or max. dimension setting + * A chunked dataset with unlimited or max. dimension setting * * Return: Non-negative on success: dataset can be monitored - * Negative on failure: dataset cannot be monitored + * Negative on failure: dataset cannot be monitored * * Programmer: Vailin Choi; August 2010 * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t @@ -531,9 +533,9 @@ check_dataset(hid_t fid, char *dsetname) /* Open the dataset */ if((did = H5Dopen2(fid, dsetname, H5P_DEFAULT)) < 0) { - error_msg("unable to open dataset \"%s\"\n", dsetname); - ret_value = FAIL; - goto done; + error_msg("unable to open dataset \"%s\"\n", dsetname); + ret_value = FAIL; + goto done; } /* Get dataset's creation property list */ @@ -560,28 +562,28 @@ check_dataset(hid_t fid, char *dsetname) /* Get dataset's dataspace */ if((sid = H5Dget_space(did)) < 0) { - error_msg("can't get dataset's dataspace\"%s\"\n", dsetname); - ret_value = FAIL; - goto done; + error_msg("can't get dataset's dataspace\"%s\"\n", dsetname); + ret_value = FAIL; + goto done; } /* Get dimension size of dataset's dataspace */ if((ndims = H5Sget_simple_extent_dims(sid, cur_dims, max_dims)) < 0) { - error_msg("can't get dataspace dimensions for dataset \"%s\"\n", dsetname); - ret_value = FAIL; - goto done; + error_msg("can't get dataspace dimensions for dataset \"%s\"\n", dsetname); + ret_value = FAIL; + goto done; } /* Check whether dataset has unlimited dimension or max. dimension setting */ for(u = 0; u < (unsigned)ndims; u++) if(max_dims[u] == H5S_UNLIMITED || cur_dims[u] != max_dims[u]) { - unlim_max_dims = TRUE; + unlim_max_dims = TRUE; break; } if(!unlim_max_dims) { - error_msg("\"%s\" should have unlimited or max. dimension setting\n", dsetname); - ret_value = FAIL; + error_msg("\"%s\" should have unlimited or max. dimension setting\n", dsetname); + ret_value = FAIL; } done: @@ -589,9 +591,9 @@ done: /* Closing */ H5E_BEGIN_TRY - H5Sclose(sid); - H5Pclose(dcp); - H5Dclose(did); + H5Sclose(sid); + H5Pclose(dcp); + H5Dclose(did); H5E_END_TRY return(ret_value); @@ -607,7 +609,6 @@ done: * * Programmer: Vailin Choi; August 2010 * - * Modifications: * *------------------------------------------------------------------------- */ @@ -629,7 +630,6 @@ leave(int ret) * * Programmer: Vailin Choi; August 2010 * - * Modifications: *------------------------------------------------------------------------- */ static void @@ -685,8 +685,6 @@ usage(const char *prog) * * Programmer: Vailin Choi; August 2010 * - * Modifications: - * *------------------------------------------------------------------------- */ static void @@ -706,7 +704,7 @@ parse_command_line(int argc, const char *argv[]) switch ((char)opt) { case '?': case 'h': /* --help */ - usage(h5tools_getprogname()); + usage(h5tools_getprogname()); leave(EXIT_SUCCESS); case 'V': /* --version */ @@ -715,63 +713,63 @@ parse_command_line(int argc, const char *argv[]) break; case 'w': /* --width=N */ - g_display_width = (int)HDstrtol(opt_arg, NULL, 0); - if(g_display_width < 0) { - usage(h5tools_getprogname()); - leave(EXIT_FAILURE); - } + g_display_width = (int)HDstrtol(opt_arg, NULL, 0); + if(g_display_width < 0) { + usage(h5tools_getprogname()); + leave(EXIT_FAILURE); + } break; case 'd': /* --dim */ - g_monitor_size_only = TRUE; + g_monitor_size_only = TRUE; break; case 'S': /* --simple */ - g_simple_output = TRUE; + g_simple_output = TRUE; break; - case 'l': /* --label */ - g_label = TRUE; + case 'l': /* --label */ + g_label = TRUE; break; case 'p': /* --polling=N */ - /* g_polling_interval = HDstrtod(opt_arg, NULL); */ - if((tmp = (int)HDstrtol(opt_arg, NULL, 10)) <= 0) { - usage(h5tools_getprogname()); - leave(EXIT_FAILURE); - } - g_polling_interval = (unsigned)tmp; + /* g_polling_interval = HDstrtod(opt_arg, NULL); */ + if((tmp = (int)HDstrtol(opt_arg, NULL, 10)) <= 0) { + usage(h5tools_getprogname()); + leave(EXIT_FAILURE); + } + g_polling_interval = (unsigned)tmp; break; case 'f': /* --fields= */ - if(g_list_of_fields == NULL) { - if((g_list_of_fields = HDstrdup(opt_arg)) == NULL) { - error_msg("memory allocation failed (file %s:line %d)\n", - __FILE__, __LINE__); - leave(EXIT_FAILURE); - } - } else { - char *str; - - if((str = HDstrdup(opt_arg)) == NULL) { - error_msg("memory allocation failed (file %s:line %d)\n", - __FILE__, __LINE__); - leave(EXIT_FAILURE); - } - if((g_list_of_fields = (char *)HDrealloc(g_list_of_fields, HDstrlen(g_list_of_fields) + HDstrlen(str) + 2)) == NULL) { - error_msg("memory allocation failed (file %s:line %d)\n", - __FILE__, __LINE__); - leave(EXIT_FAILURE); - - } - HDstrcat(g_list_of_fields, FIELD_SEP); - HDstrcat(g_list_of_fields, str); - } + if(g_list_of_fields == NULL) { + if((g_list_of_fields = HDstrdup(opt_arg)) == NULL) { + error_msg("memory allocation failed (file %s:line %d)\n", + __FILE__, __LINE__); + leave(EXIT_FAILURE); + } + } else { + char *str; + + if((str = HDstrdup(opt_arg)) == NULL) { + error_msg("memory allocation failed (file %s:line %d)\n", + __FILE__, __LINE__); + leave(EXIT_FAILURE); + } + if((g_list_of_fields = (char *)HDrealloc(g_list_of_fields, HDstrlen(g_list_of_fields) + HDstrlen(str) + 2)) == NULL) { + error_msg("memory allocation failed (file %s:line %d)\n", + __FILE__, __LINE__); + leave(EXIT_FAILURE); + + } + HDstrcat(g_list_of_fields, FIELD_SEP); + HDstrcat(g_list_of_fields, str); + } break; default: - usage(h5tools_getprogname()); + usage(h5tools_getprogname()); leave(EXIT_FAILURE); } } @@ -780,7 +778,7 @@ parse_command_line(int argc, const char *argv[]) /* check for object to be processed */ if (argc <= opt_ind) { error_msg("missing dataset name\n"); - usage(h5tools_getprogname()); + usage(h5tools_getprogname()); leave(EXIT_FAILURE); } } /* parse_command_line() */ @@ -790,7 +788,7 @@ parse_command_line(int argc, const char *argv[]) * Function: catch_signal * * Purpose: The signal handler to catch the signals: - * SIGTERM and SIGINT and exit from h5watch + * SIGTERM and SIGINT and set flag to get out of the main loop * * Return: No return * @@ -820,14 +818,14 @@ static void catch_signal(int H5_ATTR_UNUSED signo) int main(int argc, const char *argv[]) { - char drivername[50]; - char *fname = NULL; - char *dname = NULL; - void *edata; - H5E_auto2_t func; - char *x; - hid_t fid = -1; - hid_t fapl = -1; + char drivername[50]; /* VFD name */ + char *fname = NULL; /* File name */ + char *dname = NULL; /* Dataset name */ + void *edata; /* Error reporting */ + H5E_auto2_t func; /* Error reporting */ + char *x; /* Temporary string pointer */ + hid_t fid = -1; /* File ID */ + hid_t fapl = -1; /* File access property list */ /* Set up tool name and exit status */ h5tools_setprogname(PROGRAMNAME); @@ -842,14 +840,14 @@ main(int argc, const char *argv[]) /* To exit from h5watch for SIGTERM signal */ if(HDsignal(SIGTERM, catch_signal) == SIG_ERR) { - error_msg("An error occurred while setting a signal handler.\n"); - leave(EXIT_FAILURE); + error_msg("An error occurred while setting a signal handler.\n"); + leave(EXIT_FAILURE); } /* To exit from h5watch for SIGINT signal */ if(HDsignal(SIGINT, catch_signal) == SIG_ERR) { error_msg("An error occurred while setting a signal handler.\n"); - leave(EXIT_FAILURE); + leave(EXIT_FAILURE); } /* parse command line options */ @@ -857,7 +855,7 @@ main(int argc, const char *argv[]) if(argc <= opt_ind) { error_msg("missing dataset name\n"); - usage(h5tools_getprogname()); + usage(h5tools_getprogname()); leave(EXIT_FAILURE); } @@ -877,9 +875,9 @@ main(int argc, const char *argv[]) * doesn't exist). */ if((fname = HDstrdup(argv[opt_ind])) == NULL) { - error_msg("memory allocation failed (file %s:line %d)\n", - __FILE__, __LINE__); - h5tools_setstatus(EXIT_FAILURE); + error_msg("memory allocation failed (file %s:line %d)\n", + __FILE__, __LINE__); + h5tools_setstatus(EXIT_FAILURE); } /* Create a copy of file access property list */ @@ -891,80 +889,80 @@ main(int argc, const char *argv[]) return -1; do { - while(fname && *fname) { - fid = h5tools_fopen(fname, H5F_ACC_RDONLY|H5F_ACC_SWMR_READ, fapl, NULL, drivername, sizeof drivername); - - if(fid >= 0) { - HDfprintf(stdout, "Opened \"%s\" with %s driver.\n", fname, drivername); - break; /*success*/ - } /* end if */ - - /* Shorten the file name; lengthen the object name */ - x = dname; - dname = HDstrrchr(fname, '/'); - if(x) - *x = '/'; - if(!dname) - break; - *dname = '\0'; - } /* end while */ + while(fname && *fname) { + fid = h5tools_fopen(fname, H5F_ACC_RDONLY|H5F_ACC_SWMR_READ, fapl, NULL, drivername, sizeof drivername); + + if(fid >= 0) { + HDfprintf(stdout, "Opened \"%s\" with %s driver.\n", fname, drivername); + break; /*success*/ + } /* end if */ + + /* Shorten the file name; lengthen the object name */ + x = dname; + dname = HDstrrchr(fname, '/'); + if(x) + *x = '/'; + if(!dname) + break; + *dname = '\0'; + } /* end while */ /* Try opening the file again if somehow unstable */ } while(g_retry-- > 0 && fid == FAIL); if(fid < 0) { - error_msg("unable to open file \"%s\"\n", fname); - if(fname) HDfree(fname); - if(fapl >= 0) H5Pclose(fapl); - leave(EXIT_FAILURE); + error_msg("unable to open file \"%s\"\n", fname); + if(fname) HDfree(fname); + if(fapl >= 0) H5Pclose(fapl); + leave(EXIT_FAILURE); } if(!dname) { - error_msg("no dataset specified\n"); - h5tools_setstatus(EXIT_FAILURE); + error_msg("no dataset specified\n"); + h5tools_setstatus(EXIT_FAILURE); } else { - *dname = '/'; - x = dname; - if((dname = HDstrdup(dname)) == NULL) { - error_msg("memory allocation failed (file %s:line %d)\n", - __FILE__, __LINE__); - h5tools_setstatus(EXIT_FAILURE); - } else { - *x = '\0'; - /* Validate dataset */ - if(check_dataset(fid, dname) < 0) - h5tools_setstatus(EXIT_FAILURE); - /* Validate input "fields" */ - else if(g_list_of_fields && *g_list_of_fields) - if(process_cmpd_fields(fid, dname) < 0) - h5tools_setstatus(EXIT_FAILURE); - } + *dname = '/'; + x = dname; + if((dname = HDstrdup(dname)) == NULL) { + error_msg("memory allocation failed (file %s:line %d)\n", + __FILE__, __LINE__); + h5tools_setstatus(EXIT_FAILURE); + } else { + *x = '\0'; + /* Validate dataset */ + if(check_dataset(fid, dname) < 0) + h5tools_setstatus(EXIT_FAILURE); + /* Validate input "fields" */ + else if(g_list_of_fields && *g_list_of_fields) + if(process_cmpd_fields(fid, dname) < 0) + h5tools_setstatus(EXIT_FAILURE); + } } /* If everything is fine, start monitoring the datset */ if(h5tools_getstatus() != EXIT_FAILURE) - if(monitor_dataset(fid, dname) < 0) - h5tools_setstatus(EXIT_FAILURE); + if(monitor_dataset(fid, dname) < 0) + h5tools_setstatus(EXIT_FAILURE); /* Free spaces */ if(fname) HDfree(fname); if(dname) HDfree(dname); if(g_list_of_fields) HDfree(g_list_of_fields); if(g_listv) { - H5LD_clean_vector(g_listv); - HDfree(g_listv); + H5LD_clean_vector(g_listv); + HDfree(g_listv); } if(g_dup_fields) HDfree(g_dup_fields); /* Close the file access property list */ if(fapl >= 0 && H5Pclose(fapl) < 0) { - error_msg("unable to close file access property list\n"); - h5tools_setstatus(EXIT_FAILURE); + error_msg("unable to close file access property list\n"); + h5tools_setstatus(EXIT_FAILURE); } /* Close the file */ if(H5Fclose(fid) < 0) { - error_msg("unable to close file\n"); - h5tools_setstatus(EXIT_FAILURE); + error_msg("unable to close file\n"); + h5tools_setstatus(EXIT_FAILURE); } H5Eset_auto2(H5E_DEFAULT, func, edata); diff --git a/hl/tools/h5watch/testh5watch.sh.in b/hl/tools/h5watch/testh5watch.sh.in index 02f155f..33660b4 100644 --- a/hl/tools/h5watch/testh5watch.sh.in +++ b/hl/tools/h5watch/testh5watch.sh.in @@ -46,6 +46,7 @@ GEN_TEST=h5watchgentest # Generate HDF5 file with various datasets GEN_TEST_BIN=`pwd`/$GEN_TEST # Path of the binary GEN_TEST WATCHFILE=`pwd`/WATCH.h5 # The HDF5 file generated to test h5watch TESTFILE=TEST.h5 # The temporary file (a copy of WATCH.h5) used by tests +TRY_MAX=10 # Try running the test again # # These 3 defines should be the same as the defines in ./extend_dset.c WRITER_MESSAGE=writer_message # The message file created by the "extend" process @@ -118,29 +119,30 @@ TOOLTEST() { exitcode=$? cat $actual_err >> $actual if [ $exitcode -ne $retvalexpect ]; then - $ECHO "*FAILED*" - nerrors="`expr $nerrors + 1`" - if [ yes = "$verbose" ]; then - $ECHO "test returned with exit code $exitcode" - $ECHO "test output: (up to $NLINES lines)" - head -$NLINES $actual - $ECHO "***end of test output***" - $ECHO "" - fi - elif $CMP $expect $actual; then - $ECHO " PASSED" - else $ECHO "*FAILED*" - $ECHO " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' - fi + nerrors="`expr $nerrors + 1`" + if [ yes = "$verbose" ]; then + $ECHO "test returned with exit code $exitcode" + $ECHO "test output: (up to $NLINES lines)" + head -$NLINES $actual + $ECHO "***end of test output***" + $ECHO "" + fi + elif $CMP $expect $actual; then + $ECHO " PASSED" + else + $ECHO "*FAILED*" + $ECHO " Expected result differs from actual result" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + fi # Clean up output file if test -z "$HDF5_NOCLEANUP"; then rm -f $actual $actual_err fi } + # # # @@ -150,8 +152,13 @@ TOOLTEST() { # $1 -- the specified dataset to watch and to extend # $2 -- the options to h5watch (can be NULL) # $3 -- expected output from watching the object +# $4 -- action 1 +# $5 -- action 2 # TEST_WATCH() { +try=0 +while [ $try -lt $TRY_MAX ] ; +do cp $WATCHFILE $TESTFILE # Copy the file being watched/extended to a temporary file actual="../testfiles/`basename $3 .ddl`.out" # The actual output expect="$srcdir/../testfiles/$3" # The expected output @@ -165,7 +172,7 @@ TEST_WATCH() { rm -f $WRITER_MESSAGE # Remove the file just to be sure rm -f $READER_MESSAGE # Remove the file just to be sure # - $EXTEND_BIN $TESTFILE $1 & # Extend the dataset; put in background + $EXTEND_BIN $TESTFILE $1 $4 $5& # Extend the dataset; put in background extend_pid=$! # Get "extend" process ID # # Wait for message from "extend_dset" process to start h5watch-- @@ -178,10 +185,10 @@ TEST_WATCH() { do t1=`date +%s` # Get current time in seconds difft=`expr $t1 - $t0` # Calculate the time difference - if [ -e $WRITER_MESSAGE ]; then # If message file is found: + if [ -e $WRITER_MESSAGE ]; then # If message file is found: mexist=1 # indicate the message file is found - rm $WRITER_MESSAGE # remove the message file - break # get out of the while loop + rm $WRITER_MESSAGE # remove the message file + break # get out of the while loop fi done; # @@ -207,7 +214,7 @@ TEST_WATCH() { extend_exit=$? # Collect "extend" process' exit code sleep 1 # Sleep to make sure output is flushed kill $watch_pid # Kill h5watch - wait $watch_pid # Wait for "h5watch" process to complete + wait $watch_pid # Wait for "h5watch" process to complete # if [ $extend_exit -ne 0 ]; then # Error returned from "extend" process $ECHO "*FAILED*" @@ -220,13 +227,21 @@ TEST_WATCH() { $ECHO "" fi elif $CMP $expect $actual; then # Compare actual output with expected output + try=$TRY_MAX $ECHO " PASSED" else - $ECHO "*FAILED*" # Actual and expected outputs are different - $ECHO " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - if test yes = "$verbose"; then - $DIFF $expect $actual |sed 's/^/ /' + try="`expr $try + 1`" + if [ $try -lt $TRY_MAX ]; then + $ECHO "*RETRY" + rm -f $actual + rm -f $TESTFILE + else + $ECHO "*FAILED*" # Actual and expected outputs are different + $ECHO " Expected result differs from actual result" + nerrors="`expr $nerrors + 1`" + if test yes = "$verbose"; then + $DIFF $expect $actual |sed 's/^/ /' + fi fi fi # @@ -236,45 +251,45 @@ TEST_WATCH() { rm -f $actual fi fi +done; } - ############################################################################## ############################################################################## -### T H E T E S T S ### +### T H E T E S T S ### ############################################################################## ############################################################################## # # ################################################################################################# -# # -# WATCH.h5: file with various types of datasets for testing-- # -# The following datasets are chunked, H5D_ALLOC_TIME_INCR, max. dimensional setting: # -# DSET_ONE: one-dimensional dataset # -# DSET_TWO: two-dimensional dataset # -# DSET_CMPD: one-dimensional dataset with compound type # -# DSET_CMPD_ESC: one-dimensional dataset with compound type & escape/separator characters # -# DSET_CMPD_TWO: two-dimensional dataset with compound type # -# # -# The following datasets are one-dimensional, chunked, max. dimension setting: # -# DSET_ALLOC_EARLY: dataset with H5D_ALLOC_TIME_EARLY # -# DSET_ALLOC_LATE: dataset H5D_ALLOC_TIME_LATE # -# # -# The following datasets are one-dimensional: # -# DSET_NONE: fixed dimension setting, contiguous, H5D_ALLOC_TIME_LATE # -# DSET_NOMAX: fixed dimension setting, chunked, H5D_ALLOC_TIME_INCR # -# # +# # +# WATCH.h5: file with various types of datasets for testing-- # +# The following datasets are chunked, H5D_ALLOC_TIME_INCR, max. dimensional setting: # +# DSET_ONE: one-dimensional dataset # +# DSET_TWO: two-dimensional dataset # +# DSET_CMPD: one-dimensional dataset with compound type # +# DSET_CMPD_ESC: one-dimensional dataset with compound type & escape/separator characters # +# DSET_CMPD_TWO: two-dimensional dataset with compound type # +# # +# The following datasets are one-dimensional, chunked, max. dimension setting: # +# DSET_ALLOC_EARLY: dataset with H5D_ALLOC_TIME_EARLY # +# DSET_ALLOC_LATE: dataset H5D_ALLOC_TIME_LATE # +# # +# The following datasets are one-dimensional: # +# DSET_NONE: fixed dimension setting, contiguous, H5D_ALLOC_TIME_LATE # +# DSET_NOMAX: fixed dimension setting, chunked, H5D_ALLOC_TIME_INCR # +# # ################################################################################################# # # ################################################################################################# -# # -# Tests on expected failures: # -# Invalid file name # -# Unable to find dataset, invalid dataset # -# DSET_NONE and DSET_NOMAX # -# Invalid input to options --width and --polling # -# Invalid field names for -f option # -# # +# # +# Tests on expected failures: # +# Invalid file name # +# Unable to find dataset, invalid dataset # +# DSET_NONE and DSET_NOMAX # +# Invalid input to options --width and --polling # +# Invalid field names for -f option # +# # ################################################################################################# # # Generate file with various types of datasets @@ -319,13 +334,13 @@ $GEN_TEST_BIN # TEST.h5/DSET_CMPD_TWO # TEST.h5/DSET_CMPD_ESC # -TEST_WATCH DSET_ONE '' w-ext-one.ddl -TEST_WATCH DSET_ALLOC_EARLY '' w-ext-early.ddl -TEST_WATCH DSET_ALLOC_LATE '' w-ext-late.ddl -TEST_WATCH DSET_CMPD '' w-ext-cmpd.ddl -TEST_WATCH DSET_TWO '' w-ext-two.ddl -TEST_WATCH DSET_CMPD_TWO '' w-ext-cmpd-two.ddl -TEST_WATCH DSET_CMPD_ESC '' w-ext-cmpd-esc.ddl +TEST_WATCH DSET_ONE '' w-ext-one.ddl 3 0 #Increase +TEST_WATCH DSET_ALLOC_EARLY '' w-ext-early.ddl -1 0 #Decrease +TEST_WATCH DSET_ALLOC_LATE '' w-ext-late.ddl 0 0 #Same +TEST_WATCH DSET_CMPD '' w-ext-cmpd.ddl 3 0 #Increase +TEST_WATCH DSET_CMPD_ESC '' w-ext-cmpd-esc.ddl -1 0 #Decrease +TEST_WATCH DSET_TWO '' w-ext-two.ddl 2 2 #Increase, Increase +TEST_WATCH DSET_CMPD_TWO '' w-ext-cmpd-two.ddl 2 -9 #Increase, Decrease # echo "DONE WITH 2nd SET OF TESTS" # @@ -339,25 +354,25 @@ echo "DONE WITH 2nd SET OF TESTS" # TEST.h5/DSET_CMPD with --fields=field1,field2 # TEST.h5/DSET_CMPD with --fields=field2.b,field4 # TEST.h5/DSET_CMPD with --fields=field2.b.a --fields=field2.c -TEST_WATCH DSET_CMPD --fields=field1,field2 w-ext-cmpd-f1.ddl -TEST_WATCH DSET_CMPD --fields=field2.b,field4 w-ext-cmpd-f2.ddl -TEST_WATCH DSET_CMPD '--fields=field2.b.a --fields=field2.c' w-ext-cmpd-ff3.ddl +TEST_WATCH DSET_CMPD --fields=field1,field2 w-ext-cmpd-f1.ddl -9 0 #Decrease +TEST_WATCH DSET_CMPD --fields=field2.b,field4 w-ext-cmpd-f2.ddl 3 0 #Increase +TEST_WATCH DSET_CMPD '--fields=field2.b.a --fields=field2.c' w-ext-cmpd-ff3.ddl 0 0 #Same # # # TEST.h5/DSET_CMP_TWO with --fields=field1,field2 # TEST.h5/DSET_CMPD_TWO with --fields=field2.b --fields=field4 # TEST.h5/DSET_CMPD_TWO with --fields=field2.b.a,field2.c -TEST_WATCH DSET_CMPD_TWO --fields=field1,field2 w-ext-cmpd-two-f1.ddl -TEST_WATCH DSET_CMPD_TWO '--fields=field2.b --fields=field4' w-ext-cmpd-two-ff2.ddl -TEST_WATCH DSET_CMPD_TWO --fields=field2.b.a,field2.c w-ext-cmpd-two-f3.ddl +TEST_WATCH DSET_CMPD_TWO --fields=field1,field2 w-ext-cmpd-two-f1.ddl 2 0 #Increase, Same +TEST_WATCH DSET_CMPD_TWO '--fields=field2.b --fields=field4' w-ext-cmpd-two-ff2.ddl -1 2 #Decrease, Increase +TEST_WATCH DSET_CMPD_TWO --fields=field2.b.a,field2.c w-ext-cmpd-two-f3.ddl -1 -3 #Decrease, Decrease # # # TEST.h5/DSET_CMPD_ESC with --fields=field\,1,field2\. # TEST.h5/DSET_CMPD_ESC with --fields=field2\..\,b --fields=field4\, # TEST.h5/DSET_CMPD_ESC with --fields=field2\..\,b.a,field2\..\\K -TEST_WATCH DSET_CMPD_ESC '--fields=field\,1,field2\.' w-ext-cmpd-esc-f1.ddl -TEST_WATCH DSET_CMPD_ESC '--fields=field2\..\,b --fields=field4\,' w-ext-cmpd-esc-ff2.ddl -TEST_WATCH DSET_CMPD_ESC '--fields=field2\..\,b.a,field2\..\\K' w-ext-cmpd-esc-f3.ddl +TEST_WATCH DSET_CMPD_ESC '--fields=field\,1,field2\.' w-ext-cmpd-esc-f1.ddl 3 0 #Increase +TEST_WATCH DSET_CMPD_ESC '--fields=field2\..\,b --fields=field4\,' w-ext-cmpd-esc-ff2.ddl -1 0 #Decrease +TEST_WATCH DSET_CMPD_ESC '--fields=field2\..\,b.a,field2\..\\K' w-ext-cmpd-esc-f3.ddl 3 0 #Increase # # echo "DONE WITH 3rd SET OF TESTS" @@ -376,11 +391,11 @@ echo "DONE WITH 3rd SET OF TESTS" # TEST.h5/DSET_TWO with --width=60 option # TEST.h5/DSET_CMPD with --label option # TEST.h5/DSET_ONE with --simple option -TEST_WATCH DSET_ONE --dim w-ext-one-d.ddl -TEST_WATCH DSET_TWO --dim w-ext-two-d.ddl -TEST_WATCH DSET_TWO --width=30 w-ext-two-width.ddl -TEST_WATCH DSET_CMPD --label w-ext-cmpd-label.ddl -TEST_WATCH DSET_ONE --simple w-ext-one-simple.ddl +TEST_WATCH DSET_ONE --dim w-ext-one-d.ddl 3 0 #Increase +TEST_WATCH DSET_TWO --dim w-ext-two-d.ddl -2 0 #Decrease, Same +TEST_WATCH DSET_TWO --width=30 w-ext-two-width.ddl 0 2 #Same, Increase +TEST_WATCH DSET_CMPD --label w-ext-cmpd-label.ddl 3 0 #Increase +TEST_WATCH DSET_ONE --simple w-ext-one-simple.ddl 2 0 #I # echo "DONE WITH 4th SET OF TESTS" # diff --git a/hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl b/hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl index d85594d..09255cc 100644 --- a/hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-esc-f1.ddl @@ -4,8 +4,3 @@ dimension 0: 10->13 (increases) Data: (10) {1, {2, {2, 2, 2}, 2}}, {2, {3, {3, 3, 3}, 3}}, (12) {3, {4, {4, 4, 4}, 4}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {1, {2, {2, 2, 2}, 2}}, {2, {3, {3, 3, 3}, 3}} diff --git a/hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl b/hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl index ab6c294..00ed390 100644 --- a/hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-esc-f3.ddl @@ -3,8 +3,3 @@ Monitoring dataset /DSET_CMPD_ESC... dimension 0: 10->13 (increases) Data: (10) {{{2}}, {2}}, {{{3}}, {3}}, {{{4}}, {4}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {{{2}}, {2}}, {{{3}}, {3}} diff --git a/hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl b/hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl index 039cbf3..9b9a971 100644 --- a/hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-esc-ff2.ddl @@ -1,11 +1,3 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD_ESC... -dimension 0: 10->13 (increases) - Data: - (10) {{{2, 2, 2}}, {4, 4}}, {{{3, 3, 3}}, {5, 5}}, {{{4, 4, 4}}, {6, - (12) 6}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {{{2, 2, 2}}, {4, 4}}, {{{3, 3, 3}}, {5, 5}} +dimension 0: 10->9 (decreases) diff --git a/hl/tools/testfiles/w-ext-cmpd-esc.ddl b/hl/tools/testfiles/w-ext-cmpd-esc.ddl index 900b3f2..9b9a971 100644 --- a/hl/tools/testfiles/w-ext-cmpd-esc.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-esc.ddl @@ -1,13 +1,3 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD_ESC... -dimension 0: 10->13 (increases) - Data: - (10) {1, {2, {2, 2, 2}, 2}, 3, {4, 4}}, - (11) {2, {3, {3, 3, 3}, 3}, 4, {5, 5}}, - (12) {3, {4, {4, 4, 4}, 4}, 5, {6, 6}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {1, {2, {2, 2, 2}, 2}, 3, {4, 4}}, {2, {3, {3, 3, 3}, 3}, 4, {5, - (2) 5}} +dimension 0: 10->9 (decreases) diff --git a/hl/tools/testfiles/w-ext-cmpd-f1.ddl b/hl/tools/testfiles/w-ext-cmpd-f1.ddl index 7e0a066..029e4db 100644 --- a/hl/tools/testfiles/w-ext-cmpd-f1.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-f1.ddl @@ -1,11 +1,3 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD... -dimension 0: 10->13 (increases) - Data: - (10) {1, {2, {2, 2, 2}, 2}}, {2, {3, {3, 3, 3}, 3}}, - (12) {3, {4, {4, 4, 4}, 4}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {1, {2, {2, 2, 2}, 2}}, {2, {3, {3, 3, 3}, 3}} +dimension 0: 10->1 (decreases) diff --git a/hl/tools/testfiles/w-ext-cmpd-f2.ddl b/hl/tools/testfiles/w-ext-cmpd-f2.ddl index ea69222..362cc94 100644 --- a/hl/tools/testfiles/w-ext-cmpd-f2.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-f2.ddl @@ -4,8 +4,3 @@ dimension 0: 10->13 (increases) Data: (10) {{{2, 2, 2}}, {4, 4}}, {{{3, 3, 3}}, {5, 5}}, {{{4, 4, 4}}, {6, (12) 6}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {{{2, 2, 2}}, {4, 4}}, {{{3, 3, 3}}, {5, 5}} diff --git a/hl/tools/testfiles/w-ext-cmpd-ff3.ddl b/hl/tools/testfiles/w-ext-cmpd-ff3.ddl index 84e2919..6a54b97 100644 --- a/hl/tools/testfiles/w-ext-cmpd-ff3.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-ff3.ddl @@ -1,10 +1,2 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD... -dimension 0: 10->13 (increases) - Data: - (10) {{{2}}, {2}}, {{{3}}, {3}}, {{{4}}, {4}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {{{2}}, {2}}, {{{3}}, {3}} diff --git a/hl/tools/testfiles/w-ext-cmpd-label.ddl b/hl/tools/testfiles/w-ext-cmpd-label.ddl index 84534ea..394d5a6 100644 --- a/hl/tools/testfiles/w-ext-cmpd-label.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-label.ddl @@ -8,11 +8,3 @@ dimension 0: 10->13 (increases) (11) field4={a=5, b=5}}, (12) {field1=3, field2={a=4, b={a=4, b=4, c=4}, c=4}, field3=5, (12) field4={a=6, b=6}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {field1=1, field2={a=2, b={a=2, b=2, c=2}, c=2}, field3=3, - (1) field4={a=4, b=4}}, - (2) {field1=2, field2={a=3, b={a=3, b=3, c=3}, c=3}, field3=4, - (2) field4={a=5, b=5}} diff --git a/hl/tools/testfiles/w-ext-cmpd-two-f1.ddl b/hl/tools/testfiles/w-ext-cmpd-two-f1.ddl index 49abde9..9b4c235 100644 --- a/hl/tools/testfiles/w-ext-cmpd-two-f1.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-two-f1.ddl @@ -1,47 +1,15 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD_TWO... dimension 0: 4->6 (increases) -dimension 1: 10->12 (increases) - Data: - (0,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}} - (1,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}} - (2,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}} - (3,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}} - (4,0) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (4,2) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (4,4) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (4,6) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (4,8) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (4,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (5,0) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (5,2) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (5,4) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (5,6) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (5,8) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}}, - (5,10) {1, {1, {1, 1, 1}, 1}}, {1, {1, {1, 1, 1}, 1}} -dimension 0: 6->8 (increases) -dimension 1: 12->1 (decreases) - Data: - (6,0) {2, {2, {2, 2, 2}, 2}}, - (7,0) {2, {2, {2, 2, 2}, 2}} -dimension 0: 8->10 (increases) -dimension 1: 1->1 (unchanged) - Data: - (8,0) {3, {3, {3, 3, 3}, 3}}, - (9,0) {3, {3, {3, 3, 3}, 3}} -dimension 0: 10->3 (decreases) -dimension 1: 1->3 (increases) - Data: - (0,1) {4, {4, {4, 4, 4}, 4}}, {4, {4, {4, 4, 4}, 4}} - (1,1) {4, {4, {4, 4, 4}, 4}}, {4, {4, {4, 4, 4}, 4}} - (2,1) {4, {4, {4, 4, 4}, 4}}, {4, {4, {4, 4, 4}, 4}} -dimension 0: 3->2 (decreases) -dimension 1: 3->2 (decreases) -dimension 0: 2->1 (decreases) -dimension 1: 2->2 (unchanged) -dimension 0: 1->1 (unchanged) -dimension 1: 2->4 (increases) - Data: - (0,2) {7, {7, {7, 7, 7}, 7}}, {7, {7, {7, 7, 7}, 7}} -dimension 0: 1->1 (unchanged) -dimension 1: 4->3 (decreases) +dimension 1: 10->10 (unchanged) + Data: + (4,0) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (4,2) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (4,4) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (4,6) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (4,8) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (5,0) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (5,2) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (5,4) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (5,6) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}}, + (5,8) {2, {2, {2, 2, 2}, 2}}, {2, {2, {2, 2, 2}, 2}} diff --git a/hl/tools/testfiles/w-ext-cmpd-two-f3.ddl b/hl/tools/testfiles/w-ext-cmpd-two-f3.ddl index 0878f35..94b5c99 100644 --- a/hl/tools/testfiles/w-ext-cmpd-two-f3.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-two-f3.ddl @@ -1,41 +1,4 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD_TWO... -dimension 0: 4->6 (increases) -dimension 1: 10->12 (increases) - Data: - (0,10) {{{1}}, {1}}, {{{1}}, {1}} - (1,10) {{{1}}, {1}}, {{{1}}, {1}} - (2,10) {{{1}}, {1}}, {{{1}}, {1}} - (3,10) {{{1}}, {1}}, {{{1}}, {1}} - (4,0) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, - (4,4) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, - (4,8) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, - (5,0) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, - (5,4) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, - (5,8) {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}}, {{{1}}, {1}} -dimension 0: 6->8 (increases) -dimension 1: 12->1 (decreases) - Data: - (6,0) {{{2}}, {2}}, - (7,0) {{{2}}, {2}} -dimension 0: 8->10 (increases) -dimension 1: 1->1 (unchanged) - Data: - (8,0) {{{3}}, {3}}, - (9,0) {{{3}}, {3}} -dimension 0: 10->3 (decreases) -dimension 1: 1->3 (increases) - Data: - (0,1) {{{4}}, {4}}, {{{4}}, {4}} - (1,1) {{{4}}, {4}}, {{{4}}, {4}} - (2,1) {{{4}}, {4}}, {{{4}}, {4}} -dimension 0: 3->2 (decreases) -dimension 1: 3->2 (decreases) -dimension 0: 2->1 (decreases) -dimension 1: 2->2 (unchanged) -dimension 0: 1->1 (unchanged) -dimension 1: 2->4 (increases) - Data: - (0,2) {{{7}}, {7}}, {{{7}}, {7}} -dimension 0: 1->1 (unchanged) -dimension 1: 4->3 (decreases) +dimension 0: 4->3 (decreases) +dimension 1: 10->7 (decreases) diff --git a/hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl b/hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl index 669547e..482da31 100644 --- a/hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-two-ff2.ddl @@ -1,47 +1,8 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD_TWO... -dimension 0: 4->6 (increases) +dimension 0: 4->3 (decreases) dimension 1: 10->12 (increases) Data: - (0,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}} - (1,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}} - (2,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}} - (3,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}} - (4,0) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (4,2) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (4,4) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (4,6) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (4,8) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (4,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (5,0) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (5,2) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (5,4) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (5,6) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (5,8) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}}, - (5,10) {{{1, 1, 1}}, {1, 1}}, {{{1, 1, 1}}, {1, 1}} -dimension 0: 6->8 (increases) -dimension 1: 12->1 (decreases) - Data: - (6,0) {{{2, 2, 2}}, {2, 2}}, - (7,0) {{{2, 2, 2}}, {2, 2}} -dimension 0: 8->10 (increases) -dimension 1: 1->1 (unchanged) - Data: - (8,0) {{{3, 3, 3}}, {3, 3}}, - (9,0) {{{3, 3, 3}}, {3, 3}} -dimension 0: 10->3 (decreases) -dimension 1: 1->3 (increases) - Data: - (0,1) {{{4, 4, 4}}, {4, 4}}, {{{4, 4, 4}}, {4, 4}} - (1,1) {{{4, 4, 4}}, {4, 4}}, {{{4, 4, 4}}, {4, 4}} - (2,1) {{{4, 4, 4}}, {4, 4}}, {{{4, 4, 4}}, {4, 4}} -dimension 0: 3->2 (decreases) -dimension 1: 3->2 (decreases) -dimension 0: 2->1 (decreases) -dimension 1: 2->2 (unchanged) -dimension 0: 1->1 (unchanged) -dimension 1: 2->4 (increases) - Data: - (0,2) {{{7, 7, 7}}, {7, 7}}, {{{7, 7, 7}}, {7, 7}} -dimension 0: 1->1 (unchanged) -dimension 1: 4->3 (decreases) + (0,10) {{{-1, -1, -1}}, {-1, -1}}, {{{-1, -1, -1}}, {-1, -1}} + (1,10) {{{-1, -1, -1}}, {-1, -1}}, {{{-1, -1, -1}}, {-1, -1}} + (2,10) {{{-1, -1, -1}}, {-1, -1}}, {{{-1, -1, -1}}, {-1, -1}} diff --git a/hl/tools/testfiles/w-ext-cmpd-two.ddl b/hl/tools/testfiles/w-ext-cmpd-two.ddl index a461226..57ffc2c 100644 --- a/hl/tools/testfiles/w-ext-cmpd-two.ddl +++ b/hl/tools/testfiles/w-ext-cmpd-two.ddl @@ -1,67 +1,7 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_CMPD_TWO... dimension 0: 4->6 (increases) -dimension 1: 10->12 (increases) +dimension 1: 10->1 (decreases) Data: - (0,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (0,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}} - (1,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (1,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}} - (2,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (2,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}} - (3,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (3,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}} - (4,0) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,1) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,2) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,3) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,4) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,5) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,6) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,7) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,8) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,9) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (4,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,0) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,1) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,2) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,3) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,4) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,5) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,6) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,7) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,8) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,9) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,10) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}}, - (5,11) {1, {1, {1, 1, 1}, 1}, 1, {1, 1}} -dimension 0: 6->8 (increases) -dimension 1: 12->1 (decreases) - Data: - (6,0) {2, {2, {2, 2, 2}, 2}, 2, {2, 2}}, - (7,0) {2, {2, {2, 2, 2}, 2}, 2, {2, 2}} -dimension 0: 8->10 (increases) -dimension 1: 1->1 (unchanged) - Data: - (8,0) {3, {3, {3, 3, 3}, 3}, 3, {3, 3}}, - (9,0) {3, {3, {3, 3, 3}, 3}, 3, {3, 3}} -dimension 0: 10->3 (decreases) -dimension 1: 1->3 (increases) - Data: - (0,1) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}}, - (0,2) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}} - (1,1) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}}, - (1,2) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}} - (2,1) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}}, - (2,2) {4, {4, {4, 4, 4}, 4}, 4, {4, 4}} -dimension 0: 3->2 (decreases) -dimension 1: 3->2 (decreases) -dimension 0: 2->1 (decreases) -dimension 1: 2->2 (unchanged) -dimension 0: 1->1 (unchanged) -dimension 1: 2->4 (increases) - Data: - (0,2) {7, {7, {7, 7, 7}, 7}, 7, {7, 7}}, - (0,3) {7, {7, {7, 7, 7}, 7}, 7, {7, 7}} -dimension 0: 1->1 (unchanged) -dimension 1: 4->3 (decreases) + (4,0) {2, {2, {2, 2, 2}, 2}, 2, {2, 2}}, + (5,0) {2, {2, {2, 2, 2}, 2}, 2, {2, 2}} diff --git a/hl/tools/testfiles/w-ext-cmpd.ddl b/hl/tools/testfiles/w-ext-cmpd.ddl index 7e64a14..aac5be3 100644 --- a/hl/tools/testfiles/w-ext-cmpd.ddl +++ b/hl/tools/testfiles/w-ext-cmpd.ddl @@ -5,9 +5,3 @@ dimension 0: 10->13 (increases) (10) {1, {2, {2, 2, 2}, 2}, 3, {4, 4}}, (11) {2, {3, {3, 3, 3}, 3}, 4, {5, 5}}, (12) {3, {4, {4, 4, 4}, 4}, 5, {6, 6}} -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) {1, {2, {2, 2, 2}, 2}, 3, {4, 4}}, {2, {3, {3, 3, 3}, 3}, 4, {5, - (2) 5}} diff --git a/hl/tools/testfiles/w-ext-early.ddl b/hl/tools/testfiles/w-ext-early.ddl index 1d963d7..bb72104 100644 --- a/hl/tools/testfiles/w-ext-early.ddl +++ b/hl/tools/testfiles/w-ext-early.ddl @@ -1,10 +1,3 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_ALLOC_EARLY... -dimension 0: 10->13 (increases) - Data: - (10) 0, 1, 2 -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) 0, 1 +dimension 0: 10->9 (decreases) diff --git a/hl/tools/testfiles/w-ext-late.ddl b/hl/tools/testfiles/w-ext-late.ddl index f3a7cf2..a6f8265 100644 --- a/hl/tools/testfiles/w-ext-late.ddl +++ b/hl/tools/testfiles/w-ext-late.ddl @@ -1,10 +1,2 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_ALLOC_LATE... -dimension 0: 10->13 (increases) - Data: - (10) 0, 1, 2 -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) 0, 1 diff --git a/hl/tools/testfiles/w-ext-one-d.ddl b/hl/tools/testfiles/w-ext-one-d.ddl index 249ff95..673370a 100644 --- a/hl/tools/testfiles/w-ext-one-d.ddl +++ b/hl/tools/testfiles/w-ext-one-d.ddl @@ -1,6 +1,3 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_ONE... dimension 0: 10->13 (increases) -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) diff --git a/hl/tools/testfiles/w-ext-one-simple.ddl b/hl/tools/testfiles/w-ext-one-simple.ddl index 3bf0ef5..5df9dff 100644 --- a/hl/tools/testfiles/w-ext-one-simple.ddl +++ b/hl/tools/testfiles/w-ext-one-simple.ddl @@ -1,13 +1,6 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_ONE... -dimension 0: 10->13 (increases) - Data: - 0 - 1 - 2 -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) +dimension 0: 10->12 (increases) Data: 0 1 diff --git a/hl/tools/testfiles/w-ext-one.ddl b/hl/tools/testfiles/w-ext-one.ddl index c4e75eb..9604020 100644 --- a/hl/tools/testfiles/w-ext-one.ddl +++ b/hl/tools/testfiles/w-ext-one.ddl @@ -3,8 +3,3 @@ Monitoring dataset /DSET_ONE... dimension 0: 10->13 (increases) Data: (10) 0, 1, 2 -dimension 0: 13->12 (decreases) -dimension 0: 12->1 (decreases) -dimension 0: 1->3 (increases) - Data: - (1) 0, 1 diff --git a/hl/tools/testfiles/w-ext-two-d.ddl b/hl/tools/testfiles/w-ext-two-d.ddl index b71a9a6..5c7af0a 100644 --- a/hl/tools/testfiles/w-ext-two-d.ddl +++ b/hl/tools/testfiles/w-ext-two-d.ddl @@ -1,18 +1,4 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_TWO... -dimension 0: 4->6 (increases) -dimension 1: 10->12 (increases) -dimension 0: 6->8 (increases) -dimension 1: 12->1 (decreases) -dimension 0: 8->10 (increases) -dimension 1: 1->1 (unchanged) -dimension 0: 10->3 (decreases) -dimension 1: 1->3 (increases) -dimension 0: 3->2 (decreases) -dimension 1: 3->2 (decreases) -dimension 0: 2->1 (decreases) -dimension 1: 2->2 (unchanged) -dimension 0: 1->1 (unchanged) -dimension 1: 2->4 (increases) -dimension 0: 1->1 (unchanged) -dimension 1: 4->3 (decreases) +dimension 0: 4->2 (decreases) +dimension 1: 10->10 (unchanged) diff --git a/hl/tools/testfiles/w-ext-two-width.ddl b/hl/tools/testfiles/w-ext-two-width.ddl index 52903de..9f09fde 100644 --- a/hl/tools/testfiles/w-ext-two-width.ddl +++ b/hl/tools/testfiles/w-ext-two-width.ddl @@ -1,41 +1,9 @@ Opened "TEST.h5" with sec2 driver. Monitoring dataset /DSET_TWO... -dimension 0: 4->6 (increases) +dimension 0: 4->4 (unchanged) dimension 1: 10->12 (increases) Data: - (0,10) 1, 1 - (1,10) 1, 1 - (2,10) 1, 1 - (3,10) 1, 1 - (4,0) 1, 1, 1, 1, 1, - (4,5) 1, 1, 1, 1, 1, - (4,10) 1, 1, - (5,0) 1, 1, 1, 1, 1, - (5,5) 1, 1, 1, 1, 1, - (5,10) 1, 1 -dimension 0: 6->8 (increases) -dimension 1: 12->1 (decreases) - Data: - (6,0) 2, - (7,0) 2 -dimension 0: 8->10 (increases) -dimension 1: 1->1 (unchanged) - Data: - (8,0) 3, - (9,0) 3 -dimension 0: 10->3 (decreases) -dimension 1: 1->3 (increases) - Data: - (0,1) 4, 4 - (1,1) 4, 4 - (2,1) 4, 4 -dimension 0: 3->2 (decreases) -dimension 1: 3->2 (decreases) -dimension 0: 2->1 (decreases) -dimension 1: 2->2 (unchanged) -dimension 0: 1->1 (unchanged) -dimension 1: 2->4 (increases) - Data: - (0,2) 7, 7 -dimension 0: 1->1 (unchanged) -dimension 1: 4->3 (decreases) + (0,10) 0, 0 + (1,10) 0, 0 + (2,10) 0, 0 + (3,10) 0, 0 diff --git a/hl/tools/testfiles/w-ext-two.ddl b/hl/tools/testfiles/w-ext-two.ddl index 31df8d5..28ff075 100644 --- a/hl/tools/testfiles/w-ext-two.ddl +++ b/hl/tools/testfiles/w-ext-two.ddl @@ -3,35 +3,9 @@ Monitoring dataset /DSET_TWO... dimension 0: 4->6 (increases) dimension 1: 10->12 (increases) Data: - (0,10) 1, 1 - (1,10) 1, 1 - (2,10) 1, 1 - (3,10) 1, 1 - (4,0) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - (5,0) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 -dimension 0: 6->8 (increases) -dimension 1: 12->1 (decreases) - Data: - (6,0) 2, - (7,0) 2 -dimension 0: 8->10 (increases) -dimension 1: 1->1 (unchanged) - Data: - (8,0) 3, - (9,0) 3 -dimension 0: 10->3 (decreases) -dimension 1: 1->3 (increases) - Data: - (0,1) 4, 4 - (1,1) 4, 4 - (2,1) 4, 4 -dimension 0: 3->2 (decreases) -dimension 1: 3->2 (decreases) -dimension 0: 2->1 (decreases) -dimension 1: 2->2 (unchanged) -dimension 0: 1->1 (unchanged) -dimension 1: 2->4 (increases) - Data: - (0,2) 7, 7 -dimension 0: 1->1 (unchanged) -dimension 1: 4->3 (decreases) + (0,10) 2, 2 + (1,10) 2, 2 + (2,10) 2, 2 + (3,10) 2, 2 + (4,0) 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + (5,0) 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 -- cgit v0.12 From ebb7bc7fadb86c48869439ea9137f1dfc1e1f158 Mon Sep 17 00:00:00 2001 From: lrknox Date: Sat, 22 Apr 2017 15:21:36 -0500 Subject: Comment out failing plugin test until fixed (unexpected .libs in plugin test directory path with '@'). --- test/test_plugin.sh.in | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in index 1e6d9d9..37d4462 100644 --- a/test/test_plugin.sh.in +++ b/test/test_plugin.sh.in @@ -91,19 +91,19 @@ fi ENVCMD="env HDF5_PLUGIN_PATH=@/${PLUGIN_LIBDIR1}:@/${PLUGIN_LIBDIR2}" # Run the test -$ENVCMD $TEST_BIN -if [ $? != 0 ]; then - nerrors=`expr $nerrors + 1` -fi +#$ENVCMD $TEST_BIN +#if [ $? != 0 ]; then +# nerrors=`expr $nerrors + 1` +#fi # print results -if test $nerrors -ne 0 ; then - echo "$nerrors errors encountered" - exit_code=$EXIT_FAILURE -else - echo "All Plugin API tests passed." - exit_code=$EXIT_SUCCESS -fi +#if test $nerrors -ne 0 ; then +# echo "$nerrors errors encountered" +# exit_code=$EXIT_FAILURE +#else +# echo "All Plugin API tests passed." +# exit_code=$EXIT_SUCCESS +#fi # Clean up temporary files/directories and leave $RM $PLUGIN_LIBDIR1 $PLUGIN_LIBDIR2 -- cgit v0.12 From 0e1633c26d3d28cc7612ae52277111a6aa4869da Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 09:03:46 -0500 Subject: Windows ahs one more directory level --- test/CMakeTests.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 86c5cb3..6f15fc4 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -986,8 +986,10 @@ endif () ############################################################################## if (WIN32) set (CMAKE_SEP "\;") + set (BIN_REL_PATH "../../") else () set (CMAKE_SEP ":") + set (BIN_REL_PATH "../") endif () add_test (NAME H5PLUGIN-plugin COMMAND $) @@ -998,7 +1000,7 @@ set_tests_properties (H5PLUGIN-plugin PROPERTIES add_test (NAME H5PLUGIN-pluginRelative COMMAND $) set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES - ENVIRONMENT "HDF5_PLUGIN_PATH=@/../testdir1${CMAKE_SEP}@/../testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" + ENVIRONMENT "HDF5_PLUGIN_PATH=@/${BIN_REL_PATH}testdir1${CMAKE_SEP}@/${BIN_REL_PATH}testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} ) -- cgit v0.12 From 220388e7351becc927114de19f8a34e78e55a7ed Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 10:50:06 -0500 Subject: Fix path to actual executable location --- test/test_plugin.sh.in | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in index 37d4462..a0c9a42 100644 --- a/test/test_plugin.sh.in +++ b/test/test_plugin.sh.in @@ -88,22 +88,23 @@ if [ $? != 0 ]; then fi # setup plugin path relative to test -ENVCMD="env HDF5_PLUGIN_PATH=@/${PLUGIN_LIBDIR1}:@/${PLUGIN_LIBDIR2}" +# actual executable is in the .libs folder +ENVCMD="env HDF5_PLUGIN_PATH=@/../${PLUGIN_LIBDIR1}:@/../${PLUGIN_LIBDIR2}" # Run the test -#$ENVCMD $TEST_BIN -#if [ $? != 0 ]; then -# nerrors=`expr $nerrors + 1` -#fi +$ENVCMD $TEST_BIN +if [ $? != 0 ]; then + nerrors=`expr $nerrors + 1` +fi # print results -#if test $nerrors -ne 0 ; then -# echo "$nerrors errors encountered" -# exit_code=$EXIT_FAILURE -#else -# echo "All Plugin API tests passed." -# exit_code=$EXIT_SUCCESS -#fi +if test $nerrors -ne 0 ; then + echo "$nerrors errors encountered" + exit_code=$EXIT_FAILURE +else + echo "All Plugin API tests passed." + exit_code=$EXIT_SUCCESS +fi # Clean up temporary files/directories and leave $RM $PLUGIN_LIBDIR1 $PLUGIN_LIBDIR2 -- cgit v0.12 From 6fac0de1582f9b8f9a85893cd269a86203b7fc41 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 15:10:58 -0500 Subject: Revert HDFFV-9655 by disabling test and not using new function. --- src/H5PL.c | 16 +++++++++------- src/H5PLpublic.h | 12 ++++++------ test/test_plugin.sh.in | 15 +++++++++------ 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/src/H5PL.c b/src/H5PL.c index 2789a5e..ba10e5a 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -720,17 +720,19 @@ done: * * Purpose: Query the size of the current list of plugin paths. * - * Return: Plugin path size (can't indicate failure due to unsigned type) + * Return: Plugin path size * *------------------------------------------------------------------------- */ -unsigned int -H5PLsize(void) +herr_t +H5PLsize(unsigned int *listsize) { - unsigned int ret_value = (unsigned int)H5PL_num_paths_g; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE1("e", "*Iu", listsize); - FUNC_ENTER_API(0) - H5TRACE0("Iu",""); + *listsize = (unsigned int)H5PL_num_paths_g; done: FUNC_LEAVE_API(ret_value) @@ -778,7 +780,7 @@ H5PL__init_path_table(void) /* Check for too many directories in path */ if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table") - if(NULL == (H5PL_path_table_g[H5PL_num_paths_g] = H5PL__env_strdup(dir))) + if(NULL == (H5PL_path_table_g[H5PL_num_paths_g] = H5MM_strdup(dir))) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") H5PL_num_paths_g++; dir = HDstrtok(NULL, H5PL_PATH_SEPARATOR); diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h index 5e4dcae..12cdc87 100644 --- a/src/H5PLpublic.h +++ b/src/H5PLpublic.h @@ -43,14 +43,14 @@ extern "C" { /* plugin state */ H5_DLL herr_t H5PLset_loading_state(unsigned int plugin_type); -H5_DLL herr_t H5PLget_loading_state(unsigned int* plugin_type/*out*/); -H5_DLL herr_t H5PLappend(const char* plugin_path); -H5_DLL herr_t H5PLprepend(const char* plugin_path); -H5_DLL herr_t H5PLreplace(const char* plugin_path, unsigned int index); -H5_DLL herr_t H5PLinsert(const char* plugin_path, unsigned int index); +H5_DLL herr_t H5PLget_loading_state(unsigned int *plugin_type/*out*/); +H5_DLL herr_t H5PLappend(const char *plugin_path); +H5_DLL herr_t H5PLprepend(const char *plugin_path); +H5_DLL herr_t H5PLreplace(const char *plugin_path, unsigned int index); +H5_DLL herr_t H5PLinsert(const char *plugin_path, unsigned int index); H5_DLL herr_t H5PLremove(unsigned int index); H5_DLL ssize_t H5PLget(unsigned int index, char *pathname/*out*/, size_t size); -H5_DLL unsigned int H5PLsize(void); +H5_DLL herr_t H5PLsize(unsigned int *listsize/*out*/); #ifdef __cplusplus } diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in index a0c9a42..4cddbb0 100644 --- a/test/test_plugin.sh.in +++ b/test/test_plugin.sh.in @@ -87,15 +87,18 @@ if [ $? != 0 ]; then nerrors=`expr $nerrors + 1` fi +############################################ +# HDFFV-9655 test for relative path disabled # setup plugin path relative to test # actual executable is in the .libs folder -ENVCMD="env HDF5_PLUGIN_PATH=@/../${PLUGIN_LIBDIR1}:@/../${PLUGIN_LIBDIR2}" - +#ENVCMD="env HDF5_PLUGIN_PATH=@/../${PLUGIN_LIBDIR1}:@/../${PLUGIN_LIBDIR2}" +# # Run the test -$ENVCMD $TEST_BIN -if [ $? != 0 ]; then - nerrors=`expr $nerrors + 1` -fi +#$ENVCMD $TEST_BIN +#if [ $? != 0 ]; then +# nerrors=`expr $nerrors + 1` +#fi +############################################# # print results if test $nerrors -ne 0 ; then -- cgit v0.12 From aafee79e9f34137b3db11e9e76aeb604446c31b7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 15:20:21 -0500 Subject: Changed signature of H5PLgetsize --- java/src/jni/h5plImp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c index 09a1032..322d5d1 100644 --- a/java/src/jni/h5plImp.c +++ b/java/src/jni/h5plImp.c @@ -213,13 +213,11 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5PLsize (JNIEnv *env, jclass clss) { - int retVal = -1; - - retVal = H5PLsize(); - if (retVal < 0) + unsigned int listsize = 0; + if (H5PLget_loading_state(&listsize) < 0) { h5libraryError(env); - - return (jint)retVal; + } + return (jint)listsize; } /* end Java_hdf_hdf5lib_H5_H5PLsize */ #ifdef __cplusplus -- cgit v0.12 From c2a9c334447da04a1d8424d25e54f9bb1381fe48 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 15:25:36 -0500 Subject: Revert HDFFV-9655 --- test/CMakeTests.cmake | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 6f15fc4..6eee237 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -998,11 +998,15 @@ set_tests_properties (H5PLUGIN-plugin PROPERTIES WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} ) -add_test (NAME H5PLUGIN-pluginRelative COMMAND $) -set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES - ENVIRONMENT "HDF5_PLUGIN_PATH=@/${BIN_REL_PATH}testdir1${CMAKE_SEP}@/${BIN_REL_PATH}testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} -) +############################################################################## +# HDFFV-9655 relative plugin test disabled +# +#add_test (NAME H5PLUGIN-pluginRelative COMMAND $) +#set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES +# ENVIRONMENT "HDF5_PLUGIN_PATH=@/${BIN_REL_PATH}testdir1${CMAKE_SEP}@/${BIN_REL_PATH}testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" +# WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} +#) +############################################################################## ############################################################################## ### S W M R T E S T S -- cgit v0.12 From c1dc24c143077dcbc95dfc881de09d669133ddd6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 15:31:28 -0500 Subject: Change H5PLsize() signature --- test/plugin.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/test/plugin.c b/test/plugin.c index 2939595..13e87bd 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -733,7 +733,7 @@ test_filter_path_apis(void) if(H5Zfilter_avail(H5Z_FILTER_DYNLIB1) != TRUE) TEST_ERROR - ndx = H5PLsize(); + H5PLsize(ndx); TESTING(" remove"); /* Remove all existing paths*/ @@ -743,7 +743,8 @@ test_filter_path_apis(void) TEST_ERROR } /* end if */ /* Verify the table is empty */ - if(H5PLsize() > 0) TEST_ERROR + H5PLsize(ndx); + if(ndx > 0) TEST_ERROR PASSED(); TESTING(" remove (exceed min)"); @@ -764,7 +765,8 @@ test_filter_path_apis(void) } } /* Verify the table is full */ - if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + H5PLsize(ndx); + if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR PASSED(); TESTING(" append (exceed)"); @@ -835,7 +837,8 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is not full */ - if (H5PLsize() != H5PL_MAX_PATH_NUM - 1) TEST_ERROR + H5PLsize(ndx); + if (ndx != H5PL_MAX_PATH_NUM - 1) TEST_ERROR TESTING(" prepend"); /* Prepend one path*/ @@ -846,7 +849,8 @@ test_filter_path_apis(void) } /* Verify the table is full */ - if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + H5PLsize(ndx); + if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were moved */ if(H5PLget(8, pathname, 256) <= 0) TEST_ERROR @@ -880,7 +884,8 @@ test_filter_path_apis(void) } /* Verify the table is full */ - if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + H5PLsize(ndx); + if(ndx) != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were not moved */ if(H5PLget(0, pathname, 256) <= 0) TEST_ERROR @@ -909,7 +914,8 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is not full */ - if(H5PLsize() != 15) TEST_ERROR + H5PLsize(ndx); + if(ndx != 15) TEST_ERROR TESTING(" insert"); /* Insert one path*/ @@ -928,7 +934,8 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is full */ - if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + H5PLsize(ndx); + if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR TESTING(" insert (exceed)"); /* Exceed the max path insert */ -- cgit v0.12 From c08ef4dc5b0050e173b673a8c2ef4efb8244ea11 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 15:34:25 -0500 Subject: Signature change requires a ptr --- test/plugin.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/plugin.c b/test/plugin.c index 13e87bd..cc0c6b8 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -733,7 +733,7 @@ test_filter_path_apis(void) if(H5Zfilter_avail(H5Z_FILTER_DYNLIB1) != TRUE) TEST_ERROR - H5PLsize(ndx); + H5PLsize(&ndx); TESTING(" remove"); /* Remove all existing paths*/ @@ -743,7 +743,7 @@ test_filter_path_apis(void) TEST_ERROR } /* end if */ /* Verify the table is empty */ - H5PLsize(ndx); + H5PLsize(&ndx); if(ndx > 0) TEST_ERROR PASSED(); @@ -765,7 +765,7 @@ test_filter_path_apis(void) } } /* Verify the table is full */ - H5PLsize(ndx); + H5PLsize(&ndx); if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR PASSED(); @@ -837,7 +837,7 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is not full */ - H5PLsize(ndx); + H5PLsize(&ndx); if (ndx != H5PL_MAX_PATH_NUM - 1) TEST_ERROR TESTING(" prepend"); @@ -849,7 +849,7 @@ test_filter_path_apis(void) } /* Verify the table is full */ - H5PLsize(ndx); + H5PLsize(&ndx); if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were moved */ @@ -884,7 +884,7 @@ test_filter_path_apis(void) } /* Verify the table is full */ - H5PLsize(ndx); + H5PLsize(&ndx); if(ndx) != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were not moved */ @@ -914,7 +914,7 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is not full */ - H5PLsize(ndx); + H5PLsize(&ndx); if(ndx != 15) TEST_ERROR TESTING(" insert"); @@ -934,7 +934,7 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is full */ - H5PLsize(ndx); + H5PLsize(&ndx); if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR TESTING(" insert (exceed)"); -- cgit v0.12 From bce204f7f3337424d99df0d6c18f701fc9727cb4 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 15:36:10 -0500 Subject: Fix typo --- test/plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/plugin.c b/test/plugin.c index cc0c6b8..862f99d 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -885,7 +885,7 @@ test_filter_path_apis(void) /* Verify the table is full */ H5PLsize(&ndx); - if(ndx) != H5PL_MAX_PATH_NUM) TEST_ERROR + if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were not moved */ if(H5PLget(0, pathname, 256) <= 0) TEST_ERROR -- cgit v0.12 From c148ad90f0604e67065a1a82a0ade72984672173 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 16:09:39 -0500 Subject: Fix javadoc --- java/src/hdf/hdf5lib/H5.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 23e2a34..5e13fdf 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -2895,7 +2895,8 @@ public class H5 implements java.io.Serializable { * @param file_id * IN: Identifier of the target file. * - * @param mdc_logging_status, the status + * @param mdc_logging_status + * the status * mdc_logging_status[0] = is_enabled, whether logging is enabled * mdc_logging_status[1] = is_currently_logging, whether events are currently being logged * @@ -5813,7 +5814,8 @@ public class H5 implements java.io.Serializable { * * @param fapl_id * IN: File access property list identifier - * @param mdc_log_options, the options + * @param mdc_log_options + * the options * mdc_logging_options[0] = is_enabled, whether logging is enabled * mdc_logging_options[1] = start_on_access, whether the logging begins as soon as the file is opened or created * -- cgit v0.12 From 0fb5ce7ad50664f800ffe7e107e0fb0f90f66e12 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 16:21:42 -0500 Subject: Correct name of native function --- java/src/jni/h5plImp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c index 322d5d1..9b6100e 100644 --- a/java/src/jni/h5plImp.c +++ b/java/src/jni/h5plImp.c @@ -214,7 +214,7 @@ Java_hdf_hdf5lib_H5_H5PLsize (JNIEnv *env, jclass clss) { unsigned int listsize = 0; - if (H5PLget_loading_state(&listsize) < 0) { + if (H5PLsize(&listsize) < 0) { h5libraryError(env); } return (jint)listsize; -- cgit v0.12 From b1a5ba405393da68028cf1c8b159a3abb51d2187 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Tue, 25 Apr 2017 02:09:55 -0400 Subject: Updated bin/trace to emit errors and reordered autogen.sh processing so that script failures leave the library in a non-compilable state, making it harder to ignore errors. --- autogen.sh | 63 +++++++++++++++++++++++++++++++++----------------------------- bin/trace | 15 ++++++++++++++- 2 files changed, 48 insertions(+), 30 deletions(-) diff --git a/autogen.sh b/autogen.sh index f3bd774..33779d4 100755 --- a/autogen.sh +++ b/autogen.sh @@ -205,6 +205,39 @@ Darwin*) ;; esac +# Run scripts that process source. +# +# These should be run before the autotools so that failures here block +# compilation. + +# Run trace script +# The trace script adds H5TRACE macros to library source files. It should +# have no effect on files that don't have HDF5 API macros in them. +echo "Running trace script:" +bin/trace src/H5*.c || exit 1 +echo + +# Run make_err +# make_err automatically generates the H5E headers that create error message +# types for HDF5. +echo "Running error generation script:" +bin/make_err src/H5err.txt || exit 1 +echo + +# Run make_vers +# make_vers automatically generates the public headers that define the API version +# macros for HDF5. +echo "Running API version generation script:" +bin/make_vers src/H5vers.txt || exit 1 +echo + +# Run make_overflow +# make_overflow automatically generates macros for detecting overflows for type +# conversion. +echo "Running overflow macro generation script:" +bin/make_overflow src/H5overflow.txt || exit 1 +echo + # Run autotools in order # # When available, we use the --force option to ensure all files are @@ -267,35 +300,7 @@ fi ${autoconf_cmd} || exit 1 echo -# Run scripts that process source. - -# Run trace script -# The trace script adds H5TRACE macros to library source files. It should -# have no effect on files that don't have HDF5 API macros in them. -echo -echo "Running trace script:" -bin/trace src/H5*.c || exit 1 - -# Run make_err -# make_err automatically generates the H5E headers that create error message -# types for HDF5. -echo -echo "Running error generation script:" -bin/make_err src/H5err.txt || exit 1 - -# Run make_vers -# make_vers automatically generates the public headers that define the API version -# macros for HDF5. -echo -echo "Running API version generation script:" -bin/make_vers src/H5vers.txt || exit 1 - -# Run make_overflow -# make_overflow automatically generates macros for detecting overflows for type -# conversion. -echo -echo "Running overflow macro generation script:" -bin/make_overflow src/H5overflow.txt || exit 1 +echo "*** SUCCESS ***" echo exit 0 diff --git a/bin/trace b/bin/trace index 19c8990..ede344c 100755 --- a/bin/trace +++ b/bin/trace @@ -163,6 +163,8 @@ $Source = ""; ##############