summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorAdrian McCarthy <amccarth@google.com>2019-11-07 10:50:33 -0800
committerAdrian McCarthy <amccarth@google.com>2019-11-14 08:48:47 -0800
commit1275ab1620b665eb06231ce3c4e5068c97d9b618 (patch)
tree64bca2aef09e015a26b9dbbb58046982b415b721 /clang/test
parentbbcbb10e2d0848b611c51b1ff56c758645c55f3b (diff)
downloadbcm5719-llvm-1275ab1620b665eb06231ce3c4e5068c97d9b618.tar.gz
bcm5719-llvm-1275ab1620b665eb06231ce3c4e5068c97d9b618.zip
Improve VFS compatibility on Windows
Keys in a virtual file system can be in Posix or Windows form or even a combination of the two. Many VFS tests (and a few Clang tests) were XFAILed on Windows because of false negatives when comparing paths. First, we default CaseSenstive to false on Windows. This allows drive letters like "D:" to match "d:". Windows filesystems are, by default, case insensitive, so this makes sense even beyond the drive letter. Second, we allow slashes to match backslashes when they're used as the root component of a path. Both of these changes are limited to RedirectingFileSystems, so there's little chance of affecting other path handling. These changes allow eleven of the VFS tests to pass on Windows as well as three other Clang tests, so they have re-enabled. This solves the majority of PR43272. Additional VFS test failures will be fixed in separate patches. Differential Revision: https://reviews.llvm.org/D69958
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Index/index-module-with-vfs.m5
-rw-r--r--clang/test/Modules/double-quotes.m3
-rw-r--r--clang/test/Modules/framework-public-includes-private.m3
-rw-r--r--clang/test/VFS/external-names.c3
-rw-r--r--clang/test/VFS/framework-import.m3
-rw-r--r--clang/test/VFS/implicit-include.c3
-rw-r--r--clang/test/VFS/include-mixed-real-and-virtual.c3
-rw-r--r--clang/test/VFS/include-real-from-virtual.c3
-rw-r--r--clang/test/VFS/include-virtual-from-real.c3
-rw-r--r--clang/test/VFS/include.c3
-rw-r--r--clang/test/VFS/incomplete-umbrella.m3
-rw-r--r--clang/test/VFS/module-import.m3
-rw-r--r--clang/test/VFS/real-path-found-first.m3
-rw-r--r--clang/test/VFS/relative-path.c3
-rw-r--r--clang/test/VFS/umbrella-framework-import-skipnonexist.m3
15 files changed, 1 insertions, 46 deletions
diff --git a/clang/test/Index/index-module-with-vfs.m b/clang/test/Index/index-module-with-vfs.m
index a1c74cfd8de..46fa68dfa13 100644
--- a/clang/test/Index/index-module-with-vfs.m
+++ b/clang/test/Index/index-module-with-vfs.m
@@ -1,6 +1,3 @@
-// FIXME: PR43272
-// XFAIL: system-windows
-
@import ModuleNeedsVFS;
void foo() {
@@ -13,7 +10,7 @@ void foo() {
// RUN: c-index-test -index-file %s -fmodules-cache-path=%t.cache -fmodules -F %t -I %t \
// RUN: -ivfsoverlay %t.yaml -Xclang -fdisable-module-hash | FileCheck %s
-// CHECK: [importedASTFile]: {{.*}}ModuleNeedsVFS.pcm | loc: 4:1 | name: "ModuleNeedsVFS" | isImplicit: 0
+// CHECK: [importedASTFile]: {{.*}}ModuleNeedsVFS.pcm | loc: 1:1 | name: "ModuleNeedsVFS" | isImplicit: 0
// CHECK: [indexEntityReference]: kind: function | name: module_needs_vfs
// CHECK: [indexEntityReference]: kind: function | name: base_module_needs_vfs
diff --git a/clang/test/Modules/double-quotes.m b/clang/test/Modules/double-quotes.m
index bed6a48726b..4ce712ccc6c 100644
--- a/clang/test/Modules/double-quotes.m
+++ b/clang/test/Modules/double-quotes.m
@@ -1,6 +1,3 @@
-// FIXME: PR43272
-// XFAIL: system-windows
-
// RUN: rm -rf %t
// RUN: mkdir %t
diff --git a/clang/test/Modules/framework-public-includes-private.m b/clang/test/Modules/framework-public-includes-private.m
index be9223016ba..0f1e3a242a1 100644
--- a/clang/test/Modules/framework-public-includes-private.m
+++ b/clang/test/Modules/framework-public-includes-private.m
@@ -1,6 +1,3 @@
-// FIXME: PR43272
-// XFAIL: system-windows
-
// RUN: rm -rf %t
// RUN: mkdir %t
diff --git a/clang/test/VFS/external-names.c b/clang/test/VFS/external-names.c
index 569c226c868..1e12c930c35 100644
--- a/clang/test/VFS/external-names.c
+++ b/clang/test/VFS/external-names.c
@@ -1,9 +1,6 @@
// RUN: sed -e "s@INPUT_DIR@%/S/Inputs@g" -e "s@OUT_DIR@%/t@g" -e "s@EXTERNAL_NAMES@true@" %S/Inputs/use-external-names.yaml > %t.external.yaml
// RUN: sed -e "s@INPUT_DIR@%/S/Inputs@g" -e "s@OUT_DIR@%/t@g" -e "s@EXTERNAL_NAMES@false@" %S/Inputs/use-external-names.yaml > %t.yaml
-// FIXME: PR43272
-// XFAIL: system-windows
-
#include "external-names.h"
#ifdef REINCLUDE
#include "external-names.h"
diff --git a/clang/test/VFS/framework-import.m b/clang/test/VFS/framework-import.m
index 231a3884bb9..858f1f57fbd 100644
--- a/clang/test/VFS/framework-import.m
+++ b/clang/test/VFS/framework-import.m
@@ -1,9 +1,6 @@
// RUN: sed -e "s@INPUT_DIR@%/S/Inputs@g" -e "s@OUT_DIR@%/t@g" %S/Inputs/vfsoverlay.yaml > %t.yaml
// RUN: %clang_cc1 -Werror -F %t -ivfsoverlay %t.yaml -fsyntax-only %s
-// FIXME: PR43272
-// XFAIL: system-windows
-
#import <SomeFramework/public_header.h>
void foo() {
diff --git a/clang/test/VFS/implicit-include.c b/clang/test/VFS/implicit-include.c
index 39187417925..654e0a87de0 100644
--- a/clang/test/VFS/implicit-include.c
+++ b/clang/test/VFS/implicit-include.c
@@ -1,9 +1,6 @@
// RUN: sed -e "s@INPUT_DIR@%/S/Inputs@g" -e "s@OUT_DIR@%/t@g" %S/Inputs/vfsoverlay.yaml > %t.yaml
// RUN: %clang_cc1 -Werror -ivfsoverlay %t.yaml -I %t -include "not_real.h" -fsyntax-only %s
-// FIXME: PR43272
-// XFAIL: system-windows
-
void foo() {
bar();
}
diff --git a/clang/test/VFS/include-mixed-real-and-virtual.c b/clang/test/VFS/include-mixed-real-and-virtual.c
index 90b29640c68..e4297c5737d 100644
--- a/clang/test/VFS/include-mixed-real-and-virtual.c
+++ b/clang/test/VFS/include-mixed-real-and-virtual.c
@@ -4,9 +4,6 @@
// RUN: sed -e "s@INPUT_DIR@%/S/Inputs@g" -e "s@OUT_DIR@%/t@g" %S/Inputs/vfsoverlay.yaml > %t.yaml
// RUN: %clang_cc1 -Werror -ivfsoverlay %t.yaml -I %t -fsyntax-only %s
-// FIXME: PR43272
-// XFAIL: system-windows
-
#include "not_real.h"
#include "real.h"
diff --git a/clang/test/VFS/include-real-from-virtual.c b/clang/test/VFS/include-real-from-virtual.c
index dad71602ee0..3a41c4ea2c7 100644
--- a/clang/test/VFS/include-real-from-virtual.c
+++ b/clang/test/VFS/include-real-from-virtual.c
@@ -4,9 +4,6 @@
// RUN: sed -e "s@INPUT_DIR@%/S/Inputs@g" -e "s@OUT_DIR@%/t@g" %S/Inputs/vfsoverlay.yaml > %t.yaml
// RUN: %clang_cc1 -Werror -ivfsoverlay %t.yaml -I %t -fsyntax-only %s
-// FIXME: PR43272
-// XFAIL: system-windows
-
#include "include_real.h"
void foo() {
diff --git a/clang/test/VFS/include-virtual-from-real.c b/clang/test/VFS/include-virtual-from-real.c
index 60142a52f9a..0b0d4cd0025 100644
--- a/clang/test/VFS/include-virtual-from-real.c
+++ b/clang/test/VFS/include-virtual-from-real.c
@@ -4,9 +4,6 @@
// RUN: sed -e "s@INPUT_DIR@%/S/Inputs@g" -e "s@OUT_DIR@%/t@g" %S/Inputs/vfsoverlay.yaml > %t.yaml
// RUN: %clang_cc1 -Werror -ivfsoverlay %t.yaml -I %t -fsyntax-only %s
-// FIXME: PR43272
-// XFAIL: system-windows
-
#include "include_not_real.h"
void foo() {
diff --git a/clang/test/VFS/include.c b/clang/test/VFS/include.c
index 5ece6cc9634..16a1bca71a7 100644
--- a/clang/test/VFS/include.c
+++ b/clang/test/VFS/include.c
@@ -1,9 +1,6 @@
// RUN: sed -e "s@INPUT_DIR@%/S/Inputs@g" -e "s@OUT_DIR@%/t@g" %S/Inputs/vfsoverlay.yaml > %t.yaml
// RUN: %clang_cc1 -Werror -I %t -ivfsoverlay %t.yaml -fsyntax-only %s
-// FIXME: PR43272
-// XFAIL: system-windows
-
#include "not_real.h"
void foo() {
diff --git a/clang/test/VFS/incomplete-umbrella.m b/clang/test/VFS/incomplete-umbrella.m
index b8c22bda784..5b2a1e0b4e1 100644
--- a/clang/test/VFS/incomplete-umbrella.m
+++ b/clang/test/VFS/incomplete-umbrella.m
@@ -5,9 +5,6 @@
// RUN: not %clang_cc1 -Werror -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \
// RUN: -ivfsoverlay %t.yaml -F %t -fsyntax-only %s 2>&1 | FileCheck %s
-// FIXME: PR43272
-// XFAIL: system-windows
-
@import Incomplete;
// CHECK: umbrella header for module 'Incomplete' {{.*}}IncompleteVFS.h
// CHECK: umbrella header for module 'Incomplete' {{.*}}IncompleteReal.h
diff --git a/clang/test/VFS/module-import.m b/clang/test/VFS/module-import.m
index 7557cb9555f..336a72d31cf 100644
--- a/clang/test/VFS/module-import.m
+++ b/clang/test/VFS/module-import.m
@@ -2,9 +2,6 @@
// RUN: sed -e "s@INPUT_DIR@%/S/Inputs@g" -e "s@OUT_DIR@%/t@g" %S/Inputs/vfsoverlay.yaml > %t.yaml
// RUN: %clang_cc1 -Werror -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -ivfsoverlay %t.yaml -I %t -fsyntax-only %s
-// FIXME: PR43272
-// XFAIL: system-windows
-
@import not_real;
void foo() {
diff --git a/clang/test/VFS/real-path-found-first.m b/clang/test/VFS/real-path-found-first.m
index 493222a76a3..8d7d21bf783 100644
--- a/clang/test/VFS/real-path-found-first.m
+++ b/clang/test/VFS/real-path-found-first.m
@@ -4,9 +4,6 @@
// intentionally rebuild modules, since the precompiled module file refers to
// the dependency files by real path.
-// FIXME: PR43272
-// XFAIL: system-windows
-
// RUN: rm -rf %t %t-cache %t.pch
// RUN: mkdir -p %t/SomeFramework.framework/Modules
// RUN: cat %S/Inputs/some_frame_module.map > %t/SomeFramework.framework/Modules/module.modulemap
diff --git a/clang/test/VFS/relative-path.c b/clang/test/VFS/relative-path.c
index 39360d5f781..fc4ae151d87 100644
--- a/clang/test/VFS/relative-path.c
+++ b/clang/test/VFS/relative-path.c
@@ -3,9 +3,6 @@
// RUN: sed -e "s@INPUT_DIR@%/S/Inputs@g" -e "s@OUT_DIR@%/t@g" %S/Inputs/vfsoverlay.yaml > %t.yaml
// RUN: %clang_cc1 -Werror -I . -ivfsoverlay %t.yaml -fsyntax-only %s
-// FIXME: PR43272
-// XFAIL: system-windows
-
#include "not_real.h"
void foo() {
diff --git a/clang/test/VFS/umbrella-framework-import-skipnonexist.m b/clang/test/VFS/umbrella-framework-import-skipnonexist.m
index 5ef48ed44a0..6f536b40a91 100644
--- a/clang/test/VFS/umbrella-framework-import-skipnonexist.m
+++ b/clang/test/VFS/umbrella-framework-import-skipnonexist.m
@@ -1,8 +1,5 @@
// REQUIRES: crash-recovery
-// FIXME: PR43272
-// XFAIL: system-windows
-
// RUN: rm -rf %t
// RUN: mkdir -p %t/vdir %t/outdir %t/cache
// RUN: cp -R %S/Inputs/Bar.framework %t/outdir/
OpenPOWER on IntegriCloud