* [LTP] [PATCH v2 1/5] ioctl_sg01: Add max_runtime
2022-09-14 16:19 [LTP] [PATCH v2 0/5] Max_runtime timeout fixes Martin Doucha
@ 2022-09-14 16:19 ` Martin Doucha
2022-09-14 20:27 ` Petr Vorel
2022-09-15 11:51 ` Cyril Hrubis
2022-09-14 16:19 ` [LTP] [PATCH v2 2/5] copy_file_range01: " Martin Doucha
` (3 subsequent siblings)
4 siblings, 2 replies; 17+ messages in thread
From: Martin Doucha @ 2022-09-14 16:19 UTC (permalink / raw)
To: ltp
Test setup can take very long time depending on the amount of free RAM.
Set high max_runtime to avoid timeout issues.
Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
Changes since v1:
- Changed max_runtime from unlimited to 1 hour
We'll add .max_setup_runtime after the release to not break even more things.
Let's use this as a temporary fix.
testcases/kernel/syscalls/ioctl/ioctl_sg01.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_sg01.c b/testcases/kernel/syscalls/ioctl/ioctl_sg01.c
index 94b30dc6b..dfbba399d 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_sg01.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_sg01.c
@@ -126,6 +126,7 @@ static struct tst_test test = {
.test_all = run,
.setup = setup,
.cleanup = cleanup,
+ .max_runtime = 3600,
.tags = (const struct tst_tag[]) {
{"linux-git", "a45b599ad808"},
{"CVE", "2018-1000204"},
--
2.37.3
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [LTP] [PATCH v2 2/5] copy_file_range01: Add max_runtime
2022-09-14 16:19 [LTP] [PATCH v2 0/5] Max_runtime timeout fixes Martin Doucha
2022-09-14 16:19 ` [LTP] [PATCH v2 1/5] ioctl_sg01: Add max_runtime Martin Doucha
@ 2022-09-14 16:19 ` Martin Doucha
2022-09-14 20:30 ` Petr Vorel
2022-09-14 16:19 ` [LTP] [PATCH v2 3/5] perf_event_open02: " Martin Doucha
` (2 subsequent siblings)
4 siblings, 1 reply; 17+ messages in thread
From: Martin Doucha @ 2022-09-14 16:19 UTC (permalink / raw)
To: ltp
Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
Changes since v1:
- Changed max_runtime from 20s to 5s
testcases/kernel/syscalls/copy_file_range/copy_file_range01.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c b/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
index 7d27007a3..bbcb0ca3b 100644
--- a/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
+++ b/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
@@ -232,4 +232,5 @@ static struct tst_test test = {
.all_filesystems = 1,
.test = copy_file_range_verify,
.test_variants = TEST_VARIANTS,
+ .max_runtime = 5
};
--
2.37.3
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [LTP] [PATCH v2 2/5] copy_file_range01: Add max_runtime
2022-09-14 16:19 ` [LTP] [PATCH v2 2/5] copy_file_range01: " Martin Doucha
@ 2022-09-14 20:30 ` Petr Vorel
0 siblings, 0 replies; 17+ messages in thread
From: Petr Vorel @ 2022-09-14 20:30 UTC (permalink / raw)
To: Martin Doucha; +Cc: ltp
Hi Martin,
merged, with Cyril's RBT (as he proposed this value in v1).
Thanks!
Kind regards,
Petr
> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> ---
> Changes since v1:
> - Changed max_runtime from 20s to 5s
> testcases/kernel/syscalls/copy_file_range/copy_file_range01.c | 1 +
> 1 file changed, 1 insertion(+)
> diff --git a/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c b/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
> index 7d27007a3..bbcb0ca3b 100644
> --- a/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
> +++ b/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
> @@ -232,4 +232,5 @@ static struct tst_test test = {
> .all_filesystems = 1,
> .test = copy_file_range_verify,
> .test_variants = TEST_VARIANTS,
> + .max_runtime = 5
> };
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 17+ messages in thread
* [LTP] [PATCH v2 3/5] perf_event_open02: Add max_runtime
2022-09-14 16:19 [LTP] [PATCH v2 0/5] Max_runtime timeout fixes Martin Doucha
2022-09-14 16:19 ` [LTP] [PATCH v2 1/5] ioctl_sg01: Add max_runtime Martin Doucha
2022-09-14 16:19 ` [LTP] [PATCH v2 2/5] copy_file_range01: " Martin Doucha
@ 2022-09-14 16:19 ` Martin Doucha
2022-09-14 20:31 ` Petr Vorel
2022-09-15 13:43 ` Cyril Hrubis
2022-09-14 16:19 ` [LTP] [PATCH v2 4/5] readahead02: " Martin Doucha
2022-09-14 16:19 ` [LTP] [PATCH v2 5/5] sendfile09: " Martin Doucha
4 siblings, 2 replies; 17+ messages in thread
From: Martin Doucha @ 2022-09-14 16:19 UTC (permalink / raw)
To: ltp
Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
Changes since v1:
- Changed max_runtime from 15s to 72s
Again, we'll add .max_setup_runtime after the new release.
testcases/kernel/syscalls/perf_event_open/perf_event_open02.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c b/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c
index 618a27016..defe13c62 100644
--- a/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c
+++ b/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c
@@ -334,4 +334,5 @@ static struct tst_test test = {
},
.test_all = verify,
.needs_root = 1,
+ .max_runtime = 72
};
--
2.37.3
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [LTP] [PATCH v2 3/5] perf_event_open02: Add max_runtime
2022-09-14 16:19 ` [LTP] [PATCH v2 3/5] perf_event_open02: " Martin Doucha
@ 2022-09-14 20:31 ` Petr Vorel
2022-09-15 13:43 ` Cyril Hrubis
1 sibling, 0 replies; 17+ messages in thread
From: Petr Vorel @ 2022-09-14 20:31 UTC (permalink / raw)
To: Martin Doucha; +Cc: ltp
Hi Martin,
> Changes since v1:
> - Changed max_runtime from 15s to 72s
Reviewed-by: Petr Vorel <pvorel@suse.cz>
> Again, we'll add .max_setup_runtime after the new release.
+1
> testcases/kernel/syscalls/perf_event_open/perf_event_open02.c | 1 +
> 1 file changed, 1 insertion(+)
> diff --git a/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c b/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c
> index 618a27016..defe13c62 100644
> --- a/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c
> +++ b/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c
> @@ -334,4 +334,5 @@ static struct tst_test test = {
> },
> .test_all = verify,
> .needs_root = 1,
> + .max_runtime = 72
> };
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [LTP] [PATCH v2 3/5] perf_event_open02: Add max_runtime
2022-09-14 16:19 ` [LTP] [PATCH v2 3/5] perf_event_open02: " Martin Doucha
2022-09-14 20:31 ` Petr Vorel
@ 2022-09-15 13:43 ` Cyril Hrubis
1 sibling, 0 replies; 17+ messages in thread
From: Cyril Hrubis @ 2022-09-15 13:43 UTC (permalink / raw)
To: Martin Doucha; +Cc: ltp
Hi!
Pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 17+ messages in thread
* [LTP] [PATCH v2 4/5] readahead02: Add max_runtime
2022-09-14 16:19 [LTP] [PATCH v2 0/5] Max_runtime timeout fixes Martin Doucha
` (2 preceding siblings ...)
2022-09-14 16:19 ` [LTP] [PATCH v2 3/5] perf_event_open02: " Martin Doucha
@ 2022-09-14 16:19 ` Martin Doucha
2022-09-14 20:33 ` Petr Vorel
2022-09-15 13:53 ` Cyril Hrubis
2022-09-14 16:19 ` [LTP] [PATCH v2 5/5] sendfile09: " Martin Doucha
4 siblings, 2 replies; 17+ messages in thread
From: Martin Doucha @ 2022-09-14 16:19 UTC (permalink / raw)
To: ltp
Also calculate max_runtime dynamically if the test gets called with
non-default filesize.
Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
Changes since v1:
- Added dynamic runtime calculation for non-default filesize
testcases/kernel/syscalls/readahead/readahead02.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/syscalls/readahead/readahead02.c b/testcases/kernel/syscalls/readahead/readahead02.c
index 4fa8cfaf8..02e866e82 100644
--- a/testcases/kernel/syscalls/readahead/readahead02.c
+++ b/testcases/kernel/syscalls/readahead/readahead02.c
@@ -38,7 +38,9 @@ static char testfile[PATH_MAX] = "testfile";
#define DROP_CACHES_FNAME "/proc/sys/vm/drop_caches"
#define MEMINFO_FNAME "/proc/meminfo"
#define PROC_IO_FNAME "/proc/self/io"
-static size_t testfile_size = 64 * 1024 * 1024;
+#define DEFAULT_FILESIZE (64 * 1024 * 1024)
+
+static size_t testfile_size = DEFAULT_FILESIZE;
static char *opt_fsizestr;
static int pagesize;
static unsigned long cached_max;
@@ -365,8 +367,10 @@ static void setup_readahead_length(void)
static void setup(void)
{
- if (opt_fsizestr)
+ if (opt_fsizestr) {
testfile_size = SAFE_STRTOL(opt_fsizestr, 1, INT_MAX);
+ tst_set_max_runtime(1 + testfile_size / (DEFAULT_FILESIZE/32));
+ }
if (access(PROC_IO_FNAME, F_OK))
tst_brk(TCONF, "Requires " PROC_IO_FNAME);
@@ -406,6 +410,7 @@ static struct tst_test test = {
},
.test = test_readahead,
.tcnt = ARRAY_SIZE(tcases),
+ .max_runtime = 30,
.tags = (const struct tst_tag[]) {
{"linux-git", "b833a3660394"},
{"linux-git", "5b910bd615ba"},
--
2.37.3
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [LTP] [PATCH v2 4/5] readahead02: Add max_runtime
2022-09-14 16:19 ` [LTP] [PATCH v2 4/5] readahead02: " Martin Doucha
@ 2022-09-14 20:33 ` Petr Vorel
2022-09-15 13:53 ` Cyril Hrubis
1 sibling, 0 replies; 17+ messages in thread
From: Petr Vorel @ 2022-09-14 20:33 UTC (permalink / raw)
To: Martin Doucha; +Cc: ltp
Hi Martin,
> Also calculate max_runtime dynamically if the test gets called with
> non-default filesize.
> Changes since v1:
> - Added dynamic runtime calculation for non-default filesize
LGTM, thanks!
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
> testcases/kernel/syscalls/readahead/readahead02.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
> diff --git a/testcases/kernel/syscalls/readahead/readahead02.c b/testcases/kernel/syscalls/readahead/readahead02.c
> index 4fa8cfaf8..02e866e82 100644
> --- a/testcases/kernel/syscalls/readahead/readahead02.c
> +++ b/testcases/kernel/syscalls/readahead/readahead02.c
> @@ -38,7 +38,9 @@ static char testfile[PATH_MAX] = "testfile";
> #define DROP_CACHES_FNAME "/proc/sys/vm/drop_caches"
> #define MEMINFO_FNAME "/proc/meminfo"
> #define PROC_IO_FNAME "/proc/self/io"
> -static size_t testfile_size = 64 * 1024 * 1024;
> +#define DEFAULT_FILESIZE (64 * 1024 * 1024)
> +
> +static size_t testfile_size = DEFAULT_FILESIZE;
> static char *opt_fsizestr;
> static int pagesize;
> static unsigned long cached_max;
> @@ -365,8 +367,10 @@ static void setup_readahead_length(void)
> static void setup(void)
> {
> - if (opt_fsizestr)
> + if (opt_fsizestr) {
> testfile_size = SAFE_STRTOL(opt_fsizestr, 1, INT_MAX);
> + tst_set_max_runtime(1 + testfile_size / (DEFAULT_FILESIZE/32));
> + }
> if (access(PROC_IO_FNAME, F_OK))
> tst_brk(TCONF, "Requires " PROC_IO_FNAME);
> @@ -406,6 +410,7 @@ static struct tst_test test = {
> },
> .test = test_readahead,
> .tcnt = ARRAY_SIZE(tcases),
> + .max_runtime = 30,
> .tags = (const struct tst_tag[]) {
> {"linux-git", "b833a3660394"},
> {"linux-git", "5b910bd615ba"},
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [LTP] [PATCH v2 4/5] readahead02: Add max_runtime
2022-09-14 16:19 ` [LTP] [PATCH v2 4/5] readahead02: " Martin Doucha
2022-09-14 20:33 ` Petr Vorel
@ 2022-09-15 13:53 ` Cyril Hrubis
2022-09-15 14:08 ` Martin Doucha
1 sibling, 1 reply; 17+ messages in thread
From: Cyril Hrubis @ 2022-09-15 13:53 UTC (permalink / raw)
To: Martin Doucha; +Cc: ltp
Hi!
Pushed, thanks.
I guess that for the rest of the problems we should open an issue so
that we do not forget. Or do you plan to continue working on the test
after the release?
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [LTP] [PATCH v2 4/5] readahead02: Add max_runtime
2022-09-15 13:53 ` Cyril Hrubis
@ 2022-09-15 14:08 ` Martin Doucha
2022-09-16 8:47 ` Cyril Hrubis
0 siblings, 1 reply; 17+ messages in thread
From: Martin Doucha @ 2022-09-15 14:08 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
On 15. 09. 22 15:53, Cyril Hrubis wrote:
> Hi!
> Pushed, thanks.
>
> I guess that for the rest of the problems we should open an issue so
> that we do not forget. Or do you plan to continue working on the test
> after the release?
I'm planning to go back to ULP and KVM tests after release so feel free
to open a new ticket for the other suggested improvements.
--
Martin Doucha mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 17+ messages in thread
* [LTP] [PATCH v2 5/5] sendfile09: Add max_runtime
2022-09-14 16:19 [LTP] [PATCH v2 0/5] Max_runtime timeout fixes Martin Doucha
` (3 preceding siblings ...)
2022-09-14 16:19 ` [LTP] [PATCH v2 4/5] readahead02: " Martin Doucha
@ 2022-09-14 16:19 ` Martin Doucha
2022-09-14 20:34 ` Petr Vorel
4 siblings, 1 reply; 17+ messages in thread
From: Martin Doucha @ 2022-09-14 16:19 UTC (permalink / raw)
To: ltp
Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
Changes since v1:
- Changed max_runtime from 20 to 120
testcases/kernel/syscalls/sendfile/sendfile09.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/syscalls/sendfile/sendfile09.c b/testcases/kernel/syscalls/sendfile/sendfile09.c
index 320649dcd..07c43eb59 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile09.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile09.c
@@ -97,6 +97,7 @@ static struct tst_test test = {
.test = run,
.tcnt = ARRAY_SIZE(tc),
.min_kver = "2.6.33",
+ .max_runtime = 120,
.tags = (const struct tst_tag[]) {
{"linux-git", "5d73320a96fcc"},
{}
--
2.37.3
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [LTP] [PATCH v2 5/5] sendfile09: Add max_runtime
2022-09-14 16:19 ` [LTP] [PATCH v2 5/5] sendfile09: " Martin Doucha
@ 2022-09-14 20:34 ` Petr Vorel
2022-09-15 14:06 ` Cyril Hrubis
0 siblings, 1 reply; 17+ messages in thread
From: Petr Vorel @ 2022-09-14 20:34 UTC (permalink / raw)
To: Martin Doucha; +Cc: ltp
Hi Martin, Jan,
> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> ---
> Changes since v1:
> - Changed max_runtime from 20 to 120
Reviewed-by: Petr Vorel <pvorel@suse.cz>
> testcases/kernel/syscalls/sendfile/sendfile09.c | 1 +
> 1 file changed, 1 insertion(+)
> diff --git a/testcases/kernel/syscalls/sendfile/sendfile09.c b/testcases/kernel/syscalls/sendfile/sendfile09.c
> index 320649dcd..07c43eb59 100644
> --- a/testcases/kernel/syscalls/sendfile/sendfile09.c
> +++ b/testcases/kernel/syscalls/sendfile/sendfile09.c
> @@ -97,6 +97,7 @@ static struct tst_test test = {
> .test = run,
> .tcnt = ARRAY_SIZE(tc),
> .min_kver = "2.6.33",
> + .max_runtime = 120,
> .tags = (const struct tst_tag[]) {
> {"linux-git", "5d73320a96fcc"},
> {}
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 17+ messages in thread