From patchwork Tue May 3 17:46:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625667 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=foXmH/9+; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=2B26dBCF; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6mx52fPz9sG2 for ; Wed, 4 May 2022 03:45:21 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id F31A13CA996 for ; Tue, 3 May 2022 19:45:18 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [IPv6:2001:4b78:1:20::4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 44FE73CA949 for ; Tue, 3 May 2022 19:45:02 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 418E91000956 for ; Tue, 3 May 2022 19:45:00 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 940FB210DF; Tue, 3 May 2022 17:45:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599900; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sdgPWAJfDF/QtgOnATG3fCC4alxh84gIbhHgchuSV7o=; b=foXmH/9+/WT69MbJGxelB9w3aLH6tkuuhK52sEtymt7DCh9ztU+xLiuaBHk2ix1Dm2qZLF igGqzm8A+uIXk6OTuni9tQFoKV9iwStnQpHe8LTxJ4oh6HHyfUSNkhWbv4s0I8oulmAkKM JLJky1giTZemOdCkw7ou0+1b7IYlTTw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599900; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sdgPWAJfDF/QtgOnATG3fCC4alxh84gIbhHgchuSV7o=; b=2B26dBCFVI7yUazIj0hsaGPLVv6GkMLL06PwpwOO0Q5an08Op80eVQb0LZ6lr3IrGGRb1U CoRftRWp9E2g/2CQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7821713ABE; Tue, 3 May 2022 17:45:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wGLYGxxqcWLPPQAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:00 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:46:49 +0200 Message-Id: <20220503174718.21205-2-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH v2 01/30] Introduce a concept of max runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" This commit introduce a concept of per iteration max test runtime. In other words test runtime is capped at a certain value in order to make testruns more deterministic. Test is free to to finish before the runtime is used up, for example when maximal number of iterations was reached, but test must stop once the runtime has been used up. Testcases that run for more than a second or two must check for remaining runtime by regular calls to tst_remaining_runtime() and should exit when zero is returned. The test max runtime must be set either by the .max_iteration_runtime in the tst_test structure or in the test setup by a call to tst_set_runtime(). The test timeout is then computed as a sum of DEFAULT_TIMEOUT (currently set to 30 seconds) and the test runtime. The DEFAULT_TIMEOUT is nothing more than a safety margin for teardown of the test. This commit also maps the -I parameter to the test max runtime if available and introduces LTP_RUNTIME_MUL enviroment variable so that we have an easy controll over the runtime cap. Lastly but not least the function related to the timeout are turned into no-op by this commit and removed after all test are converted to the runtime API. Signed-off-by: Cyril Hrubis --- doc/user-guide.txt | 4 + include/tst_test.h | 27 ++++ lib/newlib_tests/.gitignore | 5 +- lib/newlib_tests/test10.c | 22 --- lib/newlib_tests/test12.c | 21 --- lib/newlib_tests/test13.c | 1 - lib/newlib_tests/test_children_cleanup.c | 1 - .../{test18.c => test_runtime01.c} | 10 +- lib/newlib_tests/test_runtime02.c | 31 ++++ lib/tst_test.c | 151 ++++++++++++++---- 10 files changed, 187 insertions(+), 86 deletions(-) delete mode 100644 lib/newlib_tests/test10.c delete mode 100644 lib/newlib_tests/test12.c rename lib/newlib_tests/{test18.c => test_runtime01.c} (58%) create mode 100644 lib/newlib_tests/test_runtime02.c diff --git a/doc/user-guide.txt b/doc/user-guide.txt index f41cbc733..d50d2e0cb 100644 --- a/doc/user-guide.txt +++ b/doc/user-guide.txt @@ -25,6 +25,10 @@ For running LTP network tests see `testcases/network/README.md`. | 'LTP_TIMEOUT_MUL' | Multiply timeout, must be number >= 1 (> 1 is useful for slow machines to avoid unexpected timeout). Variable is also used in shell tests, but ceiled to int. +| 'LTP_RUNTIME_MUL' | Multiplies maximal test iteration runtime. Tests + that run for more than a second or two are capped on + runtime. You can scale the default runtime both up + and down with this multiplier. | 'LTP_VIRT_OVERRIDE' | Overrides virtual machine detection in the test library. Setting it to empty string tell the library that system is not a virtual machine. Other possible diff --git a/include/tst_test.h b/include/tst_test.h index dbe303bc8..c084ce4bc 100644 --- a/include/tst_test.h +++ b/include/tst_test.h @@ -134,6 +134,8 @@ extern unsigned int tst_variant; #define TST_NO_HUGEPAGES ((unsigned long)-1) +#define TST_UNLIMITED_RUNTIME (-1) + struct tst_test { /* number of tests available in test() function */ unsigned int tcnt; @@ -236,6 +238,18 @@ struct tst_test { /* override default timeout per test run, disabled == -1 */ int timeout; + /* + * Maximal test runtime in seconds. + * + * Any test that runs for more than a second or two should set this and + * also use tst_remaining_runtime() to exit when runtime was used up. + * Tests may finish sooner, for example if requested number of + * iterations was reached before the runtime runs out. + * + * If test runtime cannot be know in advance it should be set to + * TST_UNLIMITED_RUNTIME. + */ + int max_iteration_runtime; void (*setup)(void); void (*cleanup)(void); @@ -323,6 +337,19 @@ unsigned int tst_timeout_remaining(void); unsigned int tst_multiply_timeout(unsigned int timeout); void tst_set_timeout(int timeout); +/* + * Returns remaining test runtime. Test that runs for more than a few seconds + * should check if they should exit by calling this function regularly. + * + * The function returns remaining runtime in seconds. If runtime was used up + * zero is returned. + */ +unsigned int tst_remaining_runtime(void); + +/* + * Sets runtime per iteration in seconds. + */ +void tst_set_runtime(int runtime_per_iteration); /* * Returns path to the test temporary directory in a newly allocated buffer. diff --git a/lib/newlib_tests/.gitignore b/lib/newlib_tests/.gitignore index f4414f6a1..59b57d063 100644 --- a/lib/newlib_tests/.gitignore +++ b/lib/newlib_tests/.gitignore @@ -7,9 +7,7 @@ test06 test07 test08 test09 -test10 test11 -test12 test13 test14 test15 @@ -22,7 +20,6 @@ tst_safe_fileops tst_res_hexd tst_strstatus tst_print_result -test18 test19 test20 test22 @@ -56,3 +53,5 @@ tst_needs_cmds05 tst_needs_cmds06 tst_needs_cmds07 tst_needs_cmds08 +test_runtime01 +test_runtime02 diff --git a/lib/newlib_tests/test10.c b/lib/newlib_tests/test10.c deleted file mode 100644 index df61908ac..000000000 --- a/lib/newlib_tests/test10.c +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * Copyright (c) 2016 Linux Test Project - */ - -/* - * Test for watchdog timeout. - */ - -#include "tst_test.h" - - -static void do_test(void) -{ - sleep(2); - tst_res(TPASS, "Not reached"); -} - -static struct tst_test test = { - .test_all = do_test, - .timeout = 1, -}; diff --git a/lib/newlib_tests/test12.c b/lib/newlib_tests/test12.c deleted file mode 100644 index b4f0d6303..000000000 --- a/lib/newlib_tests/test12.c +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * Copyright (c) 2016 Linux Test Project - */ - -/* - * Test for timeout override. - */ - -#include "tst_test.h" - -static void do_test(void) -{ - sleep(1); - tst_res(TPASS, "Passed!"); -} - -static struct tst_test test = { - .timeout = 2, - .test_all = do_test, -}; diff --git a/lib/newlib_tests/test13.c b/lib/newlib_tests/test13.c index c447dc3dc..83c48f734 100644 --- a/lib/newlib_tests/test13.c +++ b/lib/newlib_tests/test13.c @@ -20,7 +20,6 @@ static void do_test(void) } static struct tst_test test = { - .timeout = 1, .forks_child = 1, .test_all = do_test, }; diff --git a/lib/newlib_tests/test_children_cleanup.c b/lib/newlib_tests/test_children_cleanup.c index 2b1ca5f9c..4a1313f6d 100644 --- a/lib/newlib_tests/test_children_cleanup.c +++ b/lib/newlib_tests/test_children_cleanup.c @@ -39,5 +39,4 @@ static void run(void) static struct tst_test test = { .test_all = run, .forks_child = 1, - .timeout = 10, }; diff --git a/lib/newlib_tests/test18.c b/lib/newlib_tests/test_runtime01.c similarity index 58% rename from lib/newlib_tests/test18.c rename to lib/newlib_tests/test_runtime01.c index 026435d7d..79e4c7eac 100644 --- a/lib/newlib_tests/test18.c +++ b/lib/newlib_tests/test_runtime01.c @@ -9,14 +9,18 @@ static void run(void) { + int runtime; + do { + runtime = tst_remaining_runtime(); + tst_res(TINFO, "Remaining runtime %d", runtime); sleep(1); - } while (tst_timeout_remaining() >= 4); + } while (runtime); - tst_res(TPASS, "Timeout remaining: %d", tst_timeout_remaining()); + tst_res(TPASS, "Finished loop!"); } static struct tst_test test = { .test_all = run, - .timeout = 5 + .max_iteration_runtime = 5 }; diff --git a/lib/newlib_tests/test_runtime02.c b/lib/newlib_tests/test_runtime02.c new file mode 100644 index 000000000..1329743f4 --- /dev/null +++ b/lib/newlib_tests/test_runtime02.c @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (c) 2021, Linux Test Project + */ +/* + * This test is set up so that the timeout is not long enough to guarantee + * enough runtime for two iterations, i.e. the timeout without offset and after + * scaling is too small and the tests ends up with TBROK. + * + * You can fix this by exporting LTP_MAX_TEST_RUNTIME=10 before executing the + * test, in that case the runtime would be divided between iterations and timeout + * adjusted so that it provides enough safeguards for the test to finish. + */ + +#include +#include +#include "tst_test.h" + +static void run(void) +{ + while (tst_remaining_runtime()) + sleep(1); + + tst_res(TPASS, "Timeout remaining: %d", tst_remaining_runtime()); +} + +static struct tst_test test = { + .test_all = run, + .max_iteration_runtime = 5, + .test_variants = 2 +}; diff --git a/lib/tst_test.c b/lib/tst_test.c index 8e258594a..096acef96 100644 --- a/lib/tst_test.c +++ b/lib/tst_test.c @@ -45,6 +45,8 @@ const char *TCID __attribute__((weak)); #define GLIBC_GIT_URL "https://sourceware.org/git/?p=glibc.git;a=commit;h=" #define CVE_DB_URL "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-" +#define DEFAULT_TIMEOUT 30 + struct tst_test *tst_test; static const char *tid; @@ -63,6 +65,7 @@ struct results { int warnings; int broken; unsigned int timeout; + int max_iteration_runtime; }; static struct results *results; @@ -464,6 +467,40 @@ pid_t safe_clone(const char *file, const int lineno, return pid; } +static void parse_mul(float *mul, const char *env_name, float min, float max) +{ + char *str_mul; + int ret; + + if (*mul > 0) + return; + + str_mul = getenv(env_name); + + if (!str_mul) { + *mul = 1; + return; + } + + ret = tst_parse_float(str_mul, mul, min, max); + if (ret) { + tst_brk(TBROK, "Failed to parse %s: %s", + env_name, tst_strerrno(ret)); + } +} + +static int multiply_runtime(void) +{ + static float runtime_mul = -1; + + if (tst_test->max_iteration_runtime <= 0) + return tst_test->max_iteration_runtime; + + parse_mul(&runtime_mul, "LTP_RUNTIME_MUL", 0.0099, 100); + + return tst_test->max_iteration_runtime * runtime_mul; +} + static struct option { char *optstr; char *help; @@ -477,6 +514,7 @@ static struct option { static void print_help(void) { unsigned int i; + int timeout, runtime; /* see doc/user-guide.txt, which lists also shell API variables */ fprintf(stderr, "Environment Variables\n"); @@ -489,10 +527,32 @@ static void print_help(void) fprintf(stderr, "LTP_DEV_FS_TYPE Filesystem used for testing (default: %s)\n", DEFAULT_FS_TYPE); fprintf(stderr, "LTP_SINGLE_FS_TYPE Testing only - specifies filesystem instead all supported (for .all_filesystems)\n"); fprintf(stderr, "LTP_TIMEOUT_MUL Timeout multiplier (must be a number >=1)\n"); + fprintf(stderr, "LTP_RUNTIME_MUL Runtime multiplier (must be a number >=1)\n"); fprintf(stderr, "LTP_VIRT_OVERRIDE Overrides virtual machine detection (values: \"\"|kvm|microsoft|xen|zvm)\n"); fprintf(stderr, "TMPDIR Base directory for template directory (for .needs_tmpdir, default: %s)\n", TEMPDIR); fprintf(stderr, "\n"); + fprintf(stderr, "Timeout and runtime\n"); + fprintf(stderr, "-------------------\n"); + + if (tst_test->max_iteration_runtime) { + runtime = multiply_runtime(); + + if (runtime == TST_UNLIMITED_RUNTIME) { + fprintf(stderr, "Test iteration runtime is not limited\n"); + } else { + fprintf(stderr, "Test iteration runtime cap %ih %im %is\n", + runtime/3600, (runtime%3600)/60, runtime % 60); + } + } + + timeout = tst_multiply_timeout(DEFAULT_TIMEOUT); + + fprintf(stderr, "Test timeout (not including runtime) %ih %im %is\n", + timeout/3600, (timeout%3600)/60, timeout % 60); + + fprintf(stderr, "\n"); + fprintf(stderr, "Options\n"); fprintf(stderr, "-------\n"); @@ -620,7 +680,10 @@ static void parse_opts(int argc, char *argv[]) iterations = atoi(optarg); break; case 'I': - duration = atof(optarg); + if (tst_test->max_iteration_runtime > 0) + tst_test->max_iteration_runtime = atoi(optarg); + else + duration = atof(optarg); break; case 'C': #ifdef UCLINUX @@ -1034,6 +1097,11 @@ static void do_setup(int argc, char *argv[]) if (!tst_test) tst_brk(TBROK, "No tests to run"); + if (tst_test->max_iteration_runtime < -1) { + tst_brk(TBROK, "Invalid runtime value %i", + results->max_iteration_runtime); + } + if (tst_test->tconf_msg) tst_brk(TCONF, "%s", tst_test->tconf_msg); @@ -1404,39 +1472,36 @@ static void sigint_handler(int sig LTP_ATTRIBUTE_UNUSED) } unsigned int tst_timeout_remaining(void) +{ + tst_brk(TBROK, "Stub called!"); + return 0; +} + +unsigned int tst_remaining_runtime(void) { static struct timespec now; - unsigned int elapsed; + int elapsed; + + if (results->max_iteration_runtime == TST_UNLIMITED_RUNTIME) + return UINT_MAX; + + if (results->max_iteration_runtime == 0) + tst_brk(TBROK, "Runtime not set!"); if (tst_clock_gettime(CLOCK_MONOTONIC, &now)) tst_res(TWARN | TERRNO, "tst_clock_gettime() failed"); - elapsed = (tst_timespec_diff_ms(now, tst_start_time) + 500) / 1000; - if (results->timeout > elapsed) - return results->timeout - elapsed; + elapsed = tst_timespec_diff_ms(now, tst_start_time) / 1000; + if (results->max_iteration_runtime > elapsed) + return results->max_iteration_runtime - elapsed; return 0; } + unsigned int tst_multiply_timeout(unsigned int timeout) { - char *mul; - int ret; - - if (timeout_mul == -1) { - mul = getenv("LTP_TIMEOUT_MUL"); - if (mul) { - if ((ret = tst_parse_float(mul, &timeout_mul, 1, 10000))) { - tst_brk(TBROK, "Failed to parse LTP_TIMEOUT_MUL: %s", - tst_strerrno(ret)); - } - } else { - timeout_mul = 1; - } - } - if (timeout_mul < 1) - tst_brk(TBROK, "LTP_TIMEOUT_MUL must to be int >= 1! (%.2f)", - timeout_mul); + parse_mul(&timeout_mul, "LTP_TIMEOUT_MUL", 0.099, 10000); if (timeout < 1) tst_brk(TBROK, "timeout must to be >= 1! (%d)", timeout); @@ -1446,37 +1511,48 @@ unsigned int tst_multiply_timeout(unsigned int timeout) void tst_set_timeout(int timeout) { - if (timeout == -1) { + tst_brk(TBROK, "Stub called!"); +} + +static void set_timeout(void) +{ + unsigned int timeout = DEFAULT_TIMEOUT; + + if (results->max_iteration_runtime == TST_UNLIMITED_RUNTIME) { tst_res(TINFO, "Timeout per run is disabled"); return; } - if (timeout < 1) - tst_brk(TBROK, "timeout must to be >= 1! (%d)", timeout); + if (results->max_iteration_runtime < 0) { + tst_brk(TBROK, "max_iteration_runtime must to be >= 0! (%d)", + results->max_iteration_runtime); + } - results->timeout = tst_multiply_timeout(timeout); + results->timeout = tst_multiply_timeout(timeout) + results->max_iteration_runtime; tst_res(TINFO, "Timeout per run is %uh %02um %02us", results->timeout/3600, (results->timeout%3600)/60, results->timeout % 60); +} - if (getpid() == lib_pid) - alarm(results->timeout); - else - heartbeat(); +void tst_set_runtime(int max_iteration_runtime) +{ + results->max_iteration_runtime = max_iteration_runtime; + tst_res(TINFO, "Updating max runtime to %uh %02um %02us", + max_iteration_runtime/3600, (max_iteration_runtime%3600)/60, + max_iteration_runtime % 60); + set_timeout(); + heartbeat(); } static int fork_testrun(void) { int status; - if (tst_test->timeout) - tst_set_timeout(tst_test->timeout); - else - tst_set_timeout(300); - SAFE_SIGNAL(SIGINT, sigint_handler); + alarm(results->timeout); + test_pid = fork(); if (test_pid < 0) tst_brk(TBROK | TERRNO, "fork()"); @@ -1568,6 +1644,11 @@ void tst_run_tcases(int argc, char *argv[], struct tst_test *self) SAFE_SIGNAL(SIGALRM, alarm_handler); SAFE_SIGNAL(SIGUSR1, heartbeat_handler); + if (tst_test->max_iteration_runtime) + results->max_iteration_runtime = tst_test->max_iteration_runtime; + + set_timeout(); + if (tst_test->test_variants) test_variants = tst_test->test_variants; From patchwork Tue May 3 17:46:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625666 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=xL7fig5k; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=fTNA2G3L; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6mk2kHKz9sG2 for ; Wed, 4 May 2022 03:45:08 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id C19653CA952 for ; Tue, 3 May 2022 19:45:04 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [IPv6:2001:4b78:1:20::4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 0E0E53CA949 for ; Tue, 3 May 2022 19:45:01 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 82CB21000958 for ; Tue, 3 May 2022 19:45:01 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 269E6210F4; Tue, 3 May 2022 17:45:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599901; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l3byiRdZ0U7PqFI8g9i52LJu1T2zjJyOEJ5tDB2PXyA=; b=xL7fig5keGrr/VFtV/apQ4X5yLLSb8kjG/P+1iUiPruBcIoth/7DKABcG4hkvNmBoPoK5f R3cOjimJVk0NKy6Wm8JUEzzk6n/5rK0BffaKvJZh9/JYcHm3LSzTqU5zS+8kobnLMRFnQe 8V3BOZ3FmusrNr+yu6WG3Y1iiO3lyPY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599901; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l3byiRdZ0U7PqFI8g9i52LJu1T2zjJyOEJ5tDB2PXyA=; b=fTNA2G3LznqGjgUWC16CBmTAL4uXZ1irYdgtrde1iiyvF8qWwM3Hxy9OHFnCeRR7NRBSZa s/VHR7/fyPox+6AA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 06F9713ABE; Tue, 3 May 2022 17:45:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id JUZwAB1qcWLTPQAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:01 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:46:50 +0200 Message-Id: <20220503174718.21205-3-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH v2 02/30] mtest06/mmap1: Convert to runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/mem/mtest06/mmap1.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/testcases/kernel/mem/mtest06/mmap1.c b/testcases/kernel/mem/mtest06/mmap1.c index 10c47c35c..72506c37b 100644 --- a/testcases/kernel/mem/mtest06/mmap1.c +++ b/testcases/kernel/mem/mtest06/mmap1.c @@ -42,10 +42,8 @@ static int file_size = 1024; static int num_iter = 5000; -static float exec_time = 0.05; /* default is 3 min */ static void *distant_area; -static char *str_exec_time; static jmp_buf jmpbuf; static volatile unsigned char *map_address; static unsigned long page_sz; @@ -206,17 +204,10 @@ static void setup(void) SAFE_MUNMAP(distant_area, distant_mmap_size); distant_area += distant_mmap_size / 2; - if (tst_parse_float(str_exec_time, &exec_time, 0, FLT_MAX)) { - tst_brk(TBROK, "Invalid number for exec_time '%s'", - str_exec_time); - } - sigptr.sa_sigaction = sig_handler; sigemptyset(&sigptr.sa_mask); sigptr.sa_flags = SA_SIGINFO | SA_NODEFER; SAFE_SIGACTION(SIGSEGV, &sigptr, NULL); - - tst_set_timeout((int)(exec_time * 3600)); } static void run(void) @@ -224,8 +215,8 @@ static void run(void) pthread_t thid[2]; int start, last_update; - start = last_update = tst_timeout_remaining(); - while (tst_timeout_remaining() > STOP_THRESHOLD) { + start = last_update = tst_remaining_runtime(); + while (tst_remaining_runtime()) { int fd = mkfile(file_size); tst_atomic_store(0, &mapcnt); @@ -240,11 +231,11 @@ static void run(void) close(fd); - if (last_update - tst_timeout_remaining() >= PROGRESS_SEC) { - last_update = tst_timeout_remaining(); + if (last_update - tst_remaining_runtime() >= PROGRESS_SEC) { + last_update = tst_remaining_runtime(); tst_res(TINFO, "[%03d] mapped: %lu, sigsegv hit: %lu, " "threads spawned: %lu", - start - tst_timeout_remaining(), + start - last_update, map_count, mapped_sigsegv_count, threads_spawned); tst_res(TINFO, " repeated_reads: %ld, " @@ -258,9 +249,6 @@ static void run(void) static struct tst_test test = { .test_all = run, .setup = setup, - .options = (struct tst_option[]) { - {"x:", &str_exec_time, "Exec time (hours)"}, - {} - }, + .max_iteration_runtime = 180, .needs_tmpdir = 1, }; From patchwork Tue May 3 17:46:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625669 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=ABBWfCgp; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=rNeo3cu1; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6nR0lSxz9sG2 for ; Wed, 4 May 2022 03:45:47 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 44E193CA9EF for ; Tue, 3 May 2022 19:45:43 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [IPv6:2001:4b78:1:20::5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 34BE13CA949 for ; Tue, 3 May 2022 19:45:02 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 2312160068E for ; Tue, 3 May 2022 19:45:02 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id ABD3A1F74D; Tue, 3 May 2022 17:45:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599901; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=na0FPhT9EPCmlE/WNsOPSdIb7yTQI0w3LASWMLEYwnk=; b=ABBWfCgpBvKIlDwhCwYyZAvDHXGijr0kyXFNJkB6SIJzQ0UEHyH3Su4nNVxjh6HFwlAvbR gfw5LZSv2hdbsczFln8baLy1xmrTk2Q1mjOUwdi38r7m8Zy15TCINfsvCSmmSlZKMluQ6C W5b8A6YalvAo/+1ZfdHMmsMxo06Td9M= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599901; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=na0FPhT9EPCmlE/WNsOPSdIb7yTQI0w3LASWMLEYwnk=; b=rNeo3cu1EN+afV1lHO3GSxtSdksR4RQIS+59WH+g7wFYiHrd6GC0zlgdeh4IQOKzwtuMsh fo6j+tgEkWxsAWAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 966DC13ABE; Tue, 3 May 2022 17:45:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id x4VgIx1qcWLWPQAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:01 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:46:51 +0200 Message-Id: <20220503174718.21205-4-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH v2 03/30] mtest06/mmap3: Convert to runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/mem/mtest06/mmap3.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/testcases/kernel/mem/mtest06/mmap3.c b/testcases/kernel/mem/mtest06/mmap3.c index 23609752f..461131e15 100644 --- a/testcases/kernel/mem/mtest06/mmap3.c +++ b/testcases/kernel/mem/mtest06/mmap3.c @@ -23,11 +23,9 @@ static char *str_loops; static char *str_threads; static char *map_private; -static char *str_exec_time; static int loops = 1000; static int threads = 40; -static float exec_time = 24; static volatile int sig_caught; static int threads_running; @@ -109,7 +107,7 @@ static void test_mmap(void) long i; pthread_t thids[threads]; - alarm(exec_time * 3600); + alarm(tst_remaining_runtime()); while (!sig_caught) { for (i = 0; i < threads; i++) { @@ -138,11 +136,6 @@ static void setup(void) if (tst_parse_int(str_threads, &threads, 1, INT_MAX)) tst_brk(TBROK, "Invalid number of threads '%s'", str_threads); - if (tst_parse_float(str_exec_time, &exec_time, 0.0005, 9000)) - tst_brk(TBROK, "Invalid execution time '%s'", str_exec_time); - - tst_set_timeout(exec_time * 3600 + 300); - SAFE_SIGNAL(SIGALRM, sig_handler); SAFE_SIGNAL(SIGBUS, sig_handler); SAFE_SIGNAL(SIGSEGV, sig_handler); @@ -155,7 +148,6 @@ static void setup(void) tst_res(TINFO, "Number of loops %i", loops); tst_res(TINFO, "Number of threads %i", threads); tst_res(TINFO, "MAP_PRIVATE = %i", map_private ? 1 : 0); - tst_res(TINFO, "Execution time %fH", exec_time); } static void cleanup(void) @@ -184,11 +176,11 @@ static struct tst_test test = { {"l:", &str_loops, "Number of map-write-unmap loops"}, {"n:", &str_threads, "Number of worker threads"}, {"p", &map_private, "Turns on MAP_PRIVATE (default MAP_SHARED)"}, - {"x:", &str_exec_time, "float Execution time in hours (default 24H)"}, {} }, .needs_tmpdir = 1, .setup = setup, .cleanup = cleanup, .test_all = test_mmap, + .max_iteration_runtime = 86400, }; From patchwork Tue May 3 17:46:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625670 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=nBiTBKM7; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Q5gzenTd; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6nc2bRFz9sG2 for ; Wed, 4 May 2022 03:45:56 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 3DFE13CAA19 for ; Tue, 3 May 2022 19:45:54 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [IPv6:2001:4b78:1:20::5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 3DCAD3CA94A for ; Tue, 3 May 2022 19:45:03 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id D4F95600700 for ; Tue, 3 May 2022 19:45:02 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 92DF821872; Tue, 3 May 2022 17:45:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599902; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SmMlMt9FuzVniuKZ4bMUYl5uGry3oCLmPOjzocf6Yck=; b=nBiTBKM7sxB3uCWulbLGds9jVyemqY1NPw4beEKV1mXrOtk3k7YOp6Kx39a2YTg/4WfROK U8k8/FImzC3xN2VN8VBG5f3A+HjPBWOPojWNSF9mp07RXBOeVHPANUqSMxZWHFkoRP6Fm2 E9Yd4/BgWaKNCcSpl+xInGpmEC3SsGU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599902; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SmMlMt9FuzVniuKZ4bMUYl5uGry3oCLmPOjzocf6Yck=; b=Q5gzenTdwSpLd1QvetV3EmaDqvIv9YfhyGzYvJkd9Sd8ZmvaHa2A5WG0FH0hzv0RSHNV55 l/zDh8fk2EDnooCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7550213ABE; Tue, 3 May 2022 17:45:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 27k3Fx5qcWLrPQAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:02 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:46:52 +0200 Message-Id: <20220503174718.21205-5-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH v2 04/30] mtest01/mtest01: Convert to runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/mem/mtest01/mtest01.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/testcases/kernel/mem/mtest01/mtest01.c b/testcases/kernel/mem/mtest01/mtest01.c index 20cb95191..2991d3d2e 100644 --- a/testcases/kernel/mem/mtest01/mtest01.c +++ b/testcases/kernel/mem/mtest01/mtest01.c @@ -41,8 +41,6 @@ #define ALLOC_THRESHOLD (6*FIVE_HUNDRED_MB) #endif -#define STOP_THRESHOLD 15 /* seconds remaining before reaching timeout */ - static pid_t *pid_list; static sig_atomic_t children_done; static int max_pids; @@ -137,6 +135,7 @@ static void child_loop_alloc(unsigned long long alloc_bytes) { unsigned long bytecount = 0; char *mem; + int runtime_rem; tst_res(TINFO, "... child %d starting", getpid()); @@ -153,12 +152,15 @@ static void child_loop_alloc(unsigned long long alloc_bytes) if (bytecount >= alloc_bytes) break; } + + runtime_rem = tst_remaining_runtime(); + if (dowrite) tst_res(TINFO, "... [t=%d] %lu bytes allocated and used in child %d", - tst_timeout_remaining(), bytecount, getpid()); + runtime_rem, bytecount, getpid()); else tst_res(TINFO, "... [t=%d] %lu bytes allocated only in child %d", - tst_timeout_remaining(), bytecount, getpid()); + runtime_rem, bytecount, getpid()); kill(getppid(), SIGRTMIN); raise(SIGSTOP); @@ -195,10 +197,9 @@ static void mem_test(void) /* wait in the loop for all children finish allocating */ while (children_done < pid_cntr) { - if (tst_timeout_remaining() < STOP_THRESHOLD) { + if (!tst_remaining_runtime()) { tst_res(TWARN, "the remaininig time is not enough for testing"); - break; } @@ -234,6 +235,7 @@ static struct tst_test test = { {"v", &verbose, "Verbose"}, {} }, + .max_iteration_runtime = 300, .setup = setup, .cleanup = cleanup, .test_all = mem_test, From patchwork Tue May 3 17:46:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625671 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=rtbemKUm; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=a9hV5Qw6; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6nt5Dd9z9sG2 for ; Wed, 4 May 2022 03:46:10 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 2CED13CAA16 for ; Tue, 3 May 2022 19:46:08 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [IPv6:2001:4b78:1:20::4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 0E4693CA94E for ; Tue, 3 May 2022 19:45:04 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 9B3831000955 for ; Tue, 3 May 2022 19:45:03 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4D06421875; Tue, 3 May 2022 17:45:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599903; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oVXepiHFa6P1201cZDt51HfQtjTvBX4in+bdW9iieGU=; b=rtbemKUmH4YfT6VMZI++OQjW9merzpnx1QqSg3y24UEsDp7jixBmYwH+Xv/3vn34DILcgR +iRf004t6SqLYkdV1wCmWa+MPWMbPsL+5NlaZA7mTCYUGaERIalkSoePJx9KN9TAmIqQ8t U/A+Dxjj0LclHsPLtH0yPJt2Huiecpk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599903; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oVXepiHFa6P1201cZDt51HfQtjTvBX4in+bdW9iieGU=; b=a9hV5Qw6McYPCNzFqAv+tSMGtPUVq5GYZf5P1GqHQ1iPKRJu6Wdu6v0UPL1AVuyM4bKMD+ q1ifC8bUVaQ1JNAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3CB2F13ABE; Tue, 3 May 2022 17:45:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id KG6eDR9qcWLuPQAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:03 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:46:53 +0200 Message-Id: <20220503174718.21205-6-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH v2 05/30] cve/cve-2015-3290: Convert to runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/cve/cve-2015-3290.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/testcases/cve/cve-2015-3290.c b/testcases/cve/cve-2015-3290.c index fd1abe136..91fe813eb 100644 --- a/testcases/cve/cve-2015-3290.c +++ b/testcases/cve/cve-2015-3290.c @@ -395,10 +395,6 @@ static void *child_thread(void *arg LTP_ATTRIBUTE_UNUSED) return (void *)niter; } -#define TIMEOUT (180) -#define TIME_TO_GIVEUP (TIMEOUT - 5) -#define TIMER_TYPE CLOCK_MONOTONIC - static void do_child(void) { int i, ncpus; @@ -415,7 +411,7 @@ static void do_child(void) for (i = 0; i < ncpus; i++) SAFE_PTHREAD_CREATE(&threads[i], NULL, child_thread, NULL); - sleep(TIME_TO_GIVEUP); + sleep(tst_remaining_runtime()); running = 0; for (i = 0; i < ncpus; i++) { @@ -468,7 +464,7 @@ static struct tst_test test = { .needs_root = 1, .needs_checkpoints = 1, .setup = setup, - .timeout = TIMEOUT, + .max_iteration_runtime = 180, .test_all = run, .tags = (const struct tst_tag[]) { {"linux-git", "9b6e6a8334d5"}, From patchwork Tue May 3 17:46:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625673 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=PUbf1YgX; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=H+B15FOU; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6pK2yB2z9sG2 for ; Wed, 4 May 2022 03:46:33 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id B67333CAA87 for ; Tue, 3 May 2022 19:46:30 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 24C8B3CA967 for ; Tue, 3 May 2022 19:45:05 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 9E4DE1400437 for ; Tue, 3 May 2022 19:45:04 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E543F1F74B; Tue, 3 May 2022 17:45:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599903; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+awJnqlgiXBg3aH31mI0oJlOg9I2JfIGTKc+hFISPNU=; b=PUbf1YgXV/5dcQ5dtC4eTYbj5smZz6Ux66B37RPO7JDPjbLG+UMJHsMn8vFoTuHs5VIFgd 6UbEUJri5xOAJe+Kd/i+kmxYAagD/k3QN8vCMwGrjYkyCWZc5zmIr9ccWfmsfR/PmpoQjW 0iu04DwLti1ajhCIOQKQbMKVV83i2r4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599903; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+awJnqlgiXBg3aH31mI0oJlOg9I2JfIGTKc+hFISPNU=; b=H+B15FOUEnifLzWFh7wvOPmTbr0e0miOFiA5Lm0ntVTcjhyCiUA6J0cbXzD6ZatYUK2et6 ttu9DK/v+QwlC7Dg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C588A13ABE; Tue, 3 May 2022 17:45:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 0fPqLh9qcWLwPQAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:03 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:46:54 +0200 Message-Id: <20220503174718.21205-7-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH v2 06/30] crypto/af_alg02: Convert to runtime. X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/crypto/af_alg02.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/crypto/af_alg02.c b/testcases/kernel/crypto/af_alg02.c index 9894ffacd..b96b8b341 100644 --- a/testcases/kernel/crypto/af_alg02.c +++ b/testcases/kernel/crypto/af_alg02.c @@ -65,7 +65,7 @@ static void run(void) TST_CHECKPOINT_WAIT(0); while (!completed) { - if (tst_timeout_remaining() <= 10) { + if (tst_remaining_runtime()) { pthread_cancel(thr); tst_brk(TBROK, "Timed out while reading from request socket."); @@ -77,7 +77,7 @@ static void run(void) static struct tst_test test = { .test_all = run, - .timeout = 20, + .runtime_per_iteration = 20, .needs_checkpoints = 1, .tags = (const struct tst_tag[]) { {"linux-git", "ecaaab564978"}, From patchwork Tue May 3 17:46:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625672 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=msoyD1Ne; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=aMG8x0Zt; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6p54rXqz9sG2 for ; Wed, 4 May 2022 03:46:21 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 8A8F43CAA50 for ; Tue, 3 May 2022 19:46:19 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [IPv6:2001:4b78:1:20::4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 263433CA968 for ; Tue, 3 May 2022 19:45:05 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id C5D991000953 for ; Tue, 3 May 2022 19:45:04 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 80483210DF; Tue, 3 May 2022 17:45:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599904; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yXhvMotBIOFGO7U/GlwzFIRmAYspQvkKIkYMGb3rcsc=; b=msoyD1Ne3GVFi7Rdys6s/w1iXDlQkxZNa5/Q6esWgFgPJLDkaOAfWEUb2D7tdFZ9hxXsdl I/WPK0kCDgIUGmcEcthuQfjHN2/TBqFcH/1Hq8n+KnXRuUidWjNPAhUPDVworVl8itUsAr wYVIJsYMQO7tMT8rFFAJf4PPerv4X5M= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599904; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yXhvMotBIOFGO7U/GlwzFIRmAYspQvkKIkYMGb3rcsc=; b=aMG8x0Zt+Ih+O4CkSISwbB0PnK44KroL5koGC78YT8Tn1SJKrBlEe3hEW+Wp4hHbxAJ3i4 yYoQAmuB5U03+UBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6DBCB13ABE; Tue, 3 May 2022 17:45:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id lWyNGSBqcWLyPQAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:04 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:46:55 +0200 Message-Id: <20220503174718.21205-8-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH v2 07/30] crypto/pcrypt_aead01: Convert to runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/crypto/pcrypt_aead01.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testcases/kernel/crypto/pcrypt_aead01.c b/testcases/kernel/crypto/pcrypt_aead01.c index 0609af9f6..d10d744c5 100644 --- a/testcases/kernel/crypto/pcrypt_aead01.c +++ b/testcases/kernel/crypto/pcrypt_aead01.c @@ -55,7 +55,7 @@ void run(void) if (TST_RET) tst_brk(TBROK | TRERRNO, "del_alg"); - if (tst_timeout_remaining() < 10) { + if (!tst_remaining_runtime()) { tst_res(TINFO, "Time limit reached, stopping at " "%d iterations", i); break; @@ -75,6 +75,7 @@ static struct tst_test test = { .test_all = run, .cleanup = cleanup, .needs_root = 1, + .max_iteration_runtime = 300, .tags = (const struct tst_tag[]) { {"linux-git", "d76c68109f37"}, {"CVE", "2017-5754"}, From patchwork Tue May 3 17:46:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625674 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=ndGs8MeH; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=XMOnM/fJ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6pW188Lz9sG2 for ; Wed, 4 May 2022 03:46:42 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id DA30C3CAAC8 for ; Tue, 3 May 2022 19:46:40 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [IPv6:2001:4b78:1:20::6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 471AE3CA962 for ; Tue, 3 May 2022 19:45:06 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 957DA1400437 for ; Tue, 3 May 2022 19:45:05 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3426C210F4; Tue, 3 May 2022 17:45:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599905; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LRPgP1tNk2mI0bHW0RwCeYoIxAjdMKtXLRtFzCU41n8=; b=ndGs8MeHEXp0pJ13UyM/5oqg+snCZOyQaixhs7E3lcs4hHT+lRZD+QsEAlZpVY3ko0/ZHO Q6cAbUZrKzwWyVtn5cKgXqaAaiNr9ekSLijttY45Y3SIWsIiOhJr+ctvrxkQ64WBWVM8mm w6C0vNrV3B+M4Z21GOxvsFSC5VI6KIE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599905; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LRPgP1tNk2mI0bHW0RwCeYoIxAjdMKtXLRtFzCU41n8=; b=XMOnM/fJ40YGYebPDDLBjYVfxQwihMCbG+EGFzR8wrclUvXnjXmQBGJaTbHluMu4lo7DwY OYtgxlSQAVrwbwAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 012FF13ABE; Tue, 3 May 2022 17:45:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8zs7OSBqcWL0PQAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:04 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:46:56 +0200 Message-Id: <20220503174718.21205-9-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH v2 08/30] syscalls/clock_gettime01: Remove useless timeout X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/syscalls/clock_gettime/clock_gettime01.c | 1 - 1 file changed, 1 deletion(-) diff --git a/testcases/kernel/syscalls/clock_gettime/clock_gettime01.c b/testcases/kernel/syscalls/clock_gettime/clock_gettime01.c index 11da39cf0..a67639b05 100644 --- a/testcases/kernel/syscalls/clock_gettime/clock_gettime01.c +++ b/testcases/kernel/syscalls/clock_gettime/clock_gettime01.c @@ -126,5 +126,4 @@ static struct tst_test test = { .test_variants = ARRAY_SIZE(variants), .setup = setup, .needs_root = 1, - .timeout = 10, }; From patchwork Tue May 3 17:46:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625675 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=lAqc2Gum; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=R5eD7iOh; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6pk2Dj6z9sG2 for ; Wed, 4 May 2022 03:46:54 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id B0BA63CAACC for ; Tue, 3 May 2022 19:46:51 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [IPv6:2001:4b78:1:20::4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 6F3EA3CA97C for ; Tue, 3 May 2022 19:45:07 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id CB4CB1000959 for ; Tue, 3 May 2022 19:45:06 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5A2EA1F74B; Tue, 3 May 2022 17:45:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599906; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qlFUzx/FeN2NFpfHk/JBxtD02zSFAtsmORI2N9Nwf5Q=; b=lAqc2GumVNWt7VO5KdnLBP6+rnrqMA0Vn8qvEw1Mh7FC/FTEU1m/tf3PvSTHfzgfl/ZIx1 S5nJz7xZ2e0I4PrrSrlZ6UfS9qpVQhF6o/hL4R+wDJwngnZtgOnt63ubpW0/g1/2lDsgeg WJz+M3K+fFXZR+XrX0FWpo6pYhlDAug= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599906; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qlFUzx/FeN2NFpfHk/JBxtD02zSFAtsmORI2N9Nwf5Q=; b=R5eD7iOhnEP9veBikYMpTbIxStXBR2P0JCua8T/KdKMjvVdUH2PIBFaRkTeGgo/c9gzggX Q3JQnP/ie2zn3rBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 32E4B13ABE; Tue, 3 May 2022 17:45:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id NgURByJqcWL3PQAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:06 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:46:57 +0200 Message-Id: <20220503174718.21205-10-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH v2 09/30] syscalls/fanotify22: Remove useless timeout X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" I guess that the timeout was there to exit faster in a case that the test gets stuck. However that is no longer needed as the default timeout was shortented significantly. Signed-off-by: Cyril Hrubis --- testcases/kernel/syscalls/fanotify/fanotify22.c | 1 - 1 file changed, 1 deletion(-) diff --git a/testcases/kernel/syscalls/fanotify/fanotify22.c b/testcases/kernel/syscalls/fanotify/fanotify22.c index f45c8512d..1105172bb 100644 --- a/testcases/kernel/syscalls/fanotify/fanotify22.c +++ b/testcases/kernel/syscalls/fanotify/fanotify22.c @@ -305,7 +305,6 @@ static struct tst_test test = { {"linux-git", "124e7c61deb2"}, {} }, - .timeout = 10, .needs_cmds = (const char *[]) { "debugfs", NULL From patchwork Tue May 3 17:46:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625677 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=tZ8DpS51; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=dWbizc0s; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6qB6BPTz9sG2 for ; Wed, 4 May 2022 03:47:18 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 5B46D3CAADF for ; Tue, 3 May 2022 19:47:16 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id E46163CA95D for ; Tue, 3 May 2022 19:45:08 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-7.smtp.seeweb.it (Postfix) with ESMTPS id 2CC3A20006D for ; Tue, 3 May 2022 19:45:07 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 831D2210DF; Tue, 3 May 2022 17:45:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599907; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/opg+5m4bhh18NsUdNanNPcaKS2VRzysrPoX9aHMczU=; b=tZ8DpS51pQPshrG/JO6klo5QckqrLmTaMXd8j7u/ZlkqJmACQwCYRO1OIAC2T0PhbBG3nk EzQ1FF+Lmu1admioL6Jl8zbYhK8BXROiJTvAULLmTy92UM8p3ZaPk68hCMQE0Gxpb1HcGP IyJrI/OjX7/ph4md34xTiiHjHsE/7is= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599907; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/opg+5m4bhh18NsUdNanNPcaKS2VRzysrPoX9aHMczU=; b=dWbizc0s0eX0SH3ZCyBkH7+va968b0qk/u1lBgnagOAFAg74Gzm7Q0+ZblddPB3DTvJcPU D3PzfDXHeunGMLAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6381913ABE; Tue, 3 May 2022 17:45:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id FTjEFSNqcWL+PQAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:07 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:46:58 +0200 Message-Id: <20220503174718.21205-11-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-7.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-7.smtp.seeweb.it Subject: [LTP] [PATCH v2 10/30] syscalls/gettimeofday02: Convert to runtime. X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- .../kernel/syscalls/gettimeofday/gettimeofday02.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c b/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c index 948d2d8ec..6f175e79b 100644 --- a/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c +++ b/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c @@ -25,8 +25,6 @@ #include "lapi/syscalls.h" static volatile sig_atomic_t done; -static char *str_rtime; -static int rtime = 10; static void breakout(int sig) { @@ -37,6 +35,7 @@ static void verify_gettimeofday(void) { struct __kernel_old_timeval tv1, tv2; unsigned long long cnt = 0; + int rtime = tst_remaining_runtime(); done = 0; @@ -68,21 +67,11 @@ static void verify_gettimeofday(void) static void setup(void) { - if (str_rtime) { - rtime = atoi(str_rtime); - if (rtime <= 0) - tst_brk(TBROK, "Invalid runtime '%s'", str_rtime); - tst_set_timeout(rtime + 60); - } - SAFE_SIGNAL(SIGALRM, breakout); } static struct tst_test test = { .setup = setup, - .options = (struct tst_option[]) { - {"T:", &str_rtime, "Test iteration runtime in seconds"}, - {}, - }, + .max_iteration_runtime = 10, .test_all = verify_gettimeofday, }; From patchwork Tue May 3 17:46:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625676 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=CbC47R6i; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=owtIKfMJ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6py6cPrz9sG2 for ; Wed, 4 May 2022 03:47:06 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 4772D3CAB24 for ; Tue, 3 May 2022 19:47:04 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id AC7F83CA987 for ; Tue, 3 May 2022 19:45:08 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 51A1A1400421 for ; Tue, 3 May 2022 19:45:08 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0E0941F74D; Tue, 3 May 2022 17:45:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599908; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VyPhCkhxOeR5fSIxdfkN/+GLDe5c8SKbffJTmdCbAlA=; b=CbC47R6iNjDux9IuA88jCdKgNh38SqbYvPEQ1MuDvyTgjGnSyomWps6ISXl+zRRG8ODHC9 aXFFE/K47FscCACPgJcRNHgyyzHbVpizPlQQQi7fRytwib8fv0hi6zpDlIXx7YMZA5MIei ytr61Fm/ph4zHAyBB5IQ7uVUmsAyTfo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599908; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VyPhCkhxOeR5fSIxdfkN/+GLDe5c8SKbffJTmdCbAlA=; b=owtIKfMJZ98SjuPEDmddjvLIlkb1EcaRdKT7RwxudN4+c6S5l7IDX0fAXibqczH90TYWlj Dtg0A1rbBX81mTAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E16B313ABE; Tue, 3 May 2022 17:45:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id xH2SNSNqcWIAPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:07 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:46:59 +0200 Message-Id: <20220503174718.21205-12-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH v2 11/30] syscalls/inotify06: Convert to runtime. X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/syscalls/inotify/inotify06.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/testcases/kernel/syscalls/inotify/inotify06.c b/testcases/kernel/syscalls/inotify/inotify06.c index 68813769b..10b5de0bc 100644 --- a/testcases/kernel/syscalls/inotify/inotify06.c +++ b/testcases/kernel/syscalls/inotify/inotify06.c @@ -87,6 +87,11 @@ static void verify_inotify(void) myinotify_add_watch(inotify_fd, names[i], IN_MODIFY); } SAFE_CLOSE(inotify_fd); + + if (!tst_remaining_runtime()) { + tst_res(TINFO, "Test out of runtime, exitting"); + break; + } } /* We survived for given time - test succeeded */ tst_res(TPASS, "kernel survived inotify beating"); @@ -108,7 +113,7 @@ static void cleanup(void) } static struct tst_test test = { - .timeout = 600, + .max_iteration_runtime = 600, .needs_root = 1, .needs_tmpdir = 1, .forks_child = 1, From patchwork Tue May 3 17:47:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625678 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=exOhCvi/; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=VfjCKN2E; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6qN534pz9sG2 for ; Wed, 4 May 2022 03:47:28 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 153F73CAB63 for ; Tue, 3 May 2022 19:47:26 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 762C53CA988 for ; Tue, 3 May 2022 19:45:09 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id D1552600149 for ; Tue, 3 May 2022 19:45:08 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 844651F750; Tue, 3 May 2022 17:45:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599908; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2y+r3C50Zn/8uc0wz/gBU2THYvayC3Sxn8vt25DX99g=; b=exOhCvi/PsPOu/dkFRK/9TV9xs857liEXVoSfcBipDwxGZgbI6V2C/LJrtyabcr1jIvHMR u3VwVSIa/E2P5LgbAOj0v28AgRMe9o66z04n8cOEfBONDZOHsWwLysgvqZPCO6FUiEb/wL 6vGnRnw5SoBm8AN6UuHj4VTh2huTWdU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599908; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2y+r3C50Zn/8uc0wz/gBU2THYvayC3Sxn8vt25DX99g=; b=VfjCKN2EXWuh9pLGQMYprVkQ1PWafpNn2rC3jPUKcX/PAjEtIeX0eeA0C52eKtnpt7uKGm anV/6gL+p3uOYwBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 701E013ABE; Tue, 3 May 2022 17:45:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id SP8bGiRqcWICPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:08 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:00 +0200 Message-Id: <20220503174718.21205-13-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH v2 12/30] syscalls/inotify01: Remove now useless timeout X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/syscalls/inotify/inotify11.c | 1 - 1 file changed, 1 deletion(-) diff --git a/testcases/kernel/syscalls/inotify/inotify11.c b/testcases/kernel/syscalls/inotify/inotify11.c index 062b92409..e426f9e1c 100644 --- a/testcases/kernel/syscalls/inotify/inotify11.c +++ b/testcases/kernel/syscalls/inotify/inotify11.c @@ -117,7 +117,6 @@ static void cleanup(void) } static struct tst_test test = { - .timeout = 10, .needs_tmpdir = 1, .forks_child = 1, .cleanup = cleanup, From patchwork Tue May 3 17:47:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625679 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=HlynYlsj; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=NZ65y355; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6qZ6Bwcz9sG2 for ; Wed, 4 May 2022 03:47:38 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id A5DA13CABBA for ; Tue, 3 May 2022 19:47:36 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [IPv6:2001:4b78:1:20::5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id E5FB13CA972 for ; Tue, 3 May 2022 19:45:09 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 730AE60009C for ; Tue, 3 May 2022 19:45:09 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 1BA4E210F4; Tue, 3 May 2022 17:45:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599909; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=muvQ0jKvz1NR56soV7Kpi0Z0AdCcqC1aGI2xta3Onlg=; b=HlynYlsjhQEkoAKK9FNYd1Jmr+Gw65SKY4sS4Zj+l0bJQxFW4Nmy1uQVZz3iOlpzIsS32i ESdSwnVMOgAatjWOQRVwvqTgk0slzXbDqGgPYD1ky2PwJrk2f6HWiY4Dg44j3xaE48bBxV WB/nODkWwP5OgCOdya4/GxcBaQMPiRE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599909; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=muvQ0jKvz1NR56soV7Kpi0Z0AdCcqC1aGI2xta3Onlg=; b=NZ65y355SuLfWq7/xXnG704hY17SDwmsufulYyd4oCKMn3nV9DaucBvUI2LIqN/JqzXxR3 qOpHTg3JwlU80ACg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id F2AB313ABE; Tue, 3 May 2022 17:45:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8wyQOSRqcWIEPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:08 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:01 +0200 Message-Id: <20220503174718.21205-14-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH v2 13/30] syscalls/perf_event_open03: Convert to runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- .../syscalls/perf_event_open/perf_event_open03.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/testcases/kernel/syscalls/perf_event_open/perf_event_open03.c b/testcases/kernel/syscalls/perf_event_open/perf_event_open03.c index 6dffc8272..38897d1bf 100644 --- a/testcases/kernel/syscalls/perf_event_open/perf_event_open03.c +++ b/testcases/kernel/syscalls/perf_event_open/perf_event_open03.c @@ -25,7 +25,7 @@ const int iterations = 12000000; static int fd = -1; -static int timeout; +static int runtime; static void setup(void) { @@ -43,12 +43,12 @@ static void setup(void) SAFE_FILE_SCANF(INTEL_PT_PATH, "%d", &ev.type); fd = perf_event_open(&ev, getpid(), -1, -1, 0); - timeout = tst_timeout_remaining(); + runtime = tst_remaining_runtime(); } /* * Check how fast we can do the iterations after 5 seconds of runtime. - * If the rate is too small to complete for current timeout then + * If the rate is too small to complete for current runtime then * stop the test. */ static void check_progress(int i) @@ -67,11 +67,11 @@ static void check_progress(int i) if (elapsed_ms > 5000) { iter_per_ms = (float) i / elapsed_ms; tst_res(TINFO, "rate: %f iters/ms", iter_per_ms); - tst_res(TINFO, "needed rate for current test timeout: %f iters/ms", - (float) iterations / (timeout * 1000)); + tst_res(TINFO, "needed rate for current test runtime: %f iters/ms", + (float) iterations / (runtime * 1000)); - if (iter_per_ms * 1000 * (timeout - 1) < iterations) - tst_brk(TCONF, "System too slow to complete test in specified timeout"); + if (iter_per_ms * 1000 * (runtime - 1) < iterations) + tst_brk(TCONF, "System too slow to complete test in specified runtime"); } } @@ -108,6 +108,7 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .needs_root = 1, + .max_iteration_runtime = 300, .tags = (const struct tst_tag[]) { {"linux-git", "7bdb157cdebb"}, {"CVE", "2020-25704"}, From patchwork Tue May 3 17:47:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625680 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=VYZYEcro; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=EOsvsgrA; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6qn6Sjkz9sG2 for ; Wed, 4 May 2022 03:47:49 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 452963CABDC for ; Tue, 3 May 2022 19:47:47 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [IPv6:2001:4b78:1:20::6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 632713CA98B for ; Tue, 3 May 2022 19:45:10 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 022CA1400421 for ; Tue, 3 May 2022 19:45:10 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A946E210DF; Tue, 3 May 2022 17:45:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599909; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dDI+kxOQ/xvFfNrUmt3iRhZ/j7Q8VtXAPuP+N65iZeY=; b=VYZYEcromWW0N0HKicNj47Xs6nOIWX4oQBihbIxRHQhho+DsAuRUK8QcuIxL2uq3E0KTo5 5euIahf4O2USpUpzGmPE24Od/5R+CEiJ8FK+T6AlS4YabckZbqFQkG+FM4dr5AYaT8Iufa b01rYMy9Arta1vc0rbuO+Py3Q7pLSdA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599909; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dDI+kxOQ/xvFfNrUmt3iRhZ/j7Q8VtXAPuP+N65iZeY=; b=EOsvsgrA/PDY5oum37GnOyzpXl7D6v2aMgX+OSucH07xCvqwCMfFewEpSFbkbhmxlJjJNr mcgVH8gh3asdssCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 95D4013ABE; Tue, 3 May 2022 17:45:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id C/UnIyVqcWIGPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:09 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:02 +0200 Message-Id: <20220503174718.21205-15-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH v2 14/30] syscalls/readv01: Remove now useless timeout X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/syscalls/readv/readv01.c | 1 - 1 file changed, 1 deletion(-) diff --git a/testcases/kernel/syscalls/readv/readv01.c b/testcases/kernel/syscalls/readv/readv01.c index f12b3f09f..2bd3fd5eb 100644 --- a/testcases/kernel/syscalls/readv/readv01.c +++ b/testcases/kernel/syscalls/readv/readv01.c @@ -110,7 +110,6 @@ static struct tst_test test = { .test = test_readv, .tcnt = ARRAY_SIZE(testcase_list), .needs_tmpdir = 1, - .timeout = 15, .tags = (const struct tst_tag[]) { {"linux-git", "19f18459330f"}, {} From patchwork Tue May 3 17:47:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625681 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=Si3PitwR; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=vLJlGczX; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6r04bRwz9sG2 for ; Wed, 4 May 2022 03:48:00 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 1BE883CABFD for ; Tue, 3 May 2022 19:47:58 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [IPv6:2001:4b78:1:20::4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id EBEED3CA988 for ; Tue, 3 May 2022 19:45:10 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 85A431000953 for ; Tue, 3 May 2022 19:45:10 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 36BDE21872; Tue, 3 May 2022 17:45:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599910; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0I5KJ2ihHqCd/8vJAbL6VkOrnUpl9Qw8ty22c4pPOeY=; b=Si3PitwRzWhWWcD38T4r1Rxt67XTfXGuJc+er24OA9+ulDX92hLgfUqdL4z1FTuKBRsl+d VKqRl2DhFRUv6g9lAqyH6loA0fHjuAswfaZiEjMsxvIjyAqyC3xfRbUmFeB/CpXenI2w+/ jqMHFwPQUp6XxOl3F3etvAjXYUXbB14= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599910; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0I5KJ2ihHqCd/8vJAbL6VkOrnUpl9Qw8ty22c4pPOeY=; b=vLJlGczXp0xhBCDZaqRJwp0bEAS6ZJ0gB44ynO57DUJraa/n2YNqwdjVup6FK7iEOo3cEM pnGRJ6I7VgsIFDDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2164E13ABE; Tue, 3 May 2022 17:45:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yezaBiZqcWIIPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:10 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:03 +0200 Message-Id: <20220503174718.21205-16-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH v2 15/30] syscalls/tgkill03: Remove now unused timeout X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/syscalls/tgkill/tgkill03.c | 1 - 1 file changed, 1 deletion(-) diff --git a/testcases/kernel/syscalls/tgkill/tgkill03.c b/testcases/kernel/syscalls/tgkill/tgkill03.c index 0002f3278..e46e95f73 100644 --- a/testcases/kernel/syscalls/tgkill/tgkill03.c +++ b/testcases/kernel/syscalls/tgkill/tgkill03.c @@ -117,5 +117,4 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .test = run, - .timeout = 20, }; From patchwork Tue May 3 17:47:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625682 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=0vNMwlGb; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Y9msBfTg; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6rC3tcbz9sG2 for ; Wed, 4 May 2022 03:48:11 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 1AEE13CABFF for ; Tue, 3 May 2022 19:48:09 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 9CD973CA98B for ; Tue, 3 May 2022 19:45:11 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 49C26600149 for ; Tue, 3 May 2022 19:45:11 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id ED74621875; Tue, 3 May 2022 17:45:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599910; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5Omw6uawwADSiWS/mYHtnWUzfXj0yP4/zmNjjySZ2sw=; b=0vNMwlGbdzkoAPom4dRypCpxxeSV6xI0XUxNNFAlbbd64nleJ+MeaXh9wu9GJDE0hCVw42 WupNJHFWrf0SaOP4NBhCpdrwU/SEhGiVicx28Rg9sNSROLK1YwgoeN4MSfLhnmnA68Qzgm hv5thoMaaybVvU9bYhkIxsZmgX6paJ8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599910; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5Omw6uawwADSiWS/mYHtnWUzfXj0yP4/zmNjjySZ2sw=; b=Y9msBfTgp/4wGXPADl8DiT4ZF78lSmuJd6mA3oupGstaSIi/zdIloFrb2VHEidC8n3KH7H qVh8o/SgMRxwrpAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id DD08313ABE; Tue, 3 May 2022 17:45:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id YzCINCZqcWIKPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:10 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:04 +0200 Message-Id: <20220503174718.21205-17-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH v2 16/30] syscalls/setsockopt09: Remove now useless timeout X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/syscalls/setsockopt/setsockopt09.c | 1 - 1 file changed, 1 deletion(-) diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt09.c b/testcases/kernel/syscalls/setsockopt/setsockopt09.c index 3047ec0ff..98f7fd00e 100644 --- a/testcases/kernel/syscalls/setsockopt/setsockopt09.c +++ b/testcases/kernel/syscalls/setsockopt/setsockopt09.c @@ -117,7 +117,6 @@ static struct tst_test test = { .test_all = run, .setup = setup, .cleanup = cleanup, - .timeout = 5, .taint_check = TST_TAINT_W | TST_TAINT_D, .needs_kconfigs = (const char *[]) { "CONFIG_USER_NS=y", From patchwork Tue May 3 17:47:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625684 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=E6iGzQKg; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=HsvRrZbp; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6rZ4wjvz9sG2 for ; Wed, 4 May 2022 03:48:30 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 9FB6C3CAC5A for ; Tue, 3 May 2022 19:48:27 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id D5DBC3CA96B for ; Tue, 3 May 2022 19:45:12 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 353B860068E for ; Tue, 3 May 2022 19:45:11 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8C5951F74B; Tue, 3 May 2022 17:45:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599911; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oHyVm4YwjKcczEA/lwMAQ3KG67BJAWFsJuYhAYORIJU=; b=E6iGzQKgWTZ48IePU/4e/QW7TcrQ1uYMsS21YYiPz+/gx+dsHUXSNkiSt4946CmfsTQi/R Mj23vOep0brgdA5uCJs5IiflkTk/bNUL2xpIxcVmM6WIwvCr91qYyC0ElaZ9DdWazRDLnF u3Bc1/BQzofcBT4h44xxfV9lCZWCoPM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599911; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oHyVm4YwjKcczEA/lwMAQ3KG67BJAWFsJuYhAYORIJU=; b=HsvRrZbpB5Gmy7TJPFUsbskcHrtPL0whuFXFThiDTIidQgTIe37EYl9xP1seU0cMVfxnqM au+M2mJ+/9z0E5DA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 75E4213ABE; Tue, 3 May 2022 17:45:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qMNTGydqcWIOPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:11 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:05 +0200 Message-Id: <20220503174718.21205-18-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH v2 17/30] syscalls/userfaultfd01: Remove now useless timeout X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/syscalls/userfaultfd/userfaultfd01.c | 1 - 1 file changed, 1 deletion(-) diff --git a/testcases/kernel/syscalls/userfaultfd/userfaultfd01.c b/testcases/kernel/syscalls/userfaultfd/userfaultfd01.c index 4e178b4f8..2dae2ec78 100644 --- a/testcases/kernel/syscalls/userfaultfd/userfaultfd01.c +++ b/testcases/kernel/syscalls/userfaultfd/userfaultfd01.c @@ -121,7 +121,6 @@ static void run(void) static struct tst_test test = { .test_all = run, .min_kver = "4.3", - .timeout = 20 }; #else From patchwork Tue May 3 17:47:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625683 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=0XPnUABD; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=1pYs98Il; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6rN4ybwz9sG2 for ; Wed, 4 May 2022 03:48:20 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 4465C3CABF4 for ; Tue, 3 May 2022 19:48:18 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [IPv6:2001:4b78:1:20::4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id D79123CA96E for ; Tue, 3 May 2022 19:45:12 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 7422F1000956 for ; Tue, 3 May 2022 19:45:12 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 238B31F74D; Tue, 3 May 2022 17:45:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599912; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5mDGe1GBQn1rNP2uPcyQQTWq6Wam1MBHVJ44w46HpD4=; b=0XPnUABDuekiYnLgPstG3azDLgXIvhXBEnZ7cBqYaGiwnXeWgcSPOvl3BxCPnE32/diwHy h7NTpCKx9lJ8HlMXLeekNORB3MKyJW1H+uFlxYFxCHEgn5kDESHZ+9jwB+oOnnZ1eXFqqM eBY+gYPvPqu+jo2ppr2hNKKYd8S6JSI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599912; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5mDGe1GBQn1rNP2uPcyQQTWq6Wam1MBHVJ44w46HpD4=; b=1pYs98IlmsR1AE02kUGcyBbWFS10vZJ811TXGm6q0TWyONkI/FFfrBkVvGmI87Oghcevrv d3NiTaFMCB7I1/DA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 11CAB13ABE; Tue, 3 May 2022 17:45:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4uXwAihqcWIQPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:12 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:06 +0200 Message-Id: <20220503174718.21205-19-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH v2 18/30] syscalls/move_pages12: Convert to runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/syscalls/move_pages/move_pages12.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/syscalls/move_pages/move_pages12.c b/testcases/kernel/syscalls/move_pages/move_pages12.c index 220130f4b..26271eaaf 100644 --- a/testcases/kernel/syscalls/move_pages/move_pages12.c +++ b/testcases/kernel/syscalls/move_pages/move_pages12.c @@ -153,7 +153,6 @@ static void do_test(unsigned int n) void *ptr; pid_t cpid = -1; int status; - unsigned int twenty_percent = (tst_timeout_remaining() / 5); addr = SAFE_MMAP(NULL, tcases[n].tpages * hpsz, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0); @@ -198,7 +197,7 @@ static void do_test(unsigned int n) SAFE_MUNMAP(addr, tcases[n].tpages * hpsz); - if (tst_timeout_remaining() < twenty_percent) + if (!tst_remaining_runtime()) break; } @@ -341,6 +340,7 @@ static struct tst_test test = { .cleanup = cleanup, .test = do_test, .tcnt = ARRAY_SIZE(tcases), + .max_iteration_runtime = 240, .tags = (const struct tst_tag[]) { {"linux-git", "e66f17ff7177"}, {"linux-git", "c9d398fa2378"}, From patchwork Tue May 3 17:47:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625685 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=tXrasiHj; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=5Hy7O9Ry; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6rl6x3Rz9sG2 for ; Wed, 4 May 2022 03:48:39 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 192353CAC39 for ; Tue, 3 May 2022 19:48:37 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [IPv6:2001:4b78:1:20::6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 6503B3CA988 for ; Tue, 3 May 2022 19:45:13 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id F1EBA1400451 for ; Tue, 3 May 2022 19:45:12 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9FFDF210DF; Tue, 3 May 2022 17:45:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599912; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yqqK2rkBO5lu/TbauT51xEV0z4tjmkHgYwBTBLYhZ4c=; b=tXrasiHjxkDIm6GO2n/KkDidVVe5IR2nYYEPJcBBYGeR9qMHykOojkEUWe+PYr2sWFlbIz JhKP3Ekdmy7eFRGwmggZiKfpHjnQ+FimqpkakUkMg/P2taoS/XULjDBkvPsF6uyvDmxHP7 BSHbLXBidrmzE6XFPm1qG8ttTGuE/FE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599912; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yqqK2rkBO5lu/TbauT51xEV0z4tjmkHgYwBTBLYhZ4c=; b=5Hy7O9Ryq14NISb8ae40SNt+kqdYuaWdA56kWIV2vDhc0hFR4h7lHpKWHf8/7Le7v+BG8P xLZdpJOz2ETLo/Aw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8D4BA13ABE; Tue, 3 May 2022 17:45:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id HGT3IChqcWISPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:12 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:07 +0200 Message-Id: <20220503174718.21205-20-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH v2 19/30] syscalls/rt_sigqueueinfo01: Remove now useless timeout X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c | 1 - 1 file changed, 1 deletion(-) diff --git a/testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c b/testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c index 5996e998b..c8b07c077 100644 --- a/testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c +++ b/testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c @@ -108,7 +108,6 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .needs_checkpoints = 1, - .timeout = 20, }; #else From patchwork Tue May 3 17:47:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625686 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=NtGPTQJe; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=mGG01yki; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6rx0w98z9sG2 for ; Wed, 4 May 2022 03:48:49 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 102CE3CAC8E for ; Tue, 3 May 2022 19:48:47 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [217.194.8.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id E99FE3CA983 for ; Tue, 3 May 2022 19:45:13 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 6E3381000953 for ; Tue, 3 May 2022 19:45:13 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 27C11210F4; Tue, 3 May 2022 17:45:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599913; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ctz5qRsk5gNtiljsXDaHJwYBqxm6gochu5uiRYOJhuQ=; b=NtGPTQJeouAGmyOH53LncI4iLUw7mecQAByAqVoX+gVz5QRgfUGhh79vUsinzbIelMRRE1 Ls0aec1jj/uEUyL85sMeGXV5chr1eq8Cge4NoebfPpK1HsI2GZDiMhBNjS5GFJ2q/AlAdc VvjtjJWa6a/HBl24QfKnXMxeKxb+xH8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599913; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ctz5qRsk5gNtiljsXDaHJwYBqxm6gochu5uiRYOJhuQ=; b=mGG01ykiUq2GBODagDrevPhtGLBOTbnnBU8ild914RHWeWcWocxaUotIZ2blK1uDYI54rT TxR08wVkaFGEVKAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1593713ABE; Tue, 3 May 2022 17:45:13 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id e7oMBClqcWIUPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:13 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:08 +0200 Message-Id: <20220503174718.21205-21-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH v2 20/30] mem/mallocstress: Convert to runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/mem/mtest07/mallocstress.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/testcases/kernel/mem/mtest07/mallocstress.c b/testcases/kernel/mem/mtest07/mallocstress.c index fa7494e7d..089e42bc0 100644 --- a/testcases/kernel/mem/mtest07/mallocstress.c +++ b/testcases/kernel/mem/mtest07/mallocstress.c @@ -62,7 +62,7 @@ static void my_yield(void) * 0: success * 1: failure */ -int allocate_free(int scheme) +int allocate_free(int scheme, int threadnum) { int loop; const int MAXPTRS = 50; /* only 42 or so get used on 32 bit machine */ @@ -127,6 +127,11 @@ int allocate_free(int scheme) } my_yield(); + + if (!tst_remaining_runtime()) { + tst_res(TINFO, "Thread [%d]: Test runtime is over, exitting", threadnum); + break; + } } /* Success! */ @@ -141,7 +146,7 @@ void *alloc_mem(void *threadnum) TST_CHECKPOINT_WAIT(0); /* thread N will use growth scheme N mod 4 */ - err = allocate_free(((uintptr_t)threadnum) % 4); + err = allocate_free(((uintptr_t)threadnum) % 4, (uintptr_t)threadnum); tst_res(TINFO, "Thread [%d]: allocate_free() returned %d, %s. Thread exiting.\n", (int)(uintptr_t)threadnum, err, @@ -189,7 +194,7 @@ static void cleanup(void) } static struct tst_test test = { - .timeout = 600, + .max_iteration_runtime = 600, .needs_checkpoints = 1, .setup = setup, .cleanup = cleanup, From patchwork Tue May 3 17:47:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625688 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=enY+2QcF; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=rlozFPdL; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6sJ1tCnz9sGP for ; Wed, 4 May 2022 03:49:08 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id AC1533CAC6F for ; Tue, 3 May 2022 19:49:05 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [217.194.8.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id D0FCE3CA992 for ; Tue, 3 May 2022 19:45:14 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 5077D60081A for ; Tue, 3 May 2022 19:45:14 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A83D01F74B; Tue, 3 May 2022 17:45:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599913; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c5x1ZMY6dCn0plCwC7XC78GIE/Bdt5qXVG9/Bp6tEjY=; b=enY+2QcFJbdJ0MStq7SnEUUobwOLi+4Cpe6hPpucwCV2/4DzmpODpKJE47AeO5TIAtScLh KpkltFMIAfSaOO4GQlT57DbCD6bwlbWGkNaOWRqgvCipIPXmRYOYEYBCNOwW+KtorAIH11 2+jqPym1MDM+HnaNAeJ85OB3rHezNL8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599913; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c5x1ZMY6dCn0plCwC7XC78GIE/Bdt5qXVG9/Bp6tEjY=; b=rlozFPdLq+QJuhSE8nol+Mpi8IBgeKjaehdslxnc2BO6qDTk4qr8VLi8jjmyccyZUPUbD/ tgTYQNkx9mB5GXCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 95A5713ABE; Tue, 3 May 2022 17:45:13 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yUx3IylqcWIWPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:13 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:09 +0200 Message-Id: <20220503174718.21205-22-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH v2 21/30] mem/{oom, min_free_kbytes}: Convert to runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" This just sets the runtime to TST_UNLIMITED_RUNTIME which disables the timeout. Signed-off-by: Cyril Hrubis --- testcases/kernel/mem/oom/oom01.c | 2 +- testcases/kernel/mem/oom/oom02.c | 2 +- testcases/kernel/mem/oom/oom03.c | 2 +- testcases/kernel/mem/oom/oom04.c | 2 +- testcases/kernel/mem/oom/oom05.c | 2 +- testcases/kernel/mem/tunable/min_free_kbytes.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/testcases/kernel/mem/oom/oom01.c b/testcases/kernel/mem/oom/oom01.c index 258bfd89e..c4dd55e63 100644 --- a/testcases/kernel/mem/oom/oom01.c +++ b/testcases/kernel/mem/oom/oom01.c @@ -63,7 +63,7 @@ static void cleanup(void) static struct tst_test test = { .needs_root = 1, .forks_child = 1, - .timeout = -1, + .max_iteration_runtime = TST_UNLIMITED_RUNTIME, .setup = setup, .cleanup = cleanup, .test_all = verify_oom, diff --git a/testcases/kernel/mem/oom/oom02.c b/testcases/kernel/mem/oom/oom02.c index 2b9bcb1b2..bc6f9c105 100644 --- a/testcases/kernel/mem/oom/oom02.c +++ b/testcases/kernel/mem/oom/oom02.c @@ -70,7 +70,7 @@ static void cleanup(void) static struct tst_test test = { .needs_root = 1, .forks_child = 1, - .timeout = -1, + .max_iteration_runtime = TST_UNLIMITED_RUNTIME, .setup = setup, .cleanup = cleanup, .test_all = verify_oom, diff --git a/testcases/kernel/mem/oom/oom03.c b/testcases/kernel/mem/oom/oom03.c index 48a0f20b5..cfbcba615 100644 --- a/testcases/kernel/mem/oom/oom03.c +++ b/testcases/kernel/mem/oom/oom03.c @@ -95,7 +95,7 @@ static void cleanup(void) static struct tst_test test = { .needs_root = 1, .forks_child = 1, - .timeout = -1, + .max_iteration_runtime = TST_UNLIMITED_RUNTIME, .setup = setup, .cleanup = cleanup, .test_all = verify_oom, diff --git a/testcases/kernel/mem/oom/oom04.c b/testcases/kernel/mem/oom/oom04.c index 6b65383a3..fb70a69ae 100644 --- a/testcases/kernel/mem/oom/oom04.c +++ b/testcases/kernel/mem/oom/oom04.c @@ -91,7 +91,7 @@ static void cleanup(void) static struct tst_test test = { .needs_root = 1, .forks_child = 1, - .timeout = -1, + .max_iteration_runtime = TST_UNLIMITED_RUNTIME, .setup = setup, .cleanup = cleanup, .test_all = verify_oom, diff --git a/testcases/kernel/mem/oom/oom05.c b/testcases/kernel/mem/oom/oom05.c index 91c9bec83..6a8750353 100644 --- a/testcases/kernel/mem/oom/oom05.c +++ b/testcases/kernel/mem/oom/oom05.c @@ -113,7 +113,7 @@ void cleanup(void) static struct tst_test test = { .needs_root = 1, .forks_child = 1, - .timeout = -1, + .max_iteration_runtime = TST_UNLIMITED_RUNTIME, .setup = setup, .cleanup = cleanup, .test_all = verify_oom, diff --git a/testcases/kernel/mem/tunable/min_free_kbytes.c b/testcases/kernel/mem/tunable/min_free_kbytes.c index 09741eea3..c9b766c2b 100644 --- a/testcases/kernel/mem/tunable/min_free_kbytes.c +++ b/testcases/kernel/mem/tunable/min_free_kbytes.c @@ -231,7 +231,7 @@ static void cleanup(void) static struct tst_test test = { .needs_root = 1, .forks_child = 1, - .timeout = -1, + .max_iteration_runtime = TST_UNLIMITED_RUNTIME, .setup = setup, .cleanup = cleanup, .test_all = min_free_kbytes_test, From patchwork Tue May 3 17:47:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625687 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=rR1/Cps3; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=RzeI6jEe; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6s674mnz9sGP for ; Wed, 4 May 2022 03:48:58 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 6A0863CAC92 for ; Tue, 3 May 2022 19:48:56 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [217.194.8.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id DAB6F3CA994 for ; Tue, 3 May 2022 19:45:14 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 7E7911000956 for ; Tue, 3 May 2022 19:45:14 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3BD4F21872; Tue, 3 May 2022 17:45:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599914; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DpLsIIYCHe2lBi4iNcFB2jktpucj8fTnJhuO37Mm/Ts=; b=rR1/Cps3p5b5aLwnYvzTV/x+BhxR6v6j03O9TBpMaWsWXftLH9fPr6XJRr4Cl9Cj2k0121 LfWhUVVVFONpjlJvAG/iHPLUu3REGK6P7lyg+M6xrzVotZP/a8NDcoQZpLgqWf9kquzxBu PO3sVuxPVafIcHJG+5KaF5UgxOFuyMI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599914; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DpLsIIYCHe2lBi4iNcFB2jktpucj8fTnJhuO37Mm/Ts=; b=RzeI6jEe2EU3xtl3dn2IX4icSFpUGlWqmIXbLF3OXHyUW0Qd+qdj1hIkRFdUV/z0Az6Ztj b6F1WveoREWGDqCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 24FB813ABE; Tue, 3 May 2022 17:45:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 0hOjBypqcWIaPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:14 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:10 +0200 Message-Id: <20220503174718.21205-23-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH v2 22/30] crypto/af_alg02: Convert to runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- testcases/kernel/crypto/af_alg02.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/crypto/af_alg02.c b/testcases/kernel/crypto/af_alg02.c index b96b8b341..9c2f488c4 100644 --- a/testcases/kernel/crypto/af_alg02.c +++ b/testcases/kernel/crypto/af_alg02.c @@ -65,7 +65,7 @@ static void run(void) TST_CHECKPOINT_WAIT(0); while (!completed) { - if (tst_remaining_runtime()) { + if (!tst_remaining_runtime()) { pthread_cancel(thr); tst_brk(TBROK, "Timed out while reading from request socket."); @@ -77,7 +77,7 @@ static void run(void) static struct tst_test test = { .test_all = run, - .runtime_per_iteration = 20, + .max_iteration_runtime = 20, .needs_checkpoints = 1, .tags = (const struct tst_tag[]) { {"linux-git", "ecaaab564978"}, From patchwork Tue May 3 17:47:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625689 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=DHBAXEDV; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=tyYmDckD; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6sW74FCz9sGP for ; Wed, 4 May 2022 03:49:19 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 427053CACD9 for ; Tue, 3 May 2022 19:49:17 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id EBF993CA997 for ; Tue, 3 May 2022 19:45:15 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 20D26140052D for ; Tue, 3 May 2022 19:45:15 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D04EB210DF; Tue, 3 May 2022 17:45:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599914; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K9pCqT5el2r7JVNfy5q2vBV4F6KADZns+ArEj1JbDmk=; b=DHBAXEDVc/qUlnDUUoU1jm7lASP8HPni0CTewVYKsjV6iAFgeUhz14G+ktzRCW2RDEKEPO TOz9y003o9Zk+pTzz9Wf1aqAAnKHLpmDw0kstKeBGyr/fyTRXAKcIkH3gmqemQ+UVapmWB A0bzKuIYpxtyKM8D4ZYjsJwSWApSMlA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599914; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K9pCqT5el2r7JVNfy5q2vBV4F6KADZns+ArEj1JbDmk=; b=tyYmDckD922z7BxpNik/P8IFUZhAUiK/ACep0IWlI38Ud9qbw7G4s7Bj04a++gKJEgRGQn TbVn61XB1VXQRDBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BAE9313ABE; Tue, 3 May 2022 17:45:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +O8+LCpqcWIcPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:14 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:11 +0200 Message-Id: <20220503174718.21205-24-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH v2 23/30] fuzzy_sync: Convert to runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Palethorpe , automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" The runtime for fuzzy sync tests are computed as timeout * exec_time_p. The default timeout was 300 and the default was 0.5. CC: Richard Palethorpe Signed-off-by: Cyril Hrubis --- include/tst_fuzzy_sync.h | 19 ++++--------------- testcases/kernel/crypto/af_alg07.c | 1 + testcases/kernel/mem/thp/thp04.c | 1 + testcases/kernel/pty/pty03.c | 2 +- testcases/kernel/pty/pty05.c | 1 + testcases/kernel/pty/pty06.c | 1 + testcases/kernel/pty/pty07.c | 1 + testcases/kernel/sound/snd_seq01.c | 2 +- testcases/kernel/sound/snd_timer01.c | 1 + testcases/kernel/syscalls/bind/bind06.c | 2 +- testcases/kernel/syscalls/inotify/inotify09.c | 1 + .../kernel/syscalls/ipc/shmctl/shmctl05.c | 2 +- testcases/kernel/syscalls/sendmsg/sendmsg03.c | 1 + .../kernel/syscalls/setsockopt/setsockopt06.c | 2 +- .../kernel/syscalls/setsockopt/setsockopt07.c | 1 + .../syscalls/timerfd/timerfd_settime02.c | 1 + testcases/kernel/syscalls/writev/writev03.c | 2 +- 17 files changed, 20 insertions(+), 21 deletions(-) diff --git a/include/tst_fuzzy_sync.h b/include/tst_fuzzy_sync.h index 4f09ed416..bef424002 100644 --- a/include/tst_fuzzy_sync.h +++ b/include/tst_fuzzy_sync.h @@ -160,15 +160,6 @@ struct tst_fzsync_pair { int b_cntr; /** Internal; Used by tst_fzsync_pair_exit() and fzsync_pair_wait() */ int exit; - /** - * The maximum desired execution time as a proportion of the timeout - * - * A value x so that 0 < x < 1 which decides how long the test should - * be run for (assuming the loop limit is not exceeded first). - * - * Defaults to 0.5 (~150 seconds with default timeout). - */ - float exec_time_p; /** Internal; The test time remaining on tst_fzsync_pair_reset() */ float exec_time_start; /** @@ -214,7 +205,6 @@ static inline void tst_fzsync_pair_init(struct tst_fzsync_pair *pair) CHK(avg_alpha, 0, 1, 0.25); CHK(min_samples, 20, INT_MAX, 1024); CHK(max_dev_ratio, 0, 1, 0.1); - CHK(exec_time_p, 0, 1, 0.5); CHK(exec_loops, 20, INT_MAX, 3000000); if (tst_ncpus_available() <= 1) @@ -291,7 +281,7 @@ static inline void tst_fzsync_pair_reset(struct tst_fzsync_pair *pair, if (run_b) SAFE_PTHREAD_CREATE(&pair->thread_b, 0, run_b, 0); - pair->exec_time_start = (float)tst_timeout_remaining(); + pair->exec_time_start = (float)tst_remaining_runtime(); } /** @@ -644,10 +634,9 @@ static inline void tst_fzsync_wait_b(struct tst_fzsync_pair *pair) */ static inline int tst_fzsync_run_a(struct tst_fzsync_pair *pair) { - float rem_p = 1 - tst_timeout_remaining() / pair->exec_time_start; + float rem_p = 1 - tst_remaining_runtime() / pair->exec_time_start; - if ((pair->exec_time_p * SAMPLING_SLICE < rem_p) - && (pair->sampling > 0)) { + if ((SAMPLING_SLICE < rem_p) && (pair->sampling > 0)) { tst_res(TINFO, "Stopped sampling at %d (out of %d) samples, " "sampling time reached 50%% of the total time limit", pair->exec_loop, pair->min_samples); @@ -655,7 +644,7 @@ static inline int tst_fzsync_run_a(struct tst_fzsync_pair *pair) tst_fzsync_pair_info(pair); } - if (pair->exec_time_p < rem_p) { + if (rem_p >= 1) { tst_res(TINFO, "Exceeded execution time, requesting exit"); tst_atomic_store(1, &pair->exit); diff --git a/testcases/kernel/crypto/af_alg07.c b/testcases/kernel/crypto/af_alg07.c index ef13ad764..4754c501e 100644 --- a/testcases/kernel/crypto/af_alg07.c +++ b/testcases/kernel/crypto/af_alg07.c @@ -125,6 +125,7 @@ static struct tst_test test = { .cleanup = cleanup, .min_kver = "4.10.0", .min_cpus = 2, + .max_iteration_runtime = 150, .taint_check = TST_TAINT_W | TST_TAINT_D, .tags = (const struct tst_tag[]) { {"linux-git", "ff7b11aa481f"}, diff --git a/testcases/kernel/mem/thp/thp04.c b/testcases/kernel/mem/thp/thp04.c index 985394dc3..77f49e777 100644 --- a/testcases/kernel/mem/thp/thp04.c +++ b/testcases/kernel/mem/thp/thp04.c @@ -163,6 +163,7 @@ static struct tst_test test = { .test_all = run, .setup = setup, .cleanup = cleanup, + .max_iteration_runtime = 150, .tags = (const struct tst_tag[]) { {"linux-git", "a8f97366452e"}, {"linux-git", "8310d48b125d"}, diff --git a/testcases/kernel/pty/pty03.c b/testcases/kernel/pty/pty03.c index 71bcb2eb6..f5680e7c5 100644 --- a/testcases/kernel/pty/pty03.c +++ b/testcases/kernel/pty/pty03.c @@ -135,7 +135,6 @@ static void do_test(unsigned int n) static void setup(void) { fzp.min_samples = 20; - fzp.exec_time_p = 0.1; tst_fzsync_pair_init(&fzp); } @@ -151,6 +150,7 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .needs_root = 1, + .max_iteration_runtime = 30, .tags = (const struct tst_tag[]) { {"linux-git", "0ace17d568241"}, {"CVE", "2020-14416"}, diff --git a/testcases/kernel/pty/pty05.c b/testcases/kernel/pty/pty05.c index afef051c8..72a2f2c36 100644 --- a/testcases/kernel/pty/pty05.c +++ b/testcases/kernel/pty/pty05.c @@ -97,6 +97,7 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .taint_check = TST_TAINT_W | TST_TAINT_D, + .max_iteration_runtime = 150, .tags = (const struct tst_tag[]) { {"linux-git", "82f2341c94d27"}, {"CVE", "2017-2636"}, diff --git a/testcases/kernel/pty/pty06.c b/testcases/kernel/pty/pty06.c index cc8eb1f85..37edbc981 100644 --- a/testcases/kernel/pty/pty06.c +++ b/testcases/kernel/pty/pty06.c @@ -97,6 +97,7 @@ static struct tst_test test = { .cleanup = cleanup, .needs_root = 1, .taint_check = TST_TAINT_W | TST_TAINT_D, + .max_iteration_runtime = 150, .tags = (const struct tst_tag[]) { { "linux-git", "ca4463bf8438"}, {} diff --git a/testcases/kernel/pty/pty07.c b/testcases/kernel/pty/pty07.c index c63b71c89..0190b581d 100644 --- a/testcases/kernel/pty/pty07.c +++ b/testcases/kernel/pty/pty07.c @@ -110,6 +110,7 @@ static struct tst_test test = { .cleanup = cleanup, .needs_root = 1, .taint_check = TST_TAINT_W | TST_TAINT_D, + .max_iteration_runtime = 150, .tags = (const struct tst_tag[]) { { "linux-git", "6cd1ed50efd8"}, {} diff --git a/testcases/kernel/sound/snd_seq01.c b/testcases/kernel/sound/snd_seq01.c index c56752230..3ce9550c7 100644 --- a/testcases/kernel/sound/snd_seq01.c +++ b/testcases/kernel/sound/snd_seq01.c @@ -123,7 +123,7 @@ static struct tst_test test = { .tcnt = ARRAY_SIZE(testfunc_list), .setup = setup, .cleanup = cleanup, - .timeout = 120, + .max_iteration_runtime = 60, .taint_check = TST_TAINT_W | TST_TAINT_D, .tags = (const struct tst_tag[]) { {"linux-git", "d15d662e89fc"}, diff --git a/testcases/kernel/sound/snd_timer01.c b/testcases/kernel/sound/snd_timer01.c index 51591c18e..4c46c966f 100644 --- a/testcases/kernel/sound/snd_timer01.c +++ b/testcases/kernel/sound/snd_timer01.c @@ -139,6 +139,7 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .taint_check = TST_TAINT_W | TST_TAINT_D, + .max_iteration_runtime = 150, .tags = (const struct tst_tag[]) { {"linux-git", "d11662f4f798"}, {"linux-git", "ba3021b2c79b"}, diff --git a/testcases/kernel/syscalls/bind/bind06.c b/testcases/kernel/syscalls/bind/bind06.c index 1dfc534a7..a2c1d67c1 100644 --- a/testcases/kernel/syscalls/bind/bind06.c +++ b/testcases/kernel/syscalls/bind/bind06.c @@ -102,7 +102,7 @@ static struct tst_test test = { .test_all = run, .setup = setup, .cleanup = cleanup, - .timeout = 600, + .max_iteration_runtime = 300, .taint_check = TST_TAINT_W | TST_TAINT_D, .needs_kconfigs = (const char *[]) { "CONFIG_USER_NS=y", diff --git a/testcases/kernel/syscalls/inotify/inotify09.c b/testcases/kernel/syscalls/inotify/inotify09.c index fdfc9c078..8364a9e6a 100644 --- a/testcases/kernel/syscalls/inotify/inotify09.c +++ b/testcases/kernel/syscalls/inotify/inotify09.c @@ -94,6 +94,7 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .test_all = verify_inotify, + .max_iteration_runtime = 150, .tags = (const struct tst_tag[]) { {"linux-git", "d90a10e2444b"}, {} diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl05.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl05.c index 228174c9b..2a7dd3c0f 100644 --- a/testcases/kernel/syscalls/ipc/shmctl/shmctl05.c +++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl05.c @@ -106,7 +106,7 @@ static void cleanup(void) } static struct tst_test test = { - .timeout = 20, + .max_iteration_runtime = 10, .setup = setup, .test_all = do_test, .cleanup = cleanup, diff --git a/testcases/kernel/syscalls/sendmsg/sendmsg03.c b/testcases/kernel/syscalls/sendmsg/sendmsg03.c index c7d72f686..fb9182dec 100644 --- a/testcases/kernel/syscalls/sendmsg/sendmsg03.c +++ b/testcases/kernel/syscalls/sendmsg/sendmsg03.c @@ -105,6 +105,7 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .taint_check = TST_TAINT_W | TST_TAINT_D, + .max_iteration_runtime = 150, .tags = (const struct tst_tag[]) { {"linux-git", "8f659a03a0ba"}, {"CVE", "2017-17712"}, diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt06.c b/testcases/kernel/syscalls/setsockopt/setsockopt06.c index c6fc2fba9..dafb9665f 100644 --- a/testcases/kernel/syscalls/setsockopt/setsockopt06.c +++ b/testcases/kernel/syscalls/setsockopt/setsockopt06.c @@ -46,7 +46,6 @@ static void setup(void) SAFE_FILE_PRINTF("/proc/self/gid_map", "0 %d 1", real_gid); fzsync_pair.exec_loops = 100000; - fzsync_pair.exec_time_p = 0.9; tst_fzsync_pair_init(&fzsync_pair); } @@ -123,6 +122,7 @@ static struct tst_test test = { .test_all = run, .setup = setup, .cleanup = cleanup, + .max_iteration_runtime = 270, .taint_check = TST_TAINT_W | TST_TAINT_D, .needs_kconfigs = (const char *[]) { "CONFIG_USER_NS=y", diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt07.c b/testcases/kernel/syscalls/setsockopt/setsockopt07.c index 147ae3899..cde0ea2d4 100644 --- a/testcases/kernel/syscalls/setsockopt/setsockopt07.c +++ b/testcases/kernel/syscalls/setsockopt/setsockopt07.c @@ -136,6 +136,7 @@ static struct tst_test test = { .test_all = run, .setup = setup, .cleanup = cleanup, + .max_iteration_runtime = 150, .needs_kconfigs = (const char *[]) { "CONFIG_USER_NS=y", "CONFIG_NET_NS=y", diff --git a/testcases/kernel/syscalls/timerfd/timerfd_settime02.c b/testcases/kernel/syscalls/timerfd/timerfd_settime02.c index bd92ee964..327a1b8e5 100644 --- a/testcases/kernel/syscalls/timerfd/timerfd_settime02.c +++ b/testcases/kernel/syscalls/timerfd/timerfd_settime02.c @@ -112,6 +112,7 @@ static struct tst_test test = { .cleanup = cleanup, .min_kver = "2.6.25", .taint_check = TST_TAINT_W | TST_TAINT_D, + .max_iteration_runtime = 150, .tags = (const struct tst_tag[]) { {"linux-git", "1e38da300e1e"}, {"CVE", "2017-10661"}, diff --git a/testcases/kernel/syscalls/writev/writev03.c b/testcases/kernel/syscalls/writev/writev03.c index d0c64743b..467e2de6c 100644 --- a/testcases/kernel/syscalls/writev/writev03.c +++ b/testcases/kernel/syscalls/writev/writev03.c @@ -49,7 +49,6 @@ static void setup(void) mapfd = SAFE_OPEN(MAPFILE, O_CREAT|O_RDWR|O_TRUNC, 0644); SAFE_WRITE(1, mapfd, buf, BUF_SIZE); - fzsync_pair.exec_time_p = 0.25; tst_fzsync_pair_init(&fzsync_pair); } @@ -146,6 +145,7 @@ static struct tst_test test = { .min_cpus = 2, .setup = setup, .cleanup = cleanup, + .max_iteration_runtime = 75, .tags = (const struct tst_tag[]) { {"linux-git", "d4690f1e1cda"}, {} From patchwork Tue May 3 17:47:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625690 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=YkJY479m; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=JVusruUZ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6sj3KQzz9sGP for ; Wed, 4 May 2022 03:49:29 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id AB9673CACE0 for ; Tue, 3 May 2022 19:49:26 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 018263CA998 for ; Tue, 3 May 2022 19:45:16 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 9B1F0600739 for ; Tue, 3 May 2022 19:45:15 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5815B210F4; Tue, 3 May 2022 17:45:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599915; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nvzm7F5PerFcyr8liLtMYZDBSU+rTv7Z/fdBgnlR9Og=; b=YkJY479m9vLxsC5MnhjZ7JK/ctvnXSLtYf+oSm22PVcOxu+Rn9DsTMsw09dQiEeCIvjyUH lQnZI3zeTdiWk7vixT/2FanyZhjCPnUgTMUy4z5cMc48rkpvnIh0E3swuoViiAxZNLuAep TVLj8Z/AVM3qZbOamLj7jwwjMth4sX8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599915; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nvzm7F5PerFcyr8liLtMYZDBSU+rTv7Z/fdBgnlR9Og=; b=JVusruUZ/vDjx7de7Dw88Qr9Kxfh8w/g/bErYxXKtW+pbzs5IS5XoWIQTD7qzAY7Y1gTd8 XbaUynlJZqZjzjBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 45ECD13ABE; Tue, 3 May 2022 17:45:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id tDroDytqcWIhPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:15 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:12 +0200 Message-Id: <20220503174718.21205-25-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH v2 24/30] ltp-aiodio/dio_sparse, aiodio_sparse: Convert to runtime. X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Change the code so that the test runtime is capped at the maximal runtime allowed for the test. For this to work we also have to: - check the run_child in the io_read() in the inner loop otherwise the test will timeout while waiting for the children to finish - run the AIO writer in a separate process and kill it when we are out of runtime in the aiodio_sparse CC: Andrea Cervesato Signed-off-by: Cyril Hrubis --- .../kernel/io/ltp-aiodio/aiodio_sparse.c | 26 ++++++++++++++++--- testcases/kernel/io/ltp-aiodio/common.h | 6 ++++- testcases/kernel/io/ltp-aiodio/dio_sparse.c | 6 ++++- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c b/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c index 2aa5662bb..d3c27646c 100644 --- a/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c +++ b/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c @@ -189,7 +189,7 @@ static void run(void) { char *filename = "file.bin"; int status; - int i; + int i, pid; *run_child = 1; @@ -200,9 +200,27 @@ static void run(void) } } - tst_res(TINFO, "Parent create a sparse file"); + pid = SAFE_FORK(); + if (!pid) { + aiodio_sparse(filename, alignment, writesize, filesize, numaio); + return; + } + + tst_res(TINFO, "Child %i creates a sparse file", pid); + + for (;;) { + if (SAFE_WAITPID(pid, NULL, WNOHANG)) + break; - aiodio_sparse(filename, alignment, writesize, filesize, numaio); + sleep(1); + + if (!tst_remaining_runtime()) { + tst_res(TINFO, "Test out of runtime, exitting"); + kill(pid, SIGKILL); + SAFE_WAITPID(pid, NULL, 0); + break; + } + } if (SAFE_WAITPID(-1, &status, WNOHANG)) tst_res(TFAIL, "Non zero bytes read"); @@ -229,7 +247,7 @@ static struct tst_test test = { "tmpfs", NULL }, - .timeout = 1800, + .max_iteration_runtime = 1800, }; #else TST_TEST_TCONF("test requires libaio and its development packages"); diff --git a/testcases/kernel/io/ltp-aiodio/common.h b/testcases/kernel/io/ltp-aiodio/common.h index c27c3a0ad..0a242b91e 100644 --- a/testcases/kernel/io/ltp-aiodio/common.h +++ b/testcases/kernel/io/ltp-aiodio/common.h @@ -63,7 +63,7 @@ static inline void io_read(const char *filename, int filesize, volatile int *run tst_res(TINFO, "child %i reading file", getpid()); - while (*run_child) { + for (;;) { off_t offset = 0; char *bufoff; @@ -80,9 +80,13 @@ static inline void io_read(const char *filename, int filesize, volatile int *run } offset += r; } + + if (!*run_child) + goto exit; } } +exit: SAFE_CLOSE(fd); } diff --git a/testcases/kernel/io/ltp-aiodio/dio_sparse.c b/testcases/kernel/io/ltp-aiodio/dio_sparse.c index 0039daa8d..dac034158 100644 --- a/testcases/kernel/io/ltp-aiodio/dio_sparse.c +++ b/testcases/kernel/io/ltp-aiodio/dio_sparse.c @@ -51,6 +51,10 @@ static void dio_sparse(int fd, int align, long long fs, int ws, long long off) SAFE_LSEEK(fd, off, SEEK_SET); for (i = off; i < fs;) { + if (!tst_remaining_runtime()) { + tst_res(TINFO, "Test runtime is over, exitting"); + return; + } w = SAFE_WRITE(0, fd, bufptr, ws); i += w; } @@ -135,5 +139,5 @@ static struct tst_test test = { "tmpfs", NULL }, - .timeout = 1800, + .max_iteration_runtime = 1800, }; From patchwork Tue May 3 17:47:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625691 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=XKhoCuw2; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=feN3HL8f; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6sv5B1wz9sGP for ; Wed, 4 May 2022 03:49:39 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 173293CACEE for ; Tue, 3 May 2022 19:49:37 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [IPv6:2001:4b78:1:20::5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id C39163CA99F for ; Tue, 3 May 2022 19:45:16 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 36DD6600700 for ; Tue, 3 May 2022 19:45:16 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E722421875; Tue, 3 May 2022 17:45:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599915; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kuGZn0WOL4/wZMiZL9c6xdCVqlzqPGXCMQmBNs+dy5Q=; b=XKhoCuw2yt+XL2OF52HGpGpB8jaADtX4rI2V/lu7vwY8KhMjfon/CKlG3FRkuC4+CKGTgZ gaVd7aCs+PVM+pW9ZZsNDrYHZ85hTNxpgy0bJDK3if7ZhG8qTkYjm2u+8DEBI261VF8CR1 T8jJvR/HI3GRYM7KQk2Urk1+dxjxuHg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599915; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kuGZn0WOL4/wZMiZL9c6xdCVqlzqPGXCMQmBNs+dy5Q=; b=feN3HL8fyky0di7nZllfbqV9aeuEmVAaB9AoTxGYoOtmIxskMI5gSHDy3DBM7IGBGecsDO BvjxVAiLgqNG7aBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CE29F13ABE; Tue, 3 May 2022 17:45:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 3AgqMStqcWIlPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:15 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:13 +0200 Message-Id: <20220503174718.21205-26-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH v2 25/30] ltp-aiodio/read_checkzero: Remove X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Remove leftovers that are not used anymore. CC: Andrea Cervesato Signed-off-by: Cyril Hrubis --- runtest/ltp-aiodio.part4 | 2 - testcases/kernel/io/ltp-aiodio/.gitignore | 1 - .../kernel/io/ltp-aiodio/read_checkzero.c | 84 ------------------- 3 files changed, 87 deletions(-) delete mode 100644 testcases/kernel/io/ltp-aiodio/read_checkzero.c diff --git a/runtest/ltp-aiodio.part4 b/runtest/ltp-aiodio.part4 index 54019d47b..d88c27a83 100644 --- a/runtest/ltp-aiodio.part4 +++ b/runtest/ltp-aiodio.part4 @@ -59,8 +59,6 @@ ADI009 dio_append DIT000 dio_truncate DIT001 dio_truncate DIT002 dio_truncate -#Running read_checkzero -#gread_checkzero #Running dio_read DOR000 dio_read -n 1 -i 100 -r 512k -w 512k -s 32M DOR001 dio_read -n 10 -i 30 -r 512k -w 512k -s 32M diff --git a/testcases/kernel/io/ltp-aiodio/.gitignore b/testcases/kernel/io/ltp-aiodio/.gitignore index f5f20d57e..09a49bfbf 100644 --- a/testcases/kernel/io/ltp-aiodio/.gitignore +++ b/testcases/kernel/io/ltp-aiodio/.gitignore @@ -7,4 +7,3 @@ /dio_truncate /dio_read /dirty -/read_checkzero diff --git a/testcases/kernel/io/ltp-aiodio/read_checkzero.c b/testcases/kernel/io/ltp-aiodio/read_checkzero.c deleted file mode 100644 index b48197a7b..000000000 --- a/testcases/kernel/io/ltp-aiodio/read_checkzero.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2004 Daniel McNeil - * 2004 Open Source Development Lab - * 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 2 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Module: .c - */ - -/* - * Change History: - * - * 2/2004 Marty Ridgeway (mridge@us.ibm.com) Changes to adapt to LTP - * - */ -#define _GNU_SOURCE - -#include -#include -#include -#include -#include -#include - -#include "common_checkzero.h" - -int read_eof(char *filename) -{ - int fd; - int i; - int r; - char buf[4096]; - - if ((fd = open(filename, O_RDWR)) < 0) { - fprintf(stderr, "can't open file %s \n", filename); - exit(1); - } - - for (i = 0; i < 100000; i++) { - off_t offset; - char *bufoff; - - offset = lseek(fd, 4096, SEEK_END); - r = write(fd, "A", 1); - - offset = lseek(fd, offset - 4096, SEEK_SET); - - r = read(fd, buf, 4096); - if (r > 0) { - if ((bufoff = check_zero(buf, r))) { - fprintf(stderr, "non-zero read at offset %p\n", - offset + bufoff); - exit(1); - } - } - } - fprintf(stderr, "read_checkzero done\n"); - return 0; -} - -int main(int argc, char **argv) -{ - if (argc < 2) { - printf("You must pass a filename to the test \n"); - exit(1); - } - - char *filename = argv[1]; - - read_eof(filename); - - return 0; -} From patchwork Tue May 3 17:47:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625692 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=MMTi/PAS; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=qDHqi/uz; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6t54254z9sGP for ; Wed, 4 May 2022 03:49:49 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 9BFAF3CAD01 for ; Tue, 3 May 2022 19:49:46 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [IPv6:2001:4b78:1:20::6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 685BB3CA9A7 for ; Tue, 3 May 2022 19:45:17 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id D70221400535 for ; Tue, 3 May 2022 19:45:16 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 81F4521872; Tue, 3 May 2022 17:45:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599916; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QrVukndCbOkeqmE2IJpoTqUwgj3/pN3CP79NeYW0w6A=; b=MMTi/PASaRuAWwiJmiU/rvGiOwQkcmQxrA84aQaIpZecgLaNFZ9J4SexcmVDuHDUBwCbib veVxbzPTgkESbkgs0Do0aVRdA7dgx66fCpeHLlc01MhwmIYJi+5GNaNlonEAll2LF9CgqI pC69EDvwMxNPuiNt831mZplfvviRaHA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599916; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QrVukndCbOkeqmE2IJpoTqUwgj3/pN3CP79NeYW0w6A=; b=qDHqi/uzhyC0BAGYbcjO3ZUmhLbelAkH1h9L/jHMRvv9H8wJXZxYqYDUmkWbA1GtSmma2J gflgqcm2rqeBLjAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6B63F13ABE; Tue, 3 May 2022 17:45:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gQxOGSxqcWInPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:16 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:14 +0200 Message-Id: <20220503174718.21205-27-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH v2 26/30] ltp-aiodio/dio_{truncate, append}: Convert to runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Change the code so that the test runtime is capped at the maximal runtime allowed for the test, which is set to 30 minutes by default. The io_append() in common.h has to check for runtime to make this work. CC: Andrea Cervesato Signed-off-by: Cyril Hrubis --- testcases/kernel/io/ltp-aiodio/common.h | 6 +++++- testcases/kernel/io/ltp-aiodio/dio_append.c | 4 ++++ testcases/kernel/io/ltp-aiodio/dio_truncate.c | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/testcases/kernel/io/ltp-aiodio/common.h b/testcases/kernel/io/ltp-aiodio/common.h index 0a242b91e..d9cbd8611 100644 --- a/testcases/kernel/io/ltp-aiodio/common.h +++ b/testcases/kernel/io/ltp-aiodio/common.h @@ -44,9 +44,13 @@ static inline void io_append(const char *path, char pattern, int flags, size_t b fd = SAFE_OPEN(path, flags, 0666); - for (i = 0; i < bcount; i++) + for (i = 0; i < bcount; i++) { SAFE_WRITE(1, fd, bufptr, bs); + if (!tst_remaining_runtime()) + break; + } + free(bufptr); SAFE_CLOSE(fd); } diff --git a/testcases/kernel/io/ltp-aiodio/dio_append.c b/testcases/kernel/io/ltp-aiodio/dio_append.c index c099793f6..3a950f3c6 100644 --- a/testcases/kernel/io/ltp-aiodio/dio_append.c +++ b/testcases/kernel/io/ltp-aiodio/dio_append.c @@ -71,6 +71,9 @@ static void run(void) io_append(filename, 0, O_DIRECT | O_WRONLY | O_CREAT, writesize, appends); + if (!tst_remaining_runtime()) + tst_res(TINFO, "Test out of runtime, exitting"); + if (SAFE_WAITPID(-1, &status, WNOHANG)) tst_res(TFAIL, "Non zero bytes read"); else @@ -87,6 +90,7 @@ static struct tst_test test = { .cleanup = cleanup, .needs_tmpdir = 1, .forks_child = 1, + .max_iteration_runtime = 1800, .options = (struct tst_option[]) { {"n:", &str_numchildren, "Number of processes (default 16)"}, {"w:", &str_writesize, "Write size for each append (default 64K)"}, diff --git a/testcases/kernel/io/ltp-aiodio/dio_truncate.c b/testcases/kernel/io/ltp-aiodio/dio_truncate.c index 1fbf83de0..b04302a7b 100644 --- a/testcases/kernel/io/ltp-aiodio/dio_truncate.c +++ b/testcases/kernel/io/ltp-aiodio/dio_truncate.c @@ -142,6 +142,11 @@ static void run(void) fail = 1; break; } + + if (!tst_remaining_runtime()) { + tst_res(TINFO, "Test out of runtime, exitting"); + break; + } } if (fail) @@ -158,6 +163,7 @@ static struct tst_test test = { .cleanup = cleanup, .needs_tmpdir = 1, .forks_child = 1, + .max_iteration_runtime = 1800, .options = (struct tst_option[]) { {"n:", &str_numchildren, "Number of threads (default 16)"}, {"s:", &str_filesize, "Size of file (default 64K)"}, From patchwork Tue May 3 17:47:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625693 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=0ZOUsZue; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=pV7nkq7h; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6tG5tlcz9sGP for ; Wed, 4 May 2022 03:49:58 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id A867C3CAD2B for ; Tue, 3 May 2022 19:49:56 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id D394C3CA996 for ; Tue, 3 May 2022 19:45:17 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 62DD0600454 for ; Tue, 3 May 2022 19:45:17 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 12BC71F74B; Tue, 3 May 2022 17:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599917; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z7M6VVpL5cAG9IhGs4ori93XimJJNg0fANX8//D6rYQ=; b=0ZOUsZue4zumw2SZmrEMaf2VqRpYEirtBIPrycT+weNCu3y5V20Y21v+NQ+myR/0k9GMFM c+mZkJ7t86NOij0lRVJlZZlFSPeMS23xxMQ5yenX5xuHst36KIUmQr24YdRWelKsv9ILVJ 6njUlp4FQ/IDbHRxtSiX2ghRNylEAKE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599917; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z7M6VVpL5cAG9IhGs4ori93XimJJNg0fANX8//D6rYQ=; b=pV7nkq7hiytG+oE899ToURv7O3iAJgH7galHW/ZSThqyuEKfN8Vwzy4OGQnWbZTgO4ujQv qZ158TBm/ZbilrBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id F334A13ABE; Tue, 3 May 2022 17:45:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Obn1OSxqcWIpPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:16 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:15 +0200 Message-Id: <20220503174718.21205-28-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH v2 27/30] ltp-aiodio/dio_read: Convert to runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" And cap the runtime on 30 minutes by default. CC: Andrea Cervesato Signed-off-by: Cyril Hrubis --- testcases/kernel/io/ltp-aiodio/dio_read.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/testcases/kernel/io/ltp-aiodio/dio_read.c b/testcases/kernel/io/ltp-aiodio/dio_read.c index f6ed59782..8a16307a7 100644 --- a/testcases/kernel/io/ltp-aiodio/dio_read.c +++ b/testcases/kernel/io/ltp-aiodio/dio_read.c @@ -51,6 +51,9 @@ static void do_buffered_writes(int fd, char *bufptr, long long fsize, long long tst_brk(TBROK, "pwrite: wrote %lld bytes out of %lld", w, wsize); SAFE_FSYNC(fd); + + if (!tst_remaining_runtime()) + return; } } @@ -75,6 +78,11 @@ static int do_direct_reads(char *filename, char *bufptr, long long fsize, long l goto exit; } + if (!tst_remaining_runtime()) { + tst_res(TINFO, "Test out of runtime, exitting"); + goto exit; + } + w = pread(fd, bufptr, rsize, offset); if (w < 0) tst_brk(TBROK, "pread: %s", tst_strerrno(-w)); @@ -170,6 +178,7 @@ static struct tst_test test = { .cleanup = cleanup, .needs_tmpdir = 1, .forks_child = 1, + .max_iteration_runtime = 1800, .options = (struct tst_option[]) { {"n:", &str_numchildren, "Number of threads (default 8)"}, {"w:", &str_writesize, "Size of writing blocks (default 32M)"}, From patchwork Tue May 3 17:47:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625694 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=UWcPKtla; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=eOShTG2L; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6tS28r7z9sGP for ; Wed, 4 May 2022 03:50:08 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 14B393CACB5 for ; Tue, 3 May 2022 19:50:06 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [217.194.8.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 848F63CA988 for ; Tue, 3 May 2022 19:45:18 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 2EA75600454 for ; Tue, 3 May 2022 19:45:18 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B9B041F74D; Tue, 3 May 2022 17:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599917; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QxhkL+Ij5MfRe10XTlsdSTInT7Zog/VXU6Y3/N3ClXA=; b=UWcPKtla+D2jVTBujOXX9dvq7Jo5P4cF6+tbBzD7v0BGt+uHSB/ZpqyC+UUDm2V4mbbS7q tKfMKkomdSQYAEA55h9eDGXM7cqMaWMdwD96rp4P5YNDdwgwMg4dsRqEIvU4EtKUmXHr8K MgqqDJgNPnQfvLLR2iIVwpo4WuxNnjM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599917; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QxhkL+Ij5MfRe10XTlsdSTInT7Zog/VXU6Y3/N3ClXA=; b=eOShTG2LLy5RCVoZj6wVuHqE6jPfWFKPX4qzNOPvidn/HVJIZrMmmuScHeHIT7izTGx1+L nwDF7T2HLwgPmMAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 99B5F13ABE; Tue, 3 May 2022 17:45:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QGjMIi1qcWItPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:17 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:16 +0200 Message-Id: <20220503174718.21205-29-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH v2 28/30] ltp-aiodio/aiodio_append: Convert to runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Cap the test runtime on 30 minutes by default. For this to work we have to run the process that issues the aio requests in a child process and kill it when runtime is over. CC: Andrea Cervesato Signed-off-by: Cyril Hrubis --- .../kernel/io/ltp-aiodio/aiodio_append.c | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/testcases/kernel/io/ltp-aiodio/aiodio_append.c b/testcases/kernel/io/ltp-aiodio/aiodio_append.c index 46cc74ee4..4bb95189c 100644 --- a/testcases/kernel/io/ltp-aiodio/aiodio_append.c +++ b/testcases/kernel/io/ltp-aiodio/aiodio_append.c @@ -141,7 +141,7 @@ static void run(void) { char *filename = "aiodio_append"; int status; - int i; + int i, pid; *run_child = 1; @@ -152,9 +152,27 @@ static void run(void) } } - tst_res(TINFO, "Parent append to file"); + pid = SAFE_FORK(); + if (!pid) { + aiodio_append(filename, appends, alignment, writesize, numaio); + return; + } + + tst_res(TINFO, "Child %i appends to a file", pid); + + for (;;) { + if (SAFE_WAITPID(pid, NULL, WNOHANG)) + break; - aiodio_append(filename, appends, alignment, writesize, numaio); + sleep(1); + + if (!tst_remaining_runtime()) { + tst_res(TINFO, "Test out of runtime, exitting"); + kill(pid, SIGKILL); + SAFE_WAITPID(pid, NULL, 0); + break; + } + } if (SAFE_WAITPID(-1, &status, WNOHANG)) tst_res(TFAIL, "Non zero bytes read"); @@ -172,6 +190,7 @@ static struct tst_test test = { .cleanup = cleanup, .needs_tmpdir = 1, .forks_child = 1, + .max_iteration_runtime = 1800, .options = (struct tst_option[]) { {"n:", &str_numchildren, "Number of threads (default 16)"}, {"s:", &str_writesize, "Size of the file to write (default 64K)"}, From patchwork Tue May 3 17:47:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625695 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=QiylBJKO; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=dTa2cmHZ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6tf2Sxjz9sGP for ; Wed, 4 May 2022 03:50:18 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id BF90E3CAD55 for ; Tue, 3 May 2022 19:50:15 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 037083CA97A for ; Tue, 3 May 2022 19:45:19 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 981E31400520 for ; Tue, 3 May 2022 19:45:18 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 56FE91F750; Tue, 3 May 2022 17:45:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599918; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TlLROlxXA2CxfE/Q/O6gSt6nzGXn26BZJUEUBgAv3NU=; b=QiylBJKOrFB7sviNhDSDpaZz3eIgMxatpItTPIsNE2Ct5qht3IjZLdjUPuSX/iLO2zjd6O CMm8iA/5D8kTcZ7i8xI8fde9+CE1kS1aCzD0s+pv6LmQj43rP4pvDXJ2vEi2afiFA+JXln E9onhFvqUujsMxj+ZmIE67yunEMxHxM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599918; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TlLROlxXA2CxfE/Q/O6gSt6nzGXn26BZJUEUBgAv3NU=; b=dTa2cmHZkz+uLznXJ0AIBcNLJC4PBVkAr2Eb+89B6mgtyo1RaY7IAYOCyvUzOxK70UbKva UrD9JtUTpibgY4AA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3803513ABE; Tue, 3 May 2022 17:45:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8yxODC5qcWIyPgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:18 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:17 +0200 Message-Id: <20220503174718.21205-30-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH v2 29/30] timer_test: Convert to runtime X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- lib/tst_timer_test.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/tst_timer_test.c b/lib/tst_timer_test.c index 32fa55c7c..3ff9f1d65 100644 --- a/lib/tst_timer_test.c +++ b/lib/tst_timer_test.c @@ -420,6 +420,9 @@ static struct tst_option options[] = { static void parse_timer_opts(void) { + size_t i; + long long runtime_us = 0; + if (str_sleep_time) { if (tst_parse_int(str_sleep_time, &sleep_time, 0, INT_MAX)) { tst_brk(TBROK, @@ -441,14 +444,17 @@ static void parse_timer_opts(void) if (!sample_cnt) sample_cnt = 500; - long long timeout = sleep_time * sample_cnt / 1000000; - - tst_set_timeout(timeout + timeout/10); + runtime_us = sleep_time * sample_cnt; test->test_all = single_timer_test; test->test = NULL; test->tcnt = 0; + } else { + for (i = 0; i < ARRAY_SIZE(tcases); i++) + runtime_us += tcases[i].usec * tcases[i].samples; } + + tst_set_runtime((runtime_us + runtime_us/10)/1000000); } struct tst_test *tst_timer_test_setup(struct tst_test *timer_test) From patchwork Tue May 3 17:47:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1625696 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=JrdBS5Yg; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=AWg/Pmh9; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kt6tr297dz9sGP for ; Wed, 4 May 2022 03:50:28 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 29EB53CAD41 for ; Tue, 3 May 2022 19:50:26 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [IPv6:2001:4b78:1:20::6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id C4BF63CA9AB for ; Tue, 3 May 2022 19:45:19 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 5A2D91400520 for ; Tue, 3 May 2022 19:45:19 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 178A51F88A; Tue, 3 May 2022 17:45:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651599919; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vT56Ocb9mXHF+e5dw49x1SKNBXT6xpjUnN+0EHTu348=; b=JrdBS5YgbQhrkUxeJTV146TEjQuwLx6uebTc2/9nX0V8hzYxcSuxEfUZ9LCXyfgmHrrveg Y8f761DHUix5H3Jsggb4wEQ9DS4UCCfgi7s0mOCEGlKavbF5EfdXxxNz9XHeTcxij3gVz3 cYljvJKtK/7Ahkl2CGGUe3CjvHQGirI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651599919; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vT56Ocb9mXHF+e5dw49x1SKNBXT6xpjUnN+0EHTu348=; b=AWg/Pmh9+ak5+IZp6LrUingIsJrJsGc9ZF0eqLwfgK4DHcsBkaa8VwkarcTUY2K0awz/t4 ddpFansL4eplYHBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0132113ABE; Tue, 3 May 2022 17:45:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ZkkdOi5qcWI0PgAAMHmgww (envelope-from ); Tue, 03 May 2022 17:45:18 +0000 From: Cyril Hrubis To: ltp@lists.linux.it Date: Tue, 3 May 2022 19:47:18 +0200 Message-Id: <20220503174718.21205-31-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220503174718.21205-1-chrubis@suse.cz> References: <20220503174718.21205-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH v2 30/30] tst_test: Remove timeout stubs X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Cyril Hrubis --- include/tst_test.h | 4 ---- lib/tst_test.c | 11 ----------- 2 files changed, 15 deletions(-) diff --git a/include/tst_test.h b/include/tst_test.h index c084ce4bc..5a84195c7 100644 --- a/include/tst_test.h +++ b/include/tst_test.h @@ -236,8 +236,6 @@ struct tst_test { unsigned int mnt_flags; void *mnt_data; - /* override default timeout per test run, disabled == -1 */ - int timeout; /* * Maximal test runtime in seconds. * @@ -333,9 +331,7 @@ const char *tst_strsig(int sig); */ const char *tst_strstatus(int status); -unsigned int tst_timeout_remaining(void); unsigned int tst_multiply_timeout(unsigned int timeout); -void tst_set_timeout(int timeout); /* * Returns remaining test runtime. Test that runs for more than a few seconds diff --git a/lib/tst_test.c b/lib/tst_test.c index 096acef96..2ec81ab0e 100644 --- a/lib/tst_test.c +++ b/lib/tst_test.c @@ -1471,12 +1471,6 @@ static void sigint_handler(int sig LTP_ATTRIBUTE_UNUSED) } } -unsigned int tst_timeout_remaining(void) -{ - tst_brk(TBROK, "Stub called!"); - return 0; -} - unsigned int tst_remaining_runtime(void) { static struct timespec now; @@ -1509,11 +1503,6 @@ unsigned int tst_multiply_timeout(unsigned int timeout) return timeout * timeout_mul; } -void tst_set_timeout(int timeout) -{ - tst_brk(TBROK, "Stub called!"); -} - static void set_timeout(void) { unsigned int timeout = DEFAULT_TIMEOUT;