(This page was automatically generated by the tools in the opsboy project on 19:24:54 07-Feb-2019 GMT.)

Detailed Test Report for lua-resty-core in linux x86_64 (h)

Summary

Commit Testing Time Unexpected
Failures
Expected
Failures
Files Tests Elapsed Time
c5d624c5 2019-02-06 21:01:24 GMT 59 155 71 8021 341 sec

LuaJIT

LuaJIT 2.1.0-beta3, commit 0e646b5

OpenSSL

LuaJIT 1.1.0h 27 Mar 2018

Compilation Errors

Unexpected Failures

File Name Details
process-type-single.t TEST 1: sanity - response_body - response is expected (repeated req 0, req 0) got: "process type: worker\x{0a}"
length: 21
expected: "process type: single\x{0a}"
length: 21
strings begin to differ at char 15 (line 1 column 15)
process-type-single.t TEST 1: sanity - grep_error_log_out (req 0) '[TRACE 1 init_by_lua:16 loop]
[TRACE 2 init_worker_by_lua:4 loop]
[TRACE 2 content_by_lua(nginx.conf:83):4 loop]
process type in init_by_lua*: master
init_worker_by_lua:10: process type: worker
'
doesn't match '(?^:\[TRACE\s+\d+ init_by_lua:16 loop\]
\[TRACE\s+\d+ init_worker_by_lua:4 loop\]
\[TRACE\s+\d+ content_by_lua\(nginx.conf:83\):4 loop\]
process type in init_by_lua\*: single
init_worker_by_lua:10: process type: single
)'
process-type-single.t TEST 1: sanity - response_body - response is expected (repeated req 1, req 0) got: "process type: worker\x{0a}"
length: 21
expected: "process type: single\x{0a}"
length: 21
strings begin to differ at char 15 (line 1 column 15)
process-type-single.t TEST 1: sanity - grep_error_log_out (req 1) '[TRACE 1 init_by_lua:16 loop]
[TRACE 2 init_worker_by_lua:4 loop]
[TRACE 2 content_by_lua(nginx.conf:83):4 loop]
process type in init_by_lua*: master
init_worker_by_lua:10: process type: worker
'
doesn't match '(?^:\[TRACE\s+\d+ init_by_lua:16 loop\]
\[TRACE\s+\d+ init_worker_by_lua:4 loop\]
\[TRACE\s+\d+ content_by_lua\(nginx.conf:83\):4 loop\]
process type in init_by_lua\*: single
init_worker_by_lua:10: process type: single
)'
shared.t TEST 11: shared.expire returns error on not found key - response_body - response is expected (repeated req 0, req 0) got: ''
expected: 'failed to set ttl: not found
'
shared.t TEST 11: shared.expire returns error on not found key - response_body - response is expected (repeated req 1, req 0) got: ''
expected: 'failed to set ttl: not found
'
shdict.t TEST 7: get a large string value - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
-value type: string
+value type: nil
-value: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb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bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbba
+value: nil
-flags: 912
+flags: nil
'
shdict.t TEST 7: get a large string value - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1,3 @@
-value type: string
+value type: nil
-value: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb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bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbba
+value: nil
-flags: 912
+flags: nil
'
stream/errlog.t TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:4
'
expected: 'log lines:3
'
stream/errlog.t nginx: [emerg] invalid number of arguments in "lua_capture_error_log" directive in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:17
stream/errlog.t nginx: [emerg] invalid number of arguments in "lua_capture_error_log" directive in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:17
stream/errlog.t TEST 10: without directive + ngx.set_filter_level - pattern "directive "lua_capture_error_log" is not set" should match a line in error.log (req 0)
stream/errlog.t TEST 13: filter log by level(ngx.CRIT) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:1
'
expected: 'log lines:0
'
stream/errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#2 log level:6 log body:2019/02/06 23:24:34 [notice] 11892\#0: start worker processes log level:4 log body:2019/02/06 23:24:34 [error] 11972\#0: *89 stream [lua] content_by_lua(nginx.conf:40):8: --> new line, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #2
log level:6
log body:2019/02/06 23:24:34 [notice] 11892#0: start worker processes
log level:4
log body:2019/02/06 23:24:34 [error] 11972#0: *89 stream [lua] content_by_lua(nginx.conf:40):8: -->
new line, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 3: client connected info - grep_error_log_out (req 0) 'client 127.0.0.1:64858 connected to
capture log line:10
'
doesn't match '(?^:^client .*? connected to .*?
capture log line:1
$)'
stream/errlog.t TEST 3: client connected info - grep_error_log_out (req 1) 'client 127.0.0.1:64862 connected to
capture log line:4
'
doesn't match '(?^:^client .*? connected to .*?
capture log line:2
$)'
stream/errlog.t TEST 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: \#2 log level:6 log body:2019/02/06 23:24:35 [notice] 11892\#0: start worker processes log level:4 log body:2019/02/06 23:24:36 [error] 12068\#0: *181 stream [lua] content_by_lua(nginx.conf:48):8: --> new line, client: 127.0.0.1, server: 0.0.0.0:1985 end maybe log lines: \#2 end) 'maybe log lines: #2
log level:6
log body:2019/02/06 23:24:35 [notice] 11892#0: start worker processes
log level:4
log body:2019/02/06 23:24:36 [error] 12068#0: *181 stream [lua] content_by_lua(nginx.conf:48):8: -->
new line, client: 127.0.0.1, server: 0.0.0.0:1985
end
maybe log lines: #2
end
'
doesn't match '(?^s:\Amaybe log lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: 0.0.0.0:\d+
end
maybe log lines: #1
end
\z)'
stream/errlog.t nginx: [emerg] invalid capture error log size "3k", minimum size is 4096 in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:17
stream/errlog.t nginx: [emerg] invalid capture error log size "3k", minimum size is 4096 in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:17
stream/errlog.t TEST 12: filter log by level(ngx.WARN) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:3
'
expected: 'log lines:2
'
stream/semaphore.t TEST 11: semaphore in ngx.timer (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
sem: timeout,
sem: 1,
+sem: timeout,
'
stream/semaphore.t TEST 10: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 1) @@ -1,2 +1,3 @@
sem: 1 while returning text,
sem: API disabled in the context of log_by_lua* while returning text,
+sem: timeout,
'
stream/semaphore.t TEST 21: multi wait and mult post with one semaphore - pattern "[error]" should not match any line in error.log but matches line "2019/02/06 23:25:22 [error] 14441\#0: *44 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/02/06 23:25:22 [error] 14441\#0: *44 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer
2019/02/06 23:25:22 [debug] 14441\#0: stream lua semaphore wait: 0000000000F065E8, timeout: 1000, resources: 0, event posted: 0
2019/02/06 23:25:22 [debug] 14441\#0: *44 event timer add: 0: 1000:8691605
2019/02/06 23:25:22 [debug] 14441\#0: stream lua semaphore wait yielding
2019/02/06 23:25:22 [debug] 14441\#0: *44 lua resume returned 1
2019/02/06 23:25:22 [debug] 14441\#0: *44 lua thread yielded
2019/02/06 23:25:22 [debug] 14441\#0: *44 lua run thread returned -2
2019/02/06 23:25:22 [debug] 14441\#0: worker cycle
2019/02/06 23:25:22 [debug] 14441\#0: epoll timer: 1000
'
stream/semaphore.t TEST 21: multi wait and mult post with one semaphore - pattern "[error]" should not match any line in error.log but matches line "2019/02/06 23:25:22 [error] 14441\#0: *44 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer" (req 0) 2019/02/06 23:25:22 [debug] 14441\#0: stream lua semaphore wait: 0000000000F065E8, timeout: 1000, resources: 0, event posted: 0
2019/02/06 23:25:22 [debug] 14441\#0: *44 event timer add: 0: 1000:8691605
2019/02/06 23:25:22 [debug] 14441\#0: stream lua semaphore wait yielding
2019/02/06 23:25:22 [debug] 14441\#0: *44 lua resume returned 1
2019/02/06 23:25:22 [debug] 14441\#0: *44 lua thread yielded
2019/02/06 23:25:22 [debug] 14441\#0: *44 lua run thread returned -2
2019/02/06 23:25:22 [debug] 14441\#0: worker cycle
2019/02/06 23:25:22 [debug] 14441\#0: epoll timer: 1000
2019/02/06 23:25:22 [debug] 14556\#0: epoll: fd:7 ev:0001 d:0000000000E970F0
'
stream/semaphore.t TEST 13: semaphore wait post in preread_by_lua - pattern "[error]" should not match any line in error.log but matches line "2019/02/06 23:25:23 [error] 14441\#0: *44 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/02/06 23:25:23 [debug] 14441\#0: stream lua semaphore wait: 0000000000F065E8, timeout: 1000, resources: 0, event posted: 0
2019/02/06 23:25:23 [debug] 14441\#0: *44 event timer add: 0: 1000:8692605
2019/02/06 23:25:23 [debug] 14441\#0: stream lua semaphore wait yielding
2019/02/06 23:25:23 [debug] 14441\#0: *44 lua resume returned 1
2019/02/06 23:25:23 [debug] 14441\#0: *44 lua thread yielded
2019/02/06 23:25:23 [debug] 14441\#0: *44 lua run thread returned -2
2019/02/06 23:25:23 [debug] 14441\#0: worker cycle
2019/02/06 23:25:23 [debug] 14441\#0: epoll timer: 1000
2019/02/06 23:25:23 [debug] 14395\#0: child: 0 14613 e:0 t:0 d:0 r:1 j:0
'
stream/semaphore.t TEST 3: semaphore wait time=0 - pattern "[error]" should not match any line in error.log but matches line "2019/02/06 23:25:25 [error] 14441\#0: *44 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 1) 2019/02/06 23:25:25 [error] 14441\#0: *44 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer
2019/02/06 23:25:25 [debug] 14441\#0: stream lua semaphore wait: 0000000000F065E8, timeout: 1000, resources: 0, event posted: 0
2019/02/06 23:25:25 [debug] 14441\#0: *44 event timer add: 0: 1000:8694605
2019/02/06 23:25:25 [debug] 14441\#0: stream lua semaphore wait yielding
2019/02/06 23:25:25 [debug] 14441\#0: *44 lua resume returned 1
2019/02/06 23:25:25 [debug] 14441\#0: *44 lua thread yielded
2019/02/06 23:25:25 [debug] 14441\#0: *44 lua run thread returned -2
2019/02/06 23:25:25 [debug] 14441\#0: worker cycle
'
stream/semaphore.t TEST 3: semaphore wait time=0 - pattern "[error]" should not match any line in error.log but matches line "2019/02/06 23:25:25 [error] 14441\#0: *44 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer" (req 1) 2019/02/06 23:25:25 [debug] 14441\#0: stream lua semaphore wait: 0000000000F065E8, timeout: 1000, resources: 0, event posted: 0
2019/02/06 23:25:25 [debug] 14441\#0: *44 event timer add: 0: 1000:8694605
2019/02/06 23:25:25 [debug] 14441\#0: stream lua semaphore wait yielding
2019/02/06 23:25:25 [debug] 14441\#0: *44 lua resume returned 1
2019/02/06 23:25:25 [debug] 14441\#0: *44 lua thread yielded
2019/02/06 23:25:25 [debug] 14441\#0: *44 lua run thread returned -2
2019/02/06 23:25:25 [debug] 14441\#0: worker cycle
'
stream/semaphore.t TEST 8: semaphore in preread_by_lua (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
+sem: timeout,
sem: timeout while prereading client data,
sem: 1 while prereading client data,
'
stream/semaphore.t TEST 2: semaphore wait order - pattern "[error]" should not match any line in error.log but matches line "2019/02/06 23:25:27 [error] 14441\#0: *44 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/02/06 23:25:27 [debug] 14841\#0: channel: 32
2019/02/06 23:25:27 [debug] 14841\#0: channel command: 3
2019/02/06 23:25:27 [debug] 14841\#0: channel: -2
2019/02/06 23:25:27 [debug] 14841\#0: timer delta: 36
2019/02/06 23:25:27 [notice] 14841\#0: gracefully shutting down
2019/02/06 23:25:27 [debug] 14441\#0: stream lua semaphore wait: 0000000000F065E8, timeout: 1000, resources: 0, event posted: 0
2019/02/06 23:25:27 [debug] 14841\#0: setproctitle: "nginx: worker process is shutting down"
2019/02/06 23:25:27 [debug] 14441\#0: *44 event timer add: 0: 1000:8696605
2019/02/06 23:25:27 [debug] 14441\#0: stream lua semaphore wait yielding
'
stream/shdict.t TEST 2: get an nonexistent key - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
-value type: nil
-value: nil
+value type: number
+value: 371
flags: nil
'
stream/shdict.t TEST 2: get an nonexistent key - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1,3 @@
-value type: nil
-value: nil
+value type: number
+value: 371
flags: nil
'
stream/ssl.t TEST 4: read SNI name via ssl.server_name() when no SNI name specified - response_body - response is expected (repeated req 0, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 4: read SNI name via ssl.server_name() when no SNI name specified - pattern "read SNI name from Lua: nil, type: nil" should match a line in error.log (req 0)
stream/ssl.t TEST 4: read SNI name via ssl.server_name() when no SNI name specified - response_body - response is expected (repeated req 1, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 4: read SNI name via ssl.server_name() when no SNI name specified - pattern "read SNI name from Lua: nil, type: nil" should match a line in error.log (req 1)
stream/ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - response_body - response is expected (repeated req 0, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
stream/ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "(?^:Using unix socket file .*?nginx\.sock)" should match a line in error.log (req 0)
stream/ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - response_body - response is expected (repeated req 1, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
stream/ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "(?^:Using unix socket file .*?nginx\.sock)" should match a line in error.log (req 1)
stream/ssl.t TEST 20: read client addr via ssl.raw_client_addr() - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/06 23:25:51 [emerg] 15952\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/06 23:25:51 [notice] 15952\#0: start worker processes
2019/02/06 23:25:51 [debug] 15952\#0: channel 4:6
2019/02/06 23:25:51 [notice] 15952\#0: start worker process 16041
2019/02/06 23:25:51 [debug] 15952\#0: pass channel s:1 pid:16041 fd:4 to s:0 pid:16020 fd:3
2019/02/06 23:25:51 [debug] 16020\#0: epoll: fd:5 ev:0001 d:0000000000B41120
2019/02/06 23:25:51 [debug] 16020\#0: channel handler
2019/02/06 23:25:51 [debug] 16020\#0: channel: 32
2019/02/06 23:25:51 [debug] 16020\#0: channel command: 1
2019/02/06 23:25:51 [debug] 16020\#0: get channel s:1 pid:16041 fd:6
'
stream/ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
stream/ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - pattern "(?^:\[error\] .*? failed to parse pem cert: PEM_read_bio_X509\(\) failed)" should match a line in error.log (req 0)
stream/ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - pattern "[crit]" should not match any line in error.log but matches line "2019/02/06 23:25:53 [crit] 16104\#0: *196 connect() to unix:/home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory), client: 127.0.0.1, server: 0.0.0.0:1985" (req 0) 2019/02/06 23:25:53 [debug] 16104\#0: *196 reusable connection: 0
2019/02/06 23:25:53 [debug] 16104\#0: *196 malloc: 0000000000B2E100:24
2019/02/06 23:25:53 [debug] 16104\#0: *196 malloc: 0000000000B4A570:16
2019/02/06 23:25:53 [debug] 16104\#0: *196 stream cleanup add: 0000000000B2E100
2019/02/06 23:25:53 [debug] 16104\#0: *196 stream lua tcp socket connect: -5
2019/02/06 23:25:53 [debug] 16104\#0: *196 stream lua tcp socket error retval handler
2019/02/06 23:25:53 [debug] 16104\#0: *196 stream lua finalize socket
2019/02/06 23:25:53 [debug] 16104\#0: *196 lua stream cleanup free: 0000000000B2E100
2019/02/06 23:25:53 [debug] 16104\#0: *196 malloc: 0000000000B4A590:16
'
stream/ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
stream/ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - pattern "(?^:\[error\] .*? failed to parse pem cert: PEM_read_bio_X509\(\) failed)" should match a line in error.log (req 1)
stream/ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - pattern "[crit]" should not match any line in error.log but matches line "2019/02/06 23:25:53 [crit] 16104\#0: *200 connect() to unix:/home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory), client: 127.0.0.1, server: 0.0.0.0:1985" (req 1) 2019/02/06 23:25:53 [debug] 16104\#0: *200 reusable connection: 0
2019/02/06 23:25:53 [debug] 16104\#0: *200 malloc: 0000000000AFA330:24
2019/02/06 23:25:53 [debug] 16104\#0: *200 malloc: 0000000000B405C0:16
2019/02/06 23:25:53 [debug] 16104\#0: *200 stream cleanup add: 0000000000AFA330
2019/02/06 23:25:53 [debug] 16104\#0: *200 stream lua tcp socket connect: -5
2019/02/06 23:25:53 [debug] 16104\#0: *200 stream lua tcp socket error retval handler
2019/02/06 23:25:53 [debug] 16104\#0: *200 stream lua finalize socket
2019/02/06 23:25:53 [debug] 16104\#0: *200 lua stream cleanup free: 0000000000AFA330
2019/02/06 23:25:53 [debug] 16104\#0: *200 malloc: 0000000000B0EDE0:16
'
stream/ssl.t TEST 13: tls version - TLSv1.2 - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/06 23:25:53 [emerg] 15952\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/06 23:25:53 [notice] 15952\#0: start worker processes
2019/02/06 23:25:53 [debug] 15952\#0: channel 4:6
2019/02/06 23:25:53 [notice] 15952\#0: start worker process 16124
2019/02/06 23:25:53 [debug] 15952\#0: pass channel s:1 pid:16124 fd:4 to s:0 pid:16104 fd:3
2019/02/06 23:25:53 [debug] 16104\#0: epoll: fd:5 ev:0001 d:0000000000B83140
2019/02/06 23:25:53 [debug] 16104\#0: channel handler
2019/02/06 23:25:53 [debug] 16104\#0: channel: 32
2019/02/06 23:25:53 [debug] 16104\#0: channel command: 1
2019/02/06 23:25:53 [debug] 16104\#0: get channel s:1 pid:16124 fd:6
'
stream/ssl.t TEST 16: parse PEM cert and key to cdata - response_body - response is expected (repeated req 0, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 16: parse PEM cert and key to cdata - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
stream/ssl.t TEST 16: parse PEM cert and key to cdata - response_body - response is expected (repeated req 1, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 16: parse PEM cert and key to cdata - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
stream/ssl.t TEST 15: read PEM key chain but set DER key chain - response_body - response is expected (repeated req 0, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 15: read PEM key chain but set DER key chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
stream/ssl.t TEST 15: read PEM key chain but set DER key chain - response_body - response is expected (repeated req 1, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 15: read PEM key chain but set DER key chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
stream/ssl.t TEST 12: tls version - TLSv1.1 - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/06 23:25:56 [emerg] 15952\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/06 23:25:56 [notice] 15952\#0: start worker processes
2019/02/06 23:25:56 [debug] 15952\#0: channel 4:6
2019/02/06 23:25:56 [notice] 15952\#0: start worker process 16259
2019/02/06 23:25:56 [debug] 15952\#0: pass channel s:1 pid:16259 fd:4 to s:0 pid:16236 fd:3
2019/02/06 23:25:56 [debug] 16236\#0: epoll: fd:5 ev:0001 d:0000000000B89480
2019/02/06 23:25:56 [debug] 16236\#0: channel handler
2019/02/06 23:25:56 [debug] 16236\#0: channel: 32
2019/02/06 23:25:56 [debug] 16236\#0: channel command: 1
2019/02/06 23:25:56 [debug] 16236\#0: get channel s:1 pid:16259 fd:6
'
stream/ssl.t TEST 11: tls version - TLSv1 - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/06 23:25:57 [emerg] 15952\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/06 23:25:57 [notice] 15952\#0: start worker processes
2019/02/06 23:25:57 [debug] 15952\#0: channel 3:5
2019/02/06 23:25:57 [notice] 15952\#0: start worker process 16318
2019/02/06 23:25:57 [debug] 15952\#0: pass channel s:0 pid:16318 fd:3 to s:1 pid:16298 fd:4
2019/02/06 23:25:57 [debug] 16298\#0: epoll: fd:6 ev:0001 d:0000000000B8B0D0
2019/02/06 23:25:57 [debug] 16298\#0: channel handler
2019/02/06 23:25:57 [debug] 16298\#0: channel: 32
2019/02/06 23:25:57 [debug] 16298\#0: channel command: 1
2019/02/06 23:25:57 [debug] 16298\#0: get channel s:0 pid:16318 fd:5
'

Expected Failures

File Name Details
errlog.t nginx: [emerg] invalid capture error log size "3k", minimum size is 4096 in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:25
errlog.t TEST 12: filter log by level(ngx.WARN) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:10
'
expected: 'log lines:2
'
errlog.t TEST 12: filter log by level(ngx.WARN) - response_body - response is expected (repeated req 1, req 0) got: 'log lines:5
'
expected: 'log lines:2
'
errlog.t TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:10
'
expected: 'log lines:3
'
errlog.t TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 1, req 0) got: 'log lines:7
'
expected: 'log lines:3
'
errlog.t TEST 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1549495259.498 log body: 2019/02/06 23:20:59 [error] 2171\#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********28, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1549495259.498 log body: 2019/02/06 23:20:59 [error] 2171\#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********29, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1549495259.498 log body: 2019/02/06 23:20:59 [error] 2171\#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1549495259.498 log body: 2019/02/06 23:20:59 [error] 2171\#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********31, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1549495259.498 log body: 2019/02/06 23:20:59 [error] 2171\#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********32, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1549495259.498 log body: 2019/02/06 23:20:59 [error] 2171\#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********33, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1549495259.498 log body: 2019/02/06 23:20:59 [error] 2171\#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********34, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1549495259.498 log body: 2019/02/06 23:20:59 [error] 2171\#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********35, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1549495259.498 log body: 2019/02/06 23:20:59 [error] 2171\#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********36, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1549495259.498 log body: 2019/02/06 23:20:59 [error] 2171\#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********37, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log level: 4
log time: 1549495259.498
log body: 2019/02/06 23:20:59 [error] 2171#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********28, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1549495259.498
log body: 2019/02/06 23:20:59 [error] 2171#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********29, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1549495259.498
log body: 2019/02/06 23:20:59 [error] 2171#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1549495259.498
log body: 2019/02/06 23:20:59 [error] 2171#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********31, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1549495259.498
log body: 2019/02/06 23:20:59 [error] 2171#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********32, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1549495259.498
log body: 2019/02/06 23:20:59 [error] 2171#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********33, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1549495259.498
log body: 2019/02/06 23:20:59 [error] 2171#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********34, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1549495259.498
log body: 2019/02/06 23:20:59 [error] 2171#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********35, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1549495259.498
log body: 2019/02/06 23:20:59 [error] 2171#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********36, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1549495259.498
log body: 2019/02/06 23:20:59 [error] 2171#0: *143 [lua] content_by_lua(nginx.conf:72):8: **********37, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:log level: 4
log time: \d+(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: \d{10}(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*40, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost")'
errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#10 log level:6 log body:2019/02/06 23:21:00 [notice] 1989\#0: start worker processes log level:7 log body:2019/02/06 23:21:00 [info] 2228\#0: *173 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:00 [info] 2228\#0: *174 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:00 [info] 2228\#0: *175 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:00 [info] 2228\#0: *176 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:00 [info] 2228\#0: *177 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:00 [info] 2228\#0: *178 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:00 [info] 2228\#0: *179 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:00 [info] 2228\#0: *180 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:00 [info] 2228\#0: *181 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:6
log body:2019/02/06 23:21:00 [notice] 1989#0: start worker processes
log level:7
log body:2019/02/06 23:21:00 [info] 2228#0: *173 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:00 [info] 2228#0: *174 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:00 [info] 2228#0: *175 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:00 [info] 2228#0: *176 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:00 [info] 2228#0: *177 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:00 [info] 2228#0: *178 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:00 [info] 2228#0: *179 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:00 [info] 2228#0: *180 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:00 [info] 2228#0: *181 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#3 log level:7 log body:2019/02/06 23:21:00 [info] 2228\#0: *182 client 127.0.0.1 closed keepalive connection log level:4 log body:2019/02/06 23:21:00 [error] 2228\#0: *183 [lua] access_by_lua(nginx.conf:54):8: --> new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2019/02/06 23:21:00 [error] 2228\#0: *184 [lua] access_by_lua(nginx.conf:54):8: --> new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log lines: #3
log level:7
log body:2019/02/06 23:21:00 [info] 2228#0: *182 client 127.0.0.1 closed keepalive connection
log level:4
log body:2019/02/06 23:21:00 [error] 2228#0: *183 [lua] access_by_lua(nginx.conf:54):8: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2019/02/06 23:21:00 [error] 2228#0: *184 [lua] access_by_lua(nginx.conf:54):8: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: \#10 log level:6 log body:2019/02/06 23:21:01 [notice] 1989\#0: start worker processes log level:7 log body:2019/02/06 23:21:01 [info] 2302\#0: *229 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:01 [info] 2302\#0: *230 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:01 [info] 2302\#0: *231 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:01 [info] 2302\#0: *232 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:01 [info] 2302\#0: *233 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:01 [info] 2302\#0: *234 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:01 [info] 2302\#0: *235 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:01 [info] 2302\#0: *236 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:01 [info] 2302\#0: *237 client 127.0.0.1 closed keepalive connection end maybe log lines: \#10 log level:7 log body:2019/02/06 23:21:01 [info] 2302\#0: *238 client 127.0.0.1 closed keepalive connection log level:4 log body:2019/02/06 23:21:01 [error] 2302\#0: *239 [lua] access_by_lua(nginx.conf:54):8: --> new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" end) 'maybe log lines: #10
log level:6
log body:2019/02/06 23:21:01 [notice] 1989#0: start worker processes
log level:7
log body:2019/02/06 23:21:01 [info] 2302#0: *229 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:01 [info] 2302#0: *230 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:01 [info] 2302#0: *231 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:01 [info] 2302#0: *232 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:01 [info] 2302#0: *233 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:01 [info] 2302#0: *234 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:01 [info] 2302#0: *235 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:01 [info] 2302#0: *236 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:01 [info] 2302#0: *237 client 127.0.0.1 closed keepalive connection
end
maybe log lines: #10
log level:7
log body:2019/02/06 23:21:01 [info] 2302#0: *238 client 127.0.0.1 closed keepalive connection
log level:4
log body:2019/02/06 23:21:01 [error] 2302#0: *239 [lua] access_by_lua(nginx.conf:54):8: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
'
doesn't match '(?^s:\Amaybe log lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
maybe log lines: #1
end
\z)'
errlog.t TEST 13: filter log by level(ngx.CRIT) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:10
'
expected: 'log lines:0
'
errlog.t TEST 13: filter log by level(ngx.CRIT) - response_body - response is expected (repeated req 1, req 0) got: 'log lines:1
'
expected: 'log lines:0
'
errlog.t TEST 16: check the captured error log body - response_body_like - response is expected (log level:6 log body:2019/02/06 23:21:02 [notice] 1989\#0: start worker processes log level:7 log body:2019/02/06 23:21:02 [info] 2359\#0: *271 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:02 [info] 2359\#0: *272 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:02 [info] 2359\#0: *273 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:02 [info] 2359\#0: *274 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:02 [info] 2359\#0: *275 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:02 [info] 2359\#0: *276 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:02 [info] 2359\#0: *277 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:02 [info] 2359\#0: *278 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/06 23:21:02 [info] 2359\#0: *279 client 127.0.0.1 closed keepalive connection) 'log level:6
log body:2019/02/06 23:21:02 [notice] 1989#0: start worker processes
log level:7
log body:2019/02/06 23:21:02 [info] 2359#0: *271 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:02 [info] 2359#0: *272 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:02 [info] 2359#0: *273 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:02 [info] 2359#0: *274 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:02 [info] 2359#0: *275 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:02 [info] 2359#0: *276 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:02 [info] 2359#0: *277 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:02 [info] 2359#0: *278 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/06 23:21:02 [info] 2359#0: *279 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->2, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->3, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
)'
errlog.t nginx: [emerg] invalid number of arguments in "lua_capture_error_log" directive in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:25
ocsp.t TEST 5: get OCSP responder (truncated) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "OCSP url found: http:/," should match a line in error.log (req 0)
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "still get an error: truncated" should match a line in error.log (req 0)
ocsp.t TEST 5: get OCSP responder (truncated) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "OCSP url found: http:/," should match a line in error.log (req 1)
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "still get an error: truncated" should match a line in error.log (req 1)
ocsp.t TEST 7: create OCSP request (buffer too small) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 7: create OCSP request (buffer too small) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 7: create OCSP request (buffer too small) - pattern "failed to create OCSP request: output buffer too small: 68 > 67" should match a line in error.log (req 0)
ocsp.t TEST 7: create OCSP request (buffer too small) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 7: create OCSP request (buffer too small) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 7: create OCSP request (buffer too small) - pattern "failed to create OCSP request: output buffer too small: 68 > 67" should match a line in error.log (req 1)
ocsp.t TEST 11: fail to validate OCSP response - no issuer cert - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 11: fail to validate OCSP response - no issuer cert - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 11: fail to validate OCSP response - no issuer cert - pattern "failed to validate OCSP response: no issuer certificate in chain" should match a line in error.log (req 0)
ocsp.t TEST 11: fail to validate OCSP response - no issuer cert - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 11: fail to validate OCSP response - no issuer cert - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 11: fail to validate OCSP response - no issuer cert - pattern "failed to validate OCSP response: no issuer certificate in chain" should match a line in error.log (req 1)
ocsp.t TEST 14: fail to validate OCSP response - OCSP response signed by an unknown cert and the OCSP response does not contain the unknown cert - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 14: fail to validate OCSP response - OCSP response signed by an unknown cert and the OCSP response does not contain the unknown cert - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 14: fail to validate OCSP response - OCSP response signed by an unknown cert and the OCSP response does not contain the unknown cert - pattern "failed to validate OCSP response: OCSP_basic_verify() failed" should match a line in error.log (req 0)
ocsp.t TEST 14: fail to validate OCSP response - OCSP response signed by an unknown cert and the OCSP response does not contain the unknown cert - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 14: fail to validate OCSP response - OCSP response signed by an unknown cert and the OCSP response does not contain the unknown cert - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 14: fail to validate OCSP response - OCSP response signed by an unknown cert and the OCSP response does not contain the unknown cert - pattern "failed to validate OCSP response: OCSP_basic_verify() failed" should match a line in error.log (req 1)
ocsp.t TEST 6: create OCSP request (good) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 6: create OCSP request (good) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 6: create OCSP request (good) - pattern "OCSP request created with length 68" should match a line in error.log (req 0)
ocsp.t TEST 6: create OCSP request (good) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 6: create OCSP request (good) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 6: create OCSP request (good) - pattern "OCSP request created with length 68" should match a line in error.log (req 1)
ocsp.t TEST 12: validate good OCSP response - no certs in response - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 12: validate good OCSP response - no certs in response - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 12: validate good OCSP response - no certs in response - pattern "OCSP response validation ok" should match a line in error.log (req 0)
ocsp.t TEST 12: validate good OCSP response - no certs in response - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 12: validate good OCSP response - no certs in response - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 12: validate good OCSP response - no certs in response - pattern "OCSP response validation ok" should match a line in error.log (req 1)
ocsp.t TEST 4: get OCSP responder (issuer cert not next to the leaf cert) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 4: get OCSP responder (issuer cert not next to the leaf cert) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 4: get OCSP responder (issuer cert not next to the leaf cert) - pattern "failed to get OCSP responder: issuer certificate not next to leaf" should match a line in error.log (req 0)
ocsp.t TEST 4: get OCSP responder (issuer cert not next to the leaf cert) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 4: get OCSP responder (issuer cert not next to the leaf cert) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 4: get OCSP responder (issuer cert not next to the leaf cert) - pattern "failed to get OCSP responder: issuer certificate not next to leaf" should match a line in error.log (req 1)
ocsp.t TEST 1: get OCSP responder (good case) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 1: get OCSP responder (good case) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 1: get OCSP responder (good case) - pattern "OCSP url found: http://127.0.0.1:8888/ocsp?foo=1," should match a line in error.log (req 0)
ocsp.t TEST 1: get OCSP responder (good case) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 1: get OCSP responder (good case) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 1: get OCSP responder (good case) - pattern "OCSP url found: http://127.0.0.1:8888/ocsp?foo=1," should match a line in error.log (req 1)
ocsp.t TEST 2: get OCSP responder (not found) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 2: get OCSP responder (not found) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 2: get OCSP responder (not found) - pattern "OCSP responder not found" should match a line in error.log (req 0)
ocsp.t TEST 2: get OCSP responder (not found) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 2: get OCSP responder (not found) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 2: get OCSP responder (not found) - pattern "OCSP responder not found" should match a line in error.log (req 1)
ocsp.t TEST 9: create OCSP request (no issuer cert in the chain) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 9: create OCSP request (no issuer cert in the chain) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 9: create OCSP request (no issuer cert in the chain) - pattern "failed to create OCSP request: no issuer certificate in chain" should match a line in error.log (req 0)
ocsp.t TEST 9: create OCSP request (no issuer cert in the chain) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 9: create OCSP request (no issuer cert in the chain) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 9: create OCSP request (no issuer cert in the chain) - pattern "failed to create OCSP request: no issuer certificate in chain" should match a line in error.log (req 1)
ocsp.t TEST 17: no status req from client - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/06 23:21:29 [emerg] 3104\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/06 23:21:29 [notice] 3104\#0: start worker processes
2019/02/06 23:21:29 [debug] 3104\#0: channel 4:6
2019/02/06 23:21:29 [notice] 3104\#0: start worker process 3319
2019/02/06 23:21:29 [debug] 3104\#0: pass channel s:1 pid:3319 fd:4 to s:0 pid:3297 fd:3
2019/02/06 23:21:29 [debug] 3297\#0: epoll: fd:5 ev:0001 d:0000000000B70940
2019/02/06 23:21:29 [debug] 3297\#0: channel handler
2019/02/06 23:21:29 [debug] 3297\#0: channel: 32
2019/02/06 23:21:29 [debug] 3297\#0: channel command: 1
2019/02/06 23:21:29 [debug] 3297\#0: get channel s:1 pid:3319 fd:8
'
ocsp.t TEST 13: validate OCSP response - OCSP response signed by an unknown cert and the OCSP response contains the unknown cert - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 13: validate OCSP response - OCSP response signed by an unknown cert and the OCSP response contains the unknown cert - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 13: validate OCSP response - OCSP response signed by an unknown cert and the OCSP response contains the unknown cert - pattern "OCSP response validation ok" should match a line in error.log (req 0)
ocsp.t TEST 13: validate OCSP response - OCSP response signed by an unknown cert and the OCSP response contains the unknown cert - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 13: validate OCSP response - OCSP response signed by an unknown cert and the OCSP response contains the unknown cert - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 13: validate OCSP response - OCSP response signed by an unknown cert and the OCSP response contains the unknown cert - pattern "OCSP response validation ok" should match a line in error.log (req 1)
ocsp.t TEST 15: fail to validate OCSP response - OCSP response returns revoked status - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ocsp.t TEST 15: fail to validate OCSP response - OCSP response returns revoked status - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 15: fail to validate OCSP response - OCSP response returns revoked status - pattern "failed to validate OCSP response: certificate status "revoked" in the OCSP response" should match a line in error.log (req 0)
ocsp.t TEST 15: fail to validate OCSP response - OCSP response returns revoked status - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ocsp.t TEST 15: fail to validate OCSP response - OCSP response returns revoked status - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 15: fail to validate OCSP response - OCSP response returns revoked status - pattern "failed to validate OCSP response: certificate status "revoked" in the OCSP response" should match a line in error.log (req 1)
ocsp.t TEST 16: good status req from client - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/06 23:21:31 [emerg] 3104\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/06 23:21:31 [notice] 3104\#0: start worker processes
2019/02/06 23:21:31 [debug] 3104\#0: channel 4:6
2019/02/06 23:21:31 [notice] 3104\#0: start worker process 3403
2019/02/06 23:21:31 [debug] 3104\#0: pass channel s:1 pid:3403 fd:4 to s:0 pid:3384 fd:3
2019/02/06 23:21:31 [debug] 3384\#0: epoll: fd:5 ev:0001 d:0000000000B53400
2019/02/06 23:21:31 [debug] 3384\#0: channel handler
2019/02/06 23:21:31 [debug] 3384\#0: channel: 32
2019/02/06 23:21:31 [debug] 3384\#0: channel command: 1
2019/02/06 23:21:31 [debug] 3384\#0: get channel s:1 pid:3403 fd:6
'
semaphore.t TEST 13: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 1) @@ -1,2 +1,3 @@
sem: 1 while logging request,
sem: API disabled in the context of log_by_lua* while logging request,
+sem: timeout,
'
semaphore.t TEST 26: kill a light thread that is waiting on a semaphore (no resource) - pattern "[error]" should not match any line in error.log but matches line "2019/02/06 23:23:29 [error] 8757\#0: *179 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/02/06 23:23:29 [debug] 8757\#0: http lua semaphore wait: 00007F55407CF028, timeout: 1000, resources: 0, event posted: 0
2019/02/06 23:23:29 [debug] 8757\#0: *179 event timer add: 0: 1000:8578410
2019/02/06 23:23:29 [debug] 8757\#0: http lua semaphore wait yielding
2019/02/06 23:23:29 [debug] 8757\#0: *179 lua resume returned 1
2019/02/06 23:23:29 [debug] 8757\#0: *179 lua thread yielded
2019/02/06 23:23:29 [debug] 8757\#0: *179 lua run thread returned -2
2019/02/06 23:23:29 [debug] 8757\#0: worker cycle
2019/02/06 23:23:29 [debug] 8757\#0: epoll timer: 1000
2019/02/06 23:23:29 [debug] 8837\#0: epoll: fd:9 ev:0001 d:000000000210DB10
'
semaphore.t TEST 25: two thread wait for each other - pattern "[error]" should not match any line in error.log but matches line "2019/02/06 23:23:30 [error] 8757\#0: *179 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/02/06 23:23:30 [debug] 8757\#0: http lua semaphore wait: 00007F55407CF028, timeout: 1000, resources: 0, event posted: 0
2019/02/06 23:23:30 [debug] 8757\#0: *179 event timer add: 0: 1000:8579410
2019/02/06 23:23:30 [debug] 8757\#0: http lua semaphore wait yielding
2019/02/06 23:23:30 [debug] 8757\#0: *179 lua resume returned 1
2019/02/06 23:23:30 [debug] 8757\#0: *179 lua thread yielded
2019/02/06 23:23:30 [debug] 8757\#0: *179 lua run thread returned -2
2019/02/06 23:23:30 [debug] 8757\#0: worker cycle
'
semaphore.t TEST 18: semaphore wait post in access_by_lua - pattern "[error]" should not match any line in error.log but matches line "2019/02/06 23:23:33 [error] 8757\#0: *179 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/02/06 23:23:33 [debug] 8757\#0: http lua semaphore wait: 00007F55407CF028, timeout: 1000, resources: 0, event posted: 0
2019/02/06 23:23:33 [debug] 8757\#0: *179 event timer add: 0: 1000:8582410
2019/02/06 23:23:33 [debug] 8757\#0: http lua semaphore wait yielding
2019/02/06 23:23:33 [debug] 8757\#0: *179 lua resume returned 1
2019/02/06 23:23:33 [debug] 8757\#0: *179 lua thread yielded
2019/02/06 23:23:33 [debug] 8757\#0: *179 lua run thread returned -2
2019/02/06 23:23:33 [debug] 8757\#0: worker cycle
'
semaphore.t TEST 16: semaphore in ngx.timer (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
sem: timeout,
sem: 1,
+sem: timeout,
'
semaphore.t TEST 10: semaphore in rewrite_by_lua (all allowed) - grep_error_log_out (req 1) @@ -1,2 +1,3 @@
sem: timeout,
sem: 1,
+sem: timeout,
'
ssl-session-fetch.t TEST 6: store new session, and resume it, avoid memory leak when calling repeatly - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 6: store new session, and resume it, avoid memory leak when calling repeatly - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 4: attempt to resume a corrupted session - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 4: attempt to resume a corrupted session - grep_error_log_out (req 0) ''
doesn't match '(?^s:^ssl_session_store_by_lua_block:5: session id: [a-fA-F\d]+$)'
ssl-session-fetch.t TEST 4: attempt to resume a corrupted session - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 4: attempt to resume a corrupted session - grep_error_log_out (req 1) ''
doesn't match '(?^s:^ssl_session_fetch_by_lua_block:4: session id: [a-fA-F\d]+
failed to resume session: failed to de-serialize session
ssl_session_store_by_lua_block:5: session id: [a-fA-F\d]+
$)'
ssl-session-fetch.t TEST 2: attempt to fetch new session in lua_ctx during resumption. - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 2: attempt to fetch new session in lua_ctx during resumption. - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 2: attempt to fetch new session in lua_ctx during resumption. - grep_error_log_out (req 1) got: ''
expected: 'get session error: bad session in lua context
'
ssl-session-fetch.t TEST 1: get resume session id serialized - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 1: get resume session id serialized - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 1: get resume session id serialized - grep_error_log_out (req 1) ''
doesn't match '(?^s:ssl_session_fetch_by_lua_block:4: session id: [a-fA-f\d]+)'
ssl-session-store.t TEST 3: store the session via timer to memcached - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-store.t TEST 3: store the session via timer to memcached - pattern "(?^s:ssl_session_store_by_lua_block:32: session id: [a-fA-f\d]+)" should match a line in error.log (req 0)
ssl-session-store.t TEST 3: store the session via timer to memcached - pattern "(?^s:ssl_session_store_by_lua_block:34: session size: \d+)" should match a line in error.log (req 0)
ssl-session-store.t TEST 3: store the session via timer to memcached - pattern "(?^s:received memc reply: STORED)" should match a line in error.log (req 0)
ssl-session-store.t TEST 3: store the session via timer to memcached - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-store.t TEST 3: store the session via timer to memcached - pattern "(?^s:ssl_session_store_by_lua_block:32: session id: [a-fA-f\d]+)" should match a line in error.log (req 1)
ssl-session-store.t TEST 3: store the session via timer to memcached - pattern "(?^s:ssl_session_store_by_lua_block:34: session size: \d+)" should match a line in error.log (req 1)
ssl-session-store.t TEST 3: store the session via timer to memcached - pattern "(?^s:received memc reply: STORED)" should match a line in error.log (req 1)
ssl-session-store.t TEST 1: get new session serialized - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-store.t TEST 1: get new session serialized - pattern "(?^s:ssl_session_store_by_lua_block:4: session size: \d+)" should match a line in error.log (req 0)
ssl-session-store.t TEST 1: get new session serialized - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-store.t TEST 1: get new session serialized - pattern "(?^s:ssl_session_store_by_lua_block:4: session size: \d+)" should match a line in error.log (req 1)
ssl.t TEST 20: read client addr via ssl.raw_client_addr() - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/06 23:24:11 [emerg] 10828\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/06 23:24:11 [notice] 10828\#0: start worker processes
2019/02/06 23:24:11 [debug] 10828\#0: channel 3:5
2019/02/06 23:24:11 [notice] 10828\#0: start worker process 10856
2019/02/06 23:24:11 [debug] 10828\#0: pass channel s:0 pid:10856 fd:3 to s:1 pid:10836 fd:4
2019/02/06 23:24:11 [debug] 10836\#0: epoll: fd:6 ev:0001 d:0000000000B03280
2019/02/06 23:24:11 [debug] 10836\#0: channel handler
2019/02/06 23:24:11 [debug] 10836\#0: channel: 32
2019/02/06 23:24:11 [debug] 10836\#0: channel command: 1
2019/02/06 23:24:11 [debug] 10836\#0: get channel s:0 pid:10856 fd:5
'
ssl.t TEST 1: clear certs - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ssl.t TEST 1: clear certs - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ssl.t TEST 1: clear certs - pattern "sslv3 alert handshake failure" should match a line in error.log (req 0)
ssl.t TEST 1: clear certs - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ssl.t TEST 1: clear certs - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ssl.t TEST 1: clear certs - pattern "sslv3 alert handshake failure" should match a line in error.log (req 1)
ssl.t TEST 19: parse PEM cert and key to cdata (bad priv key) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ssl.t TEST 19: parse PEM cert and key to cdata (bad priv key) - pattern "(?^:\[error\] .*? failed to parse pem key: PEM_read_bio_PrivateKey\(\) failed)" should match a line in error.log (req 0)
ssl.t TEST 19: parse PEM cert and key to cdata (bad priv key) - pattern "[crit]" should not match any line in error.log but matches line "2019/02/06 23:24:12 [crit] 10917\#0: *100 connect() to unix:/home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 0) 2019/02/06 23:24:12 [debug] 10917\#0: *100 reusable connection: 0
2019/02/06 23:24:12 [debug] 10917\#0: *100 malloc: 0000000000B39220:24
2019/02/06 23:24:12 [debug] 10917\#0: *100 malloc: 0000000000B81C80:16
2019/02/06 23:24:12 [debug] 10917\#0: *100 http cleanup add: 0000000000B39220
2019/02/06 23:24:12 [debug] 10917\#0: *100 lua tcp socket connect: -5
2019/02/06 23:24:12 [debug] 10917\#0: *100 lua tcp socket error retval handler
2019/02/06 23:24:12 [debug] 10917\#0: *100 lua finalize socket
2019/02/06 23:24:12 [debug] 10917\#0: *100 lua http cleanup free: 0000000000B39220
2019/02/06 23:24:12 [debug] 10917\#0: *100 malloc: 0000000000B81CA0:16
'
ssl.t TEST 19: parse PEM cert and key to cdata (bad priv key) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ssl.t TEST 19: parse PEM cert and key to cdata (bad priv key) - pattern "(?^:\[error\] .*? failed to parse pem key: PEM_read_bio_PrivateKey\(\) failed)" should match a line in error.log (req 1)
ssl.t TEST 19: parse PEM cert and key to cdata (bad priv key) - pattern "[crit]" should not match any line in error.log but matches line "2019/02/06 23:24:12 [crit] 10917\#0: *102 connect() to unix:/home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 1) 2019/02/06 23:24:12 [debug] 10917\#0: *102 reusable connection: 0
2019/02/06 23:24:12 [debug] 10917\#0: *102 malloc: 0000000000B00370:24
2019/02/06 23:24:12 [debug] 10917\#0: *102 malloc: 0000000000B003C0:16
2019/02/06 23:24:12 [debug] 10917\#0: *102 http cleanup add: 0000000000B00370
2019/02/06 23:24:12 [debug] 10917\#0: *102 lua tcp socket connect: -5
2019/02/06 23:24:12 [debug] 10917\#0: *102 lua tcp socket error retval handler
2019/02/06 23:24:12 [debug] 10917\#0: *102 lua finalize socket
2019/02/06 23:24:12 [debug] 10917\#0: *102 lua http cleanup free: 0000000000B00370
2019/02/06 23:24:12 [debug] 10917\#0: *102 malloc: 0000000000B003E0:16
'
ssl.t TEST 12: tls version - TLSv1.1 - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/06 23:24:12 [emerg] 10828\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/06 23:24:12 [notice] 10828\#0: start worker processes
2019/02/06 23:24:12 [debug] 10828\#0: channel 3:5
2019/02/06 23:24:12 [notice] 10828\#0: start worker process 10936
2019/02/06 23:24:12 [debug] 10828\#0: pass channel s:0 pid:10936 fd:3 to s:1 pid:10917 fd:4
2019/02/06 23:24:12 [debug] 10917\#0: epoll: fd:6 ev:0001 d:0000000000B46E60
2019/02/06 23:24:12 [debug] 10917\#0: channel handler
2019/02/06 23:24:12 [debug] 10917\#0: channel: 32
2019/02/06 23:24:12 [debug] 10917\#0: channel command: 1
2019/02/06 23:24:12 [debug] 10917\#0: get channel s:0 pid:10936 fd:5
'
ssl.t TEST 15: read PEM key chain but set DER key chain - response_body - response is expected (repeated req 0, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 15: read PEM key chain but set DER key chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ssl.t TEST 15: read PEM key chain but set DER key chain - response_body - response is expected (repeated req 1, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 15: read PEM key chain but set DER key chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ssl.t TEST 16: parse PEM cert and key to cdata - response_body - response is expected (repeated req 0, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 16: parse PEM cert and key to cdata - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ssl.t TEST 16: parse PEM cert and key to cdata - response_body - response is expected (repeated req 1, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 16: parse PEM cert and key to cdata - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ssl.t TEST 11: tls version - TLSv1 - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/06 23:24:14 [emerg] 10828\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/06 23:24:14 [notice] 10828\#0: start worker processes
2019/02/06 23:24:14 [debug] 10828\#0: channel 3:5
2019/02/06 23:24:14 [notice] 10828\#0: start worker process 11057
2019/02/06 23:24:14 [debug] 10828\#0: pass channel s:0 pid:11057 fd:3 to s:1 pid:11037 fd:4
2019/02/06 23:24:14 [debug] 11037\#0: epoll: fd:6 ev:0001 d:0000000000B9BA50
2019/02/06 23:24:14 [debug] 11037\#0: channel handler
2019/02/06 23:24:14 [debug] 11037\#0: channel: 32
2019/02/06 23:24:14 [debug] 11037\#0: channel command: 1
2019/02/06 23:24:14 [debug] 11037\#0: get channel s:0 pid:11057 fd:5
'
ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - response_body - response is expected (repeated req 0, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "(?^:Using unix socket file .*?nginx\.sock)" should match a line in error.log (req 0)
ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - response_body - response is expected (repeated req 1, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "(?^:Using unix socket file .*?nginx\.sock)" should match a line in error.log (req 1)
ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - pattern "(?^:\[error\] .*? failed to parse pem cert: PEM_read_bio_X509\(\) failed)" should match a line in error.log (req 0)
ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - pattern "[crit]" should not match any line in error.log but matches line "2019/02/06 23:24:16 [crit] 11115\#0: *289 connect() to unix:/home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 0) 2019/02/06 23:24:16 [debug] 11115\#0: *289 reusable connection: 0
2019/02/06 23:24:16 [debug] 11115\#0: *289 malloc: 0000000000B54650:24
2019/02/06 23:24:16 [debug] 11115\#0: *289 malloc: 0000000000B93E70:16
2019/02/06 23:24:16 [debug] 11115\#0: *289 http cleanup add: 0000000000B54650
2019/02/06 23:24:16 [debug] 11115\#0: *289 lua tcp socket connect: -5
2019/02/06 23:24:16 [debug] 11115\#0: *289 lua tcp socket error retval handler
2019/02/06 23:24:16 [debug] 11115\#0: *289 lua finalize socket
2019/02/06 23:24:16 [debug] 11115\#0: *289 lua http cleanup free: 0000000000B54650
2019/02/06 23:24:16 [debug] 11115\#0: *289 malloc: 0000000000B92BA0:16
'
ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - pattern "(?^:\[error\] .*? failed to parse pem cert: PEM_read_bio_X509\(\) failed)" should match a line in error.log (req 1)
ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - pattern "[crit]" should not match any line in error.log but matches line "2019/02/06 23:24:16 [crit] 11115\#0: *291 connect() to unix:/home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 1) 2019/02/06 23:24:16 [debug] 11115\#0: *291 reusable connection: 0
2019/02/06 23:24:16 [debug] 11115\#0: *291 malloc: 0000000000B54650:24
2019/02/06 23:24:16 [debug] 11115\#0: *291 malloc: 0000000000B93E70:16
2019/02/06 23:24:16 [debug] 11115\#0: *291 http cleanup add: 0000000000B54650
2019/02/06 23:24:16 [debug] 11115\#0: *291 lua tcp socket connect: -5
2019/02/06 23:24:16 [debug] 11115\#0: *291 lua tcp socket error retval handler
2019/02/06 23:24:16 [debug] 11115\#0: *291 lua finalize socket
2019/02/06 23:24:16 [debug] 11115\#0: *291 lua http cleanup free: 0000000000B54650
2019/02/06 23:24:16 [debug] 11115\#0: *291 malloc: 0000000000B824D0:16
'
ssl.t TEST 10: tls version - SSLv3 - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/06 23:24:18 [emerg] 10828\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/06 23:24:18 [notice] 10828\#0: start worker processes
2019/02/06 23:24:18 [debug] 10828\#0: channel 4:6
2019/02/06 23:24:18 [notice] 10828\#0: start worker process 11209
2019/02/06 23:24:18 [debug] 10828\#0: pass channel s:1 pid:11209 fd:4 to s:0 pid:11186 fd:3
2019/02/06 23:24:18 [debug] 11186\#0: epoll: fd:5 ev:0001 d:0000000000B9D6A0
2019/02/06 23:24:18 [debug] 11186\#0: channel handler
2019/02/06 23:24:18 [debug] 11186\#0: channel: 32
2019/02/06 23:24:18 [debug] 11186\#0: channel command: 1
2019/02/06 23:24:18 [debug] 11186\#0: get channel s:1 pid:11209 fd:6
'

Warnings

Go back to the index page.