jjb: lava: kprobe-fuzzing: Fix: clear events before next iteration
[lttng-ci.git] / scripts / system-tests / lava-submit.py
index 5d92177d56fde10d72f4c327ca2a9b81ba38a2d2..682e2249e11cc7fe5229baf081330a6e564059fe 100644 (file)
@@ -111,17 +111,18 @@ def print_test_output(server, job):
 
                     # Decode the base64 file and split on newlines to iterate
                     # on list
-                    testoutput = str(base64.b64decode(bytes(attachment['content'], encoding='UTF-8'))).split('\n')
+                    testoutput = str(base64.b64decode(bytes(attachment['content'], encoding='UTF-8')))
+
+                    testoutput = testoutput.replace('\\n', '\n')
 
                     # Create a generator to iterate on the lines and keeping
                     # the state of the iterator across the two loops.
-                    testoutput_iter = iter(testoutput)
+                    testoutput_iter = iter(testoutput.split('\n'))
                     for line in testoutput_iter:
 
                         # Find the header of the test case and start printing
                         # from there
                         if 'LAVA_SIGNAL_STARTTC run-tests' in line:
-                            found = True
                             print('---- TEST SUITE OUTPUT BEGIN ----')
                             for line in testoutput_iter:
                                 if 'LAVA_SIGNAL_ENDTC run-tests' not in line:
@@ -131,7 +132,6 @@ def print_test_output(server, job):
                                     # section
                                     break
 
-                        if found is True:
                             print('----- TEST SUITE OUTPUT END -----')
                             break
 
@@ -193,37 +193,37 @@ def get_baremetal_benchmarks_cmd():
                 {
                     'git-repo': 'https://github.com/lttng/lttng-ci.git',
                     'revision': 'master',
-                    'testdef': 'lava/baremetal-tests/failing-close.yml'
+                    'testdef': 'lava/system-tests/failing-close.yml'
                 },
                 {
                     'git-repo': 'https://github.com/lttng/lttng-ci.git',
                     'revision': 'master',
-                    'testdef': 'lava/baremetal-tests/failing-ioctl.yml'
+                    'testdef': 'lava/system-tests/failing-ioctl.yml'
                 },
                 {
                     'git-repo': 'https://github.com/lttng/lttng-ci.git',
                     'revision': 'master',
-                    'testdef': 'lava/baremetal-tests/failing-open-efault.yml'
+                    'testdef': 'lava/system-tests/failing-open-efault.yml'
                 },
                 {
                     'git-repo': 'https://github.com/lttng/lttng-ci.git',
                     'revision': 'master',
-                    'testdef': 'lava/baremetal-tests/success-dup-close.yml'
+                    'testdef': 'lava/system-tests/success-dup-close.yml'
                 },
                 {
                     'git-repo': 'https://github.com/lttng/lttng-ci.git',
                     'revision': 'master',
-                    'testdef': 'lava/baremetal-tests/raw-syscall-getpid.yml'
+                    'testdef': 'lava/system-tests/raw-syscall-getpid.yml'
                 },
                 {
                     'git-repo': 'https://github.com/lttng/lttng-ci.git',
                     'revision': 'master',
-                    'testdef': 'lava/baremetal-tests/failing-open-enoent.yml'
+                    'testdef': 'lava/system-tests/failing-open-enoent.yml'
                 },
                 {
                     'git-repo': 'https://github.com/lttng/lttng-ci.git',
                     'revision': 'master',
-                    'testdef': 'lava/baremetal-tests/lttng-test-filter.yml'
+                    'testdef': 'lava/system-tests/lttng-test-filter.yml'
                 }
                 ],
             'timeout': 7200
@@ -239,7 +239,7 @@ def get_baremetal_tests_cmd():
                 {
                     'git-repo': 'https://github.com/lttng/lttng-ci.git',
                     'revision': 'master',
-                    'testdef': 'lava/baremetal-tests/perf-tests.yml'
+                    'testdef': 'lava/system-tests/perf-tests.yml'
                 }
                 ],
             'timeout': 3600
@@ -255,19 +255,20 @@ def get_kvm_tests_cmd():
                 {
                     'git-repo': 'https://github.com/lttng/lttng-ci.git',
                     'revision': 'master',
-                    'testdef': 'lava/baremetal-tests/kernel-tests.yml'
+                    'testdef': 'lava/system-tests/kernel-tests.yml'
                 },
                 {
                     'git-repo': 'https://github.com/lttng/lttng-ci.git',
                     'revision': 'master',
-                    'testdef': 'lava/baremetal-tests/destructive-tests.yml'
+                    'testdef': 'lava/system-tests/destructive-tests.yml'
                 }
                 ],
             'timeout': 7200
             }
         })
     return command
-def get_kprobes_test_cmd():
+
+def get_kprobes_generate_data_cmd():
     command = OrderedDict({
         'command': 'lava_test_shell',
         'parameters': {
@@ -275,10 +276,27 @@ def get_kprobes_test_cmd():
                 {
                     'git-repo': 'https://github.com/lttng/lttng-ci.git',
                     'revision': 'master',
-                    'testdef': 'lava/baremetal-tests/kprobe-fuzzing-tests.yml'
+                    'testdef': 'lava/system-tests/kprobe-fuzzing-generate-data.yml'
                 }
                 ],
-            'timeout': 7200
+            'timeout': 60
+            }
+        })
+    return command
+
+def get_kprobes_test_cmd(round_nb):
+    command = OrderedDict({
+        'command': 'lava_test_shell',
+        'parameters': {
+            'testdef_repos': [
+                {
+                    'git-repo': 'https://github.com/lttng/lttng-ci.git',
+                    'revision': 'master',
+                    'testdef': 'lava/system-tests/kprobe-fuzzing-tests.yml',
+                    'parameters': { 'ROUND_NB': str(round_nb) }
+                }
+            ],
+            'timeout': 1000
             }
         })
     return command
@@ -446,8 +464,9 @@ def main():
             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_kprobes_generate_data_cmd())
+        for i in range(10):
+            j['actions'].append(get_kprobes_test_cmd(round_nb=i))
         j['actions'].append(get_results_cmd(stream_name='tests-kernel'))
     else:
         assert False, 'Unknown test type'
This page took 0.024745 seconds and 4 git commands to generate.