From c3144042b9f050c3d880f4ae5464a2a21617fe7d Mon Sep 17 00:00:00 2001 From: Andrew Jeffery Date: Mon, 26 Feb 2018 13:24:52 +1030 Subject: test: Update tmpf to store data in /tmp, reformat names Cleans up residuals from failed tests in the source tree by moving them to /tmp. Some were annoying to remove with prefixes like 'mbox', so change the pattern as well to include '-store'. Change-Id: I674664a372e7e15ec4c3cd93d33318c4135f33ba Signed-off-by: Andrew Jeffery --- test/tmpf.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/tmpf.h') diff --git a/test/tmpf.h b/test/tmpf.h index ce47191..cb1bda4 100644 --- a/test/tmpf.h +++ b/test/tmpf.h @@ -27,8 +27,20 @@ struct tmpf { char path[PATH_MAX]; }; +/** + * Initialise a tmpf instance for use, creating a temporary file. + * + * @tmpf: A context to initialise with the provided template + * @template_str: A file basename in mkstemp(3) template form + * + * Returns 0 on success, or -1 on error with errno set appropriately + */ int tmpf_init(struct tmpf *tmpf, const char *template_str); +/** + * Destroy a tmpf instance, closing the file descriptor and removing the + * temporary file. + */ void tmpf_destroy(struct tmpf *tmpf); #endif /* MBOX_TEST_UTILS_H */ -- cgit v1.2.1