Move kprobe fuzzing lava test to its own lava job.
properties-file: properties.txt
- shell: !include-raw-escape: scripts/lttng-baremetal-tests/run-kvm-tests.sh
+- defaults:
+ name: vm_tests_kmainline
+ defaults: vm_tests
+ triggers:
+ - pollscm:
+ cron: "0 1 * * 1-5"
+ wrappers:
+ - workspace-cleanup
+ - timestamps
+ - ansicolor
+ - credentials-binding:
+ - text:
+ credential-id: jenkins_lava_key
+ variable: LAVA_JENKINS_TOKEN
+ - inject:
+ properties-content: |
+ TOOLS_BRANCH={toolsversion}
+ MODULES_BRANCH={modulesversion}
+ UST_BRANCH={ustversion}
+ BUILD_DEVICE=baremetal
+ scm:
+ - git:
+ url: git://git-mirror.internal.efficios.com/lttng/lttng-tools.git
+ branches:
+ - "{toolsversion}"
+ shallow-clone: true
+ skip-tag: true
+ fastpoll: true
+ basedir: src/lttng-tools
+ - git:
+ url: git://git-mirror.internal.efficios.com/lttng/lttng-modules.git
+ branches:
+ - "{modulesversion}"
+ shallow-clone: true
+ skip-tag: true
+ fastpoll: true
+ basedir: src/lttng-modules
+ - git:
+ url: git://git-mirror.internal.efficios.com/kernel/torvalds/linux.git
+ refspec: "+refs/tags/*:refs/remotes/origin/tags/*"
+ branches:
+ - "master"
+ fastpoll: true
+ basedir: src/linux
+
- defaults:
name: baremetal_tests
description: |
defaults: baremetal_benchmarks
triggers:
- timed: "0 1 * * 1-5"
-
- job-template:
name: vm_tests_kmainline_t{toolsversion}_m{modulesversion}_u{ustversion}
- defaults: vm_tests
- triggers:
- - pollscm:
- cron: "0 1 * * 1-5"
- wrappers:
- - workspace-cleanup
- - timestamps
- - ansicolor
- - credentials-binding:
- - text:
- credential-id: jenkins_lava_key
- variable: LAVA_JENKINS_TOKEN
+ defaults: vm_tests_kmainline
+
+- job-template:
+ name: vm_tests_fuzzing_kmainline_t{toolsversion}_m{modulesversion}_u{ustversion}
+ defaults: vm_tests_kmainline
+
+ builders:
+ - shell: !include-raw-escape: scripts/lttng-baremetal-tests/generate-properties-master.sh
+ - trigger-builds:
+ - project: "build_kernel_PARAM"
+ property-file: 'properties.txt'
+ block: true
- inject:
- properties-content: |
- TOOLS_BRANCH={toolsversion}
- MODULES_BRANCH={modulesversion}
- UST_BRANCH={ustversion}
- BUILD_DEVICE=baremetal
- scm:
- - git:
- url: git://git-mirror.internal.efficios.com/lttng/lttng-tools.git
- branches:
- - "{toolsversion}"
- shallow-clone: true
- skip-tag: true
- fastpoll: true
- basedir: src/lttng-tools
- - git:
- url: git://git-mirror.internal.efficios.com/lttng/lttng-modules.git
- branches:
- - "{modulesversion}"
- shallow-clone: true
- skip-tag: true
- fastpoll: true
- basedir: src/lttng-modules
- - git:
- url: git://git-mirror.internal.efficios.com/kernel/torvalds/linux.git
- refspec: "+refs/tags/*:refs/remotes/origin/tags/*"
- branches:
- - "master"
- fastpoll: true
- basedir: src/linux
+ properties-file: properties.txt
+ - shell: !include-raw-escape: scripts/lttng-baremetal-tests/run-kvm-fuzzing-tests.sh
- job-template:
name: baremetal_tests_kmainline_t{toolsversion}_m{modulesversion}_u{ustversion}
- stable-2.9
jobs:
- 'vm_tests_kmainline_t{toolsversion}_m{modulesversion}_u{ustversion}'
+ - 'vm_tests_fuzzing_kmainline_t{toolsversion}_m{modulesversion}_u{ustversion}'
- 'baremetal_tests_kmainline_t{toolsversion}_m{modulesversion}_u{ustversion}'
- 'baremetal_benchmarks_kmainline_t{toolsversion}_m{modulesversion}_u{ustversion}'
# Loop over the list of symbols and enable the symbols in groups of
# $NB_KPROBE_PER_ITER
for i in $(seq 0 "$NB_KPROBE_PER_ITER" "$nb_syms"); do
+ # Print time in UTC at each iteration to easily see when the script
+ # hangs
+ date --utc
+
# Pick $NB_KPROBE_PER_ITER symbols to instrument, craft enable-event
# command and save them to a file. We craft the commands and executed
# them in two steps so that the pipeline can be done without the bash
baremetal_benchmarks=1
baremetal_tests=2
kvm_tests=3
+ kvm_fuzzing_tests=4
def get_job_bundle_content(server, job):
try:
job = OrderedDict({
'health_check': False,
'job_name': name,
- 'device_type':build_device,
+ 'device_type': build_device,
'tags': [ ],
- 'timeout': 18000,
+ 'timeout': 7200,
'actions': []
})
if build_device in 'x86':
'testdef': 'lava/baremetal-tests/lttng-test-filter.yml'
}
],
- 'timeout': 18000
+ 'timeout': 7200
}
})
return command
'testdef': 'lava/baremetal-tests/perf-tests.yml'
}
],
- 'timeout': 18000
+ 'timeout': 3600
}
})
return command
'git-repo': 'https://github.com/lttng/lttng-ci.git',
'revision': 'master',
'testdef': 'lava/baremetal-tests/destructive-tests.yml'
- },
+ }
+ ],
+ 'timeout': 3600
+ }
+ })
+ return command
+def get_kprobes_test_cmd():
+ command = OrderedDict({
+ 'command': 'lava_test_shell',
+ 'parameters': {
+ 'testdef_repos': [
{
'git-repo': 'https://github.com/lttng/lttng-ci.git',
'revision': 'master',
'testdef': 'lava/baremetal-tests/kprobe-fuzzing-tests.yml'
}
],
- 'timeout': 18000
+ 'timeout': 7200
}
})
return command
'git clone https://github.com/frdeso/syscall-bench-it.git bm',
'pip3 install vlttng',
],
- 'timeout': 18000
+ 'timeout': 3600
}
})
test_type = TestType.baremetal_tests
elif args.type in 'kvm-tests':
test_type = TestType.kvm_tests
+ elif args.type in 'kvm-fuzzing-tests':
+ test_type = TestType.kvm_fuzzing_tests
else:
print('argument -t/--type {} unrecognized. Exiting...'.format(args.type))
return -1
elif test_type is TestType.baremetal_tests:
j = create_new_job(args.jobname, build_device='x86')
j['actions'].append(get_deploy_cmd_x86(args.jobname, args.kernel, args.kmodule, args.lmodule))
- elif test_type is TestType.kvm_tests:
+ elif test_type is TestType.kvm_tests or test_type is TestType.kvm_fuzzing_tests:
j = create_new_job(args.jobname, build_device='kvm')
j['actions'].append(get_deploy_cmd_kvm(args.jobname, args.kernel, args.kmodule, args.lmodule))
j['actions'].append(get_env_setup_cmd('kvm', args.tools_commit, args.ust_commit))
j['actions'].append(get_kvm_tests_cmd())
j['actions'].append(get_results_cmd(stream_name='tests-kernel'))
+ elif test_type is TestType.kvm_fuzzing_tests:
+ if args.ust_commit is None:
+ print('Tests runs need -uc/--ust-commit options. Exiting...')
+ return -1
+ j['actions'].append(get_config_cmd('kvm'))
+ j['actions'].append(get_env_setup_cmd('kvm', args.tools_commit, args.ust_commit))
+ j['actions'].append(get_kprobes_test_cmd())
+ j['actions'].append(get_results_cmd(stream_name='tests-kernel'))
else:
assert False, 'Unknown test type'
--- /dev/null
+#!/bin/bash -xeu
+# Copyright (C) 2017 - Francis Deslauriers <francis.deslauriers@efficios.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+echo 'At this point, we built the modules and kernel if we needed to.'
+echo 'We can now launch the lava job using those artefacts'
+git clone https://github.com/lttng/lttng-ci "$LTTNG_CI_PATH"
+
+python3 -u "$LTTNG_CI_PATH"/scripts/lttng-baremetal-tests/lava-submit.py \
+ -t kvm-fuzzing-tests \
+ -j "$JOB_NAME" \
+ -k "$STORAGE_KERNEL_IMAGE" \
+ -km "$STORAGE_LINUX_MODULES" \
+ -lm "$STORAGE_LTTNG_MODULES" \
+ -tc "$LTTNG_TOOLS_COMMIT_ID" \
+ -uc "$LTTNG_UST_COMMIT_ID"