From 37247875fead9d7ca5c42cc8d00e279cbbd1e586 Mon Sep 17 00:00:00 2001 From: Robb Matzke Date: Thu, 3 Sep 1998 09:59:51 -0500 Subject: [svn-r660] Fixed timeout problems on slow machines --- test/ragged.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/test/ragged.c b/test/ragged.c index 1e2d6ea..c23cafe 100644 --- a/test/ragged.c +++ b/test/ragged.c @@ -207,7 +207,7 @@ ragged_write_all(hid_t ra, hsize_t rows_at_once) (unsigned long)rows_at_once); printf("%s...\n", testname); fflush(stdout); - timeout_g = 60; + timeout_g = TIME_LIMIT; /* Create the ragged array row in memory */ if (NULL==(dd = malloc(max_width*sizeof(C_MTYPE))) || @@ -236,7 +236,7 @@ ragged_write_all(hid_t ra, hsize_t rows_at_once) interval_nelmts += size[i]; } if (H5Rwrite(ra, row, i, H_MTYPE, size, buf)<0) goto error; - if (0==row || alarm_g) { + if (0==row || alarm_g || 0==timeout_g) { alarm_g = 0; H5_timer_end(&timer_total, &timer); H5_bandwidth(s, (double)interval_nelmts*sizeof(C_MTYPE), @@ -309,7 +309,7 @@ ragged_read_all(hid_t ra, hsize_t rows_at_once) (unsigned long)rows_at_once); printf("%s...\n", testname); fflush(stdout); - timeout_g = 60; + timeout_g = TIME_LIMIT; /* Create the ragged array row in memory */ if (NULL==(size = malloc(rows_at_once*sizeof(*size))) || @@ -358,7 +358,7 @@ ragged_read_all(hid_t ra, hsize_t rows_at_once) } /* Print statistics? */ - if (0==row || alarm_g) { + if (0==row || alarm_g || 0==timeout_g) { alarm_g = 0; H5_timer_end(&timer_total, &timer); H5_bandwidth(s, (double)interval_nelmts*sizeof(C_MTYPE), @@ -372,7 +372,9 @@ ragged_read_all(hid_t ra, hsize_t rows_at_once) } if (0==size[rows_at_once-1]) { /* Reached the end of the array */ - assert(total_nelmts>=MAX_NELMTS); + if (total_nelmts=MAX_NELMTS); + if (total_nelmts