aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/VirtualFileSystemTest.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-08-01[LLVM][Support] Fix tests on Cygwin (#151417)jeremyd20191-0/+4
Cygwin returns -1 for `getconf(_SC_ARG_MAX)`, which makes `llvm::sys::commandLineFitsWithinSystemLimits` always return true, so skip the `ArgumentLimit` test in that case. Skip the `ArgumentLimitWindows` and `ResponseFileWindows` tests on Cygwin also as it doesn't suffer from the Windows limits either. Cygwin requires the same `dllexport` annotation as Win32 in the `DynamicLibrary` test, so add its preprocessor check to PipSqueak.h. Cygwin's `getcwd` function does not fail with `ENOENT` if the current working directory is unlinked. According to POSIX issue 8, this is not required. Skip the `PhysicalFileSystemWorkingDirFailure` test on Cygwin as it relies on this behavior.
2025-07-31NFC: Clean up construction of IntrusiveRefCntPtr from raw pointers for ↵James Y Knight1-123/+97
llvm::vfs::FileSystem. (#151407) This switches to `makeIntrusiveRefCnt<FileSystem>` where creating a new object, and to passing/returning by `IntrusiveRefCntPtr<FileSystem>` instead of `FileSystem*` or `FileSystem&`, when dealing with existing objects. Part of cleanup #151026.
2024-09-20Revert "[SystemZ][z/OS] Propagate IsText parameter to open text files as ↵Abhina Sreeskantharajan1-3/+3
text (#107906)" This reverts commit edf3b277a5f2ebe144827ed47463c22743cac5f9.
2024-09-19[SystemZ][z/OS] Propagate IsText parameter to open text files as text (#107906)Abhina Sree1-3/+3
This patch adds an IsText parameter to the following functions openFileForRead, getBufferForFile, getBufferForFileImpl and determines whether a file is text by querying the file tag on z/OS. The default is set to OF_Text instead of OF_None, this change in value does not affect any other platforms other than z/OS.
2024-09-13[llvm][unittests] Don't call raw_string_ostream::flush() (NFC)JOE19941-4/+0
raw_string_ostream::flush() is essentially a no-op (also specified in docs). Don't call it in tests that aren't meant to test 'raw_string_ostream' itself. p.s. remove a few redundant calls to raw_string_ostream::str()
2024-09-06[llvm][support] Implement tracing virtual file system (#88326)Jan Svoboda1-0/+114
LLVM-based tools often use the `llvm::vfs::FileSystem` instrastructure to access the file system. This patch adds new kind of a VFS that performs lightweight tracing of file system operations on an underlying VFS. This is supposed to aid in investigating file system traffic without resorting to instrumentation on the operating system level. There will be follow-up patches that integrate this into Clang and its dependency scanner.
2024-08-28[llvm] Prefer StringRef::substr to StringRef::slice (NFC) (#106330)Kazu Hirata1-1/+1
S.substr(N) is simpler than S.slice(N, StringRef::npos). Also, substr is probably better recognizable than slice thanks to std::string_view::substr.
2024-08-04[llvm] Construct SmallVector with ArrayRef (NFC) (#101872)Kazu Hirata1-1/+1
2024-06-06[clang] Fix handling of adding a file with the same name as an existing dir ↵jensmassberg1-0/+5
to VFS (#94461) When trying to add a file to clang's VFS via `addFile` and a directory of the same name already exists, we run into a [out-of-bound access](https://github.com/llvm/llvm-project/blob/145815c180fc82c5a55bf568d01d98d250490a55/llvm/lib/Support/Path.cpp#L244). The problem is that the file name is [recognised as existing path]( https://github.com/llvm/llvm-project/blob/145815c180fc82c5a55bf568d01d98d250490a55/llvm/lib/Support/VirtualFileSystem.cpp#L896) and thus continues to process the next part of the path which doesn't exist. This patch adds a check if we have reached the last part of the filename and return false in that case. This we reject to add a file if a directory of the same name already exists. This is in sync with [this check](https://github.com/llvm/llvm-project/blob/145815c180fc82c5a55bf568d01d98d250490a55/llvm/lib/Support/VirtualFileSystem.cpp#L903) that rejects adding a path if a file of the same name already exists.
2024-04-19Apply modernize-use-starts-ends-with on llvm-project (#89140)Nicolas van Kempen1-1/+1
Run `modernize-use-starts-ends-with` on llvm-project. Two instances are flagged, minor readability improvements, extremely minor performance improvements. ``` python3 clang-tools-extra/clang-tidy/tool/run-clang-tidy.py \ -clang-tidy-binary="build/bin/clang-tidy" \ -clang-apply-replacements-binary="build/bin/clang-apply-replacements" \ -checks="-*,modernize-use-starts-ends-with" \ -header-filter=".*" \ -fix -format ``` I am working on some additions to this check, but they don't seem to flag any additional cases anyway.
2024-04-12[llvm][vfs] Make vfs::FileSystem::exists() virtual NFC (#88575)Artem Chikin1-0/+165
Allow a `vfs::FileSystem` to provide a more efficient implementation of `exists()` if they are able to. The existing `FileSystem` implementations continue to default to using `status()` except that overlay, proxy, and redirecting filesystems are taught to forward calls to `exists()` correctly to their wrapped/external filesystem. Co-authored-by: Ben Langmuir <blangmuir@apple.com>
2024-04-12[llvm][vfs] NFCI: Remove `const` from `VFS::getRealPath()`Jan Svoboda1-1/+1
This is an NFC change split from https://github.com/llvm/llvm-project/pull/68645.
2024-03-15[llvm][vfs] Preserve paths for fallback/fallthrough in RedirectingFileSystem ↵Ben Langmuir1-0/+65
(#85307) When we lookup in the external filesystem, do not remove . and .. components from the original path. For .. this is a correctness issue in the presence of symlinks, while for . it is simply better practice to preserve the original path to better match the behaviour of other filesystems. The only modification we need is to apply the working directory, since it could differ from the external filesystem. rdar://123655660
2024-01-30[clang][DependencyScanner] Remove unused -ivfsoverlay files (#73734)Michael Spencer1-0/+86
`-ivfsoverlay` files are unused when building most modules. Enable removing them by, * adding a way to visit the filesystem tree with extensible RTTI to access each `RedirectingFileSystem`. * Adding tracking to `RedirectingFileSystem` to record when it actually redirects a file access. * Storing this information in each PCM. Usage tracking is only enabled when iterating over the source manager and affecting modulemaps. Here each path is stated to cause an access. During scanning these stats all hit the cache.
2024-01-24[clang] NFC: Remove `{File,Directory}Entry::getName()` (#74910)Jan Svoboda1-18/+0
The files and directories that Clang accesses are uniqued by their inode. For each inode `FileManager` will create exactly one `FileEntry` or `DirectoryEntry` object, which makes answering the question _"Are these two files/directories the same?"_ a simple pointer equality check. However, since the same inode can be accessed through multiple different paths, asking the `FileEntry` or `DirectoryEntry` object _"What is your name?"_ doesn't have clear semantics. In c0ff9908 we started reporting the most recent name used to access the entry, which turned out to be necessary for Clang modules. However, the long-term solution has always been to explicitly track the as-requested name. This has been implemented in 4dc5573a as `FileEntryRef` and `DirectoryEntryRef`. The `DirectoryEntry::getName()` interface has been deprecated since the Clang 17 release and `FileEntry::getName()` since Clang 18. We have replaced uses of these deprecated APIs in `main` with `DirectoryEntryRef::getName()` and `FileEntryRef::getName()` respectively. This makes it possible to remove `{File,Directory}Entry::getName()` for good along with the `FileManager` code that implements them.
2023-12-13[llvm] Use StringRef::{starts,ends}_with (NFC)Kazu Hirata1-2/+2
This patch replaces uses of StringRef::{starts,ends}with with StringRef::{starts,ends}_with for consistency with std::{string,string_view}::{starts,ends}_with in C++20. I'm planning to deprecate and eventually remove StringRef::{starts,ends}with.
2023-07-10[llvm][vfs] For virtual directories, use the virtual path as the real pathJan Svoboda1-3/+9
A follow-up to D135841. This patch returns the virtual path for directories from `RedirectingFileSystem`. This ensures the contents of `Path` are the same as the contents of `FS->getRealPath(Path)`. This also means we can drop the workaround in Clang's module map canonicalization, where we couldn't use the real path for a directory if it resolved to a different `DirectoryEntry`. In addition to that, we can also avoid introducing new workaround for a bug triggered by the newly introduced test case. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D135849
2023-05-03[llvm][test] Skip physical filesystem test if unsupportedBen Langmuir1-1/+3
We are relying on deleting the working directory to trigger a later error in getcwd, but some platforms (e.g. Solaris) disallow deleting the working directory of the process. Skip the test in that case. Differential Revision: https://reviews.llvm.org/D149760
2023-05-02[llvm][vfs] Avoid silent fallback to process-wide working directoryBen Langmuir1-0/+26
In createPhysicalFileSystem, preserve the per-instance working directory, even after the first call to getcwd fails. rdar://108213753 Differential Revision: https://reviews.llvm.org/D149173
2023-02-10[NFC][TargetParser] Replace uses of llvm/Support/Host.hArchibald Elliott1-1/+1
The forwarding header is left in place because of its use in `polly/lib/External/isl/interface/extract_interface.cc`, but I have added a GCC warning about the fact it is deprecated, because it is used in `isl` from where it is included by Polly.
2023-02-07[NFC][TargetParser] Remove llvm/ADT/Triple.hArchibald Elliott1-1/+1
I also ran `git clang-format` to get the headers in the right order for the new location, which has changed the order of other headers in two files.
2023-01-19Revert "[Clang] Give Clang the ability to use a shared stat cache"Fred Riss1-305/+0
This reverts commit c5abe893120b115907376359a5809229a9f9608a. This reverts commit a033dbbe5c43247b60869b008e67ed86ed230eaa. This broke the build with -DLLVM_LINK_LLVM_DYLIB=ON. Reverting while I investigate.
2023-01-18[Clang] Give Clang the ability to use a shared stat cacheFred Riss1-0/+305
Every Clang instance uses an internal FileSystemStatCache to avoid stating the same content multiple times. However, different instances of Clang will contend for filesystem access for their initial stats during HeaderSearch or module validation. On some workloads, the time spent in the kernel in these concurrent stat calls has been measured to be over 20% of the overall compilation time. This is extremly wassteful when most of the stat calls target mostly immutable content like a SDK. This commit introduces a new tool `clang-stat-cache` able to generate an OnDiskHashmap containing the stat data for a given filesystem hierarchy. The driver part of this has been modeled after -ivfsoverlay given the similarities with what it influences. It introduces a new -ivfsstatcache driver option to instruct Clang to use a stat cache generated by `clang-stat-cache`. These stat caches are inserted at the bottom of the VFS stack (right above the real filesystem). Differential Revision: https://reviews.llvm.org/D136651
2022-12-16[vfs] Allow root paths relative to the vfsoverlay YAML fileHaowei Wu1-5/+70
This change adds 'root-relative' option in vfsoverlay YAML file format so the root patchs can be relative to the YAML file directory instead of the current working directory. Differential Revision: https://reviews.llvm.org/D137473
2022-12-02[llvm/unittests] Use std::nullopt instead of None (NFC)Kazu Hirata1-10/+14
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-06-21[llvm][vfs] Implement in-memory symlinksJan Svoboda1-0/+86
This patch implements symlinks for the in-memory VFS. Original author: @erik.pilkington. Depends on D117648 & D117649. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D117650
2022-06-02Fix a buglet in remove_dots().Paul Pluzhnikov1-4/+5
The function promises to canonicalize the path, but neglected to do so for the root component. For example, calling remove_dots("/tmp/foo.c", Style::windows_backslash) resulted in "/tmp\foo.c". Now it produces "\tmp\foo.c". Also fix FIXME in the corresponding test. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D126412
2022-04-11[VFS] RedirectingFileSystem only replace path if not already mappedBen Barham1-6/+24
If the `ExternalFS` has already remapped to an external path then `RedirectingFileSystem` should not change it to the originally provided path. This fixes the original path always being used if multiple VFS overlays were provided and the path wasn't found in the highest (ie. first in the chain). For now this is accomplished through the use of a new `ExposesExternalVFSPath` field on `vfs::Status`. This flag is true when the `Status` has an external path that's different from its virtual path, ie. the contained path is the external path. See the plan in `FileManager::getFileRef` for where this is going - eventually we won't need `IsVFSMapped` any more and all returned paths should be virtual. Resolves rdar://90578880 and llvm-project#53306. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D123398
2022-04-08[RGT] Use GTEST_SKIP() in more places where we skip a testPaul Robinson1-1/+1
Simply returning will report the test as PASSED when it didn't really do anything. SKIPPED is the correct result for these. Found by the Rotten Green Tests project.
2022-04-05Revert "[VFS] RedirectingFileSystem only replace path if not already mapped"Ben Barham1-22/+22
This reverts commit 3fda0edc51fd68192a30e302d45db081bb02d7f9, which breaks crash reproducers in very specific circumstances. Specifically, since crash reproducers have `UseExternalNames` set to false, the `File->getFileEntry().getDir()->getName()` call in `DoFrameworkLookup` would use the *cached* directory name instead of the directory of the looked-up file. The plan is to re-commit this patch but to *add* `ExposesExternalVFSPath` rather than replace `IsVFSMapped`. Differential Revision: https://reviews.llvm.org/D123103
2022-03-30[VFS] RedirectingFileSystem only replace path if not already mappedBen Barham1-22/+22
If the `ExternalFS` has already remapped a path then the `RedirectingFileSystem` should not change it to the originally provided path. This fixes the original path always being used if multiple VFS overlays were provided and the path wasn't found in the highest (ie. first in the chain). This also renames `IsVFSMapped` to `ExposesExternalVFSPath` and only sets it if `UseExternalName` is true. This flag then represents that the `Status` has an external path that's different from its virtual path. Right now the contained path is still the external path, but further PRs will change this to *always* be the virtual path. Clients that need the external can then request it specifically. Note that even though `ExposesExternalVFSPath` isn't set for all VFS-mapped paths, `IsVFSMapped` was only being used by a hack in `FileManager` that was specific to module searching. In that case `UseExternalNames` is always `true` and so that hack still applies. Resolves rdar://90578880 and llvm-project#53306. Differential Revision: https://reviews.llvm.org/D122549
2022-03-17[VFS] Add print/dump to the whole FileSystem hierarchyBen Barham1-0/+126
For now most are implemented by printing out the name of the filesystem, but this can be expanded in the future. Only `OverlayFileSystem` and `RedirectingFileSystem` are properly implemented in this patch. - `OverlayFileSystem`: Prints each filesystem in the order that any operations are actually run on them. Optionally prints recursively. - `RedirectingFileSystem`: Prints out all mappings, as well as the `ExternalFS`. Most of this was already implemented other than the handling for the `DirectoryRemap` case and to actually print out the mapping. Each FS should implement `printImpl` rather than `print`, where the latter just fowards to the former. This is to avoid spreading the default arguments through to the subclasses (where we may miss updating in the future). Differential Revision: https://reviews.llvm.org/D121421
2022-02-03[VFS] Add a "redirecting-with" field to overlaysBen Barham1-1/+134
Extend "fallthrough" to allow a third option: "fallback". Fallthrough allows the original path to used if the redirected (or mapped) path fails. Fallback is the reverse of this, ie. use the original path and fallback to the mapped path otherwise. While this result *can* be achieved today using multiple overlays, this adds a much more intuitive option. As an example, take two directories "A" and "B". We would like files from "A" to be used, unless they don't exist, in which case the VFS should fallback to those in "B". With the current fallthrough option this is possible by adding two overlays: one mapping from A -> B and another mapping from B -> A. Since the frontend *nests* the two RedirectingFileSystems, the result will be that "A" is mapped to "B" and back to "A", unless it isn't in "A" in which case it fallsthrough to "B" (or fails if it exists in neither). Using "fallback" semantics allows a single overlay instead: one mapping from "A" to "B" but only using that mapping if the operation in "A" fails first. "redirect-only" is used to represent the current "fallthrough: false" case. Differential Revision: https://reviews.llvm.org/D117937
2022-01-21[NFCI][Support] Avoid ASSERT_/EXPECT_TRUE(A <op> B)Archibald Elliott1-37/+39
The error messages in tests are far better when a test fails if the test is written using ASSERT_/EXPECT_<operator>(A, B) rather than ASSERT_/EXPECT_TRUE(A <operator> B). This commit updates all of llvm/unittests/Support to use these macros where possible. This change has not been possible in: - llvm/unittests/Support/FSUniqueIDTest.cpp - due to not overloading operators beyond ==, != and <. - llvm/unittests/Support/BranchProbabilityTest.cpp - where the unchanged tests are of the operator overloads themselves. There are other possibilities of this conversion not being valid, which have not applied in these tests, as they do not use NULL (they use nullptr), and they do not use const char* (they use std::string or StringRef). Reviewed By: mubashar_ Differential Revision: https://reviews.llvm.org/D117319
2022-01-19[clang] support relative roots to vfs overlaysRichard Howell1-5/+25
This diff adds support for relative roots to VFS overlays. The directory root will be made absolute from the current working directory and will be used to determine the path style to use. This supports the use of VFS overlays with remote build systems that might use a different working directory for each compilation. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D116174
2021-11-13reland: [VFS] Use original path when falling back to external FSKeith Smiley1-0/+108
This reverts commit f0cf544d6f6fe6cbca4c07772998272d6bb433d8. Just a small change to fix: ``` /home/buildbot/as-builder-4/llvm-clang-x86_64-expensive-checks-ubuntu/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp: In static member function ‘static llvm::ErrorOr<std::unique_ptr<llvm::vfs::File> > llvm::vfs::File::getWithPath(llvm::ErrorOr<std::unique_ptr<llvm::vfs::File> >, const llvm::Twine&)’: /home/buildbot/as-builder-4/llvm-clang-x86_64-expensive-checks-ubuntu/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp:2084:10: error: could not convert ‘F’ from ‘std::unique_ptr<llvm::vfs::File>’ to ‘llvm::ErrorOr<std::unique_ptr<llvm::vfs::File> >’ return F; ^ ``` Differential Revision: https://reviews.llvm.org/D113832
2021-11-13Revert "[VFS] Use original path when falling back to external FS"Keith Smiley1-108/+0
``` /work/omp-vega20-0/openmp-offload-amdgpu-runtime/llvm.src/llvm/lib/Support/VirtualFileSystem.cpp: In static member function 'static llvm::ErrorOr<std::unique_ptr<llvm::vfs::File> > llvm::vfs::File::getWithPath(llvm::ErrorOr<std::unique_ptr<llvm::vfs::File> >, const llvm::Twine&)': /work/omp-vega20-0/openmp-offload-amdgpu-runtime/llvm.src/llvm/lib/Support/VirtualFileSystem.cpp:2084:10: error: could not convert 'F' from 'std::unique_ptr<llvm::vfs::File>' to 'llvm::ErrorOr<std::unique_ptr<llvm::vfs::File> >' return F; ^ ``` This reverts commit c972175649f4bb50d40d911659a04d5620ce6fe0.
2021-11-13[VFS] Use original path when falling back to external FSKeith Smiley1-0/+108
This is a follow up to 0be9ca7c0f9a733f846bb6bc4e8e36d46b518162 to make paths in the case of falling back to the external file system use the original format, preserving relative paths, and allow the external filesystem to canonicalize them if needed. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D109128
2021-09-29[VFS] InMemoryFilesystem's UniqueIDs are a function of path and content.Sam McCall1-0/+20
This ensures that re-creating "the same" FS results in the same UIDs for files. In turn, this means that creating a clang module (preamble) using one in-memory filesystem and consuming it using another doesn't create duplicate FileEntrys for files that are the same in both FSes. It's tempting to give the creator control over the UIDs instead. However that requires fiddly API changes, e.g. what should the UIDs of intermediate directories be? This change is more "magic" but seems safe given: - InMemoryFilesystem is used in testing more than production - comparing UIDs across filesystems is unusual - files with the same path and content are usually logically equivalent (The usual reason for re-creating virtual filesystems rather than reusing them is that typical use involves mutating their CWD and so is not threadsafe). Differential Revision: https://reviews.llvm.org/D110711
2021-02-02[VFS] Add support to RedirectingFileSystem for mapping a virtual directory ↵Nathan Hawes1-1/+239
to one in the external FS. Previously file entries in the -ivfsoverlay yaml could map to a file in the external file system, but directories had to list their contents in the form of other file entries or directories. Allowing directory entries to map to a directory in the external file system makes it possible to present an external directory's contents in a different location and (in combination with the 'fallthrough' option) overlay one directory's contents on top of another. rdar://problem/72485443 Differential Revision: https://reviews.llvm.org/D94844
2021-01-22[VFS] Fix inconsistencies between relative paths and fallthrough.Jonas Devlieghere1-1/+35
This patch addresses inconsistencies in the way fallthrough is handled in the RedirectingFileSystem. Rather than trying to change the working directory of the external filesystem, the RedirectingFileSystem will canonicalize every path before handing it down. This guarantees that relative paths are resolved relative to the RedirectingFileSystem's working directory. This allows us to have a strictly virtual working directory, and still fallthrough for absolute paths, but not for relative paths that would get resolved incorrectly at the lower layer (for example, in case of the RealFileSystem, because the strictly virtual path does not exist). Differential revision: https://reviews.llvm.org/D95188
2020-12-08Support: Add RedirectingFileSystem::create from simple list of redirectionsDuncan P. N. Exon Smith1-0/+86
Add an overload of `RedirectingFileSystem::create` that builds a redirecting filesystem off of a simple vector of string pairs. This is intended to be used to support `clang::arcmt::FileRemapper` and `clang::PreprocessorOptions::RemappedFiles`. Differential Revision: https://reviews.llvm.org/D91317
2020-12-08VFS: Return new file systems as uniquely owned when possible, almost NFCDuncan P. N. Exon Smith1-2/+2
Uniformly return uniquely-owned filesystems from VFS creation APIs. The one exception is `getRealFileSystem`, which has a single instance and needs to be shared. This is almost NFC, except that it fixes a memory leak in `vfs::collectVFSFromYAML()`. Depends on https://reviews.llvm.org/D92888 Differential Revision: https://reviews.llvm.org/D92890
2020-12-03Support: Change InMemoryFileSystem::addFileNoOwn to take a MemoryBufferRef, NFCDuncan P. N. Exon Smith1-1/+1
Found this by chance when looking at the InMemoryFileSystem API, seems like an easy cleanup. Differential Revision: https://reviews.llvm.org/D90893
2020-09-02[llvm] [unittests] Remove temporary files after they're not neededSergej Jaskiewicz1-194/+143
Some LLVM unit tests forget to clean up temporary files and directories. Introduce RAII classes for cleaning them up. Refactor the tests to use those classes. Differential Revision: https://reviews.llvm.org/D83228
2020-06-04Revert "Relands "[YAMLVFSWriter][Test][NFC] Add couple tests" vol. 2"Russell Gallop1-57/+0
This reverts commit 30949926f98576fbff8d5ad0390be5124ffacd7e. This was failing on bot here: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/32749
2020-06-04Relands "[YAMLVFSWriter][Test][NFC] Add couple tests" vol. 2Jan Korous1-0/+57
This reverts commit e4e3e41905d182c0f3d5b0b9406e3cbf2aabb30f. Fixed dangling StringRef in test.
2020-05-12[YAMLVFSWriter] Fix for delimitersJan Korous1-4/+2
Differential Revision: https://reviews.llvm.org/D79809
2020-05-12[VirtualFileSystem] Add unit test that showcases another YAMLVFSWriter bugJonas Devlieghere1-0/+34
This scenario generates another broken YAML mapping as illustrated below. { 'type': 'directory', 'name': "c", 'contents': [ , { 'type': 'directory', 'name': "d", 'contents': [ , { 'type': 'directory', 'name': "e", 'contents': [ { 'type': 'file', 'name': "f", 'external-contents': "//root/a/c/d/e/f" } { 'type': 'file', 'name': "g", 'external-contents': "//root/a/c/d/e/g" } ] } ] } ] },
2020-05-12[VirtualFileSystem] Add unit test that showcases YAMLVFSWriter bugJonas Devlieghere1-0/+32
This scenario generates a broken YAML mapping as illustrated below. { 'type': 'directory', 'name': "c", 'contents': [ { 'type': 'file', 'name': "d", 'external-contents': "//root/a/c/d" } { 'type': 'file', 'name': "e", 'external-contents': "//root/a/c/e" } { 'type': 'file', 'name': "f", 'external-contents': "//root/a/c/f" } ] },