-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWSCredentialsProviderTest Tests Failing on armv7l build #2672
Comments
Hello @mike6789 , Thank you very much for your submission. Based on the behavior you are experiencing:
as you can see in the AWSCredentialsProviderTest.cpp test file, it seems that when testing the InstanceProfileCredentialsProvider, the mockClient credentials value are not being set. How are you providing your AWSCredentials? While looking into this, a workaround could be to disable the tests. You can do this with - Best regards, Yasmine |
Hi @yasminetalby , I actually did not provide the credentials yet, I thought this test is some kind of self-contained test with pseudo credentials. Will providing the credentials fix the test? I did disable the tests for now and was able to build. Can you suggest a way to provide the credentials? I would like to simply make a file (such as ~/.aws/credentials) that holds my key, will the SDK pick this up or do I need to explicitly point it to this file (and how can I do that if so)? Thank you!! |
Hello @mike6789 , Thank you very much for your fast response. I am glad the workaround allowed you to build the SDK. Providing your credentials will not fix the test, I wanted to check which credential provider you would like to use with the sdk. There are multiple ways to provide the credentials to authenticate described in our developer guide (see). What you are looking for is actually documented here. By default, the sdk will follow the default credential provider chain to retrieve credentials. You can choose whatever option you prefer to provide credentials. If you are planning to use the shared AWS config and credentials files, the Let me know if that helps or if you need further guidance/have any questions! Best regards, Yasmine |
Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one. |
I ran into the same issue and do not want to disable all tests to get the SDK built. Is there any way these tests can be fixed? |
@yasminetalby can we please reopen this? |
@yasminetalby the problem still persists with the current main. Could you please reopen this issue? We do not want to disable the tests. |
The problem is in the test itself, when the "Expiration" date is set to the year 2047, which causes an overflow on armhf being a 32bit architecture: e.g. https://github.com/aws/aws-sdk-cpp/blob/main/tests/aws-cpp-sdk-core-tests/aws/auth/AWSCredentialsProviderTest.cpp#L302 Changing the expiration date to the year 2037 fixes the issue (see also "Year 2038 Problem") |
Thanks for pointing this out. Testing your suggested change before merging the PR |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
Build does not complete on armv7l target with Ubuntu OS.
'''
[100%] Linking CXX executable aws-cpp-sdk-core-tests
/root/aws-sdk-cpp/tests/aws-cpp-sdk-core-tests/aws/auth/AWSCredentialsProviderTest.cpp:343: Failure
Expected equality of these values:
"goodAccessKey"
provider.GetAWSCredentials().GetAWSAccessKeyId()
Which is: ""
[ FAILED ] InstanceProfileCredentialsProviderTest.TestThatProviderRefreshes (2 ms)
/root/aws-sdk-cpp/tests/aws-cpp-sdk-core-tests/aws/auth/AWSCredentialsProviderTest.cpp:361: Failure
Expected equality of these values:
"goodAccessKey"
provider.GetAWSCredentials().GetAWSAccessKeyId()
Which is: ""
[ FAILED ] InstanceProfileCredentialsProviderTest.TestCredentialsDontRefreshForCredentialsInPast (1 ms)
/root/aws-sdk-cpp/tests/aws-cpp-sdk-core-tests/aws/auth/AWSCredentialsProviderTest.cpp:330: Failure
Expected equality of these values:
"goodAccessKey"
provider.GetAWSCredentials().GetAWSAccessKeyId()
Which is: ""
'''
Expected Behavior
Build should complete
Current Behavior
Test error out
Reproduction Steps
Simply follow the guide here -> https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/setup-linux.html
I am running this on an Orange Pi Zero board
Possible Solution
No response
Additional Information/Context
No response
AWS CPP SDK version used
main
Compiler and Version used
-- The C compiler identification is GNU 11.4.0
Operating System and version
VERSION="22.04.3 LTS (Jammy Jellyfish)"
The text was updated successfully, but these errors were encountered: