diff options
Diffstat (limited to 'tools/h5repack/h5repacktst.c')
-rw-r--r-- | tools/h5repack/h5repacktst.c | 673 |
1 files changed, 339 insertions, 334 deletions
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c index e0c23fc..6d58abc 100644 --- a/tools/h5repack/h5repacktst.c +++ b/tools/h5repack/h5repacktst.c @@ -19,6 +19,9 @@ #include "h5repack.h" #include "h5diff.h" +#define GOERROR {H5_FAILED(); goto error;} + + /* fill value test */ #define FNAME0 "h5repack_fill.h5" #define FNAME0OUT "h5repack_fill_out.h5" @@ -145,7 +148,7 @@ int main (void) /* make the test files */ TESTING(" generating datasets"); if (make_testfiles()<0) - goto error; + GOERROR; PASSED(); /*------------------------------------------------------------------------- @@ -163,17 +166,17 @@ int main (void) */ TESTING(" copy of datasets (fill values)"); if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME0,FNAME0OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME0,FNAME0OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME0,FNAME0OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME0OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_cmpdcpl(FNAME0,FNAME0OUT)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); /*------------------------------------------------------------------------- @@ -182,37 +185,39 @@ int main (void) */ TESTING(" copy of datasets (all datatypes)"); if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME1,FNAME1OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME1,FNAME1OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME1,FNAME1OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME1OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_cmpdcpl(FNAME1,FNAME1OUT)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); /*------------------------------------------------------------------------- * file with attributes *------------------------------------------------------------------------- */ +#if 0 TESTING(" copy of datasets (attributes)"); if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME2,FNAME2OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME2,FNAME2OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME2,FNAME2OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME2OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_cmpdcpl(FNAME2,FNAME2OUT)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); +#endif /*------------------------------------------------------------------------- * file with hardlinks @@ -220,17 +225,17 @@ int main (void) */ TESTING(" copy of datasets (hardlinks)"); if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME3,FNAME3OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME3,FNAME3OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME3,FNAME3OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME3OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_cmpdcpl(FNAME3,FNAME3OUT)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); @@ -240,15 +245,15 @@ int main (void) */ TESTING(" copy of allocation early file"); if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME5,FNAME5OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME5,FNAME5OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME5,FNAME5OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME5OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); /*------------------------------------------------------------------------- @@ -270,19 +275,19 @@ int main (void) */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("dset1:GZIP=9",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else SKIPPED(); @@ -298,19 +303,19 @@ int main (void) #ifdef H5_HAVE_FILTER_DEFLATE if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("GZIP=1",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -325,7 +330,7 @@ int main (void) TESTING(" adding szip filter"); #if defined (H5_HAVE_FILTER_SZIP) -if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { +if (h5tools_can_encode(H5Z_FILTER_SZIP) >0) { szip_can_encode = 1; } @@ -336,19 +341,19 @@ if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { if (szip_can_encode) { if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("dset2:SZIP=8,EC",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset2:CHUNK=20x10",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); } else { @@ -368,17 +373,17 @@ TESTING(" adding szip filter to all"); #if defined (H5_HAVE_FILTER_SZIP) if (szip_can_encode) { if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("SZIP=8,NN",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); } else { @@ -399,19 +404,19 @@ if (szip_can_encode) { */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("dset1:SHUF",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -428,19 +433,19 @@ TESTING(" addding shuffle filter to all"); #ifdef H5_HAVE_FILTER_SHUFFLE if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("SHUF",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -457,19 +462,19 @@ TESTING(" addding shuffle filter to all"); */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("dset1:FLET",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -487,19 +492,19 @@ TESTING(" addding shuffle filter to all"); #ifdef H5_HAVE_FILTER_FLETCHER32 if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("FLET",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -515,40 +520,40 @@ TESTING(" addding shuffle filter to all"); */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options)<0) - TEST_ERROR; + GOERROR; #if defined (H5_HAVE_FILTER_FLETCHER32) if (h5repack_addfilter("dset1:FLET",&pack_options)<0) - TEST_ERROR; + GOERROR; #endif #ifdef H5_HAVE_FILTER_SHUFFLE if (h5repack_addfilter("dset1:SHUF",&pack_options)<0) - TEST_ERROR; + GOERROR; #endif #if defined (H5_HAVE_FILTER_SZIP) if (szip_can_encode) { if (h5repack_addfilter("dset1:SZIP=8,NN",&pack_options)<0) - TEST_ERROR; + GOERROR; } #endif #ifdef H5_HAVE_FILTER_DEFLATE if (h5repack_addfilter("dset1:GZIP=1",&pack_options)<0) - TEST_ERROR; + GOERROR; #endif if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); @@ -561,17 +566,17 @@ if (szip_can_encode) { */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); /*------------------------------------------------------------------------- @@ -581,17 +586,17 @@ if (szip_can_encode) { TESTING(" adding layout chunked to all"); if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); @@ -602,17 +607,17 @@ if (szip_can_encode) { *------------------------------------------------------------------------- */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset1:CONTI",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); @@ -623,17 +628,17 @@ if (szip_can_encode) { *------------------------------------------------------------------------- */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("CONTI",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); @@ -645,17 +650,17 @@ if (szip_can_encode) { */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset1:COMPA",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); TESTING(" adding layout compact to all"); @@ -666,17 +671,17 @@ if (szip_can_encode) { */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("COMPA",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); @@ -688,17 +693,17 @@ if (szip_can_encode) { *------------------------------------------------------------------------- */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset_compact:CONTI",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); TESTING(" layout compact to chunk conversion"); @@ -708,17 +713,17 @@ if (szip_can_encode) { *------------------------------------------------------------------------- */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset_compact:CHUNK=2x5",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); TESTING(" layout compact to compact conversion"); @@ -728,17 +733,17 @@ if (szip_can_encode) { *------------------------------------------------------------------------- */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset_compact:COMPA",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); TESTING(" layout contiguous to compact conversion"); @@ -747,17 +752,17 @@ if (szip_can_encode) { *------------------------------------------------------------------------- */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset_contiguous:COMPA",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); TESTING(" layout contiguous to chunk conversion"); @@ -766,17 +771,17 @@ if (szip_can_encode) { *------------------------------------------------------------------------- */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset_contiguous:CHUNK=3x6",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); TESTING(" layout contiguous to contiguous conversion"); @@ -786,17 +791,17 @@ if (szip_can_encode) { *------------------------------------------------------------------------- */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset_contiguous:CONTI",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); TESTING(" layout chunked to compact conversion"); @@ -805,17 +810,17 @@ if (szip_can_encode) { *------------------------------------------------------------------------- */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset_chunk:COMPA",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); TESTING(" layout chunked to contiguous conversion"); @@ -825,17 +830,17 @@ if (szip_can_encode) { *------------------------------------------------------------------------- */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset_chunk:CONTI",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); TESTING(" layout chunked to chunk conversion"); @@ -844,17 +849,17 @@ if (szip_can_encode) { *------------------------------------------------------------------------- */ if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addlayout("dset_chunk:CHUNK=18x13",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME4OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); @@ -874,15 +879,15 @@ if (szip_can_encode) { #if defined (H5_HAVE_FILTER_SZIP) if (szip_can_encode) { if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME7,FNAME7OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME7OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); } else { @@ -897,17 +902,17 @@ if (szip_can_encode) { #if defined (H5_HAVE_FILTER_SZIP) if (szip_can_encode) { if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("dset_szip:NONE",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME7,FNAME7OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME7OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); } else { @@ -922,15 +927,15 @@ if (szip_can_encode) { #ifdef H5_HAVE_FILTER_DEFLATE if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME8,FNAME8OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME8OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -942,17 +947,17 @@ if (szip_can_encode) { #ifdef H5_HAVE_FILTER_DEFLATE if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("dset_deflate:NONE",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME8,FNAME8OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME8OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -965,15 +970,15 @@ if (szip_can_encode) { #ifdef H5_HAVE_FILTER_SHUFFLE if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME9,FNAME9OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME9,FNAME9OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME9OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -984,17 +989,17 @@ if (szip_can_encode) { #ifdef H5_HAVE_FILTER_SHUFFLE if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("dset_shuffle:NONE",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME9,FNAME9OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME9,FNAME9OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME9OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -1005,15 +1010,15 @@ if (szip_can_encode) { #ifdef H5_HAVE_FILTER_FLETCHER32 if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME10,FNAME10OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME10,FNAME10OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME10OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -1024,17 +1029,17 @@ if (szip_can_encode) { #ifdef H5_HAVE_FILTER_FLETCHER32 if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("dset_fletcher32:NONE",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME10,FNAME10OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME10,FNAME10OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME10OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -1046,15 +1051,15 @@ if (szip_can_encode) { #ifdef H5_HAVE_FILTER_NBIT if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME12OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -1065,17 +1070,17 @@ if (szip_can_encode) { #ifdef H5_HAVE_FILTER_NBIT if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("dset_nbit:NONE",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME12OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -1086,17 +1091,17 @@ if (szip_can_encode) { #ifdef H5_HAVE_FILTER_NBIT if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("dset_int31:NBIT",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME12OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -1106,15 +1111,15 @@ if (szip_can_encode) { #ifdef H5_HAVE_FILTER_SCALEOFFSET if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME13OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -1125,17 +1130,17 @@ if (szip_can_encode) { #ifdef H5_HAVE_FILTER_SCALEOFFSET if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("dset_scaleoffset:NONE",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME13OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -1147,17 +1152,17 @@ if (szip_can_encode) { #ifdef H5_HAVE_FILTER_SCALEOFFSET if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("dset_none:SOFF=31,IN",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME13OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -1183,17 +1188,17 @@ if (szip_can_encode) { if (szip_can_encode) { if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("dset_deflate:SZIP=8,NN",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME11OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); } else { @@ -1211,17 +1216,17 @@ if (szip_can_encode) { if (szip_can_encode) { if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME11OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); } else { @@ -1243,17 +1248,17 @@ if (szip_can_encode) { && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE) if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack_addfilter("NONE",&pack_options)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME11OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); #else @@ -1266,15 +1271,15 @@ if (szip_can_encode) { */ TESTING(" big file"); if (h5repack_init (&pack_options, 0)<0) - TEST_ERROR; + GOERROR; if (h5repack(FNAME14,FNAME14OUT,&pack_options) < 0) - TEST_ERROR; - if (h5diff(FNAME14,FNAME14OUT,NULL,NULL,&diff_options) == 1) - TEST_ERROR; + GOERROR; + if (h5diff(FNAME14,FNAME14OUT,NULL,NULL,&diff_options) >0) + GOERROR; if (h5repack_verify(FNAME14OUT,&pack_options)<=0) - TEST_ERROR; + GOERROR; if (h5repack_end (&pack_options)<0) - TEST_ERROR; + GOERROR; PASSED(); |