summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-01-03 02:46:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-01-03 02:46:22 (GMT)
commitbcf2d652764ee7748e161867fd85c98fe0c7805a (patch)
treeefc82526e7c220b8cc68923544c1ccdcffea2cd7 /test
parentb2a3ed027aaa6734438c92d12fe4af523bc5173c (diff)
downloadhdf5-bcf2d652764ee7748e161867fd85c98fe0c7805a.zip
hdf5-bcf2d652764ee7748e161867fd85c98fe0c7805a.tar.gz
hdf5-bcf2d652764ee7748e161867fd85c98fe0c7805a.tar.bz2
[svn-r13099] Description:
Bug fix for possible file corruption when attribute is renamed with a longer name. Tested on: FreeBSD/32 6.1 (duty)
Diffstat (limited to 'test')
-rw-r--r--test/tattr.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/test/tattr.c b/test/tattr.c
index 10192d6..5628e8d 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -181,9 +181,7 @@ test_attr_basic_write(void)
CHECK(ret, FAIL, "H5Aclose");
/* change attribute name */
-HDfprintf(stderr, "Before renaming attribute\n");
ret=H5Arename(dataset, ATTR1_NAME, ATTR_TMP_NAME);
-HDfprintf(stderr, "After renaming attribute\n");
CHECK(ret, FAIL, "H5Arename");
/* Open attribute again */
@@ -251,12 +249,6 @@ HDfprintf(stderr, "After renaming attribute\n");
ret=H5Aclose(attr2);
CHECK(ret, FAIL, "H5Aclose");
-#ifndef OLD_WAY
- /* change first attribute back to the original name */
- ret=H5Arename(dataset, ATTR_TMP_NAME, ATTR1_NAME);
- CHECK(ret, FAIL, "H5Arename");
-#endif /* OLD_WAY */
-
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
ret = H5Sclose(sid2);
@@ -344,11 +336,7 @@ test_attr_basic_read(void)
VERIFY(ret, 2, "H5Aget_num_attrs");
/* Open an attribute for the dataset */
-#ifndef OLD_WAY
- attr=H5Aopen_name(dataset,ATTR1_NAME);
-#else /* OLD_WAY */
- attr=H5Aopen_name(dataset,ATTR_TMP_NAME);
-#endif /* OLD_WAY */
+ attr = H5Aopen_name(dataset, ATTR_TMP_NAME);
CHECK(attr, FAIL, "H5Aopen_name");
/* Read attribute information */