libhttpserver
libhttpserver copied to clipboard
[BUG] "authentication" test failing
Prerequisites
- [X] Put an X between the brackets on this line if you have checked that your issue isn't already filed: https://github.com/search?l=&q=repo%3Aetr%2Flibhttpserver&type=Issues
Description
The "authentication" test is failing.
Steps to Reproduce
- Run make check
Expected behavior: All test cases passes
Actual behavior:
The "authentication" test case is failing. Below is the output of the generated test-suite.log:
===============================================
libhttpserver 0.18.1: test/test-suite.log
===============================================
# TOTAL: 10
# PASS: 9
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: authentication
====================
Running test (1): base_auth
- Time spent during "base_auth": 6.059 ms
Running test (2): base_auth_fail
- Time spent during "base_auth_fail": 5.702 ms
Running test (3): digest_auth
[CHECK FAILURE] (../../test/integ/authentication.cpp:181) - error in "digest_auth": Not Found!=SUCCESS
- Time spent during "digest_auth": 3.915 ms
Running test (4): digest_auth_wrong_pass
[CHECK FAILURE] (../../test/integ/authentication.cpp:221) - error in "digest_auth_wrong_pass": Not Found!=FAIL
- Time spent during "digest_auth_wrong_pass": 2.827 ms
** Runner terminated! **
4 tests executed
8 checks
-> 6 successes
-> 2 failures
Total run time: 18.509 ms
Total time spent in tests: 18.503 ms
Average set up time: 0.000800037 ms
Average tear down time: 0.000400019 ms
FAIL authentication (exit status: 2)
Tracing execution it appears that MHD_digest_auth_get_username
is returning null.
Reproduces how often: 100%
Versions
- OS version: Raspbian 10 Linux <HOSTNAME REDACTED> 5.4.72-v7l+ #1356 SMP Thu Oct 22 13:57:51 BST 2020 armv7l GNU/Linux
- libhttpserver version 0.18.1 compiled
- libmicrohttpd version 0.9.71 compiled
If you have problems during build:
- Compiler version: g++ (Raspbian 8.3.0-6+rpi1) 8.3.0
- autotools version: 2.69
Additional Information
Any additional information, configuration (especially build configuration flags if you compiled the libraries) or data that might be necessary to reproduce the issue.
If you have problems during build, please attach your config.log and the full scope of your error from make.
If you have problems at execution, please:
- attach the stacktrace in case of crash (a coredump would be even better).
- provide a main that reproduces the error.
Interesting. I don't see this issue in the build we have on travis (latest build as recent as today).
Admittedly, that uses an old version of libmicrohttpd - I'll build with 0.9.71 to make sure the error is not there.
In the meantime, can you give me the missing info so that I can reproduce more precisely?
- OS and OS version.
- Compiler version.
- Autotools version.
Sorry about the missing info. Initial post updated.
Same check fails here. System is Debian GNU/Linux 10 (buster) on amd64 architecture. Building libhttpserver 0.18.2-21-gc5cf5ea (current master) with GCC 8.3.0 (from Debian) against libmicrohttpd 0.9.62 (from Debian). I could not trace the execution, but this is the test output:
% ./test/authentication
Running test (1): base_auth
- Time spent during "base_auth": 1.11401 ms
Running test (2): base_auth_fail
- Time spent during "base_auth_fail": 0.354004 ms
Running test (3): digest_auth
[CHECK FAILURE] (../../test/integ/authentication.cpp:177) - error in "digest_auth": Not Found!=SUCCESS
- Time spent during "digest_auth": 3.10083 ms
Running test (4): digest_auth_wrong_pass
[CHECK FAILURE] (../../test/integ/authentication.cpp:217) - error in "digest_auth_wrong_pass": Not Found!=FAIL
- Time spent during "digest_auth_wrong_pass": 0.519043 ms
** Runner terminated! **
4 tests executed
8 checks
-> 6 successes
-> 2 failures
Total run time: 5.08887 ms
Total time spent in tests: 5.08789 ms
Average set up time: 0 ms
Average tear down time: 0.000195313 ms