libgit2 / libgit2/libgit2

Test 12 (util) Failing on Windows

Open
#6,900 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs repro
Dominant language
C
Stars
10.6k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

Reproduction steps

README.md

Expected behavior
There should be no failing tests when you build an unmodified source tree from a [release](https://github.com/libgit2/libgit2/releases), or from the [main branch](https://github.com/libgit2/libgit2/tree/main). Please contact us or [open an issue](https://github.com/libgit2/libgit2/issues) if you see test failures.
Actual behavior
12: posix......
12: pqueue.....'\\?\C:\Users\siddh\AppData\Local\Temp\libgit2_tests_a07432'
12: CMD.EXE was started with the above path as the current directory.
12: UNC paths are not supported.  Defaulting to Windows directory.
12:
12: process::env.'\\?\C:\Users\siddh\AppData\Local\Temp\libgit2_tests_a07432'
12: CMD.EXE was started with the above path as the current directory.
12: UNC paths are not supported.  Defaulting to Windows directory.
12: .'\\?\C:\Users\siddh\AppData\Local\Temp\libgit2_tests_a07432'
12: CMD.EXE was started with the above path as the current directory.
12: UNC paths are not supported.  Defaulting to Windows directory.
12: .'\\?\C:\Users\siddh\AppData\Local\Temp\libgit2_tests_a07432'
12: CMD.EXE was started with the above path as the current directory.
12: UNC paths are not supported.  Defaulting to Windows directory.
12: F'\\?\C:\Users\siddh\AppData\Local\Temp\libgit2_tests_a07432'
12: CMD.EXE was started with the above path as the current directory.
12: UNC paths are not supported.  Defaulting to Windows directory.
12:
12: process::start..'\\?\C:\Users\siddh\AppData\Local\Temp\libgit2_tests_a07432'
12: CMD.EXE was started with the above path as the current directory.
12: UNC paths are not supported.  Defaulting to Windows directory.
12: ...
12: process::win32....
12: zstream....
12:
12:   1) Failure:
12: process::env::can_clear_env [D:\Apps\Fritzing Entirity\libgit2-1.8.1\tests\util\process\env.c:52]
12:   0 != result.exitcode
12:   0 != 1
12:
12/12 Test #12: util .............................***Failed    4.61 sec

92% tests passed, 1 tests failed out of 12

Total Test time (real) = 1169.06 sec

The following tests FAILED:
         12 - util (Failed)
Errors while running CTest
Output from these tests are in: D:/Apps/Fritzing Entirity/libgit2-1.8.1/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.

After rebuilding after removing space from parent directory name,

PS D:\Apps\FritzingEntirity\libgit2-1.8.1\build> ctest -R util
Test project D:/Apps/FritzingEntirity/libgit2-1.8.1/build
    Start 12: util
1/1 Test #12: util .............................***Failed    4.05 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   4.06 sec

The following tests FAILED:
         12 - util (Failed)
Errors while running CTest
Output from these tests are in: D:/Apps/FritzingEntirity/libgit2-1.8.1/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
PS D:\Apps\FritzingEntirity\libgit2-1.8.1\build> ctest --rerun-failed --output-on-failure
Test project D:/Apps/FritzingEntirity/libgit2-1.8.1/build
    Start 12: util
1/1 Test #12: util .............................***Failed    4.03 sec
Loaded 54 suites:
Started (test status codes: OK='.' FAILURE='F' SKIPPED='S')

alloc....
array.
assert.....
bitvec.
copy...
dirent.........
encoding..
errors.......
filebuf............
ftruncateSS
futils...S
gitstr..........................
hex.
hostname.
iconv...
init...
integer...
link..SSSSSSSSS....SS....SSS
memmem...
mkdir......
path::core.................................
path::win32.............
pool...
posix......
pqueue.....'\\?\C:\Users\siddh\AppData\Local\Temp\libgit2_tests_a30044'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.

process::env.'\\?\C:\Users\siddh\AppData\Local\Temp\libgit2_tests_a30044'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
.'\\?\C:\Users\siddh\AppData\Local\Temp\libgit2_tests_a30044'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
.'\\?\C:\Users\siddh\AppData\Local\Temp\libgit2_tests_a30044'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
F'\\?\C:\Users\siddh\AppData\Local\Temp\libgit2_tests_a30044'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.

process::start..'\\?\C:\Users\siddh\AppData\Local\Temp\libgit2_tests_a30044'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
...
process::win32....
qsort......
regexp.SSS.........
rmdir.....
sha1...
sha256....
sortedcache...
stat..
str::basic...
str::oom...
str::percent..
str::quote...
str::splice.........
string........
strmap...........
strtol........
url::http.................................................
url::joinpath......
url::parse......................................................
url::pattern..
url::redirect...........
url::scp.....................
url::valid.
utf8.
vector..........
wildmatch........
zstream....

  1) Failure:
process::env::can_clear_env [D:\Apps\FritzingEntirity\libgit2-1.8.1\tests\util\process\env.c:52]
  0 != result.exitcode
  0 != 1



0% tests passed, 1 tests failed out of 1

Total Test time (real) =   4.05 sec

The following tests FAILED:
         12 - util (Failed)
Errors while running CTest
PS D:\Apps\FritzingEntirity\libgit2-1.8.1\build>

D:/Apps/FritzingEntirity/libgit2-1.8.1/build/Testing/Temporary/LastTest.log :

12:util
Version of libgit2 (release number or SHA1)

libgit2 v1.8.1

Operating system(s) tested

Edition Windows 11 Home Single Language
Version 23H2
Installed on ‎05-‎02-‎2023
OS build 22631.4169
Experience Windows Feature Experience Pack 1000.22700.1034.0

Windows PowerShell

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tests/util/process/env.c at line 52 and reproduce the failure by running ctest -R util on Windows. Check the process environment test and the reported temporary path behavior; done means the util test passes on Windows without the CMD.EXE or UNC-path errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.