Merge pull request #17 from frdeso/add-open-enoent-back
authorJonathan Rajotte Julien <jonathan.rajotte-julien@efficios.com>
Wed, 10 May 2017 20:21:33 +0000 (16:21 -0400)
committerGitHub <noreply@github.com>
Wed, 10 May 2017 20:21:33 +0000 (16:21 -0400)
Add Lava benchmark test cases and minor fixes

jobs/lttng-baremetal-tests.yaml
lava/baremetal-tests/failing-ioctl.yml [new file with mode: 0644]
lava/baremetal-tests/failing-open-enoent.yml [new file with mode: 0644]
lava/baremetal-tests/raw-syscall-getpid.yml [new file with mode: 0644]
scripts/lttng-baremetal-tests/generate-plots.py
scripts/lttng-baremetal-tests/lava-submit.py
scripts/lttng-baremetal-tests/run-baremetal-benchmarks.sh

index bef4fa1ffb7ba9c5fc35b7ea3690b35553e19ee7..e1a3b6a5773d8ca531bff2dd8da423ff66163344 100644 (file)
@@ -5,7 +5,7 @@
 
     triggers:
       - pollscm:
-          cron: "@hourly"
+          cron: "H * * * 1-5"
     logrotate:
       numToKeep: 10
 
@@ -97,7 +97,7 @@
             - 'kvm-tests'
     triggers:
       - pollscm:
-          cron: "@hourly"
+          cron: "H * * * 1-5"
     logrotate:
       numToKeep: 10
 
           recipients: 'francis.deslauriers@efficios.com'
       - ircbot:
           strategy: new-failure-and-fixed
+          message-type: summary
           channels:
             - name: '#lttng'
       - workspace-cleanup
             - 'baremetal-tests'
     triggers:
       - pollscm:
-          cron: "@hourly"
+          cron: "H * * * 1-5"
     logrotate:
       numToKeep: 10
 
           recipients: 'francis.deslauriers@efficios.com'
       - ircbot:
           strategy: new-failure-and-fixed
+          message-type: summary
           channels:
             - name: '#lttng'
       - workspace-cleanup
     name: baremetal_tests_k{kversion}_l{lttngversion}_canary
     defaults: baremetal_tests
     triggers:
-      - timed: "@daily"
+      - timed: "0 1 * * 1-5"
 - job-template:
     name: vm_tests_k{kversion}_l{lttngversion}_canary
     defaults: vm_tests
     triggers:
-      - timed: "@daily"
+      - timed: "0 1 * * 1-5"
 - job-template:
     name: baremetal_benchmarks_k{kversion}_l{lttngversion}_canary
     defaults: baremetal_benchmarks
     triggers:
-      - timed: "@daily"
+      - timed: "0 1 * * 1-5"
 
 - job-template:
     name: vm_tests_kmainline_t{toolsversion}_m{modulesversion}_u{ustversion}
     defaults: vm_tests
     triggers:
       - pollscm:
-          cron: "@daily"
+          cron: "0 1 * * 1-5"
     wrappers:
       - workspace-cleanup
       - timestamps
     defaults: baremetal_tests
     triggers:
       - pollscm:
-          cron: "@daily"
+          cron: "0 1 * * 1-5"
     wrappers:
       - workspace-cleanup
       - timestamps
     defaults: baremetal_benchmarks
     triggers:
       - pollscm:
-          cron: "@daily"
+          cron: "0 1 * * 1-5"
     wrappers:
       - workspace-cleanup
       - timestamps
     concurrent: true
 
     logrotate:
-      numToKeep: 50
+      numToKeep: 100
     node: 'x86-64'
 
     wrappers:
diff --git a/lava/baremetal-tests/failing-ioctl.yml b/lava/baremetal-tests/failing-ioctl.yml
new file mode 100644 (file)
index 0000000..4865fc4
--- /dev/null
@@ -0,0 +1,38 @@
+metadata:
+        format: Lava-Test Test Definition 1.0
+        name: benchmark-syscall-failing-ioctl
+        description: "Perform syscall tracing benchmark of failing ioctl"
+params:
+    JENKINS_JOBNAME: "default jobname"
+
+install:
+        deps:
+                - python3-pandas
+                - python3-numpy
+        git-repos:
+                - url: https://github.com/frdeso/syscall-bench-it.git
+                  destination: benchmarks
+                  branch: master
+                - url: https://github.com/frdeso/lttng-ci
+                  destination: ci
+                  branch: baremetal_tests
+        steps:
+                - export TMPDIR="/tmp"
+                - ulimit -c unlimited
+                - mkdir -p coredump
+                - echo "$(pwd)/coredump/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
+run:
+        steps:
+                - source /root/lttngvenv/activate
+                - cd benchmarks
+                - lava-test-case build-benchmarks --shell "make"
+                - lava-test-case run-benchmarks --shell "./run.sh failing-ioctl sys_ioctl"
+                - lava-test-case-attach run-benchmarks "./results.csv"
+                - cd -
+                - cd ci
+                - python3 ./scripts/lttng-baremetal-tests/parse-results.py ../benchmarks/results.csv
+                - mv ./processed_results.csv ../processed_results_ioctl.csv
+                - cd -
+                - tar czf coredump.tar.gz coredump
+                - lava-test-case-attach run-benchmarks coredump.tar.gz
+                - lava-test-case-attach run-benchmarks "./processed_results_ioctl.csv"
diff --git a/lava/baremetal-tests/failing-open-enoent.yml b/lava/baremetal-tests/failing-open-enoent.yml
new file mode 100644 (file)
index 0000000..5ad6dbe
--- /dev/null
@@ -0,0 +1,39 @@
+metadata:
+        format: Lava-Test Test Definition 1.0
+        name: benchmark-syscall-failing-open-enoent
+        description: "Perform syscall tracing benchmark of failing open-enoent"
+params:
+    JENKINS_JOBNAME: "default jobname"
+
+install:
+        deps:
+                - python3-pandas
+                - python3-numpy
+        git-repos:
+                - url: https://github.com/frdeso/syscall-bench-it.git
+                  destination: benchmarks
+                  branch: master
+                - url: https://github.com/lttng/lttng-ci
+                  destination: ci
+                  branch: master
+        steps:
+                - export TMPDIR="/tmp"
+                - ulimit -c unlimited
+                - mkdir -p coredump
+                - echo "$(pwd)/coredump/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
+run:
+        steps:
+                - source /root/lttngvenv/activate
+                - cd benchmarks
+                - lava-test-case build-benchmarks --shell "make"
+                - lava-test-case run-benchmarks --shell "./run.sh failing-open-enoent sys_open"
+                - lava-test-case-attach run-benchmarks "./results.csv"
+                - cd -
+                - cd ci
+                - python3 ./scripts/lttng-baremetal-tests/parse-results.py ../benchmarks/results.csv
+                - mv ./processed_results.csv ../processed_results_open_enoent.csv
+                - cd -
+                - tar czf coredump.tar.gz coredump
+                - lava-test-case-attach run-benchmarks coredump.tar.gz
+                - lava-test-case-attach run-benchmarks "./processed_results_open_enoent.csv"
+
diff --git a/lava/baremetal-tests/raw-syscall-getpid.yml b/lava/baremetal-tests/raw-syscall-getpid.yml
new file mode 100644 (file)
index 0000000..bb2f2fe
--- /dev/null
@@ -0,0 +1,38 @@
+metadata:
+        format: Lava-Test Test Definition 1.0
+        name: benchmark-raw-syscall-getpid
+        description: "Perform syscall tracing benchmark of the raw syscall getpid"
+params:
+    JENKINS_JOBNAME: "default jobname"
+
+install:
+        deps:
+                - python3-pandas
+                - python3-numpy
+        git-repos:
+                - url: https://github.com/frdeso/syscall-bench-it.git
+                  destination: benchmarks
+                  branch: master
+                - url: https://github.com/lttng/lttng-ci
+                  destination: ci
+                  branch: master
+        steps:
+                - export TMPDIR="/tmp"
+                - ulimit -c unlimited
+                - mkdir -p coredump
+                - echo "$(pwd)/coredump/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
+run:
+        steps:
+                - source /root/lttngvenv/activate
+                - cd benchmarks
+                - lava-test-case build-benchmarks --shell "make"
+                - lava-test-case run-benchmarks --shell "./run.sh raw-syscall-getpid sys_getpid"
+                - lava-test-case-attach run-benchmarks "./results.csv"
+                - cd -
+                - cd ci
+                - python3 ./scripts/lttng-baremetal-tests/parse-results.py ../benchmarks/results.csv
+                - mv ./processed_results.csv ../processed_results_raw_syscall_getpid.csv
+                - cd -
+                - tar czf coredump.tar.gz coredump
+                - lava-test-case-attach run-benchmarks coredump.tar.gz
+                - lava-test-case-attach run-benchmarks "./processed_results_raw_syscall_getpid.csv"
index 89f6084ec072889e15cc70fb4e13d036680f1565..efc987734e95e808db75c88f570dce127c0d1ca8 100644 (file)
@@ -83,7 +83,7 @@ def create_plot(df, graph_type):
 
     plots = [baseline, lttng, one_thr, two_thr, four_thr, eight_thr, sixteen_thr]
 
-    title='Meantime per syscalls for {} testcase'.format(graph_type)
+    title='Meantime per event for {} testcase'.format(graph_type)
 
     # Create a axe object for each sub-plots
     f, arrax = plt.subplots(len(plots), sharex=True, figsize=(16, 25))
@@ -106,7 +106,7 @@ def create_plot(df, graph_type):
         ax.set_ylim(0)
         ax.grid()
         ax.set_xlabel('Jenkins Build ID')
-        ax.set_ylabel('Meantime per syscall [us]')
+        ax.set_ylabel('Meantime per event [us]')
 
         ax.xaxis.set_major_locator(MaxNLocator(integer=True, nbins=30))
 
index 34ad7118563298c098527b7a54a75f1f165d90f6..5a3ed94e02f50af4e846eb6f85b7685f9d2ca0d7 100644 (file)
@@ -47,6 +47,12 @@ def get_job_bundle_content(server, job):
 def check_job_all_test_cases_state_count(server, job):
     content = get_job_bundle_content(server, job)
 
+    # FIXME:Those tests are part of the boot actions and fail randomly but
+    # doesn't affect the behaviour of the tests. We should update our Lava
+    # installation and try to reproduce it. This error was encountered on
+    # Ubuntu 16.04.
+    tests_known_to_fail=['mount', 'df', 'ls', 'ip', 'wait_for_test_image_prompt']
+
     passed_tests=0
     failed_tests=0
     for run in content['test_runs']:
@@ -54,13 +60,7 @@ def check_job_all_test_cases_state_count(server, job):
             if 'test_case_id' in result :
                 if result['result'] in 'pass':
                     passed_tests+=1
-                elif result['test_case_id'] in 'wait_for_test_image_prompt':
-                    # FIXME:This test is part of the boot action and fails
-                    # randomly but doesn't affect the behaviour of the tests.
-                    # No reply on the Lava IRC channel yet. We should update
-                    # our Lava installation and try to reproduce it. This error
-                    # was encountered ont the KVM trusty image only. Not seen
-                    # on Xenial at this point.
+                elif result['test_case_id'] in tests_known_to_fail:
                     pass
                 else:
                     failed_tests+=1
@@ -71,8 +71,11 @@ def check_job_all_test_cases_state_count(server, job):
 def fetch_benchmark_results(server, job):
     content = get_job_bundle_content(server, job)
     testcases = ['processed_results_close.csv',
+            'processed_results_ioctl.csv',
             'processed_results_open_efault.csv',
+            'processed_results_open_enoent.csv',
             'processed_results_dup_close.csv',
+            'processed_results_raw_syscall_getpid.csv',
             'processed_results_lttng_test_filter.csv']
 
     # The result bundle is a large JSON containing the results of every testcase
@@ -154,7 +157,7 @@ def get_config_cmd(build_device):
     packages=['bsdtar', 'psmisc', 'wget', 'python3', 'python3-pip', \
             'libglib2.0-dev', 'libffi-dev', 'elfutils', 'libdw-dev', \
             'libelf-dev', 'libmount-dev', 'libxml2', 'libpfm4-dev', \
-            'libnuma-dev']
+            'libnuma-dev', 'python3-dev']
     command = OrderedDict({
         'command': 'lava_command_run',
         'parameters': {
@@ -190,6 +193,11 @@ def get_baremetal_benchmarks_cmd():
                     'revision': 'master',
                     'testdef': 'lava/baremetal-tests/failing-close.yml'
                 },
+                {
+                    'git-repo': 'https://github.com/lttng/lttng-ci.git',
+                    'revision': 'master',
+                    'testdef': 'lava/baremetal-tests/failing-ioctl.yml'
+                },
                 {
                     'git-repo': 'https://github.com/lttng/lttng-ci.git',
                     'revision': 'master',
@@ -200,6 +208,16 @@ def get_baremetal_benchmarks_cmd():
                     'revision': 'master',
                     'testdef': 'lava/baremetal-tests/success-dup-close.yml'
                 },
+                {
+                    'git-repo': 'https://github.com/lttng/lttng-ci.git',
+                    'revision': 'master',
+                    'testdef': 'lava/baremetal-tests/raw-syscall-getpid.yml'
+                },
+                {
+                    'git-repo': 'https://github.com/lttng/lttng-ci.git',
+                    'revision': 'master',
+                    'testdef': 'lava/baremetal-tests/failing-open-enoent.yml'
+                },
                 {
                     'git-repo': 'https://github.com/lttng/lttng-ci.git',
                     'revision': 'master',
@@ -316,7 +334,10 @@ def get_env_setup_cmd(build_device, lttng_tools_commit, lttng_ust_commit=None):
         })
 
     vlttng_cmd = 'vlttng --jobs=$(nproc) --profile urcu-master' \
-                    ' --profile babeltrace-stable-1.4 ' \
+                    ' --override projects.babeltrace.build-env.PYTHON=python3' \
+                    ' --override projects.babeltrace.build-env.PYTHON_CONFIG=python3-config' \
+                    ' --profile babeltrace-stable-1.4' \
+                    ' --profile babeltrace-python' \
                     ' --profile lttng-tools-master' \
                     ' --override projects.lttng-tools.checkout='+lttng_tools_commit + \
                     ' --profile lttng-tools-no-man-pages'
index 9c64afd06b0dcc531d5cd2c5680b1e72d21a676f..aa6be86b41258b2a4b4e6bcaecf2becd31bc564c 100644 (file)
@@ -40,7 +40,10 @@ echo "$BUILD_NUMBER,$TIMESTAMP,$KERNEL_COMMIT_ID,$LTTNG_MODULES_COMMIT_ID,$LTTNG
 
 # Copy the result files for each benchmark and metadata on storage server
 $SCP_COMMAND ./processed_results_close.csv "$STORAGE_USER@$STORAGE_HOST:$RESULT_STORAGE_FOLDER/close.csv"
+$SCP_COMMAND ./processed_results_ioctl.csv "$STORAGE_USER@$STORAGE_HOST:$RESULT_STORAGE_FOLDER/ioctl.csv"
 $SCP_COMMAND ./processed_results_open_efault.csv "$STORAGE_USER@$STORAGE_HOST:$RESULT_STORAGE_FOLDER/open-efault.csv"
+$SCP_COMMAND ./processed_results_open_enoent.csv "$STORAGE_USER@$STORAGE_HOST:$RESULT_STORAGE_FOLDER/open-enoent.csv"
 $SCP_COMMAND ./processed_results_dup_close.csv "$STORAGE_USER@$STORAGE_HOST:$RESULT_STORAGE_FOLDER/dup-close.csv"
 $SCP_COMMAND ./processed_results_lttng_test_filter.csv "$STORAGE_USER@$STORAGE_HOST:$RESULT_STORAGE_FOLDER/lttng-test-filter.csv"
+$SCP_COMMAND ./processed_results_raw_syscall_getpid.csv "$STORAGE_USER@$STORAGE_HOST:$RESULT_STORAGE_FOLDER/raw_syscall_getpid.csv"
 $SCP_COMMAND ./metadata.csv "$STORAGE_USER@$STORAGE_HOST:$RESULT_STORAGE_FOLDER/metadata.csv"
This page took 0.029072 seconds and 4 git commands to generate.