lua-resty-mysql icon indicating copy to clipboard operation
lua-resty-mysql copied to clipboard

Test case failures on rhel 7.6 ppc64le platform

Open SantoshMagdum opened this issue 5 years ago • 1 comments

Hi All,

I had build the nginx binary on rhel 7.6 ppc64le (version 1.17.1.1rc0) from source code - https://github.com/openresty/openresty. Please note that, I had copied and used ppc64le compiled LuaJIT code while building openresty (nginx). Below command I used to compile the openresty -

./configure --with-cc-opt="-DNGX_LUA_USE_ASSERT -DNGX_LUA_ABORT_AT_PANIC" --with-http_image_filter_module --with-http_dav_module --with-http_auth_request_module --with-poll_module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module --with-http_iconv_module --with-http_drizzle_module --with-http_postgres_module --with-http_addition_module --add-module=/usr/openresty/openresty_test_modules/nginx-eval-module --add-module=/usr/openresty/openresty_test_modules/replace-filter-nginx-module

And then tried to execute the test cases for 'lua-resty-mysql' like below -

pwd

/usr/openresty/openresty/openresty-1.17.1.1rc0/build/lua-resty-mysql-0.21

prove -r t/

NOTE: The 'lua-resty-mysql' version downloaded from openresty bundle is 0.21

But I am getting below set of errors (Here, I have pasted the uniq error messages but these error messages repeated for multiple test cases)-

[root@ lua-resty-mysql-0.21]# prove -r t/
t/big.t ............. 7/600
#   Failed test 'TEST 1: big field value exceeding 256 - response_body - response is expected (repeated req 2, req 0)'
#   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 1594.
#          got: ..."to mysql.\x{0a}bad result: failed to receive packet hea"...
#       length: 84
#     expected: ..."to mysql.\x{0a}table cats dropped.\x{0a}table cats created.\x{0a}"...
#       length: 2215
#     strings begin to differ at char 21 (line 2 column 1)

#   Failed test 'TEST 1: big field value exceeding 256 - pattern "[error]" should not match any line in error.log but matches line "2019/10/14 17:28:59 [error] 22423\#0: *5 lua tcp socket read timed out, client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 2)
# '




#   Failed test 'TEST 2: bad host - status code ok'
#   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 948.
#          got: ''
#     expected: '200'

#   Failed test 'TEST 2: bad host - response_body_like - response is expected ()'
#   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 1635.
#                   ''
#     doesn't match '(?^s:^failed to connect: failed to connect: host-not-found.org could not be resolved(?: \(3: Host not found\))?: nil nil$)'
TEST 3: connected - WARNING: killing the child process 26047 with force... at /usr/local/share/perl5/Test/Nginx/Util.pm line 609.
t/sanity.t .......... 66/146
#   Failed test 'TEST 12: set keepalive (tcp) - pattern "(?^:lua tcp socket keepalive create connection pool for key "ngx_test:ngx_test:[^\s:]+:\d+")" should match a line in error.log (req 0)'
#   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 1213.
WARNING: TEST 12: set keepalive (tcp) - 2019/10/14 17:33:07 [warn] 26234#0: *1 [lua] _G write guard:12: __newindex(): writing a global lua variable ('res') which may lead to race conditions between concurrent requests, so prefer the use of 'local' variables





#   Failed test 'TEST 19: fix packet number overflow - pattern "[error]" should not match any line in error.log but matches line "2019/10/14 17:33:30 [error] 26297\#0: *3 lua tcp socket read timed out, client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 1)
# '
#   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 1280.
t/sanity.t .......... 140/146
#   Failed test 'TEST 22: InnoDB has a limit of 1017 columns per table - response_body_like - response is expected (bad result: failed to receive packet header: timeout: nil: nil.)'
#   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 1635.
#                   'bad result: failed to receive packet header: timeout: nil: nil.
# '
#     doesn't match '(?^s:bad result: .*?(?:Too many columns|Can't create table 'ngx_test\.test1018' \(errno: 139\)))'




	
#   Failed test 'TEST 22: InnoDB has a limit of 1017 columns per table - pattern "[error]" should not match any line in error.log but matches line "2019/10/14 17:33:35 [error] 26436\#0: *3 lua tcp socket read timed out, client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 1)
# '
#   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 1280.
t/sanity.t .......... Failed 18/146 subtests
t/ssl.t ............. 1/18
#   Failed test 'TEST 1: send query w/o result set - response_body_like - response is expected (failed to connect: ssl disabled on server: nil nil)'
#   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 1635.
#                   'failed to connect: ssl disabled on server: nil nil
# '
#     doesn't match '(?^s:^connected to mysql \d\.[^\s\x00]+\.
# sent 30 bytes\.
# result: \{"affected_rows":0,"insert_id":0,"server_status":2,"warning_count":[01]\}$)'




#   Failed test 'TEST 3: send query w/o result set (verify, failed) - pattern "lua ssl certificate verify error: (18: self signed certificate)" should match a line in error.log (req 1)'
#   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 1213.
# Looks like you failed 8 tests of 18.
t/ssl.t ............. Dubious, test returned 8 (wstat 2048, 0x800)
Failed 8/18 subtests
t/version.t ......... ok
t/world.t ........... ok

Test Summary Report
-------------------
t/big.t           (Wstat: 0 Tests: 604 Failed: 139)
  Failed tests:  8-9, 11-12, 14-15, 17-18, 59-60, 68-69
				119-120, 122-123, 125-126, 128-129, 131-132
				137-138, 140-141, 143-144, 221-222, 224-225
				227-228, 230-231, 233-234, 236-237, 239-240
				242-243, 316-318, 321-323, 325-326, 328-329
				331-332, 334-335, 337-338, 340-344, 347-349
				351-352, 393-394, 396-397, 399-400, 402-403
				405-406, 408-409, 411-412, 414-415, 417-418
				420-421, 423-424, 426-427, 429-430, 432-433
				435-436, 438-439, 441-442, 444-445, 447-448
				450-451, 453-454, 456-457, 459-460, 513-514
				516-517, 519-520, 522-523, 525-526, 582-583
				591-592, 594-595, 597-598, 600-604
  Parse errors: Bad plan.  You planned 600 tests but ran 604.
t/sanity.t        (Wstat: 0 Tests: 148 Failed: 20)
  Failed tests:  7-9, 11-13, 71, 75, 91, 95, 99, 103, 107
				111, 123-124, 141-142, 147-148
  Parse errors: Bad plan.  You planned 146 tests but ran 148.
t/ssl.t           (Wstat: 2048 Tests: 18 Failed: 8)
  Failed tests:  2, 5, 8, 11, 14-15, 17-18
  Non-zero exit status: 8
Files=8, Tests=830, 283 wallclock secs ( 0.33 usr  0.02 sys +  3.12 cusr  0.79 csys =  4.26 CPU)
Result: FAIL

Please help suggest if I need to export any specific environment or should try any compiler flag/somehow increase the timeout value to make these test cases pass.

nginx version (compiled with libdrizzle 1.0 and radius, mariadb, postgresql services setup) -

# nginx -V
nginx version: openresty/1.17.1.1rc0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
built with OpenSSL 1.0.2k-fips  26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt='-O2 -DNGX_LUA_USE_ASSERT -DNGX_LUA_ABORT_AT_PANIC' --add-module=../ngx_devel_kit-0.3.1rc1 --add-module=../iconv-nginx-module-0.14 --add-module=../echo-nginx-module-0.61 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.32 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.08 --add-module=../drizzle-nginx-module-0.1.11 --add-module=../ngx_postgres-1.0 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.15 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.7 --add-module=../rds-json-nginx-module-0.15 --add-module=../rds-csv-nginx-module-0.09 --add-module=../ngx_stream_lua-0.0.7 --with-ld-opt=-Wl,-rpath,/usr/local/openresty/luajit/lib --with-http_image_filter_module --with-http_dav_module --with-http_auth_request_module --with-poll_module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module --with-http_addition_module --add-module=/usr/openresty/openresty_test_modules/nginx-eval-module --add-module=/usr/openresty/openresty_test_modules/replace-filter-nginx-module --with-stream --with-stream_ssl_preread_module

SantoshMagdum avatar Oct 14 '19 12:10 SantoshMagdum

Hi All, Please share any pointers you have on way to resolve the above failures. Thanks in advance.

SantoshMagdum avatar Nov 14 '19 10:11 SantoshMagdum