From 08542017d619900f6df7fc90b6f0a91475bfd4d7 Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Wed, 14 Jun 2017 16:50:13 +0300 Subject: [PATCH 1/4] test: l2fwd pass under coverage env variable TEST=coverage is set, use it to not fail under gcov run which is really slow. Signed-off-by: Maxim Uvarov --- test/common_plat/performance/odp_l2fwd_run.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/common_plat/performance/odp_l2fwd_run.sh b/test/common_plat/performance/odp_l2fwd_run.sh index dd42ede975..6871e4b079 100755 --- a/test/common_plat/performance/odp_l2fwd_run.sh +++ b/test/common_plat/performance/odp_l2fwd_run.sh @@ -96,6 +96,9 @@ run_l2fwd() ret=1 elif [ $ret -eq 0 ]; then PASS_PPS=5000 + if [ "${TEST}" = "coverage" ]; then + PASS_PPS=10 + fi MAX_PPS=$(awk '/TEST RESULT/ {print $3}' $LOG) if [ "$MAX_PPS" -lt "$PASS_PPS" ]; then echo "FAIL: pps below threshold $MAX_PPS < $PASS_PPS" From d3f52f702c026dd72fe6e5f7af6b565230f7b5cf Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Wed, 14 Jun 2017 23:45:31 +0300 Subject: [PATCH 2/4] build: fix order of test execution l2fwd perf test requires odp_generator from examples. Make sure that examples already build when make check is run. https://bugs.linaro.org/show_bug.cgi?id=2938 Signed-off-by: Maxim Uvarov --- Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 2a9a658df3..daa4978862 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,10 +8,10 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --enable-test-cpp \ #@with_platform@ works alone in subdir but not as part of a path??? SUBDIRS = @platform_with_platform@ \ helper \ - test \ helper/test \ doc \ - example + example . \ + test @DX_RULES@ From 1cc4d2c01dd7ad356746cfa799c4e62f191b4413 Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Thu, 15 Jun 2017 16:04:55 +0300 Subject: [PATCH 3/4] travis: add sudo run make check make check has to be under root to validate pktio like raw sockets. Also odp temporary files can overlap with previous root run and permission to overwrite that files is needed. Signed-off-by: Maxim Uvarov --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d1ca5a66cb..64f4ff88ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -130,7 +130,7 @@ jobs: script: - ./bootstrap - ./configure --prefix=$HOME/odp-install --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-user-guides --enable-test-perf-proc --enable-test-example --with-dpdk-path=`pwd`/dpdk/${TARGET} --with-netmap-path=`pwd`/netmap CFLAGS="-O0 -coverage" CXXFLAGS="-O0 -coverage" LDFLAGS="--coverage" - - make check -j $(nproc) + - sudo LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" PATH=${PATH//:\.\/node_modules\/\.bin/} make check -j ${nproc} - find . -type f -iname '*.[ch]' -not -path ".git/*" -execdir gcov {} \; ; bash <(curl -s https://codecov.io/bash) -X coveragepy - stage: test env: TEST=distcheck @@ -138,7 +138,7 @@ jobs: script: - ./bootstrap - ./configure - - make distcheck + - sudo LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make distcheck - stage: test env: TEST=doxygen compiler: gcc From 328615e5348c6090d1fba8decba09c52365d798d Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Thu, 15 Jun 2017 17:02:43 +0300 Subject: [PATCH 4/4] travis: do not run performance test in parallel under coverage Performance tests have some limits to detect if they pass or fail but under coverage execution is slow, running tests in parallel is also very slow. Without that patch scheduler test simetimes fails. Signed-off-by: Maxim Uvarov --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 64f4ff88ab..1bc82b3c00 100644 --- a/.travis.yml +++ b/.travis.yml @@ -130,7 +130,7 @@ jobs: script: - ./bootstrap - ./configure --prefix=$HOME/odp-install --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-user-guides --enable-test-perf-proc --enable-test-example --with-dpdk-path=`pwd`/dpdk/${TARGET} --with-netmap-path=`pwd`/netmap CFLAGS="-O0 -coverage" CXXFLAGS="-O0 -coverage" LDFLAGS="--coverage" - - sudo LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" PATH=${PATH//:\.\/node_modules\/\.bin/} make check -j ${nproc} + - sudo LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" PATH=${PATH//:\.\/node_modules\/\.bin/} make check - find . -type f -iname '*.[ch]' -not -path ".git/*" -execdir gcov {} \; ; bash <(curl -s https://codecov.io/bash) -X coveragepy - stage: test env: TEST=distcheck