Skip to content

Commit 6a8947b

Browse files
romanmichalvasko
authored andcommitted
test_pam UPDATE suppression files for test_pam
Created valgrind and leak sanitizer suppression files for test_pam, because of a bug in pam 1.4.x, which causes a memory leak.
1 parent 959d352 commit 6a8947b

5 files changed

Lines changed: 44 additions & 17 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ jobs:
8585
make-target: ""
8686
}
8787
- {
88-
name: "SSH Only",
89-
os: "ubuntu-18.04",
88+
name: "SSH Only, Ubuntu 22.04",
89+
os: "ubuntu-22.04",
9090
build-type: "Debug",
9191
dep-build-type: "Release",
9292
cc: "gcc",
@@ -134,7 +134,7 @@ jobs:
134134
}
135135
- {
136136
name: "ABI Check",
137-
os: "ubuntu-latest",
137+
os: "ubuntu-18.04",
138138
build-type: "ABICheck",
139139
dep-build-type: "Debug",
140140
cc: "gcc",
@@ -148,10 +148,15 @@ jobs:
148148
steps:
149149
- uses: actions/checkout@v2
150150

151-
- name: Deps-packages
151+
- name: libssh 0.7 repo
152+
if: matrix.config.os == 'ubuntu-18.04' || matrix.config.os == 'ubuntu-20.04'
152153
shell: bash
153154
run: |
154155
sudo add-apt-repository ppa:kedazo/libssh-0.7.x -y
156+
157+
- name: Deps-packages
158+
shell: bash
159+
run: |
155160
sudo apt-get update
156161
sudo apt-get install $DEFAULT_PACKAGES ${{ matrix.config.packages }}
157162
if ${{ matrix.config.snaps != '' }}
@@ -210,4 +215,6 @@ jobs:
210215
- name: Test
211216
shell: bash
212217
working-directory: ${{ github.workspace }}/build
213-
run: ctest --output-on-failure
218+
run: |
219+
export LSAN_OPTIONS=suppressions=${{ github.workspace }}/tests/library_lsan.supp
220+
ctest --output-on-failure

tests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ endforeach()
7171
if(ENABLE_VALGRIND_TESTS)
7272
foreach(test_name IN LISTS tests)
7373
add_test(${test_name}_valgrind valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1
74-
--suppressions=${PROJECT_SOURCE_DIR}/tests/ld.supp ${CMAKE_BINARY_DIR}/tests/${test_name})
74+
--suppressions=${PROJECT_SOURCE_DIR}/tests/library_valgrind.supp ${CMAKE_BINARY_DIR}/tests/${test_name})
7575
endforeach()
7676

7777
foreach(test_name IN LISTS client_tests)
7878
add_test(${test_name}_valgrind valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1
79-
--suppressions=${PROJECT_SOURCE_DIR}/tests/ld.supp ${CMAKE_BINARY_DIR}/tests/${test_name})
79+
--suppressions=${PROJECT_SOURCE_DIR}/tests/library_valgrind.supp ${CMAKE_BINARY_DIR}/tests/${test_name})
8080
endforeach()
8181
endif()
8282

tests/ld.supp

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/library_lsan.supp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
leak:libpam.so

tests/library_valgrind.supp

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
ld
3+
Memcheck:Leak
4+
match-leak-kinds: reachable
5+
fun:calloc
6+
fun:_dlerror_run
7+
fun:dlopen@@GLIBC_2.2.5
8+
fun:lyext_load_plugins
9+
fun:ly_ctx_new
10+
}
11+
{
12+
CI:test_pam:pam_start_confdir
13+
Memcheck:Leak
14+
match-leak-kinds: definite
15+
fun:malloc
16+
...
17+
fun:server_thread
18+
fun:start_thread
19+
fun:clone
20+
}
21+
{
22+
test_pam:pam_start_confdir
23+
Memcheck:Leak
24+
match-leak-kinds: definite
25+
fun:malloc
26+
...
27+
fun:server_thread
28+
fun:clone
29+
}

0 commit comments

Comments
 (0)