From 23457df13df32e1db53b3ce36abd2ef7ad6d0494 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Thu, 31 Oct 2002 08:40:24 -0500 Subject: [svn-r6046] Purpose: Improvement Description: fillval will fail to find the pre-exist data file if it is run in --srcdir mode without setting $srcdir properly. This is setup properly in the Makefile but unsuspecting users trying just ./fillval were puzzled by the failure. Solution: put in a more descriptive error message with a possible remedy. Platforms tested: Modi4 only since this is just adding a printf statment. --- test/fillval.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/fillval.c b/test/fillval.c index 8f8dcaf..587999a 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -1274,7 +1274,11 @@ test_compatible(void) } strcat(testfile, FILE_COMPATIBLE); - if((file=H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT))<0) goto error; + if ((file=H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT))<0) { + printf(" Could not open file %s. Try set $srcdir to point at the " + "source directory of test\n", testfile); + goto error; + } if((dset1=H5Dopen(file, "dset1"))<0) goto error; if ((dcpl1=H5Dget_create_plist(dset1))<0) goto error; -- cgit v0.12