From de85070e734c3af99c2488509c4c7a80cb2de7fe Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Thu, 11 May 2017 11:17:57 -0700 Subject: [PATCH] tst: winfsp-tests: disable internal tests when running with --external --- tst/winfsp-tests/dirbuf-test.c | 3 +++ tst/winfsp-tests/eventlog-test.c | 3 +++ tst/winfsp-tests/fuse-opt-test.c | 3 +++ tst/winfsp-tests/memfs-test.c | 3 +++ tst/winfsp-tests/mount-test.c | 2 +- tst/winfsp-tests/path-test.c | 3 +++ tst/winfsp-tests/posix-test.c | 3 +++ tst/winfsp-tests/timeout-test.c | 2 +- tst/winfsp-tests/version-test.c | 3 +++ tst/winfsp-tests/winfsp-tests.c | 2 ++ tst/winfsp-tests/winfsp-tests.h | 1 + 11 files changed, 26 insertions(+), 2 deletions(-) diff --git a/tst/winfsp-tests/dirbuf-test.c b/tst/winfsp-tests/dirbuf-test.c index bb60fa84..845e1c73 100644 --- a/tst/winfsp-tests/dirbuf-test.c +++ b/tst/winfsp-tests/dirbuf-test.c @@ -316,6 +316,9 @@ static void dirbuf_fill_test(void) void dirbuf_tests(void) { + if (OptExternal) + return; + TEST(dirbuf_empty_test); TEST(dirbuf_dots_test); TEST(dirbuf_fill_test); diff --git a/tst/winfsp-tests/eventlog-test.c b/tst/winfsp-tests/eventlog-test.c index f4351e96..a85eed62 100644 --- a/tst/winfsp-tests/eventlog-test.c +++ b/tst/winfsp-tests/eventlog-test.c @@ -31,5 +31,8 @@ void eventlog_test(void) void eventlog_tests(void) { + if (OptExternal) + return; + TEST_OPT(eventlog_test); } diff --git a/tst/winfsp-tests/fuse-opt-test.c b/tst/winfsp-tests/fuse-opt-test.c index 5a707ba5..9725c54c 100644 --- a/tst/winfsp-tests/fuse-opt-test.c +++ b/tst/winfsp-tests/fuse-opt-test.c @@ -370,5 +370,8 @@ void fuse_opt_parse_test(void) void fuse_opt_tests(void) { + if (OptExternal) + return; + TEST(fuse_opt_parse_test); } diff --git a/tst/winfsp-tests/memfs-test.c b/tst/winfsp-tests/memfs-test.c index 66d4f4ed..5f6d8834 100644 --- a/tst/winfsp-tests/memfs-test.c +++ b/tst/winfsp-tests/memfs-test.c @@ -102,5 +102,8 @@ void memfs_test(void) void memfs_tests(void) { + if (OptExternal) + return; + TEST(memfs_test); } diff --git a/tst/winfsp-tests/mount-test.c b/tst/winfsp-tests/mount-test.c index 3d42747b..9d8cd4a6 100644 --- a/tst/winfsp-tests/mount-test.c +++ b/tst/winfsp-tests/mount-test.c @@ -336,7 +336,7 @@ void mount_preflight_test(void) void mount_tests(void) { - if (NtfsTests || OptOplock) + if (OptExternal || OptOplock) return; TEST_OPT(mount_invalid_test); diff --git a/tst/winfsp-tests/path-test.c b/tst/winfsp-tests/path-test.c index b33b17c2..95536946 100644 --- a/tst/winfsp-tests/path-test.c +++ b/tst/winfsp-tests/path-test.c @@ -126,6 +126,9 @@ void path_suffix_test(void) void path_tests(void) { + if (OptExternal) + return; + TEST(path_prefix_test); TEST(path_suffix_test); } diff --git a/tst/winfsp-tests/posix-test.c b/tst/winfsp-tests/posix-test.c index 082105f5..e6683efd 100644 --- a/tst/winfsp-tests/posix-test.c +++ b/tst/winfsp-tests/posix-test.c @@ -265,6 +265,9 @@ void posix_map_path_test(void) void posix_tests(void) { + if (OptExternal) + return; + TEST(posix_map_sid_test); TEST(posix_map_sd_test); TEST(posix_map_path_test); diff --git a/tst/winfsp-tests/timeout-test.c b/tst/winfsp-tests/timeout-test.c index 07ce9f18..c8429209 100644 --- a/tst/winfsp-tests/timeout-test.c +++ b/tst/winfsp-tests/timeout-test.c @@ -262,7 +262,7 @@ void timeout_transact_test(void) void timeout_tests(void) { - if (NtfsTests || OptOplock) + if (OptExternal || OptOplock) return; TEST_OPT(timeout_pending_test); diff --git a/tst/winfsp-tests/version-test.c b/tst/winfsp-tests/version-test.c index 3d38b02a..f375b69c 100644 --- a/tst/winfsp-tests/version-test.c +++ b/tst/winfsp-tests/version-test.c @@ -38,5 +38,8 @@ static void version_test(void) void version_tests(void) { + if (OptExternal) + return; + TEST(version_test); } diff --git a/tst/winfsp-tests/winfsp-tests.c b/tst/winfsp-tests/winfsp-tests.c index e82999a0..411e24a4 100644 --- a/tst/winfsp-tests/winfsp-tests.c +++ b/tst/winfsp-tests/winfsp-tests.c @@ -28,6 +28,7 @@ int NtfsTests = 0; int WinFspDiskTests = 1; int WinFspNetTests = 1; +BOOLEAN OptExternal = FALSE; BOOLEAN OptResilient = FALSE; BOOLEAN OptCaseInsensitiveCmp = FALSE; BOOLEAN OptCaseInsensitive = FALSE; @@ -211,6 +212,7 @@ int main(int argc, char *argv[]) { if (0 == strcmp("--ntfs", a) || 0 == strcmp("--external", a)) { + OptExternal = TRUE; NtfsTests = 1; WinFspDiskTests = 0; WinFspNetTests = 0; diff --git a/tst/winfsp-tests/winfsp-tests.h b/tst/winfsp-tests/winfsp-tests.h index 67aa7cdc..36e4c869 100644 --- a/tst/winfsp-tests/winfsp-tests.h +++ b/tst/winfsp-tests/winfsp-tests.h @@ -149,6 +149,7 @@ extern int NtfsTests; extern int WinFspDiskTests; extern int WinFspNetTests; +extern BOOLEAN OptExternal; extern BOOLEAN OptResilient; extern BOOLEAN OptCaseInsensitiveCmp; extern BOOLEAN OptCaseInsensitive;