summaryrefslogtreecommitdiffstats
path: root/test/swmr_remove_writer.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-12-09 16:30:58 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-12-09 16:30:58 (GMT)
commitc8f533cfc33ac743227cbed8eba361c715a2976f (patch)
treebcae5320f80bac774647cacbbd8493604f9384d2 /test/swmr_remove_writer.c
parentadcf8a315e82c0848d126e7e46b662930c081896 (diff)
downloadhdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.zip
hdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.tar.gz
hdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.tar.bz2
Merge all of my changes from merge-back-to-feature-vfd_swmr-attempt-1,
including the merge of `hdffv/hdf5/develop`, back to the branch that Vailin and I share. Now I need to put this branch on a fork with a less confusing name than vchoi_fork!
Diffstat (limited to 'test/swmr_remove_writer.c')
-rw-r--r--test/swmr_remove_writer.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/test/swmr_remove_writer.c b/test/swmr_remove_writer.c
index 43743d9..218c507 100644
--- a/test/swmr_remove_writer.c
+++ b/test/swmr_remove_writer.c
@@ -179,7 +179,7 @@ remove_records(hid_t fid, unsigned verbose, unsigned long nshrinks, unsigned lon
hsize_t remove_size; /* Size to reduce dataset dimension by */
/* Get a random dataset, according to the symbol distribution */
- symbol = choose_dataset();
+ symbol = choose_dataset(NULL, NULL);
/* Shrink the dataset's dataspace */
remove_size = (hsize_t)HDrandom() % MAX_REMOVE_SIZE + 1;
@@ -224,19 +224,19 @@ remove_records(hid_t fid, unsigned verbose, unsigned long nshrinks, unsigned lon
static void
usage(void)
{
- printf("\n");
- printf("Usage error!\n");
- printf("\n");
- printf("Usage: swmr_remove_writer [-q] [-o] [-f <# of shrinks between flushing\n");
- printf(" file contents>] [-r <random seed>] <# of shrinks>\n");
- printf("\n");
- printf("<# of shrinks between flushing file contents> should be 0 (for no\n");
- printf("flushing) or between 1 and (<# of shrinks> - 1)\n");
- printf("\n");
- printf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n");
- printf("flushing every 1000 shrinks ('-f 1000'), and will generate a random seed (no -r given).\n");
- printf("\n");
- HDexit(1);
+ HDprintf("\n");
+ HDprintf("Usage error!\n");
+ HDprintf("\n");
+ HDprintf("Usage: swmr_remove_writer [-q] [-o] [-f <# of shrinks between flushing\n");
+ HDprintf(" file contents>] [-r <random seed>] <# of shrinks>\n");
+ HDprintf("\n");
+ HDprintf("<# of shrinks between flushing file contents> should be 0 (for no\n");
+ HDprintf("flushing) or between 1 and (<# of shrinks> - 1)\n");
+ HDprintf("\n");
+ HDprintf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n");
+ HDprintf("flushing every 1000 shrinks ('-f 1000'), and will generate a random seed (no -r given).\n");
+ HDprintf("\n");
+ HDexit(EXIT_FAILURE);
}
int main(int argc, const char *argv[])
@@ -339,7 +339,7 @@ int main(int argc, const char *argv[])
/* Open file skeleton */
if((fid = open_skeleton(FILENAME, verbose, old)) < 0) {
HDfprintf(stderr, "Error opening skeleton file!\n");
- HDexit(1);
+ HDexit(EXIT_FAILURE);
} /* end if */
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@@ -352,7 +352,7 @@ int main(int argc, const char *argv[])
/* Remove records from datasets */
if(remove_records(fid, verbose, (unsigned long)nshrinks, (unsigned long)flush_count) < 0) {
HDfprintf(stderr, "Error removing records from datasets!\n");
- HDexit(1);
+ HDexit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@@ -362,7 +362,7 @@ int main(int argc, const char *argv[])
/* Clean up the symbols */
if(shutdown_symbols() < 0) {
HDfprintf(stderr, "Error releasing symbols!\n");
- HDexit(1);
+ HDexit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@@ -372,7 +372,7 @@ int main(int argc, const char *argv[])
/* Close objects opened */
if(H5Fclose(fid) < 0) {
HDfprintf(stderr, "Error closing file!\n");
- HDexit(1);
+ HDexit(EXIT_FAILURE);
} /* end if */
return 0;