openresty / openresty/lua-resty-memcached

Few test case failures on rhel 7.6 ppc64le

Open
#22 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
216
Forks
62
Avg merge
1h 20m
Merged PRs (30d)
2

Description

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-memcached' like below -

# pwd
/usr/openresty/openresty/openresty-1.17.1.1rc0/build/lua-resty-memcached-0.14
# prove -r t/

NOTE: The 'lua-resty-memcached' version downloaded from openresty bundle is 0.14

And I am getting below kind of errors -

# prove -r t/
t/mock.t ...... 1/40
#   Failed test 'TEST 2: continue using the obj when read timeout happens - tcp_query ok'
#   at /usr/local/share/perl5/Test/Nginx/Util.pm line 188.
#          got: ''
#     expected: 'get foo
# '

#   Failed test 'TEST 2: continue using the obj when read timeout happens - TCP query length ok'
#   at /usr/local/share/perl5/Test/Nginx/Util.pm line 1276.
#          got: '0'
#     expected: '9'
TEST 2: continue using the obj when read timeout happens - WARNING: killing the child process 19031 with force... at /usr/local/share/perl5/Test/Nginx/Util.pm line 609.
t/mock.t ...... 23/40 # Looks like you failed 2 tests of 40.
t/mock.t ...... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/40 subtests
t/sanity.t .... 18/220 WARNING: TEST 38: gets (multiple key) + change only unescape key - 2019/10/14 15:55:53 [warn] 19202#0: *1 [lua] _G write guard:12: __newindex(): writing a global lua variable ('identity') which may lead to race conditions between concurrent requests, so prefer the use of 'local' variables
t/sanity.t .... 73/220
#   Failed test 'ERROR: client socket timed out - TEST 29: connect timeout
# '
#   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 2062.

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

#   Failed test 'TEST 29: connect timeout - response_body - response is expected (repeated req 0, req 0)'
#   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 1589.
#          got: ''
#     expected: 'failed to connect: timeout
# '

#   Failed test 'TEST 29: connect timeout - pattern "lua tcp socket connect timed out" should match a line in error.log (req 0)'
#   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 1213.
t/sanity.t .... 77/220
#   Failed test 'ERROR: client socket timed out - TEST 29: connect timeout
# '
#   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 2062.

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

#   Failed test 'TEST 29: connect timeout - response_body - response is expected (repeated req 1, req 0)'
#   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 1589.
#          got: ''
#     expected: 'failed to connect: timeout
# '

#   Failed test 'TEST 29: connect timeout - pattern "lua tcp socket connect timed out" should match a line in error.log (req 1)'
#   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 1213.
t/sanity.t .... 146/220 WARNING: TEST 37: change escape method - 2019/10/14 15:56:05 [warn] 19339#0: *1 [lua] _G write guard:12: __newindex(): writing a global lua variable ('identity') which may lead to race conditions between concurrent requests, so prefer the use of 'local' variables
t/sanity.t .... Failed 8/220 subtests
t/tableset.t .. ok
t/touch.t ..... ok
t/version.t ... ok

Test Summary Report
-------------------
t/mock.t    (Wstat: 512 Tests: 40 Failed: 2)
  Failed tests:  4-5
  Non-zero exit status: 2
t/sanity.t  (Wstat: 0 Tests: 222 Failed: 10)
  Failed tests:  73-80, 221-222
  Parse errors: Bad plan.  You planned 220 tests but ran 222.
Files=5, Tests=288, 50 wallclock secs ( 0.11 usr  0.00 sys +  2.25 cusr  0.69 csys =  3.05 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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin by reproducing the failures with prove -r t/ on RHEL 7.6 ppc64le, focusing on t/mock.t and t/sanity.t. Review the reported Test/Nginx/Util.pm and Test/Nginx/Socket.pm failures and compare the configured OpenResty/LuaJIT environment. Done means identifying the platform-specific cause and obtaining a clean test result, or documenting the exact unsupported condition.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx
Domain
backend, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.