Repository navigation
Test suite repair - #866
Meinersbur wants to merge 1 commit into
Conversation
jrosdahl
left a comment
There was a problem hiding this comment.
A set of compatibility fixes for running the tests.
Thanks.
If it's not too much trouble for you I would appreciate splitting the fixes into different commits. (Different PRs are also OK, and in a way better, but that's maybe too much overhead.)
- Add
CCACHE_SLOPPINESS=include_file_mtimeto ivfsoverlay test. This is possibly due to me using my self-compiled clang since it does not fail with the version of Clang that comes with Ubuntu 20.04.
Sounds good.
- Add detection to
nvcc_ldirof whether nvcc works with chosen host compiler.
👍
- Add treatment of Windows drive letters in paths to additional functions.
Could you describe the problem in more details? Perhaps by adding test cases?
- Fix for
make_relative_path. The result of this depends on the existence of directories in the root folder which is tested with inodes, a concept that does not exist in the Win32 API. The "Linux MinGW 64-bit" test is actually failing, presumably it actually provides inode numbers under the Wine emulation layer.
I thought this was solved by #819?
| { | ||
| #ifdef _WIN32 | ||
| CHECK(make_relative_path("C:/", "C:/a", "C:/b", "C:/x") == "C:/x"); | ||
| CHECK(make_relative_path("C:/", "C:/a", "C:/b", "C:/x") == "../x"); |
There was a problem hiding this comment.
Hm, this doesn't look right. The (I guess badly named) test case is about verifying what happens when neither the actual nor the apparent current working directory exists (so in the non-Windows case, ccache cannot prove that ../x would end up in /x from /a or /b).
Since the whole thing about apparent CWD isn't relevant on Windows, I think we could just as well remove the _WIN32 version of the test case if it doesn't make sense. (Note: The actual logic of rewriting paths when CWD does exist is verified in the Util::get_relative_path tests.)
It only hides the problems (I wrote this patch before #819). I still think Part of the problem comes from what However, as a msys2 user I have never seen such paths. An actually path would be There are also more ways to describe a path under Windows, such as The other changes also stem from the false dichotomy of windows and posix absolute paths. I am not using ccache in msys2 myself, so I will not further pursue this patch (other than #868 and that #867 I moved to other PRs). I think the long-term fix is to use a normalized form that is always converted to before processing paths, like |
Thanks for providing more details. Yes, path handling for various win32 flavors has been bolted on during the years, sometimes by drive-by contributors and sometimes by me by guesswork. I don't use ccache on Windows in any form myself so I haven't had any personal motivation to improve things in this area.
Yep, I agree. |
A set of compatibility fixes for running the tests.
Add
CCACHE_SLOPPINESS=include_file_mtimeto ivfsoverlay test. This is possibly due to me using my self-compiled clang since it does not fail with the version of Clang that comes with Ubuntu 20.04.Add detection to
nvcc_ldirof whether nvcc works with chosen host compiler. For instance,nvccaborts withif the version of clang or gcc is too new. The test should be skipped in this case.
Add treatment of Windows drive letters in paths to additional functions.
Fix for
make_relative_path. The result of this depends on the existence of directories in the root folder which is tested with inodes, a concept that does not exist in the Win32 API. The "Linux MinGW 64-bit" test is actually failing, presumably it actually provides inode numbers under the Wine emulation layer.