Fix cross-device rename failure#593
Conversation
Other fixes: * Improve ktxsc docs. * Add ktxsc tests. * Simplify toktx-tests.cmake. * Simplify reference generators * Regen skybox_zstd.ktx2 with default version numbers.
|
@Honeybunch I need your assistance again. In this PR I modified the Mingw build to run the tests. All but one test are successful. The one that is failing is failing at this call to The test is It runs fine on Windows when So I'm stumped and since I don't have a Mingw environment set up, I can't readily debug. Please see if you can locate the problem. |
|
Yep I was able to repro this locally. I'll take a look at this when I have some free time |
|
I tried removing the 'x' component of the mode on that fopen call and yeah the test passed. Must be some strange behavior in mingw's fopen implementation with the 'x' mode setting. |
|
Everything I can find about any recent mingw build is that they don't actually re-implement |
|
So I have this small test program: This crashes with errno 22 when compiled with |
|
Thank you for the investigation.
No. Your test program is calling When you say "compiled with gcc", is that any gcc or specifically what is included in Mingw? The Could the problem have been fixed in one of the more recent versions? I just found this Linux fopen man page which does not have The |
|
All gcc on windows that target windows itself use mingw IIRC but yeah using mingw 11.2 from scoop. The clang I use from llvm for windows targets msvcrt directly so that must be the distinction. I just can't find the impl difference between mingw and msvc. The build machine prints that because thats a message from choco as it installs that newer 11.2 version. Remember that the older 8.1 failed to build KTX at all in the first place. I guess for now discarding that 'x' flag is a fine solution if it isn't critical behavior. Maybe this could just be done instead with a c++ api or perhaps the behavior of the 'x' flag be implemented outside the callsite manually with a comment explaining why? |
Ahh. Thanks. The message is very poorly expressed. I did remember you had some issue but did not remember the details.
I want to prevent people accidentally overwriting an existing file. By choosing the explicit output option |
by creating the temporary file in the same directory as the file to be overwritten.
Includes:
Add ktxsc tests.
Improve ktxsc docs.
Simplify toktx-tests.cmake script.
Simplify reference image generation scripts.
Regen skybox_zstd.ktx2 reference with default version numbers.
Run tests in Mingw build.
Fix on_failure.ps1 to work for both Appveyor and GitHub Actions and to use intended curl.
Workaround lack of 'x' mode in Mingw fopen.
Fixes KhronosGroup#581.
by creating the temporary file in the same directory as the file to be overwritten.
Includes:
Add ktxsc tests.
Improve ktxsc docs.
Simplify toktx-tests.cmake script.
Simplify reference image generation scripts.
Regen skybox_zstd.ktx2 reference with default version numbers.
Run tests in Mingw build.
Fix on_failure.ps1 to work for both Appveyor and GitHub Actions and to use intended curl.
Workaround lack of 'x' mode in Mingw fopen.
Fixes KhronosGroup#581.
by creating the temporary file in the same directory as the file to be overwritten.
Includes:
Add ktxsc tests.
Improve ktxsc docs.
Simplify toktx-tests.cmake script.
Simplify reference image generation scripts.
Regen skybox_zstd.ktx2 reference with default version numbers.
Run tests in Mingw build.
Fix on_failure.ps1 to work for both Appveyor and GitHub Actions and to use intended curl.
Workaround lack of 'x' mode in Mingw fopen.
Fixes KhronosGroup#581.
by creating the temporary file in the same directory as the file to be overwritten.
Includes:
Add ktxsc tests.
Improve ktxsc docs.
Simplify toktx-tests.cmake script.
Simplify reference image generation scripts.
Regen skybox_zstd.ktx2 reference with default version numbers.
Run tests in Mingw build.
Fix on_failure.ps1 to work for both Appveyor and GitHub Actions and to use intended curl.
Workaround lack of 'x' mode in Mingw fopen.
Fixes KhronosGroup#581.
by creating the temporary file in the same directory as the file to be overwritten.
Includes:
Add ktxsc tests.
Improve ktxsc docs.
Simplify toktx-tests.cmake script.
Simplify reference image generation scripts.
Regen skybox_zstd.ktx2 reference with default version numbers.
Run tests in Mingw build.
Fix on_failure.ps1 to work for both Appveyor and GitHub Actions and to use intended curl.
Workaround lack of 'x' mode in Mingw fopen.
Fixes KhronosGroup#581.
by creating the temporary file in the same directory as the file to be overwritten.
Includes:
Add ktxsc tests.
Improve ktxsc docs.
Simplify toktx-tests.cmake script.
Simplify reference image generation scripts.
Regen skybox_zstd.ktx2 reference with default version numbers.
Run tests in Mingw build.
Fix on_failure.ps1 to work for both Appveyor and GitHub Actions and to use intended curl.
Workaround lack of 'x' mode in Mingw fopen.
Fixes KhronosGroup#581.
by creating the temporary file in the same directory as the file to be overwritten.
Includes:
ktxsctestsktxscdocsskybox_zstd.ktx2reference with default version numbers.on_failure.ps1to work for both Appveyor and GitHub Actions and to use intendedcurl.Fixes #581