Skip to content

Commit

Permalink
t/logger_test.c: put testlog into CWD (/tmp may be unavailable in cer…
Browse files Browse the repository at this point in the history
…tain containers)
  • Loading branch information
Felix Wischke (65278) committed Aug 26, 2022
1 parent 0b5eb37 commit 7dec7f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions t/logger_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@ int main()

// test full file definition
logger = _config_init(&root);
logger_parse("FILE:0644:/tmp/schaufel_logtest",logger);
logger_parse("FILE:0644:./schaufel_logtest",logger);
pretty_assert(logger_validate(logger) == true);
logger = config_lookup(&root,"logger");
logger_init(logger);
logger_log("testmessage file 1");
// We can't actually compare mode because
// umask might influence result
unlink("/tmp/schaufel_logtest");
unlink("./schaufel_logtest");

logger_free();

// test file
logger = _config_init(&root);
logger_parse("/tmp/schaufel_logtest2",logger);
logger_parse("./schaufel_logtest2",logger);
pretty_assert(logger_validate(logger) == true);
logger = config_lookup(&root,"logger");
logger_init(logger);
logger_log("testmessage file 2");
unlink("/tmp/schaufel_logtest2");
unlink("./schaufel_logtest2");
logger_free();

// stderr (not a test)
Expand Down

0 comments on commit 7dec7f3

Please sign in to comment.