Update test timeouts in an automated way
v2 cover Update test timeouts in an automated way
First patch adds a script that can parse kirk test results, calculate timeouts and patch tests with the newly calculated timeouts.
Second patch updates tests timeouts using this script with a results captured on RPi zero.
---
Changes in v2:
- override timeout only if test's timeout is bigger than the one
calculated
- use '..' relative path for LTP source code
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Cyril Hrubis (2):
scripts: Add simple script for calculating timeouts
syscalls: Update test timeouts
scripts/calctimeouts.py | 232 +++++++++++++++++++++ testcases/kernel/syscalls/access/access01.c | 1 + testcases/kernel/syscalls/add_key/add_key05.c | 1 + testcases/kernel/syscalls/alarm/alarm05.c | 1 + testcases/kernel/syscalls/alarm/alarm06.c | 1 + testcases/kernel/syscalls/alarm/alarm07.c | 1 + testcases/kernel/syscalls/bind/bind04.c | 1 + testcases/kernel/syscalls/bpf/bpf_prog05.c | 1 + testcases/kernel/syscalls/bpf/bpf_prog06.c | 1 + testcases/kernel/syscalls/bpf/bpf_prog07.c | 1 + testcases/kernel/syscalls/cachestat/cachestat01.c | 1 + testcases/kernel/syscalls/cachestat/cachestat04.c | 1 + testcases/kernel/syscalls/chdir/chdir01.c | 1 + .../kernel/syscalls/clock_gettime/leapsec01.c | 1 + .../syscalls/clock_nanosleep/clock_nanosleep01.c | 1 + .../syscalls/clock_settime/clock_settime03.c | 1 + .../kernel/syscalls/close_range/close_range01.c | 1 + testcases/kernel/syscalls/connect/connect02.c | 1 + testcases/kernel/syscalls/creat/creat05.c | 1 + testcases/kernel/syscalls/creat/creat09.c | 1 + testcases/kernel/syscalls/execve/execve05.c | 1 + testcases/kernel/syscalls/execveat/execveat03.c | 1 + testcases/kernel/syscalls/fallocate/fallocate04.c | 1 + testcases/kernel/syscalls/fallocate/fallocate05.c | 1 + testcases/kernel/syscalls/fallocate/fallocate06.c | 2 +- testcases/kernel/syscalls/fanotify/fanotify01.c | 1 + testcases/kernel/syscalls/fanotify/fanotify03.c | 1 + testcases/kernel/syscalls/fanotify/fanotify05.c | 1 + testcases/kernel/syscalls/fanotify/fanotify06.c | 1 + testcases/kernel/syscalls/fanotify/fanotify09.c | 1 + testcases/kernel/syscalls/fanotify/fanotify10.c | 1 + testcases/kernel/syscalls/fchmodat2/fchmodat2_01.c | 1 + testcases/kernel/syscalls/fcntl/fcntl14.c | 1 + testcases/kernel/syscalls/fcntl/fcntl36.c | 1 + testcases/kernel/syscalls/fdatasync/fdatasync03.c | 1 + testcases/kernel/syscalls/fgetxattr/fgetxattr01.c | 1 + .../kernel/syscalls/fremovexattr/fremovexattr01.c | 1 + .../kernel/syscalls/fremovexattr/fremovexattr02.c | 1 + testcases/kernel/syscalls/fsconfig/fsconfig01.c | 1 + testcases/kernel/syscalls/fsconfig/fsconfig03.c | 1 + testcases/kernel/syscalls/fsetxattr/fsetxattr01.c | 1 + testcases/kernel/syscalls/fsmount/fsmount01.c | 1 + testcases/kernel/syscalls/fsmount/fsmount02.c | 1 + testcases/kernel/syscalls/fsopen/fsopen01.c | 1 + testcases/kernel/syscalls/fspick/fspick01.c | 1 + testcases/kernel/syscalls/fspick/fspick02.c | 1 + testcases/kernel/syscalls/fstatfs/fstatfs01.c | 1 + testcases/kernel/syscalls/fsync/fsync01.c | 1 + testcases/kernel/syscalls/fsync/fsync04.c | 1 + testcases/kernel/syscalls/getpid/getpid01.c | 1 + testcases/kernel/syscalls/getxattr/getxattr02.c | 1 + testcases/kernel/syscalls/getxattr/getxattr03.c | 1 + testcases/kernel/syscalls/inotify/inotify03.c | 1 + testcases/kernel/syscalls/inotify/inotify05.c | 1 + testcases/kernel/syscalls/inotify/inotify07.c | 1 + testcases/kernel/syscalls/inotify/inotify08.c | 1 + testcases/kernel/syscalls/inotify/inotify11.c | 1 + testcases/kernel/syscalls/ioctl/ioctl02.c | 1 + testcases/kernel/syscalls/ioctl/ioctl04.c | 1 + testcases/kernel/syscalls/ioctl/ioctl08.c | 1 + testcases/kernel/syscalls/ioctl/ioctl09.c | 1 + testcases/kernel/syscalls/ioctl/ioctl_ficlone02.c | 1 + testcases/kernel/syscalls/ioctl/ioctl_ficlone03.c | 1 + .../kernel/syscalls/ioctl/ioctl_ficlonerange01.c | 1 + .../kernel/syscalls/ioctl/ioctl_ficlonerange02.c | 1 + testcases/kernel/syscalls/ioctl/ioctl_loop01.c | 1 + 66 files changed, 297 insertions(+), 1 deletion(-)
---
base-commit: d3df587ed1ee3f881f802f5060506a8192c38e0d
change-id: 20250121-cyril_script_update_timeouts-4acc3c00b3dc
Best regards,
Signature · 5 lines
Andrea Cervesato <[email protected]> -- Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v2 1/2 scripts: Add simple script for calculating timeouts
From: Cyril Hrubis <[email protected]>
This script parses JSON results from kirk and LTP metadata in order calculate timeouts for tests based on the result file. It can also patch tests automatically.
The script does:
- Take the results and pick all tests that run for longer than 0.5s. Multiplie the time with a constant (currently 1.2) to get a suggested timeout.
- Exclude tests that have runtime defined since these are controlled by the runtime (that filters out all fuzzy sync tests).
There is a special case for timer tests that defines runtime only dynamically in the timer library code. This should be possibly fixed with special value for the .runtime in tst_test. E.g. TST_RUNTIME_DYNAMIC for tests that only set runtime in the setup.
- Normalize the timeout for a single filesystem run if test is running for more than one filesystem.
- Verify if tests are build on top of old library by checking at metadata file
- Update test with a with newly calculated timeout.
By default we only increase timeouts but that can be overridden using the -o option.
--- scripts/calctimeouts.py | 232 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 232 insertions(+)
scripts/calctimeouts.py new file +232 -0
@@ -0,0 +1,232 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-2.0-or-later +""" +This script parses JSON results from kirk and LTP metadata in order to +calculate timeouts for tests based on the results file. +It can also patch tests automatically and replace the calculated timeout. +""" + +import re +import os +import json +import argparse + +# The test runtime is multiplied by this to get a timeout +TIMEOUT_MUL = 1.2 + + +def _sed(fname, expr, replace): + """ + Pythonic version of sed command. + """ + content = [] + matcher = re.compile(expr) + + with open(fname, 'r', encoding="utf-8") as data: + for line in data: + match = matcher.search(line) + if not match: + content.append(line) + else: + content.append(replace) + + with open(fname, 'w', encoding="utf-8") as data: + data.writelines(content) + + +def _patch(ltp_dir, fname, new_timeout, override): + """ + If `override` is True, it patches a test file, searching for timeout and + replacing it with `new_timeout`. + """ + orig_timeout = None + file_path = os.path.join(ltp_dir, fname) + + with open(file_path, 'r', encoding="utf-8") as c_source: + matcher = re.compile(r'\s*.timeout\s*=\s*(\d+).') + for line in c_source: + match = matcher.search(line) + if not match: + continue + + timeout = match.group(1) + orig_timeout = int(timeout) + + if orig_timeout: + if orig_timeout < new_timeout or override: + print(f"CHANGE {fname} timeout {orig_timeout} -> {new_timeout}") + _sed(file_path, r".timeout = [0-9]*,\n", + f"\t.timeout = {new_timeout},\n") + else: + print(f"KEEP {fname} timeout {orig_timeout} (new {new_timeout})") + else: + print(f"ADD {fname} timeout {new_timeout}") + _sed(file_path, + "static struct tst_test test = {", + "static struct tst_test test = {\n" + f"\t.timeout = {new_timeout},\n") + + +def _patch_all(ltp_dir, timeouts, override): + """ + Patch all tests. + """ + for timeout in timeouts: + if timeout['path']: + _patch(ltp_dir, timeout['path'], timeout['timeout'], override) + + +def _print_table(timeouts): + """ + Print the timeouts table. + """ + timeouts.sort(key=lambda x: x['timeout'], reverse=True) + + total = 0 + + print("Old library tests\n-----------------\n") + for timeout in timeouts: + if not timeout['newlib']: + print(f"{timeout['name']:30s} {timeout['timeout']}") + total += 1 + + print(f"\n\t{total} tests in total") + + total = 0 + + print("\nNew library tests\n-----------------\n") + for timeout in timeouts: + if timeout['newlib']: + print(f"{timeout['name']:30s} {timeout['timeout']}") + total += 1 + + print(f"\n\t{total} tests in total") + + +def _parse_data(ltp_dir, results_path): + """ + Parse results data and metadata, then it generates timeouts data. + """ + timeouts = [] + results = None + metadata = None + + with open(results_path, 'r', encoding="utf-8") as file: + results = json.load(file) + + metadata_path = os.path.join(ltp_dir, 'metadata', 'ltp.json') + with open(metadata_path, 'r', encoding="utf-8") as file: + metadata = json.load(file) + + for test in results['results']: + name = test['test_fqn'] + duration = test['test']['duration'] + + # if test runs for all_filesystems, normalize runtime to one filesystem + filesystems = max(1, test['test']['log'].count('TINFO: Formatting /')) + + # check if test is new library test + test_is_newlib = name in metadata['tests'] + + # store test file path + path = None + if test_is_newlib: + path = metadata['tests'][name]['fname'] + + test_has_runtime = False + if test_is_newlib: + # filter out tests with runtime + test_has_runtime = 'runtime' in metadata['tests'][name] + + # timer tests define runtime dynamically in timer library + test_has_runtime = 'sample' in metadata['tests'][name] + + # select tests that does not have runtime and which are executed + # for a long time + if not test_has_runtime and duration >= 0.5: + data = {} + data["name"] = name + data["timeout"] = int(TIMEOUT_MUL * duration/filesystems + 0.5) + data["newlib"] = test_is_newlib + data["path"] = path + + timeouts.append(data) + + return timeouts + + +def _file_exists(filepath): + """ + Check if the given file path exists. + """ + if not os.path.isfile(filepath): + raise argparse.ArgumentTypeError( + f"The file '{filepath}' does not exist.") + return filepath + + +def _dir_exists(dirpath): + """ + Check if the given directory path exists. + """ + if not os.path.isdir(dirpath): + raise argparse.ArgumentTypeError( + f"The directory '{dirpath}' does not exist.") + return dirpath + + +def run(): + """ + Entry point of the script. + """ + parser = argparse.ArgumentParser( + description="Script to calculate LTP tests timeouts") + + parser.add_argument( + '-l', + '--ltp-dir', + type=_dir_exists, + help='LTP source code directory', + default='..') + + parser.add_argument( + '-r', + '--results', + type=_file_exists, + required=True, + help='kirk results.json file location') + + parser.add_argument( + '-o', + '--override', + default=False, + action='store_true', + help='Always override test timeouts') + + parser.add_argument( + '-p', + '--patch', + default=False, + action='store_true', + help='Patch tests with updated timeout') + + parser.add_argument( + '-t', + '--print-table', + default=True, + action='store_true', + help='Print table with suggested timeouts') + + args = parser.parse_args() + + timeouts = _parse_data(args.ltp_dir, args.results) + + if args.print_table: + _print_table(timeouts) + + if args.patch: + _patch_all(args.ltp_dir, timeouts, args.override) + + +if __name__ == "__main__": + run()
Signature · 5 lines
2.43.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v2 2/2 syscalls: Update test timeouts
In reply to Andrea CervesatoFrom: Cyril Hrubis <[email protected]>
This change was genered by:
- running syscalls via kirk on RPi zero and saving the json result
- running 'cd scripts && calctimeouts.py -l /opt/ltp -r results.json -p'
--- testcases/kernel/syscalls/access/access01.c | 1 + testcases/kernel/syscalls/add_key/add_key05.c | 1 + testcases/kernel/syscalls/alarm/alarm05.c | 1 + testcases/kernel/syscalls/alarm/alarm06.c | 1 + testcases/kernel/syscalls/alarm/alarm07.c | 1 + testcases/kernel/syscalls/bind/bind04.c | 1 + testcases/kernel/syscalls/bpf/bpf_prog05.c | 1 + testcases/kernel/syscalls/bpf/bpf_prog06.c | 1 + testcases/kernel/syscalls/bpf/bpf_prog07.c | 1 + testcases/kernel/syscalls/cachestat/cachestat01.c | 1 + testcases/kernel/syscalls/cachestat/cachestat04.c | 1 + testcases/kernel/syscalls/chdir/chdir01.c | 1 + testcases/kernel/syscalls/clock_gettime/leapsec01.c | 1 + testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c | 1 + testcases/kernel/syscalls/clock_settime/clock_settime03.c | 1 + testcases/kernel/syscalls/close_range/close_range01.c | 1 + testcases/kernel/syscalls/connect/connect02.c | 1 + testcases/kernel/syscalls/creat/creat05.c | 1 + testcases/kernel/syscalls/creat/creat09.c | 1 + testcases/kernel/syscalls/execve/execve05.c | 1 + testcases/kernel/syscalls/execveat/execveat03.c | 1 + testcases/kernel/syscalls/fallocate/fallocate04.c | 1 + testcases/kernel/syscalls/fallocate/fallocate05.c | 1 + testcases/kernel/syscalls/fallocate/fallocate06.c | 2 +- testcases/kernel/syscalls/fanotify/fanotify01.c | 1 + testcases/kernel/syscalls/fanotify/fanotify03.c | 1 + testcases/kernel/syscalls/fanotify/fanotify05.c | 1 + testcases/kernel/syscalls/fanotify/fanotify06.c | 1 + testcases/kernel/syscalls/fanotify/fanotify09.c | 1 + testcases/kernel/syscalls/fanotify/fanotify10.c | 1 + testcases/kernel/syscalls/fchmodat2/fchmodat2_01.c | 1 + testcases/kernel/syscalls/fcntl/fcntl14.c | 1 + testcases/kernel/syscalls/fcntl/fcntl36.c | 1 + testcases/kernel/syscalls/fdatasync/fdatasync03.c | 1 + testcases/kernel/syscalls/fgetxattr/fgetxattr01.c | 1 + testcases/kernel/syscalls/fremovexattr/fremovexattr01.c | 1 + testcases/kernel/syscalls/fremovexattr/fremovexattr02.c | 1 + testcases/kernel/syscalls/fsconfig/fsconfig01.c | 1 + testcases/kernel/syscalls/fsconfig/fsconfig03.c | 1 + testcases/kernel/syscalls/fsetxattr/fsetxattr01.c | 1 + testcases/kernel/syscalls/fsmount/fsmount01.c | 1 + testcases/kernel/syscalls/fsmount/fsmount02.c | 1 + testcases/kernel/syscalls/fsopen/fsopen01.c | 1 + testcases/kernel/syscalls/fspick/fspick01.c | 1 + testcases/kernel/syscalls/fspick/fspick02.c | 1 + testcases/kernel/syscalls/fstatfs/fstatfs01.c | 1 + testcases/kernel/syscalls/fsync/fsync01.c | 1 + testcases/kernel/syscalls/fsync/fsync04.c | 1 + testcases/kernel/syscalls/getpid/getpid01.c | 1 + testcases/kernel/syscalls/getxattr/getxattr02.c | 1 + testcases/kernel/syscalls/getxattr/getxattr03.c | 1 + testcases/kernel/syscalls/inotify/inotify03.c | 1 + testcases/kernel/syscalls/inotify/inotify05.c | 1 + testcases/kernel/syscalls/inotify/inotify07.c | 1 + testcases/kernel/syscalls/inotify/inotify08.c | 1 + testcases/kernel/syscalls/inotify/inotify11.c | 1 + testcases/kernel/syscalls/ioctl/ioctl02.c | 1 + testcases/kernel/syscalls/ioctl/ioctl04.c | 1 + testcases/kernel/syscalls/ioctl/ioctl08.c | 1 + testcases/kernel/syscalls/ioctl/ioctl09.c | 1 + testcases/kernel/syscalls/ioctl/ioctl_ficlone02.c | 1 + testcases/kernel/syscalls/ioctl/ioctl_ficlone03.c | 1 + testcases/kernel/syscalls/ioctl/ioctl_ficlonerange01.c | 1 + testcases/kernel/syscalls/ioctl/ioctl_ficlonerange02.c | 1 + testcases/kernel/syscalls/ioctl/ioctl_loop01.c | 1 + 65 files changed, 65 insertions(+), 1 deletion(-)
testcases/kernel/syscalls/access/access01.c +1 -0
@@ -314,6 +314,7 @@ static void setup(void) }static struct tst_test test = { + .timeout =1 , .needs_tmpdir =1 , .needs_root =1 , .forks_child =1 ,
testcases/kernel/syscalls/add_key/add_key05.c +1 -0
@@ -212,6 +212,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =2 , .test = do_test, .tcnt =2 , .needs_root =1 ,
testcases/kernel/syscalls/alarm/alarm05.c +1 -0
@@ -44,6 +44,7 @@ static void setup(void) }static struct tst_test test = { + .timeout =2 , .test_all = run, .setup = setup, };
testcases/kernel/syscalls/alarm/alarm06.c +1 -0
@@ -41,6 +41,7 @@ static void verify_alarm(void) }static struct tst_test test = { + .timeout =4 , .setup = setup, .test_all = verify_alarm, };
testcases/kernel/syscalls/alarm/alarm07.c +1 -0
@@ -47,6 +47,7 @@ static void setup(void) }static struct tst_test test = { + .timeout =4 , .test_all = verify_alarm, .setup = setup, .forks_child =1 ,
testcases/kernel/syscalls/bind/bind04.c +1 -0
@@ -161,6 +161,7 @@ static void test_bind(unsigned int n) }static struct tst_test test = { + .timeout =1 , .test = test_bind, .tcnt =ARRAY_SIZE (testcase_list), .needs_tmpdir =1 ,
testcases/kernel/syscalls/bpf/bpf_prog05.c +1 -0
@@ -190,6 +190,7 @@ static void run(void) }static struct tst_test test = { + .timeout =20 , .setup = setup, .test_all = run, .taint_check =TST_TAINT_W |TST_TAINT_D ,
testcases/kernel/syscalls/bpf/bpf_prog06.c +1 -0
@@ -131,6 +131,7 @@ static void run(void) }static struct tst_test test = { + .timeout =20 , .setup = setup, .test_all = run, .min_kver ="5.8" ,
testcases/kernel/syscalls/bpf/bpf_prog07.c +1 -0
@@ -139,6 +139,7 @@ static void run(void) }static struct tst_test test = { + .timeout =20 , .setup = setup, .test_all = run, .min_kver ="5.8" ,
testcases/kernel/syscalls/cachestat/cachestat01.c +1 -0
@@ -85,6 +85,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =13 , .test = run, .tcnt =2 , .setup = setup,
testcases/kernel/syscalls/cachestat/cachestat04.c +1 -0
@@ -47,6 +47,7 @@ static void run(void) }static struct tst_test test = { + .timeout =2 , .test_all = run, .mount_device =1 , .mntpoint =MNTPOINT ,
testcases/kernel/syscalls/chdir/chdir01.c +1 -0
@@ -149,6 +149,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =10 , .needs_root =1 , .mount_device =1 , .mntpoint =MNTPOINT ,
testcases/kernel/syscalls/clock_gettime/leapsec01.c +1 -0
@@ -196,6 +196,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =40 , .test_all = run_leapsec, .setup = setup, .cleanup = cleanup,
testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c +1 -0
@@ -219,6 +219,7 @@ static void do_test(unsigned int i) }static struct tst_test test = { + .timeout =3 , .tcnt =ARRAY_SIZE (tcase), .test = do_test, .test_variants =ARRAY_SIZE (variants),
testcases/kernel/syscalls/clock_settime/clock_settime03.c +1 -0
@@ -104,6 +104,7 @@ static void run(void) }static struct tst_test test = { + .timeout =4 , .test_all = run, .test_variants =ARRAY_SIZE (variants), .setup = setup,
testcases/kernel/syscalls/close_range/close_range01.c +1 -0
@@ -191,6 +191,7 @@ static void run(unsigned int n) }static struct tst_test test = { + .timeout =9 , .tcnt =4 , .forks_child =1 , .mount_device =1 ,
testcases/kernel/syscalls/connect/connect02.c +1 -0
@@ -126,6 +126,7 @@ static void run(void) }static struct tst_test test = { + .timeout =3 , .test_all = run, .setup = setup, .cleanup = cleanup,
testcases/kernel/syscalls/creat/creat05.c +1 -0
@@ -74,6 +74,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =1 , .test_all = verify_creat, .needs_tmpdir =1 , .setup = setup,
testcases/kernel/syscalls/creat/creat09.c +1 -0
@@ -138,6 +138,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =1 , .test = run, .setup = setup, .cleanup = cleanup,
testcases/kernel/syscalls/execve/execve05.c +1 -0
@@ -62,6 +62,7 @@ static void setup(void) }static struct tst_test test = { + .timeout =3 , .test_all = verify_execve, .options = (struct tst_option []) { {"n:" , &opt_nchild,"Numbers of children" },
testcases/kernel/syscalls/execveat/execveat03.c +1 -0
@@ -68,6 +68,7 @@ static void setup(void) }static struct tst_test test = { + .timeout =1 , .needs_root =1 , .mount_device =1 , .needs_overlay =1 ,
testcases/kernel/syscalls/fallocate/fallocate04.c +1 -0
@@ -282,6 +282,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =9 , .options = (struct tst_option []) { {"v" , &verbose,"Turns on verbose mode" }, {}
testcases/kernel/syscalls/fallocate/fallocate05.c +1 -0
@@ -172,6 +172,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =42 , .needs_root =1 , .mount_device =1 , .mntpoint =MNTPOINT ,
testcases/kernel/syscalls/fallocate/fallocate06.c +1 -1
@@ -261,7 +261,7 @@ static struct tst_test test = { .tcnt = ARRAY_SIZE(testcase_list), .needs_root = 1, .dev_min_size = 1024, - .timeout = 120, + .timeout = 150, .mount_device = 1, .mntpoint = MNTPOINT, .all_filesystems = 1,
testcases/kernel/syscalls/fanotify/fanotify01.c +1 -0
@@ -387,6 +387,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =10 , .test = test_fanotify, .tcnt =ARRAY_SIZE (tcases), .setup = setup,
testcases/kernel/syscalls/fanotify/fanotify03.c +1 -0
@@ -343,6 +343,7 @@ static const char *const resource_files[] = { };static struct tst_test test = { + .timeout =1 , .test = test_fanotify, .tcnt =ARRAY_SIZE (tcases), .setup = setup,
testcases/kernel/syscalls/fanotify/fanotify05.c +1 -0
@@ -208,6 +208,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =13 , .test = test_fanotify, .tcnt =ARRAY_SIZE (tcases), .setup = setup,
testcases/kernel/syscalls/fanotify/fanotify06.c +1 -0
@@ -236,6 +236,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =1 , .test = test_fanotify, .tcnt =ARRAY_SIZE (tcases), .setup = setup,
testcases/kernel/syscalls/fanotify/fanotify09.c +1 -0
@@ -507,6 +507,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =1 , .test = test_fanotify, .tcnt =ARRAY_SIZE (tcases), .setup = setup,
testcases/kernel/syscalls/fanotify/fanotify10.c +1 -0
@@ -959,6 +959,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =10 , .test = test_fanotify, .tcnt =ARRAY_SIZE (tcases), .test_variants =2 ,
testcases/kernel/syscalls/fchmodat2/fchmodat2_01.c +1 -0
@@ -104,6 +104,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =9 , .test_all = run, .setup = setup, .cleanup = cleanup,
testcases/kernel/syscalls/fcntl/fcntl14.c +1 -0
@@ -263,6 +263,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =8 , .test_all = run, .setup = setup, .cleanup = cleanup,
testcases/kernel/syscalls/fcntl/fcntl36.c +1 -0
@@ -387,6 +387,7 @@ static void tests(unsigned int i) }static struct tst_test test = { + .timeout =9 , .needs_tmpdir =1 , .test = tests, .tcnt =ARRAY_SIZE (tcases),
testcases/kernel/syscalls/fdatasync/fdatasync03.c +1 -0
@@ -53,6 +53,7 @@ static void verify_fdatasync(void) }static struct tst_test test = { + .timeout =15 , .needs_root =1 , .mount_device =1 , .all_filesystems =1 ,
testcases/kernel/syscalls/fgetxattr/fgetxattr01.c +1 -0
@@ -134,6 +134,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =10 , .setup = setup, .test = verify_fgetxattr, .cleanup = cleanup,
testcases/kernel/syscalls/fremovexattr/fremovexattr01.c +1 -0
@@ -83,6 +83,7 @@ static void setup(void) }static struct tst_test test = { + .timeout =12 , .setup = setup, .test_all = verify_fremovexattr, .cleanup = cleanup,
testcases/kernel/syscalls/fremovexattr/fremovexattr02.c +1 -0
@@ -105,6 +105,7 @@ static void setup(void) }static struct tst_test test = { + .timeout =10 , .setup = setup, .test = verify_fremovexattr, .cleanup = cleanup,
testcases/kernel/syscalls/fsconfig/fsconfig01.c +1 -0
@@ -82,6 +82,7 @@ static void run(void) }static struct tst_test test = { + .timeout =10 , .test_all = run, .setup = fsopen_supported_by_kernel, .cleanup = cleanup,
testcases/kernel/syscalls/fsconfig/fsconfig03.c +1 -0
@@ -80,6 +80,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =9 , .test_all = run, .setup = setup, .cleanup = cleanup,
testcases/kernel/syscalls/fsetxattr/fsetxattr01.c +1 -0
@@ -214,6 +214,7 @@ static void setup(void) }static struct tst_test test = { + .timeout =10 , .setup = setup, .test = verify_fsetxattr, .cleanup = cleanup,
testcases/kernel/syscalls/fsmount/fsmount01.c +1 -0
@@ -88,6 +88,7 @@ static void run(unsigned int n) }static struct tst_test test = { + .timeout =10 , .tcnt =ARRAY_SIZE (tcases), .test = run, .setup = fsopen_supported_by_kernel,
testcases/kernel/syscalls/fsmount/fsmount02.c +1 -0
@@ -68,6 +68,7 @@ static void run(unsigned int n) }static struct tst_test test = { + .timeout =9 , .tcnt =ARRAY_SIZE (tcases), .test = run, .setup = setup,
testcases/kernel/syscalls/fsopen/fsopen01.c +1 -0
@@ -69,6 +69,7 @@ out: }static struct tst_test test = { + .timeout =9 , .tcnt =ARRAY_SIZE (tcases), .test = run, .setup = fsopen_supported_by_kernel,
testcases/kernel/syscalls/fspick/fspick01.c +1 -0
@@ -56,6 +56,7 @@ out: }static struct tst_test test = { + .timeout =9 , .tcnt =ARRAY_SIZE (tcases), .test = run, .setup = fsopen_supported_by_kernel,
testcases/kernel/syscalls/fspick/fspick02.c +1 -0
@@ -43,6 +43,7 @@ static void run(unsigned int n) }static struct tst_test test = { + .timeout =9 , .tcnt =ARRAY_SIZE (tcases), .test = run, .setup = fsopen_supported_by_kernel,
testcases/kernel/syscalls/fstatfs/fstatfs01.c +1 -0
@@ -56,6 +56,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =9 , .setup = setup, .cleanup = cleanup, .tcnt =ARRAY_SIZE (tcases),
testcases/kernel/syscalls/fsync/fsync01.c +1 -0
@@ -44,6 +44,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =10 , .cleanup = cleanup, .setup = setup, .test_all = verify_fsync,
testcases/kernel/syscalls/fsync/fsync04.c +1 -0
@@ -53,6 +53,7 @@ static void verify_fsync(void) }static struct tst_test test = { + .timeout =17 , .needs_root =1 , .mount_device =1 , .all_filesystems =1 ,
testcases/kernel/syscalls/getpid/getpid01.c +1 -0
@@ -43,6 +43,7 @@ static void verify_getpid(void) }static struct tst_test test = { + .timeout =1 , .setup = setup, .forks_child =1 , .test_all = verify_getpid,
testcases/kernel/syscalls/getxattr/getxattr02.c +1 -0
@@ -105,6 +105,7 @@ static void setup(void) }static struct tst_test test = { + .timeout =10 , .all_filesystems =1 , .needs_root =1 , .mntpoint =MNTPOINT ,
testcases/kernel/syscalls/getxattr/getxattr03.c +1 -0
@@ -37,6 +37,7 @@ static void setup(void) }static struct tst_test test = { + .timeout =14 , .all_filesystems =1 , .needs_root =1 , .mntpoint =MNTPOINT ,
testcases/kernel/syscalls/inotify/inotify03.c +1 -0
@@ -166,6 +166,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =1 , .needs_root =1 , .format_device =1 , .setup = setup,
testcases/kernel/syscalls/inotify/inotify05.c +1 -0
@@ -148,6 +148,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =1 , .needs_tmpdir =1 , .setup = setup, .cleanup = cleanup,
testcases/kernel/syscalls/inotify/inotify07.c +1 -0
@@ -182,6 +182,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =1 , .needs_root =1 , .mount_device =1 , .needs_overlay =1 ,
testcases/kernel/syscalls/inotify/inotify08.c +1 -0
@@ -176,6 +176,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =1 , .needs_root =1 , .mount_device =1 , .needs_overlay =1 ,
testcases/kernel/syscalls/inotify/inotify11.c +1 -0
@@ -119,6 +119,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =12 , .needs_tmpdir =1 , .forks_child =1 , .cleanup = cleanup,
testcases/kernel/syscalls/ioctl/ioctl02.c +1 -0
@@ -242,6 +242,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =9 , .needs_root =1 , .needs_checkpoints =1 , .forks_child =1 ,
testcases/kernel/syscalls/ioctl/ioctl04.c +1 -0
@@ -84,6 +84,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =1 , .format_device =1 , .needs_root =1 , .setup = setup,
testcases/kernel/syscalls/ioctl/ioctl08.c +1 -0
@@ -118,6 +118,7 @@ static void setup(void)static struct tst_test test = { + .timeout =1 , .test = verify_ioctl, .tcnt =ARRAY_SIZE (tcases), .setup = setup,
testcases/kernel/syscalls/ioctl/ioctl09.c +1 -0
@@ -110,6 +110,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =1 , .setup = setup, .cleanup = cleanup, .test_all = verify_ioctl,
testcases/kernel/syscalls/ioctl/ioctl_ficlone02.c +1 -0
@@ -51,6 +51,7 @@ static void setup(void) }static struct tst_test test = { + .timeout =10 , .test_all = run, .setup = setup, .min_kver ="4.5" ,
testcases/kernel/syscalls/ioctl/ioctl_ficlone03.c +1 -0
@@ -101,6 +101,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =1 , .test = run, .tcnt =ARRAY_SIZE (tcases), .setup = setup,
testcases/kernel/syscalls/ioctl/ioctl_ficlonerange01.c +1 -0
@@ -137,6 +137,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =1 , .test_all = run, .setup = setup, .cleanup = cleanup,
testcases/kernel/syscalls/ioctl/ioctl_ficlonerange02.c +1 -0
@@ -74,6 +74,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =4 , .test_all = run, .setup = setup, .cleanup = cleanup,
testcases/kernel/syscalls/ioctl/ioctl_loop01.c +1 -0
@@ -140,6 +140,7 @@ static void cleanup(void) }static struct tst_test test = { + .timeout =1 , .setup = setup, .cleanup = cleanup, .test_all = verify_ioctl_loop,
Signature · 5 lines
2.43.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Li, Peter if possible I would like to get this fix in before there release. I think that adding the timeouts should be safe enough, what do you think?
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 5 lines · Cyril Hrubis
Hi!
Li, Peter if possible I would like to get this fix in before there release. I think that adding the timeouts should be safe enough, what do you think?
Yes, I agree.
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Petr Vorel
Acked-byHi Cyril, Andrea, Li,
Quoted 4 lines
Hi!
Li, Peter if possible I would like to get this fix in before there release. I think that adding the timeouts should be safe enough, what do you think?
Thanks for this! Agree it should be safe to add it before the release.
For both patches:
nit: scripts/calctimeouts.py could have some copyright (not needed).
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Quoted 1 line
nit:
scripts/calctimeouts.pycould have some copyright (not needed).
Ah right, sorry I tend to forget about that. Should have added GPLv2.0 or later SPDX in there.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 5 lines
Hi!
Quoted 1 line
nit:
scripts/calctimeouts.pycould have some copyright (not needed).Ah right, sorry I tend to forget about that. Should have added GPLv2.0 or later SPDX in there.
NOTE: license is added there (SPDX-License-Identifier: GPL-2.0-or-later), that's IMHO required. Copyright (e.g. who created it + year) is IMHO not required, but good to be added.
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp