-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Describe the bug
Some test cases in aws-cpp-sdk-core-tests fail with assertion errors related to Aws::Utils::TempFile when building aws-sdk-cpp using MinGW (gcc 11.4.0) on Windows 11. The failures output errors such as assertion failures and file errors.
[ FAILED ] AWSConfigFileProfileConfigLoaderTest.TestCredentialsFileCorrupted (0 ms)
D:/Pyronix/Code/aws-sdk-cpp/tests/aws-cpp-sdk-core-tests/aws/config/AWSConfigFileProfileConfigLoaderTest.cpp:120: Failure
Value of: configFile.good()
Actual: false
Expected: true
[ FAILED ] AWSConfigFileProfileConfigLoaderTest.TestConfigFileLoad (0 ms)
D:/Pyronix/Code/aws-sdk-cpp/tests/aws-cpp-sdk-core-tests/aws/config/AWSConfigFileProfileConfigLoaderTest.cpp:440: Failure
Value of: configFile.good()
Actual: false
Expected: true
[ FAILED ] AWSConfigFileProfileConfigLoaderTest.TestCredentialsBlankSpace (0 ms)
Assertion failed: pTokenFile && pTokenFile->good(), file D:/Pyronix/Code/aws-sdk-cpp/tests/aws-cpp-sdk-core-tests/aws/auth/GeneralHTTPCredentialsProviderTest.cpp, line 310
Exit code 0xc0000409
Expected Behavior
All test cases should pass and the compilation procedure should complete successfully.
Current Behavior
Test cases related to Aws::Utils::TempFile fail with assertion errors (see previous logs for details):
AWSConfigFileProfileConfigLoaderTest.TestCredentialsFileCorruptedAWSConfigFileProfileConfigLoaderTest.TestConfigFileLoadAWSConfigFileProfileConfigLoaderTest.TestCredentialsBlankSpace
Reproduction Steps
- Build the project with:
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DAWS_SDK_WARNINGS_ARE_ERRORS=off ninja - Run the test suite.
Possible Solution
The issue has been resolved by the me and a pull request has been created #3551
Failed test cases are all related to Aws::Utils::TempFile.
The root cause is in Aws::FileSystem::CreateTempFilePath(), Macro L_tmpnam_s.
Additional Information/Context
No response
AWS CPP SDK version used
1.11.643
Compiler and Version used
gcc.exe (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders) 11.4.0
Operating System and version
Windows 11