forked from enlightenment/efl
tests: eina: also handle failure cases when cleaning up created files/folders
Somethign fishy is going on if we can not delete the files and folders we created. CID: 1400986 Reviewed-by: Christopher Michael <devilhorns@comcast.net> Differential Revision: https://phab.enlightenment.org/D11955
This commit is contained in:
parent
2e6323b3d4
commit
68d06ecc1a
|
@ -814,7 +814,7 @@ EFL_START_TEST(eina_test_file_mktemp)
|
|||
|
||||
fd = eina_file_mkstemp(buf, &tmpfile);
|
||||
fail_if((fd < 0) || !tmpfile || errno);
|
||||
close(fd);
|
||||
fail_if(close(fd));
|
||||
|
||||
it = eina_file_direct_ls(tmpdir);
|
||||
fail_if(!it);
|
||||
|
@ -825,8 +825,8 @@ EFL_START_TEST(eina_test_file_mktemp)
|
|||
|
||||
eina_iterator_free(it);
|
||||
|
||||
unlink(tmpfile);
|
||||
remove(tmpdir);
|
||||
fail_if(unlink(tmpfile));
|
||||
fail_if(remove(tmpdir));
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
|
|
Loading…
Reference in New Issue