Skip to content
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

Run test fail on arm64 #47

Closed
babelouest opened this issue Jun 25, 2023 · 2 comments
Closed

Run test fail on arm64 #47

babelouest opened this issue Jun 25, 2023 · 2 comments

Comments

@babelouest
Copy link
Contributor

Hello,

During the Debian package build 1.5.1-1, the test fail for architecture arm64.

The error log is quite large, but there seems to be at least this error:

test/check_openidc.c:941:F:core:test_openidc_handle_cache:0: Assertion 'oauth2_http_response_status_code_get(_log, response) == 0' failed: oauth2_http_response_status_code_get(_log, response) == 302, 0 == 0

You can find the full build log here: https://buildd.debian.org/status/fetch.php?pkg=liboauth2&arch=arm64&ver=1.5.1-1&stamp=1687716199&raw=0

Any clue what it might be?

@zandbelt
Copy link
Member

thanks for reporting; it looks like a timing issue, could you please try with the following patch:

diff --git a/test/check_openidc.c b/test/check_openidc.c
index de524ec..e7fc228 100644
--- a/test/check_openidc.c
+++ b/test/check_openidc.c
@@ -952,7 +952,7 @@ static void _test_openidc_handle(oauth2_cfg_openidc_t *c)
        oauth2_http_request_free(_log, r);
        oauth2_http_response_free(_log, response);
 
-       sleep(2);
+       sleep(3);
 
        r = oauth2_http_request_init(_log);
        rc = oauth2_http_request_path_set(_log, r, "/secure");
@@ -991,7 +991,7 @@ START_TEST(test_openidc_handle_cookie)
        session_cfg = oauth2_cfg_session_init(_log);
        oauth2_cfg_session_set_options(
            _log, session_cfg, "cookie",
-           "name=short_cookie&inactivity_timeout=1");
+           "name=short_cookie&inactivity_timeout=2");
 
        oauth2_cfg_openidc_provider_resolver_set_options(
            _log, c, "string", test_openidc_metadata_get(),
@@ -1028,7 +1028,7 @@ START_TEST(test_openidc_handle_cache)
        session_cfg = oauth2_cfg_session_init(_log);
        oauth2_cfg_session_set_options(
            _log, session_cfg, "cache",
-           "name=short_memory&cache=memory&inactivity_timeout=1");
+           "name=short_memory&cache=memory&inactivity_timeout=2");
 
        oauth2_cfg_openidc_provider_resolver_set_options(
            _log, c, "string", test_openidc_metadata_get(),

@babelouest
Copy link
Contributor Author

It seems to work with the patch: https://buildd.debian.org/status/package.php?p=liboauth2&suite=experimental

I'll apply it to unstable then, thanks!

zandbelt added a commit that referenced this issue Jun 29, 2023
bump to 1.5.2dev

Signed-off-by: Hans Zandbelt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants