Skip to content

[Windows][MSVC] 10 folly::cli tests failed due to they rely on POSIX-specific newline and filesystem behavior #2648

Description

@QuellaZhang

Hi All,

We build Folly using the latest MSVC to detect compiler regressions. After updating the SHA to 76b331e, we observed that 10 tests failed, could you take a look? Thanks you.

The following tests FAILED:
	 45 - cli_args_test.ArgsTest.CommentLines (Failed)
	 51 - cli_args_test.ArgsTest.ComplexRealWorldExample (Failed)
	 64 - cli_args_test.ArgsTest.ArgsFileArgumentsProcessedForQuotes (Failed)
	 68 - cli_args_test.ArgsTest.MixedQuotesInSingleToken (Failed)
	 69 - cli_args_test.ArgsTest.UnclosedSingleQuoteCallsOnTermError (Failed)
	 70 - cli_args_test.ArgsTest.UnclosedDoubleQuoteCallsOnTermError (Failed)
	 71 - cli_args_test.ArgsTest.UnclosedQuoteInNestedFileContinuesParent (Failed)
	 75 - cli_args_test.ArgsTest.UnknownEscapeCallsOnTermError (Failed)
	 77 - cli_args_test.ArgsTest.DoubleAtEscapeInArgsFile (Failed)
	 83 - cli_args_test.ArgsTest.BareAtInArgsFileTriggersFileError (Failed)
Errors while running CTest

Build steps:

  1. git clone https://github.com/Microsoft/vcpkg C:\gitP\Microsoft\vcpkg
  2. set CL=/DGLOG_NO_ABBREVIATED_SEVERITIES /DNOMINMAX /DGLOG_USE_GLOG_EXPORT /utf-8
  3. cd /d C:\gitP\Microsoft\vcpkg
  4. bootstrap-vcpkg.bat
  5. vcpkg install --recurse boost-context boost-crc boost-filesystem boost-multi-index boost-program-options boost-random boost-regex boost-thread double-conversion fmt glog gtest libevent libsodium openssl snappy zlib zstd lz4 liblzma bzip2 abseil re2 fast-float --triplet x64-windows --clean-after-build
  6. git clone https://github.com/facebook/folly C:\gitP\facebook\folly
  7. mkdir C:\gitP\facebook\folly\build_amd64
  8. cd /d C:\gitP\facebook\folly\build_amd64
  9. cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\gitP\Microsoft\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=RELEASE ..
  10. ninja -v
  11. ctest --build-config Release --output-on-failure

Test log: folly_test.log

Error message:

45/2496 Test   #45: cli_args_test.ArgsTest.CommentLines ......................................................................................***Failed    0.02 sec
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from ArgsTest
[ RUN      ] ArgsTest.CommentLines
C:\gitP\facebook\folly\folly\cli\test\ArgsTest.cpp(526): error: Value of: receiver.entries
Expected: has 7 elements where
element #0 is equal to entry{type=term, value="prog", term_loc{idx=0, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0},
element #1 is equal to entry{type=file-found, value="commented.args", term_loc{idx=1, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0},
element #2 is equal to entry{type=file-enter, value="commented.args", term_loc{idx=1, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0},
element #3 is equal to entry{type=term, value="--verbose", term_loc{idx=0, off=20, len=9, b={line=2, col=1}, e={line=2, col=9}}, depth=1},
element #4 is equal to entry{type=term, value="--output", term_loc{idx=1, off=48, len=8, b={line=4, col=1}, e={line=4, col=8}}, depth=1},
element #5 is equal to entry{type=term, value="result.txt", term_loc{idx=2, off=57, len=10, b={line=4, col=10}, e={line=4, col=19}}, depth=1},
element #6 is equal to entry{type=file-leave, value="", term_loc{idx=0, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0}
  Actual: { entry{type=term, value="prog", term_loc{idx=0, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0}, entry{type=file-found, 
value="commented.args", term_loc{idx=1, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0}, entry{type=file-enter, 
value="commented.args", term_loc{idx=1, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0}, entry{type=term, value="--verbose", 
term_loc{idx=0, off=21, len=9, b={line=2, col=1}, e={line=2, col=9}}, depth=1}, entry{type=term, value="--output", term_loc{idx=1, off=51, len=8, 
b={line=4, col=1}, e={line=4, col=8}}, depth=1}, entry{type=term, value="result.txt", term_loc{idx=2, off=60, len=10, b={line=4, col=10}, e={line=4, 
col=19}}, depth=1}, entry{type=file-leave, value="", term_loc{idx=0, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0} }, whose element #3 doesn't match

[  FAILED  ] ArgsTest.CommentLines (9 ms)
[----------] 1 test from ArgsTest (10 ms total)
83/2496 Test   #83: cli_args_test.ArgsTest.BareAtInArgsFileTriggersFileError .................................................................***Failed    0.02 sec
Note: Google Test filter = ArgsTest.BareAtInArgsFileTriggersFileError
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from ArgsTest
[ RUN      ] ArgsTest.BareAtInArgsFileTriggersFileError
C:\gitP\facebook\folly\folly\cli\test\ArgsTest.cpp(2118): error: Value of: receiver.entries
Expected: has 9 elements where
element #0 is equal to entry{type=term, value="prog", term_loc{idx=0, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0},
element #1 is equal to entry{type=file-found, value="bare_at.args", term_loc{idx=1, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0},
element #2 is equal to entry{type=file-enter, value="bare_at.args", term_loc{idx=1, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0},
element #3 is equal to entry{type=term, value="--before", term_loc{idx=0, off=0, len=8, b={line=1, col=1}, e={line=1, col=8}}, depth=1},
element #4 is equal to entry{type=file-found, value="", term_loc{idx=1, off=9, len=1, b={line=2, col=1}, e={line=2, col=1}}, depth=1},
element #5 is equal to entry{type=file-error, value="", term_loc{idx=1, off=9, len=1, b={line=2, col=1}, e={line=2, col=1}}, depth=1},
element #6 is equal to entry{type=term, value="--after", term_loc{idx=2, off=11, len=7, b={line=3, col=1}, e={line=3, col=7}}, depth=1},
element #7 is equal to entry{type=file-leave, value="", term_loc{idx=0, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0},
element #8 is equal to entry{type=term, value="final", term_loc{idx=2, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0}
  Actual: { entry{type=term, value="prog", term_loc{idx=0, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0}, entry{type=file-found, 
value="bare_at.args", term_loc{idx=1, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0}, entry{type=file-enter, value="bare_at.args", 
term_loc{idx=1, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, depth=0}, entry{type=term, value="--before", term_loc{idx=0, off=0, len=8, b=
{line=1, col=1}, e={line=1, col=8}}, depth=1}, entry{type=file-found, value="", term_loc{idx=1, off=10, len=1, b={line=2, col=1}, e={line=2, col=1}}, 
depth=1}, entry{type=file-error, value="", term_loc{idx=1, off=10, len=1, b={line=2, col=1}, e={line=2, col=1}}, depth=1}, entry{type=term, value="-
-after", term_loc{idx=2, off=13, len=7, b={line=3, col=1}, e={line=3, col=7}}, depth=1}, entry{type=file-leave, value="", term_loc{idx=0, off=0, len=0, 
b={line=0, col=0}, e={line=0, col=0}}, depth=0}, entry{type=term, value="final", term_loc{idx=2, off=0, len=0, b={line=0, col=0}, e={line=0, col=0}}, 
depth=0} }, whose element #4 doesn't match

[  FAILED  ] ArgsTest.BareAtInArgsFileTriggersFileError (9 ms)
[----------] 1 test from ArgsTest (9 ms total)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions