X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=test%2Fcommandline.test;h=4bd91f45aac6a4599dfa58a5ed586dda6b9a609b;hp=241cb25f172c2351b41ef0338019c5a29a263bdf;hb=7e09765003114ba37fed2851d9126924d0f813f1;hpb=d72a450975bed625e058eb857410f0d78caee2d1 diff --git a/test/commandline.test b/test/commandline.test index 241cb25f..4bd91f45 100755 --- a/test/commandline.test +++ b/test/commandline.test @@ -46,3 +46,19 @@ must_fail tinc foo -n foo get somethingreallyunknown must_fail tinc foo --net must_fail tinc foo --net get name must_fail tinc foo foo + +# Most of these should fail with ASAN. Some leaks are only detected by Valgrind. +echo [STEP] Trigger previously known memory leaks + +tincd foo -c . -c . --help +tincd foo -n net -n net --help +tincd foo -n net -o FakeOpt=42 --help +tincd foo --logfile=one --logfile=two --help +tincd foo --pidfile=one --pidfile=two --help +expect_code "$EXIT_FAILURE" tincd foo -n net -o Compression= --help +expect_code "$EXIT_FAILURE" tincd foo -c fakedir -n 'n/e\t' + +tinc foo -c conf -c conf --help +tinc foo -n net -n net --help +tinc foo --pidfile=pid --pidfile=pid --help +expect_code "$EXIT_FAILURE" tinc foo -c conf -n 'n/e\t'