summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2006-10-12 03:55:06 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2006-10-12 03:55:06 (GMT)
commite065eee4a8932e6c09557bc539d6674138e9d7fe (patch)
tree794fd744c2d3b5efbc7523005c20ee9461f1cdff
parent9b24333b1944e5b5c37aeff0b94fabfbacb15b20 (diff)
downloadhdf5-e065eee4a8932e6c09557bc539d6674138e9d7fe.zip
hdf5-e065eee4a8932e6c09557bc539d6674138e9d7fe.tar.gz
hdf5-e065eee4a8932e6c09557bc539d6674138e9d7fe.tar.bz2
[svn-r12751] Purpose:
Bug fix (related to 544) Description: h5_get_file_size() was coded to return 0 if failed but file size can be 0. Changed the failure return value to -1 which is allowed by the returned type of off_t which is a signed type. Also changed the checking code of the stat call to just == 0 since that is how it is defined. Test: Could test it in heping only. Both Sol and Copper failed to compiled due to error in the Direct IO VFD code.
-rw-r--r--c++/test/tattr.cpp2
-rw-r--r--test/btree2.c10
-rw-r--r--test/dangle.c10
-rw-r--r--test/fheap.c50
-rw-r--r--test/h5test.c10
-rw-r--r--test/links.c4
-rw-r--r--test/stab.c12
-rw-r--r--test/tattr.c2
-rw-r--r--test/unlink.c44
9 files changed, 73 insertions, 71 deletions
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index 7402e30..68aa90c 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -1037,7 +1037,7 @@ test_attr_dtype_shared(void)
// Get size of file
h5_stat_size_t empty_filesize; // Size of empty file
empty_filesize = h5_get_file_size(FILENAME.c_str());
- if (empty_filesize == 0)
+ if (empty_filesize < 0)
TestErrPrintf("Line %d: file size wrong!\n",__LINE__);
// Open the file again
diff --git a/test/btree2.c b/test/btree2.c
index 10b46b3..70f389d 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -6734,7 +6734,7 @@ test_delete(hid_t fapl)
STACK_ERROR
/* Get the size of an empty file */
- if((empty_size = h5_get_file_size(filename)) == 0)
+ if((empty_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Create the file to work on */
@@ -6762,7 +6762,7 @@ test_delete(hid_t fapl)
STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Verify the file is correct size */
@@ -6812,7 +6812,7 @@ test_delete(hid_t fapl)
STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Verify the file is correct size */
@@ -6862,7 +6862,7 @@ test_delete(hid_t fapl)
STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Verify the file is correct size */
@@ -6912,7 +6912,7 @@ test_delete(hid_t fapl)
STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Verify the file is correct size */
diff --git a/test/dangle.c b/test/dangle.c
index 5086937..a751414 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -117,7 +117,7 @@ test_dangle_dataset(H5F_close_degree_t degree)
if(H5close()<0)
TEST_ERROR;
- if(h5_get_file_size(filename)==0)
+ if(h5_get_file_size(filename)<0)
TEST_ERROR;
/* Clean up temporary file */
@@ -210,7 +210,7 @@ test_dangle_group(H5F_close_degree_t degree)
if(H5close()<0)
TEST_ERROR;
- if(h5_get_file_size(filename)==0)
+ if(h5_get_file_size(filename)<0)
TEST_ERROR;
/* Clean up temporary file */
@@ -307,7 +307,7 @@ test_dangle_datatype1(H5F_close_degree_t degree)
if(H5close()<0)
TEST_ERROR;
- if(h5_get_file_size(filename)==0)
+ if(h5_get_file_size(filename)<0)
TEST_ERROR;
/* Clean up temporary file */
@@ -394,7 +394,7 @@ test_dangle_datatype2(H5F_close_degree_t degree)
if(H5close()<0)
TEST_ERROR;
- if(h5_get_file_size(filename)==0)
+ if(h5_get_file_size(filename)<0)
TEST_ERROR;
/* Clean up temporary file */
@@ -502,7 +502,7 @@ test_dangle_attribute(H5F_close_degree_t degree)
if(H5close()<0)
TEST_ERROR;
- if(h5_get_file_size(filename)==0)
+ if(h5_get_file_size(filename)<0)
TEST_ERROR;
/* Clean up temporary file */
diff --git a/test/fheap.c b/test/fheap.c
index 79e806c..1b701fd 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -654,7 +654,7 @@ open_heap(char *filename, hid_t fapl, hid_t dxpl, const H5HF_create_t *cparam,
FAIL_STACK_ERROR
/* Get the size of a file w/empty heap*/
- if((*empty_size = h5_get_file_size(filename)) == 0)
+ if((*empty_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Re-open the file */
@@ -787,7 +787,7 @@ close_heap(char *filename, hid_t dxpl, fheap_test_param_t *tparam,
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Verify the file is correct size */
@@ -1822,7 +1822,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t UNUSED *tparam
FAIL_STACK_ERROR
/* Get the size of a file w/empty heap*/
- if((empty_size = h5_get_file_size(filename)) == 0)
+ if((empty_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Re-open the file */
@@ -1874,7 +1874,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t UNUSED *tparam
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Verify the file is correct size */
@@ -5896,7 +5896,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
FAIL_STACK_ERROR
/* Get the size of a file w/empty heap*/
- if((empty_size = h5_get_file_size(filename)) == 0)
+ if((empty_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Re-open the file */
@@ -5961,7 +5961,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
TEST_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Verify the file is correct size */
@@ -6052,7 +6052,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
FAIL_STACK_ERROR
/* Get the size of a file w/empty heap*/
- if((empty_size = h5_get_file_size(filename)) == 0)
+ if((empty_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Re-open the file */
@@ -6145,7 +6145,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
TEST_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Verify the file is correct size */
@@ -6237,7 +6237,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
FAIL_STACK_ERROR
/* Get the size of a file w/empty heap*/
- if((empty_size = h5_get_file_size(filename)) == 0)
+ if((empty_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Re-open the file */
@@ -6305,7 +6305,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Verify the file is correct size */
@@ -6398,7 +6398,7 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
FAIL_STACK_ERROR
/* Get the size of a file w/empty heap*/
- if((empty_size = h5_get_file_size(filename)) == 0)
+ if((empty_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Re-open the file */
@@ -6536,7 +6536,7 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
TEST_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Verify the file is correct size */
@@ -6634,7 +6634,7 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
FAIL_STACK_ERROR
/* Get the size of a file w/empty heap*/
- if((empty_size = h5_get_file_size(filename)) == 0)
+ if((empty_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Re-open the file */
@@ -6831,7 +6831,7 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
TEST_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
/* Verify the file is correct size */
@@ -11870,7 +11870,7 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
#ifdef QAK
HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
@@ -12101,7 +12101,7 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
#ifdef QAK
HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
@@ -12407,7 +12407,7 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
#ifdef QAK
HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
@@ -12831,7 +12831,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
#ifdef QAK
HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
@@ -13048,7 +13048,7 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
#ifdef QAK
HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_size, (unsigned long)file_size);
@@ -13202,7 +13202,7 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
#ifdef QAK
HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
@@ -13433,7 +13433,7 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
#ifdef QAK
HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
@@ -14034,7 +14034,7 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
#ifdef QAK
HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
@@ -14232,7 +14232,7 @@ test_filtered_man_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
#ifdef QAK
HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_size, (unsigned long)file_size);
@@ -14405,7 +14405,7 @@ HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
#ifdef QAK
HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
@@ -14595,7 +14595,7 @@ HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %
FAIL_STACK_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0)
+ if((file_size = h5_get_file_size(filename)) < 0)
TEST_ERROR
#ifdef QAK
HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
diff --git a/test/h5test.c b/test/h5test.c
index 5ca5d13..ad85a8f 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -827,13 +827,15 @@ h5_dump_info_object(MPI_Info info)
*
* Purpose: Get the current size of a file (in bytes)
*
- * Return: Success: Size of file in bytes (could be 0)
- * Failure: 0
+ * Return: Success: Size of file in bytes
+ * Failure: -1
*
* Programmer: Quincey Koziol
* Saturday, March 22, 2003
*
* Modifications:
+ * Albert Cheng, Oct 11, 2006
+ * Changed Failure return value to -1.
*
*-------------------------------------------------------------------------
*/
@@ -843,10 +845,10 @@ h5_get_file_size(const char *filename)
h5_stat_t sb;
/* Get the file's statistics */
- if (HDstat(filename, &sb)>=0)
+ if (HDstat(filename, &sb)==0)
return((h5_stat_size_t)sb.st_size);
- return(0);
+ return(-1);
} /* end get_file_size() */
/*
diff --git a/test/links.c b/test/links.c
index 1a5f898..b1da4af 100644
--- a/test/links.c
+++ b/test/links.c
@@ -3767,7 +3767,7 @@ ud_hard_links(hid_t fapl)
/* Get the size of the empty file for reference */
if(H5Fclose(fid) < 0) TEST_ERROR
- if((empty_size = h5_get_file_size(filename))==0) TEST_ERROR
+ if((empty_size = h5_get_file_size(filename))<0) TEST_ERROR
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
@@ -3933,7 +3933,7 @@ ud_link_reregister(hid_t fapl)
/* Get the size of the empty file for reference */
if(H5Fclose(fid) < 0) TEST_ERROR
- if((empty_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((empty_size=h5_get_file_size(filename))<0) TEST_ERROR
if((fid=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
diff --git a/test/stab.c b/test/stab.c
index f776b8c..74f3366 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -349,7 +349,7 @@ lifecycle(hid_t fapl)
if(H5Fclose(fid) < 0) TEST_ERROR
/* Get size of file as empty */
- if((empty_size = h5_get_file_size(filename)) == 0) TEST_ERROR
+ if((empty_size = h5_get_file_size(filename)) < 0) TEST_ERROR
/* Re-open file */
if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl2)) < 0) TEST_ERROR
@@ -510,7 +510,7 @@ lifecycle(hid_t fapl)
if(H5Fclose(fid) < 0) TEST_ERROR
/* Get size of file as empty */
- if((file_size = h5_get_file_size(filename)) == 0) TEST_ERROR
+ if((file_size = h5_get_file_size(filename)) < 0) TEST_ERROR
/* Verify that file is correct size */
if(file_size != empty_size) TEST_ERROR
@@ -574,7 +574,7 @@ long_compact(hid_t fapl)
if(H5Fclose(fid) < 0) TEST_ERROR
/* Get size of file as empty */
- if((empty_size = h5_get_file_size(filename)) == 0) TEST_ERROR
+ if((empty_size = h5_get_file_size(filename)) < 0) TEST_ERROR
/* Construct very long object name template */
if((objname = HDmalloc((size_t)(LONG_COMPACT_LENGTH + 1))) == NULL) TEST_ERROR
@@ -654,7 +654,7 @@ long_compact(hid_t fapl)
if(H5Fclose(fid) < 0) TEST_ERROR
/* Get size of file as empty */
- if((file_size = h5_get_file_size(filename)) == 0) TEST_ERROR
+ if((file_size = h5_get_file_size(filename)) < 0) TEST_ERROR
/* Verify that file is correct size */
if(file_size != empty_size) TEST_ERROR
@@ -832,7 +832,7 @@ no_compact(hid_t fapl)
if(H5Fclose(fid) < 0) TEST_ERROR
/* Get size of file as empty */
- if((empty_size = h5_get_file_size(filename)) == 0) TEST_ERROR
+ if((empty_size = h5_get_file_size(filename)) < 0) TEST_ERROR
/* Re-open file */
if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl2)) < 0) TEST_ERROR
@@ -893,7 +893,7 @@ no_compact(hid_t fapl)
if(H5Fclose(fid) < 0) TEST_ERROR
/* Get size of file as empty */
- if((file_size = h5_get_file_size(filename)) == 0) TEST_ERROR
+ if((file_size = h5_get_file_size(filename)) < 0) TEST_ERROR
/* Verify that file is correct size */
if(file_size != empty_size) TEST_ERROR
diff --git a/test/tattr.c b/test/tattr.c
index 86843d1..a6e56a9 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -1527,7 +1527,7 @@ test_attr_dtype_shared(hid_t fapl)
/* Get size of file */
empty_filesize=h5_get_file_size(FILENAME);
- if(empty_filesize==0)
+ if(empty_filesize<0)
TestErrPrintf("Line %d: file size wrong!\n",__LINE__);
/* Re-open file */
diff --git a/test/unlink.c b/test/unlink.c
index cb66177..edb6b6c 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -549,7 +549,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of an empty file */
- if((empty_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((empty_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Create common objects for datasets */
@@ -606,7 +606,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -630,7 +630,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -654,7 +654,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -678,7 +678,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -702,7 +702,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -748,7 +748,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -772,7 +772,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -835,7 +835,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size = h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -862,7 +862,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -886,7 +886,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -917,7 +917,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0) TEST_ERROR
+ if((file_size = h5_get_file_size(filename)) < 0) TEST_ERROR
/* Verify the file is correct size */
if(file_size != empty_size) TEST_ERROR
@@ -946,7 +946,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -1027,7 +1027,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -1060,7 +1060,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -1093,7 +1093,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -1130,7 +1130,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -1179,7 +1179,7 @@ test_filespace(hid_t fapl)
if(H5Fclose(file) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size=h5_get_file_size(filename))==0) TEST_ERROR
+ if((file_size=h5_get_file_size(filename))<0) TEST_ERROR
/* Verify the file is correct size */
if(file_size!=empty_size) TEST_ERROR
@@ -2124,7 +2124,7 @@ test_full_group_compact(hid_t fapl)
if(H5Fclose(file_id) < 0) TEST_ERROR
/* Get the size of the file with only the objects to keep */
- if((keep_size = h5_get_file_size(filename)) == 0) TEST_ERROR
+ if((keep_size = h5_get_file_size(filename)) < 0) TEST_ERROR
/* Re-open the file */
if((file_id = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR
@@ -2188,7 +2188,7 @@ test_full_group_compact(hid_t fapl)
if(H5Fclose(file_id) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0) TEST_ERROR
+ if((file_size = h5_get_file_size(filename)) < 0) TEST_ERROR
/* Verify the file is correct size */
if(file_size != keep_size) TEST_ERROR
@@ -2258,7 +2258,7 @@ test_full_group_dense(hid_t fapl)
if(H5Fclose(file_id) < 0) TEST_ERROR
/* Get the size of the file with only the objects to keep */
- if((keep_size = h5_get_file_size(filename)) == 0) TEST_ERROR
+ if((keep_size = h5_get_file_size(filename)) < 0) TEST_ERROR
/* Re-open the file */
if((file_id = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR
@@ -2335,7 +2335,7 @@ test_full_group_dense(hid_t fapl)
if(H5Fclose(file_id) < 0) TEST_ERROR
/* Get the size of the file */
- if((file_size = h5_get_file_size(filename)) == 0) TEST_ERROR
+ if((file_size = h5_get_file_size(filename)) < 0) TEST_ERROR
/* Verify the file is correct size */
if(file_size != keep_size) TEST_ERROR