tests: Introduce functions to change directories

This introduces torture_get_current_working_dir() and
torture_change_dir() to allow changing directories in tests.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Anderson Toshiyuki Sasaki
2018-11-20 14:01:57 +01:00
committed by Andreas Schneider
parent 77be4ce905
commit 0dd2b375c7
4 changed files with 142 additions and 0 deletions

View File

@@ -128,4 +128,7 @@ int torture_run_tests(void);
char *torture_make_temp_dir(const char *template);
char *torture_create_temp_file(const char *template);
char *torture_get_current_working_dir(void);
int torture_change_dir(char *path);
#endif /* _TORTURE_H */