summaryrefslogtreecommitdiffstats
path: root/test/ohdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/ohdr.c')
-rw-r--r--test/ohdr.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/ohdr.c b/test/ohdr.c
index 8dbe05e..ad7c746 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -322,7 +322,18 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
hid_t fid_bogus = -1; /* bogus file ID */
hid_t gid_bogus = -1; /* bogus group ID */
hid_t loc_bogus = -1; /* location: bogus file or group ID */
- const char *testfile = H5_get_srcdir_filename(FILE_BOGUS);
+ char testfile[256];
+
+ /* create a different name for a local copy of the data file to be
+ opened with rd/wr file permissions in case build and test are
+ done in the source directory. */
+ HDstrncpy(testfile, FILE_BOGUS, strlen(FILE_BOGUS));
+ testfile[strlen(FILE_BOGUS)]='\0';
+ HDstrncat(testfile, ".copy", 5);
+
+ /* Make a copy of the data file from svn. */
+ if(h5_make_local_copy(FILE_BOGUS, testfile) < 0)
+ FAIL_STACK_ERROR
TESTING("object with unknown header message and no flags set");