Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ test:
override:
- cd tools/lkl && make -j8
- cd tools/lkl && make test
- cd tools/lkl && make valgrind:
timeout: 1800 # timeout to 30mins
- ? >
if [ -n "${RUN_NIGHTLY_BUILD}" ]; then
cd tools/lkl && make valgrind;
fi
: timeout: 1800 # timeout to 30mins

post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find ./tools/lkl/ -type f -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/ \;
7 changes: 6 additions & 1 deletion tools/lkl/tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
define valgrind_test
VALGRIND_CMD="valgrind --xml=yes --xml-file=valgrind-$1.xml" \
VALGRIND_CMD="valgrind --suppressions=valgrind.supp --leak-check=full --show-leak-kinds=all --xml=yes --xml-file=valgrind-$1.xml" \
./boot.sh -t $1 ; \
./valgrind2xunit.py valgrind-$1.xml
endef

define valgrind_test_text
VALGRIND_CMD="valgrind --suppressions=valgrind.supp --leak-check=full --show-leak-kinds=all" \
./boot.sh -t $1
endef

all:
./boot.sh -t ext4
./boot.sh -t btrfs
Expand Down
130 changes: 130 additions & 0 deletions tools/lkl/tests/valgrind.supp
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
<unfinished thread>
Memcheck:Leak
match-leak-kinds: possible
...
fun:thread_create
fun:copy_thread
fun:copy_thread_tls
...
fun:kthreadd
fun:thread_bootstrap
fun:start_thread
}

{
<unfinished timer 1>
Memcheck:Leak
match-leak-kinds: possible
...
fun:pthread_create@@GLIBC_2.2.5
fun:__start_helper_thread
fun:pthread_once
fun:timer_create@@GLIBC_2.3.3
fun:timer_alloc
fun:clockevent_set_state_oneshot
...
fun:__clockevents_switch_state
fun:clockevents_switch_state
fun:tick_setup_periodic
...
}

{
<kernel thread>
Memcheck:Leak
match-leak-kinds: possible
...
fun:pthread_create@@GLIBC_2.2.5
fun:thread_create
fun:copy_thread
fun:copy_thread_tls
...
fun:rest_init
fun:start_kernel
fun:lkl_run_kernel
}

{
<master thread>
Memcheck:Leak
match-leak-kinds: definite
...
fun:pthread_create@@GLIBC_2.2.5
fun:thread_create
fun:lkl_start_kernel
fun:main
}

{
<master timer thread>
Memcheck:Leak
match-leak-kinds: possible
...
fun:pthread_create@@GLIBC_2.2.5
fun:timer_helper_thread
...
}

{
<unfinished timer 2>
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
fun:timer_create@@GLIBC_2.3.3
fun:timer_alloc
fun:clockevent_set_state_oneshot
...
fun:clockevents_switch_state
fun:tick_setup_periodic
...
fun:tick_check_new_device
fun:clockevents_register_device
fun:clockevents_config_and_register
fun:time_init
...
}

{
<test boot.c ignore 1>
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
fun:lkl_disk_add
fun:test_disk_add
fun:do_test
fun:main
}

{
<test boot.c ignore 2>
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
fun:virtio_dev_setup
fun:lkl_disk_add
fun:test_disk_add
fun:do_test
fun:main
}

{
<test boot.c ignore 3>
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
fun:register_iomem
fun:virtio_dev_setup
fun:lkl_disk_add
fun:test_disk_add
fun:do_test
fun:main
}

{
<test boot.c ignore 4>
Memcheck:Param
unlink(pathname)
fun:unlink
fun:main
}