summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2012-05-30 21:44:06 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2012-05-30 21:44:06 (GMT)
commit1f6cb6f84a0fdeec79938624ef874d4147d52d87 (patch)
treec261f3f4c5925730b59b98604ceaa6549b52b62c /test
parentedebad0e78f322580c17647e57f6e74a1d0f5dcf (diff)
downloadhdf5-1f6cb6f84a0fdeec79938624ef874d4147d52d87.zip
hdf5-1f6cb6f84a0fdeec79938624ef874d4147d52d87.tar.gz
hdf5-1f6cb6f84a0fdeec79938624ef874d4147d52d87.tar.bz2
[svn-r22421] Misc enhancements for revise_chunks branch noticed while working on v2 b-trees,
but not related to v2 b-trees. Tested: durandal
Diffstat (limited to 'test')
-rw-r--r--test/swmr_sparse_reader.c2
-rw-r--r--test/swmr_sparse_writer.c7
2 files changed, 1 insertions, 8 deletions
diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c
index 53bd877..dfed4dc 100644
--- a/test/swmr_sparse_reader.c
+++ b/test/swmr_sparse_reader.c
@@ -117,7 +117,6 @@ H5Pset_fclose_degree(fapl, H5F_CLOSE_SEMI);
/* Read records */
for(u = 0; u < nrecords; u++) {
symbol_info_t *symbol = NULL; /* Symbol (dataset) */
- int can_read; /* Boolean: whether we can read the dataset */
htri_t attr_exists; /* Whether the sequence number attribute exists */
unsigned long file_u; /* Attribute sequence number (writer's "u") */
@@ -129,7 +128,6 @@ H5Pset_fclose_degree(fapl, H5F_CLOSE_SEMI);
symbol->nrecords = nrecords / 5;
/* Wait until we can read the dataset */
- can_read = 0;
do {
/* Check if sequence attribute exists */
if((attr_exists = H5Aexists_by_name(fid, symbol->name, "seq", H5P_DEFAULT)) < 0)
diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c
index 7af71ba..211bec9 100644
--- a/test/swmr_sparse_writer.c
+++ b/test/swmr_sparse_writer.c
@@ -142,16 +142,11 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
/* Set the record's ID (equal to its position) */
record.rec_id = start;
- /* Extend the dataset's dataspace to hold the new record */
- symbol->nrecords++;
- if(H5Dset_extent(symbol->dsid, &symbol->nrecords) < 0)
- return(-1);
-
/* Get the dataset's dataspace */
if((file_sid = H5Dget_space(symbol->dsid)) < 0)
return(-1);
- /* Choose the last record in the dataset */
+ /* Choose a random record in the dataset */
if(H5Sselect_hyperslab(file_sid, H5S_SELECT_SET, &start, NULL, &count, NULL) < 0)
return(-1);