diff options
author | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2018-02-07 22:01:06 +0100 |
---|---|---|
committer | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2018-02-07 22:01:06 +0100 |
commit | aa48eccde65fd3b5887a128588a7a706c1532f28 (patch) | |
tree | ed6ab6e55420aac0ccd4a52a4fdf6e0fc970f15d | |
parent | db317d76d5bb6ddc212c1e93b38eeff188c05473 (diff) | |
download | embedlog-aa48eccde65fd3b5887a128588a7a706c1532f28.tar.gz embedlog-aa48eccde65fd3b5887a128588a7a706c1532f28.tar.bz2 embedlog-aa48eccde65fd3b5887a128588a7a706c1532f28.zip |
fix: don't rely on FILENAME_MAX in tests
FILENAME_MAX is unusable on some systems, ie. on HP-UX it is defined as
14, but you clearly can create files with bigger filename.
-rw-r--r-- | tst/test-el-file.c | 4 | ||||
-rw-r--r-- | tst/test-el-print.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tst/test-el-file.c b/tst/test-el-file.c index 70ecdb5..2464de9 100644 --- a/tst/test-el-file.c +++ b/tst/test-el-file.c @@ -237,7 +237,7 @@ static void file_unexpected_third_party_delete(void) static void file_filename_too_long(void) { - char path[FILENAME_MAX + 1 + 1]; + char path[8192]; /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ @@ -1033,7 +1033,7 @@ static void file_rotate_no_access_to_file(void) static void file_rotate_filename_too_long(void) { - char path[FILENAME_MAX + 1 + 1]; + char path[8192]; /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ diff --git a/tst/test-el-print.c b/tst/test-el-print.c index 0a79abb..6094c0f 100644 --- a/tst/test-el-print.c +++ b/tst/test-el-print.c @@ -242,7 +242,7 @@ static int print_check(void) if (g_options.finfo && expected.file != NULL && expected.line != 0) { - char expected_file[FILENAME_MAX + 1]; + char expected_file[8192]; /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |