Skip to content

Commit 9523aa0

Browse files
committed
tests: test with valgrind in CI
1 parent d05e8b5 commit 9523aa0

File tree

2 files changed

+27
-7
lines changed

2 files changed

+27
-7
lines changed

.travis.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@ os: linux
55

66
language: c
77

8-
env:
9-
globals:
10-
- TEST_NGINX_BINARY=openresty
11-
128
addons:
139
apt:
1410
packages:
1511
- cpanminus
1612
- luarocks
13+
- valgrind
1714

1815
before_install:
1916
- sudo luarocks install luacheck
@@ -25,9 +22,10 @@ install:
2522
- sudo apt-get -y install software-properties-common
2623
- sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main"
2724
- sudo apt-get update
28-
- sudo apt-get install -y --no-install-recommends openresty
25+
- sudo apt-get install -y --no-install-recommends openresty-valgrind openresty-valgrind-dbgsym
2926

3027
script:
31-
- export PATH=$PATH:/usr/local/openresty/nginx/sbin
32-
- openresty -V
28+
- export PATH=$PATH:/usr/local/openresty-valgrind/nginx/sbin
29+
- nginx -V
3330
- make test
31+
- TEST_NGINX_USE_VALGRIND=1 TEST_USE_HUP=1 TEST_NGINX_SLEEP=1 prove -r t

valgrind.suppress

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
<insert_a_suppression_name_here>
3+
Memcheck:Leak
4+
match-leak-kinds: definite
5+
fun:malloc
6+
fun:ngx_alloc
7+
fun:ngx_set_environment
8+
}
9+
{
10+
<insert_a_suppression_name_here>
11+
Memcheck:Leak
12+
match-leak-kinds: definite
13+
fun:malloc
14+
fun:ngx_alloc
15+
fun:ngx_event_process_init
16+
}
17+
{
18+
<insert_a_suppression_name_here>
19+
Memcheck:Param
20+
epoll_ctl(event)
21+
fun:epoll_ctl
22+
}

0 commit comments

Comments
 (0)