summaryrefslogtreecommitdiffstats
path: root/test/fillval.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-08-27 13:42:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-08-27 13:42:22 (GMT)
commitc2869d6a57b3ba2d3d5bac8fd8f3f638263b122e (patch)
tree33037ccb57b98b0fafdb75b8b22c070eb2baebf7 /test/fillval.c
parent32b58cef083388eec4b81c956eef717f59f24a87 (diff)
downloadhdf5-c2869d6a57b3ba2d3d5bac8fd8f3f638263b122e.zip
hdf5-c2869d6a57b3ba2d3d5bac8fd8f3f638263b122e.tar.gz
hdf5-c2869d6a57b3ba2d3d5bac8fd8f3f638263b122e.tar.bz2
[svn-r5895] Purpose:
Code cleanup/More tests Description: Cleaned up some compiler warnings and wrote additional tests for space allocation and storage size routines. Platforms tested: FreeBSD 4.6 (sleipnir) w/serial & parallel. Will be testing on IRIX64 6.5 (modi4) in serial & parallel shortly.
Diffstat (limited to 'test/fillval.c')
-rw-r--r--test/fillval.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/test/fillval.c b/test/fillval.c
index c9925f9..fd63464 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -436,21 +436,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
/* 4. late space allocation and never write fill value */
if ((dset4=H5Dopen(file, "dset4"))<0) goto error;
if (H5Dget_space_status(dset4, &allocation)<0) goto error;
-#ifndef H5_HAVE_PARALLEL
if (layout == H5D_CONTIGUOUS && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED) {
H5_FAILED();
puts(" Got allocated space instead of unallocated.");
printf(" Got %d\n", allocation);
goto error;
}
-#else
- if (layout == H5D_CONTIGUOUS && allocation == H5D_SPACE_STATUS_NOT_ALLOCATED) {
- H5_FAILED();
- printf(" %d: Got unallocated space instead of allocated.\n",__LINE__);
- printf(" Got %d\n", allocation);
- goto error;
- }
-#endif
if ((dcpl=H5Dget_create_plist(dset4))<0) goto error;
if(H5Pget_space_time(dcpl, &alloc_time)<0) goto error;
if(H5Pget_fill_time(dcpl, &fill_time)<0) goto error;
@@ -604,7 +595,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
hsize_t one[5] = {1, 1, 1, 1, 1};
hsize_t hs_size[5], hs_stride[5];
hssize_t hs_offset[5], nelmts;
- int fillval, val_rd, should_be;
+ int fillval=(-1), val_rd, should_be;
int i, j, *buf=NULL, odd;
comp_datatype rd_c, fill_c, should_be_c;
comp_datatype *buf_c=NULL;
@@ -617,6 +608,9 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
fill_c.x=((comp_datatype*)_fillval)->x;
fill_c.y=((comp_datatype*)_fillval)->y;
fill_c.z=((comp_datatype*)_fillval)->z;
+ } else {
+ puts("Invalid type for test");
+ goto error;
}
/* Create dataset */