diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-02-23 16:52:45 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-02-23 16:52:45 (GMT) |
commit | f29e2a01e35e466fdcc292a0c443265efdf4b025 (patch) | |
tree | ea6ae0ace8c1cf49c0fe8b9c493120e71cc001d1 /tools/h5repack/testh5repack_main.c | |
parent | fe388e2c1303c515f36b9a595a2820db950b9413 (diff) | |
download | hdf5-f29e2a01e35e466fdcc292a0c443265efdf4b025.zip hdf5-f29e2a01e35e466fdcc292a0c443265efdf4b025.tar.gz hdf5-f29e2a01e35e466fdcc292a0c443265efdf4b025.tar.bz2 |
[svn-r8218] Purpose:
bug fix in H5Zshuffle.c
add more tests to h5repack that exposed the bug
Description:
when creating a dataset with the shuffle filter and duplicating it in a new dataset (file)
the call to H5Z_set_local_shuffle failed. this is because the value of cd_nelmts of the filter
structure is set to 1 (H5Z_SHUFFLE_TOTAL_NPARMS) when the original dataset is created, but when
the new dataset is created there is a checking instruction that fails if the value of
cd_nelmts is not 0 (its original value, H5Z_SHUFFLE_USER_NPARMS)
Solution:
just remove that check condition, since the value of cd_nelmts is not used anyway.
if we decide that the value of cd_nelmts is necessary, then the H5O_pline_copy function
must be changed to update this value (a different update for each filter)
Platforms tested:
linux
solaris
AIX
Misc. update:
Diffstat (limited to 'tools/h5repack/testh5repack_main.c')
-rw-r--r-- | tools/h5repack/testh5repack_main.c | 64 |
1 files changed, 46 insertions, 18 deletions
diff --git a/tools/h5repack/testh5repack_main.c b/tools/h5repack/testh5repack_main.c index 6b829ee..89f2a97 100644 --- a/tools/h5repack/testh5repack_main.c +++ b/tools/h5repack/testh5repack_main.c @@ -42,27 +42,29 @@ test_copy(void) memset(&diff_options, 0, sizeof (diff_opt_t)); - TESTING(" copy with no filters"); + TESTING(" copy with no input filters"); + +/*------------------------------------------------------------------------- + * file with all kinds of dataset datatypes + *------------------------------------------------------------------------- + */ if (h5repack_init (&pack_options, 0)<0) TEST_ERROR; - -#if defined(H5_REPACK_DEBUG) - diff_options.verbose=1; - pack_options.verbose=1; -#endif - if (h5repack(FNAME1,FNAME1OUT,&pack_options)<0) TEST_ERROR; if (h5diff(FNAME1,FNAME1OUT,NULL,NULL,&diff_options) == 1) TEST_ERROR; if (h5repack_verify(FNAME1OUT,&pack_options)<=0) TEST_ERROR; + if (h5repack_cmpdcpl(FNAME1,FNAME1OUT)<=0) + TEST_ERROR; if (h5repack_end (&pack_options)<0) TEST_ERROR; - PASSED(); - - TESTING(" copy of attributes"); +/*------------------------------------------------------------------------- + * file with attributes + *------------------------------------------------------------------------- + */ if (h5repack_init (&pack_options, 0)<0) TEST_ERROR; if (h5repack(FNAME2,FNAME2OUT,&pack_options)<0) @@ -71,11 +73,16 @@ test_copy(void) TEST_ERROR; if (h5repack_verify(FNAME2OUT,&pack_options)<=0) TEST_ERROR; + if (h5repack_cmpdcpl(FNAME2,FNAME2OUT)<=0) + TEST_ERROR; if (h5repack_end (&pack_options)<0) TEST_ERROR; - PASSED(); - TESTING(" copy of hardlinks"); +/*------------------------------------------------------------------------- + * file with hardlinks + *------------------------------------------------------------------------- + */ + if (h5repack_init (&pack_options, 0)<0) TEST_ERROR; if (h5repack(FNAME3,FNAME3OUT,&pack_options)<0) @@ -84,10 +91,33 @@ test_copy(void) TEST_ERROR; if (h5repack_verify(FNAME3OUT,&pack_options)<=0) TEST_ERROR; + if (h5repack_cmpdcpl(FNAME3,FNAME3OUT)<=0) + TEST_ERROR; if (h5repack_end (&pack_options)<0) TEST_ERROR; - PASSED(); + +/*------------------------------------------------------------------------- + * file with filters + *------------------------------------------------------------------------- + */ + if (h5repack_init (&pack_options, 0)<0) + TEST_ERROR; + if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0) + TEST_ERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) + TEST_ERROR; + if (h5repack_verify(FNAME4OUT,&pack_options)<=0) + TEST_ERROR; + if (h5repack_cmpdcpl(FNAME4,FNAME4OUT)<=0) + TEST_ERROR; + if (h5repack_end (&pack_options)<0) + TEST_ERROR; +/*------------------------------------------------------------------------- + * end + *------------------------------------------------------------------------- + */ + PASSED(); return 0; error: @@ -100,7 +130,7 @@ error: * * Purpose: * - * 1) delete filters form the filter pipeline + * 1) remove filters form the filter pipeline * 2) use the h5diff utility to compare the input and output file; * it returns RET==0 if the objects have the same data * 3) use API functions to verify the compression/chunking input on the output file @@ -122,7 +152,7 @@ test_filter_none(void) memset(&diff_options, 0, sizeof (diff_opt_t)); memset(&pack_options, 0, sizeof (pack_opt_t)); - TESTING(" delete filters"); + TESTING(" removing filters"); /*------------------------------------------------------------------------- * test the NONE global option @@ -131,7 +161,7 @@ test_filter_none(void) if (h5repack_init (&pack_options, 0)<0) TEST_ERROR; - if (h5repack_addfilter("dset_gzip:NONE",&pack_options)<0) + if (h5repack_addfilter("NONE",&pack_options)<0) TEST_ERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0) TEST_ERROR; @@ -167,8 +197,6 @@ test_filter_none(void) error: return 1; - - } /*------------------------------------------------------------------------- |