-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: output unambiguous message #42
Conversation
@@ -152,7 +152,7 @@ test_open_file(void) | |||
} | |||
END_MULTIPART; | |||
|
|||
TESTING_2("test cleanup") | |||
TESTING_2("test H5Pclose") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't testing H5Pclose in particular. These messages refer to testing that resources can be cleaned up after a multi-part test so that the user knows whether testing failed during the test, or during cleanup of resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's your definition of cleanup? Who wrote this code?
/*
* Cleanup temporary test files
*/
static void
cleanup_files(void)
{
hid_t fapl_id = H5I_INVALID_HID;
if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) {
if (MAINPROCESS)
HDprintf(" failed to create FAPL for deleting test files\n");
return;
}
H5Fdelete(FILE_CREATE_TEST_FILENAME, fapl_id);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote that code and it's specifically for cleaning up files generated in the parallel file tests, which are separate from the vol_test_parallel.h5
file that contains all the other tests like the dataset ones. Cleanup of resources is cleanup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think the meaning of "cleanup" here from 1998?
/*-------------------------------------------------------------------------
* Function: h5_cleanup
*
* Purpose: Cleanup temporary test files.
* base_name contains the list of test file names.
* The file access property list is also closed.
*
* Return: Non-zero if cleanup actions were performed; zero otherwise.
*
* Programmer: Albert Cheng
* May 28, 1998
*
*-------------------------------------------------------------------------
*/
int
h5_cleanup(const char *base_name[], hid_t fapl)
{
int retval = 0;
if (GetTestCleanup()) {
/* Clean up files in base_name, and the FAPL */
h5_clean_files(base_name, fapl);
retval = 1;
} /* end if */
/* Restore the original error reporting routine */
h5_restore_err();
return retval;
} /* end h5_cleanup() */
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing in "cleanup" refers specifically to files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, why do you say clean up
here?
On the other hand, the parallel test does seem to be missing a call to H5Fdelete to clean up after itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because in that particular instance I was referring specifically files.
See also HDFGroup/vol-daos#59