summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBaljak <baljci@hotmail.com>2022-03-09 14:02:18 (GMT)
committerGitHub <noreply@github.com>2022-03-09 14:02:18 (GMT)
commit3b39164c28bc55391fe8b51b9aa094666637b5db (patch)
tree4d3c5b83b255f623e487ff73aa04b167fb8fce92 /test
parent50291e54d7ff62e6a6679a63234bb2b1203cd0dc (diff)
downloadhdf5-3b39164c28bc55391fe8b51b9aa094666637b5db.zip
hdf5-3b39164c28bc55391fe8b51b9aa094666637b5db.tar.gz
hdf5-3b39164c28bc55391fe8b51b9aa094666637b5db.tar.bz2
Merge Mingw build fixes from develop (#1475)
Diffstat (limited to 'test')
-rw-r--r--test/dt_arith.c2
-rw-r--r--test/swmr.c40
-rw-r--r--test/twriteorder.c6
-rw-r--r--test/use_append_chunk.c6
-rw-r--r--test/use_append_mchunks.c6
5 files changed, 30 insertions, 30 deletions
diff --git a/test/dt_arith.c b/test/dt_arith.c
index 91e31d5..d5653ad 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -81,7 +81,7 @@ typedef enum dtype_t {
* be allowed to continue (cf. Posix signals) so in order to recover from a
* SIGFPE we run tests that might generate one in a child process.
*/
-#ifdef H5_HAVE_UNISTD_H
+#if defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)
#define HANDLE_SIGFPE
#endif
diff --git a/test/swmr.c b/test/swmr.c
index 5227765..eafd424 100644
--- a/test/swmr.c
+++ b/test/swmr.c
@@ -2394,7 +2394,7 @@ error:
* (5) Parent: open a file with write access; enable SWMR writing mode
* Child: concurrent open of the file with write and SWMR write access (fail)
*/
-#ifndef H5_HAVE_UNISTD_H
+#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
static int
test_start_swmr_write_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t new_format)
@@ -2407,11 +2407,11 @@ test_start_swmr_write_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t new_format)
}
SKIPPED();
- HDputs(" Test skipped due to a lack of unistd.h functionality.");
+ HDputs(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* test_start_swmr_write_concur() */
-#else /* H5_HAVE_UNISTD_H */
+#else /* !defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */
static int
test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
@@ -3013,7 +3013,7 @@ error:
return -1;
} /* test_start_swmr_write_concur() */
-#endif /* H5_HAVE_UNISTD_H */
+#endif /* !defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */
/*
* test_start_swmr_write_stress_ohdr():
@@ -4810,7 +4810,7 @@ error:
** This is for concurrent access.
**
*****************************************************************/
-#ifndef H5_HAVE_UNISTD_H
+#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) && defined(H5_HAVE_FLOCK))
static int
test_file_lock_concur(hid_t H5_ATTR_UNUSED in_fapl)
@@ -4818,12 +4818,12 @@ test_file_lock_concur(hid_t H5_ATTR_UNUSED in_fapl)
/* Output message about test being performed */
TESTING("File open with different combinations of flags--concurrent access");
SKIPPED();
- HDputs(" Test skipped due to a lack of unistd.h functionality.");
+ HDputs(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* end test_file_lock_concur() */
-#else /* H5_HAVE_UNISTD_H */
+#else /* !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) && defined(H5_HAVE_FLOCK)) */
static int
test_file_lock_concur(hid_t in_fapl)
@@ -5193,7 +5193,7 @@ error:
} /* end test_file_lock_concur() */
-#endif /* H5_HAVE_UNISTD_H */
+#endif /* #if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) && defined(H5_HAVE_FLOCK)) */
/****************************************************************
**
@@ -5203,7 +5203,7 @@ error:
** This is for concurrent access.
**
*****************************************************************/
-#ifndef H5_HAVE_UNISTD_H
+#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
static int
test_file_lock_swmr_concur(hid_t H5_ATTR_UNUSED in_fapl)
@@ -5211,12 +5211,12 @@ test_file_lock_swmr_concur(hid_t H5_ATTR_UNUSED in_fapl)
/* Output message about test being performed */
TESTING("File open with different combintations of flags + SWMR flags--concurrent access");
SKIPPED();
- HDputs(" Test skipped due to a lack of unistd.h functionality.");
+ HDputs(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* end test_file_lock_swmr_concur() */
-#else /* H5_HAVE_UNISTD_H */
+#else /* !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)) */
static int
test_file_lock_swmr_concur(hid_t in_fapl)
@@ -6216,7 +6216,7 @@ error:
} /* end test_file_lock_swmr_concur() */
-#endif /* H5_HAVE_UNISTD_H */
+#endif /* !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)) */
/****************************************************************
**
@@ -6228,7 +6228,7 @@ error:
static int
test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_override)
{
-#ifndef H5_HAVE_UNISTD_H
+#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
if (turn_locking_on && env_var_override)
TESTING("File locking: ON w/ env var override")
else if (turn_locking_on && !env_var_override)
@@ -6238,9 +6238,9 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
else
TESTING("File locking: OFF")
SKIPPED();
- HDputs(" Test skipped due to a lack of unistd.h functionality.");
+ HDputs(" Test skipped due to fork or waitpid not defined.");
return 0;
-#else /* H5_HAVE_UNISTD_H */
+#else /* !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)) */
hid_t fid = -1; /* File ID */
hid_t fapl = -1; /* File access property list */
char filename[NAME_BUF_SIZE]; /* file name */
@@ -6406,7 +6406,7 @@ error:
return -1;
-#endif /* H5_HAVE_UNISTD_H */
+#endif /* !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)) */
} /* end test_file_locking() */
@@ -6700,7 +6700,7 @@ error:
* (7) Refresh the dataset
* (8) Verify the dataset's dimension and data are correct
*/
-#ifndef H5_HAVE_UNISTD_H
+#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
static int
test_refresh_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t new_format)
@@ -6713,11 +6713,11 @@ test_refresh_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t new_format)
}
SKIPPED();
- HDputs(" Test skipped due to a lack of unistd.h functionality.");
+ HDputs(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* test_refresh_concur() */
-#else /* H5_HAVE_UNISTD_H */
+#else /* !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)) */
static int
test_refresh_concur(hid_t in_fapl, hbool_t new_format)
@@ -7017,7 +7017,7 @@ error:
return -1;
} /* test_refresh_concur() */
-#endif /* H5_HAVE_UNISTD_H */
+#endif /* !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)) */
/*
* test_multiple_same():
diff --git a/test/twriteorder.c b/test/twriteorder.c
index e792487..9cff00a 100644
--- a/test/twriteorder.c
+++ b/test/twriteorder.c
@@ -63,7 +63,7 @@
/* This test uses many POSIX things that are not available on
* Windows.
*/
-#ifdef H5_HAVE_UNISTD_H
+#if defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)
#define DATAFILE "twriteorder.dat"
/* #define READERS_MAX 10 */ /* max number of readers */
@@ -466,7 +466,7 @@ done:
return ret_value;
}
-#else /* H5_HAVE_UNISTD_H */
+#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */
int
main(void)
@@ -475,4 +475,4 @@ main(void)
return EXIT_SUCCESS;
} /* end main() */
-#endif /* H5_HAVE_UNISTD_H */
+#endif /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */
diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c
index 107615a..185cb26 100644
--- a/test/use_append_chunk.c
+++ b/test/use_append_chunk.c
@@ -63,7 +63,7 @@
/* This test uses many POSIX things that are not available on
* Windows.
*/
-#ifdef H5_HAVE_UNISTD_H
+#if defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)
#include "use.h"
@@ -270,7 +270,7 @@ done:
return (ret_value);
}
-#else /* H5_HAVE_UNISTD_H */
+#else /* defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) */
int
main(void)
@@ -279,4 +279,4 @@ main(void)
return EXIT_SUCCESS;
} /* end main() */
-#endif /* H5_HAVE_UNISTD_H */
+#endif /* defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) */
diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c
index 47c9f92..60f63c0 100644
--- a/test/use_append_mchunks.c
+++ b/test/use_append_mchunks.c
@@ -55,7 +55,7 @@
/* This test uses many POSIX things that are not available on
* Windows.
*/
-#ifdef H5_HAVE_UNISTD_H
+#if defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)
#include "use.h"
@@ -265,7 +265,7 @@ done:
return (ret_value);
} /* end main() */
-#else /* H5_HAVE_UNISTD_H */
+#else /* defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) */
int
main(void)
@@ -274,4 +274,4 @@ main(void)
return EXIT_SUCCESS;
} /* end main() */
-#endif /* H5_HAVE_UNISTD_H */
+#endif /* defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) */