diff --git a/ci/config-docker.jenkinsfile b/ci/config-docker.jenkinsfile index 6a157602f..3a2cdfa2c 100644 --- a/ci/config-docker.jenkinsfile +++ b/ci/config-docker.jenkinsfile @@ -4,6 +4,7 @@ env.PREFIX = '/home/intel/graphene_install/usr' env.DOCKER_ARGS_COMMON = """ --device=/dev/kmsg:/dev/kmsg --env=PATH=${env.PREFIX}/bin:${env.PATH} + --volume=/usr/bin/stress-ng:/usr/bin/stress-ng """ env.DOCKER_ARGS_SGX = ''' --volume=/lib/modules:/lib/modules:ro diff --git a/ci/linux-direct-centos8.2-gcc-release.jenkinsfile b/ci/linux-direct-centos8.2-gcc-release.jenkinsfile index 6aeafb42b..a15fbacce 100644 --- a/ci/linux-direct-centos8.2-gcc-release.jenkinsfile +++ b/ci/linux-direct-centos8.2-gcc-release.jenkinsfile @@ -15,6 +15,7 @@ node(node_label) { dir ("graphene") { sh 'cp -rf $WORKSPACE/ltp_src LibOS/shim/test/ltp/' sh 'cp -rf $WORKSPACE/ltp_config/* LibOS/shim/test/ltp/' + sh 'cp -rf $WORKSPACE/stress-ng Examples/' env.WORKSPACE = env.WORKSPACE + "/graphene" sh 'sed -i -e \'s/dent != g_dentry_root && dent->state & DENTRY_VALID/0/\' \ @@ -32,6 +33,7 @@ node(node_label) { load '../ci/stage-build-nosgx.jenkinsfile' load '../ci/stage-test.jenkinsfile' load '../ci/stage-test-direct.jenkinsfile' + load '../ci/stage-test-stress-ng.jenkinsfile' } } finally { stage('cleanup'){ diff --git a/ci/linux-direct-ubuntu18.04-gcc-release.jenkinsfile b/ci/linux-direct-ubuntu18.04-gcc-release.jenkinsfile index 85ead44d4..f5c07b3d6 100644 --- a/ci/linux-direct-ubuntu18.04-gcc-release.jenkinsfile +++ b/ci/linux-direct-ubuntu18.04-gcc-release.jenkinsfile @@ -4,7 +4,8 @@ node(node_label) { try { stage('checkout'){ dir ('./') { - git url: 'https://github.com/jinengandhi-intel/graphene_local_ci.git' + git url: 'https://github.com/jinengandhi-intel/graphene_local_ci.git', + branch: 'stress_ng_ci' } dir('graphene') { @@ -15,6 +16,7 @@ node(node_label) { dir ("graphene") { sh 'cp -rf $WORKSPACE/ltp_src LibOS/shim/test/ltp/' sh 'cp -rf $WORKSPACE/ltp_config/* LibOS/shim/test/ltp/' + sh 'cp -rf $WORKSPACE/stress-ng Examples/' env.WORKSPACE = env.WORKSPACE + "/graphene" sh 'sed -i -e \'s/dent != g_dentry_root && dent->state & DENTRY_VALID/0/\' \ @@ -35,6 +37,7 @@ node(node_label) { load '../ci/stage-build-nosgx.jenkinsfile' load '../ci/stage-test-direct.jenkinsfile' load '../ci/stage-test.jenkinsfile' + load '../ci/stage-test-stress-ng.jenkinsfile' } } } finally { diff --git a/ci/linux-direct-ubuntu20.04-gcc-release.jenkinsfile b/ci/linux-direct-ubuntu20.04-gcc-release.jenkinsfile index 9b90296ac..53fea7ed5 100644 --- a/ci/linux-direct-ubuntu20.04-gcc-release.jenkinsfile +++ b/ci/linux-direct-ubuntu20.04-gcc-release.jenkinsfile @@ -15,6 +15,7 @@ node(node_label) { dir ("graphene") { sh 'cp -rf $WORKSPACE/ltp_src LibOS/shim/test/ltp/' sh 'cp -rf $WORKSPACE/ltp_config/* LibOS/shim/test/ltp/' + sh 'cp -rf $WORKSPACE/stress-ng Examples/' env.WORKSPACE = env.WORKSPACE + "/graphene" sh 'sed -i -e \'s/dent != g_dentry_root && dent->state & DENTRY_VALID/0/\' \ @@ -34,6 +35,7 @@ node(node_label) { load '../ci/stage-build-nosgx.jenkinsfile' load '../ci/stage-test.jenkinsfile' load '../ci/stage-test-direct.jenkinsfile' + load '../ci/stage-test-stress-ng.jenkinsfile' } } } finally { diff --git a/ci/linux-sgx-centos8.2-gcc-release.jenkinsfile b/ci/linux-sgx-centos8.2-gcc-release.jenkinsfile index 17e55d5cb..2dc24c86b 100644 --- a/ci/linux-sgx-centos8.2-gcc-release.jenkinsfile +++ b/ci/linux-sgx-centos8.2-gcc-release.jenkinsfile @@ -15,6 +15,7 @@ node (node_label) { dir ("graphene") { sh 'cp -rf $WORKSPACE/ltp_src LibOS/shim/test/ltp/' sh 'cp -rf $WORKSPACE/ltp_config/* LibOS/shim/test/ltp/' + sh 'cp -rf $WORKSPACE/stress-ng Examples/' env.WORKSPACE = env.WORKSPACE + "/graphene" env.SGX = '1' @@ -33,6 +34,7 @@ node (node_label) { load '../ci/stage-build-sgx-centos.jenkinsfile' load '../ci/stage-test.jenkinsfile' load '../ci/stage-test-sgx.jenkinsfile' + load '../ci/stage-test-stress-ng.jenkinsfile' } } finally { stage('cleanup'){ diff --git a/ci/linux-sgx-ubuntu18.04-gcc-release-apps.jenkinsfile b/ci/linux-sgx-ubuntu18.04-gcc-release-apps.jenkinsfile index bdeba2110..ef8fc4492 100644 --- a/ci/linux-sgx-ubuntu18.04-gcc-release-apps.jenkinsfile +++ b/ci/linux-sgx-ubuntu18.04-gcc-release-apps.jenkinsfile @@ -29,7 +29,6 @@ node (node_label) { load '../ci/stage-build-sgx.jenkinsfile' load '../ci/stage-test-sandstone.jenkinsfile' - // load '../ci/stage-test-stress-ng.jenkinsfile' } } } finally { diff --git a/ci/linux-sgx-ubuntu18.04-gcc-release.jenkinsfile b/ci/linux-sgx-ubuntu18.04-gcc-release.jenkinsfile index a93cee8d6..e0dbeb166 100644 --- a/ci/linux-sgx-ubuntu18.04-gcc-release.jenkinsfile +++ b/ci/linux-sgx-ubuntu18.04-gcc-release.jenkinsfile @@ -15,6 +15,7 @@ node (node_label) { dir ("graphene") { sh 'cp -rf $WORKSPACE/ltp_src LibOS/shim/test/ltp/' sh 'cp -rf $WORKSPACE/ltp_config/* LibOS/shim/test/ltp/' + sh 'cp -rf $WORKSPACE/stress-ng Examples/' env.WORKSPACE = env.WORKSPACE + "/graphene" env.SGX = '1' @@ -36,6 +37,7 @@ node (node_label) { load '../ci/stage-build-sgx.jenkinsfile' load '../ci/stage-test.jenkinsfile' load '../ci/stage-test-sgx.jenkinsfile' + load '../ci/stage-test-stress-ng.jenkinsfile' } } } finally { diff --git a/ci/linux-sgx-ubuntu20.04-gcc-release-apps.jenkinsfile b/ci/linux-sgx-ubuntu20.04-gcc-release-apps.jenkinsfile index fa9f5d930..61a46b59e 100644 --- a/ci/linux-sgx-ubuntu20.04-gcc-release-apps.jenkinsfile +++ b/ci/linux-sgx-ubuntu20.04-gcc-release-apps.jenkinsfile @@ -29,7 +29,6 @@ node (node_label) { load '../ci/stage-build-sgx.jenkinsfile' load '../ci/stage-test-sandstone.jenkinsfile' - // load '../ci/stage-test-stress-ng.jenkinsfile' } } } finally { diff --git a/ci/linux-sgx-ubuntu20.04-gcc-release.jenkinsfile b/ci/linux-sgx-ubuntu20.04-gcc-release.jenkinsfile index b97735fab..157df2094 100644 --- a/ci/linux-sgx-ubuntu20.04-gcc-release.jenkinsfile +++ b/ci/linux-sgx-ubuntu20.04-gcc-release.jenkinsfile @@ -15,6 +15,7 @@ node(node_label) { dir ("graphene") { sh 'cp -rf $WORKSPACE/ltp_src LibOS/shim/test/ltp/' sh 'cp -rf $WORKSPACE/ltp_config/* LibOS/shim/test/ltp/' + sh 'cp -rf $WORKSPACE/stress-ng Examples/' env.WORKSPACE = env.WORKSPACE + "/graphene" env.SGX = '1' @@ -35,6 +36,7 @@ node(node_label) { load '../ci/stage-build-sgx.jenkinsfile' load '../ci/stage-test.jenkinsfile' load '../ci/stage-test-sgx.jenkinsfile' + load '../ci/stage-test-stress-ng.jenkinsfile' } } } finally { diff --git a/ci/stage-test-stress-ng.jenkinsfile b/ci/stage-test-stress-ng.jenkinsfile index 00a24b8a5..1078bac80 100644 --- a/ci/stage-test-stress-ng.jenkinsfile +++ b/ci/stage-test-stress-ng.jenkinsfile @@ -1,33 +1,42 @@ stage('stress-ng') { - try { - timeout(time: 180, unit: 'MINUTES') { - sh ''' - export cmd=graphene-direct - cd Examples/stress-ng - if test -n "$SGX" - then - make SGX=1 - export cmd=graphene-sgx - else - make - fi + script { + if (env.stress_ng_run == "True") { - $cmd stress-ng --job hdd.job 2>&1 | tee hdd.log - $cmd stress-ng --job seek.job 2>&1 | tee seek.log - $cmd stress-ng --job seek-hdd.job 2>&1 | tee seek-hdd.log - $cmd stress-ng --job interrupt.job 2>&1 | tee interrupt.log - $cmd stress-ng --job filesystem.job 2>&1 | tee filesystem.log - $cmd stress-ng --job filesystem_all.job 2>&1 | tee filesystem_all.log - $cmd stress-ng --job scheduler.job 2>&1 | tee scheduler.log - $cmd stress-ng --job scheduler_all.job 2>&1 | tee scheduler_all.log + try { + timeout(time: 180, unit: 'MINUTES') { + sh ''' + export cmd=graphene-direct + cd Examples/stress-ng + if test -n "$SGX" + then + make SGX=1 + export cmd=graphene-sgx + else + make + fi - ''' + $cmd stress-ng --job hdd.job 2>&1 | tee hdd.log + $cmd stress-ng --job seek.job 2>&1 | tee seek.log + $cmd stress-ng --job seek-hdd.job 2>&1 | tee seek-hdd.log + $cmd stress-ng --job interrupt.job 2>&1 | tee interrupt.log + $cmd stress-ng --job filesystem.job 2>&1 | tee filesystem.log + $cmd stress-ng --job filesystem_all.job 2>&1 | tee filesystem_all.log + $cmd stress-ng --job scheduler.job 2>&1 | tee scheduler.log + $cmd stress-ng --job scheduler_all.job 2>&1 | tee scheduler_all.log + + python3 parser_stressng.py --path=. + + ''' + } + } catch (Exception e){ + build_ok = false + sh 'echo "Stress-ng Failed"' + } finally { + archiveArtifacts 'Examples/stress-ng/*.log' + } + } else { + sh "Ignoring stress-ng run. For enabling pass True from Jenkins build parameters" } - } catch (Exception e){ - build_ok = false - sh 'echo "Stress-ng Failed"' - } finally { - archiveArtifacts 'Examples/stress-ng/*.log' } }