From 292487884c7fa73aa1ffba28b0b48beb25d42733 Mon Sep 17 00:00:00 2001 From: Hajime Tazaki Date: Sat, 6 Jan 2018 00:47:26 +0900 Subject: [PATCH 1/2] lkl: avoid using file function of make for older GNU make With make version 4.0, make -f Makefile.autoconf crashes, and with version 3.8, it will not create the output file (Makefile.conf) at all. This issues are due to the (relatively) new feature of GNU make, the file function. This commit fixes those issue by rewriting file function statements by echo commands. This also fixes #403. Fixes: 2030bf6e0e86 ("lkl tools: improve the build system") Signed-off-by: Hajime Tazaki --- tools/lkl/Makefile.autoconf | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/lkl/Makefile.autoconf b/tools/lkl/Makefile.autoconf index 4006ba4956000c..5e545bd54597ea 100644 --- a/tools/lkl/Makefile.autoconf +++ b/tools/lkl/Makefile.autoconf @@ -2,8 +2,9 @@ POSIX_HOSTS=elf64-x86-64 elf32-i386 elf64-x86-64-freebsd elf32-littlearm elf64-l NT_HOSTS=pe-i386 pe-x86-64 define set_autoconf_var - $(file >> $(OUTPUT)/include/autoconf.h,#define LKL_HOST_CONFIG_$(1) $(2)) - $(file >> $(OUTPUT)/tests/autoconf.sh,LKL_HOST_CONFIG_$(1)=$(2)) + $(shell echo "#define LKL_HOST_CONFIG_$(1) $(2)" \ + >> $(OUTPUT)/include/autoconf.h) + $(shell echo "LKL_HOST_CONFIG_$(1)=$(2)" >> $(OUTPUT)/tests/autoconf.sh) export LKL_HOST_CONFIG_$(1)=$(2) endef @@ -85,7 +86,10 @@ define do_autoconf $(if $(filter $(LD_FMT),$(NT_HOSTS)),$(call nt_host,$(LD_FMT))) endef +export do_autoconf + + $(OUTPUT)Makefile.conf: Makefile.autoconf - $(file > $(OUTPUT)/include/autoconf.h) - $(file > $(OUTPUT)/tests/autoconf.sh) - $(file > $(OUTPUT)/Makefile.conf,$(call do_autoconf)) + $(shell echo -n "" > $(OUTPUT)/include/autoconf.h) + $(shell echo -n "" > $(OUTPUT)/tests/autoconf.sh) + @echo "$$do_autoconf" > $(OUTPUT)/Makefile.conf From a4bbfd1bc1b7e57299e1ae9e7653e0c0d8dd6dbc Mon Sep 17 00:00:00 2001 From: Hajime Tazaki Date: Sat, 6 Jan 2018 22:29:29 +0900 Subject: [PATCH 2/2] lkl: fix nightly valgrind test The commit recovers the timeout variable of an execution of valgrind session (30mins) so that long execution of valgrind will be waited by the end of tests. Additionally net pipe test is skipped due to long duration of test preparation. And the valgrind-installed image is also used from docker hub. Signed-off-by: Hajime Tazaki --- .circleci/config.yml | 10 ++++++++-- tools/lkl/tests/net.sh | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1efb9559fe13f1..4c3745389685cc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -70,7 +70,13 @@ do_steps: &do_steps command: | mkdir -p ~/junit make -C tools/lkl run-tests tests="--junit-dir ~/junit" + # convert valgrind test results + if [[ -n "$VALGRIND" ]]; then + cd ./tools/lkl/ && find ./ -type f -name "valgrind-*.xml" \ + -exec ./tests/valgrind2xunit.py {} \; + fi find ./tools/lkl/ -type f -name "*.xml" -exec mv {} ~/junit/ \; + no_output_timeout: "30m" - store_test_results: path: ~/junit - store_artifacts: @@ -80,7 +86,7 @@ do_steps: &do_steps jobs: x86_64: docker: - - image: lkldocker/circleci-x86_64:0.3 + - image: lkldocker/circleci-x86_64:0.5 environment: CROSS_COMPILE: "" MKARG: "dpdk=yes" @@ -113,7 +119,7 @@ jobs: x86_64_valgrind: docker: - - image: lkldocker/circleci-x86_64:0.3 + - image: lkldocker/circleci-x86_64:0.5 environment: CROSS_COMPILE: "" MKARG: "dpdk=yes" diff --git a/tools/lkl/tests/net.sh b/tools/lkl/tests/net.sh index 6231705a4f0e44..e4c325a2117eca 100755 --- a/tools/lkl/tests/net.sh +++ b/tools/lkl/tests/net.sh @@ -58,6 +58,10 @@ setup_backend() "loopback") ;; "pipe") + if [ -n "$VALGRIND" ]; then + echo "pipe test with valgrind takes so long: skip" + return $TEST_SKIP + fi if [ -z $(lkl_test_cmd which mkfifo) ]; then echo "no mkfifo command" return $TEST_SKIP