diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2018-02-26 13:24:52 +1030 |
---|---|---|
committer | Andrew Jeffery <andrew@aj.id.au> | 2018-03-19 10:55:33 +1030 |
commit | c3144042b9f050c3d880f4ae5464a2a21617fe7d (patch) | |
tree | 6567b6c7fee4aaebb5cfc939601daf43477ddad5 /test/tmpf.c | |
parent | baea36d912053f0945ba529e5503a6c5471e802b (diff) | |
download | phosphor-mboxd-c3144042b9f050c3d880f4ae5464a2a21617fe7d.tar.gz phosphor-mboxd-c3144042b9f050c3d880f4ae5464a2a21617fe7d.zip |
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 <andrew@aj.id.au>
Diffstat (limited to 'test/tmpf.c')
-rw-r--r-- | test/tmpf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/tmpf.c b/test/tmpf.c index 285f5d5..e9cc558 100644 --- a/test/tmpf.c +++ b/test/tmpf.c @@ -25,9 +25,12 @@ #include "test/tmpf.h" +static const char *tmpf_dir = "/tmp/"; + int tmpf_init(struct tmpf *tmpf, const char *template) { - strncpy(tmpf->path, template, sizeof(tmpf->path) - 1); + strcpy(tmpf->path, tmpf_dir); + strncat(tmpf->path, template, sizeof(tmpf->path) - sizeof(tmpf_dir)); tmpf->fd = mkstemp(tmpf->path); if (tmpf->fd < 0) { |