From: Petr Vorel <pvorel@suse.cz>
To: chunfuwen <chwen@redhat.com>
Cc: "Ricardo B. Marlière" <rbm@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] Add test case to cover the setting resource limit64 for process
Date: Wed, 19 Feb 2025 17:50:06 +0100 [thread overview]
Message-ID: <20250219165006.GC2590174@pevik> (raw)
In-Reply-To: <20250219064804.1313358-1-chwen@redhat.com>
Hi
> + if (!pid) {
> + TEST(setrlimit_u64(RLIMIT_CPU, rlim));
> + if (TST_RET == -1) {
> + tst_res(TFAIL | TTERRNO,
> + "setrlimit_u64(RLIMIT_CPU) failed");
> + exit(1);
> + }
> +
> + alarm(20);
> +
> + while (1)
FYI we have TST_CHECKPOINT_WAKE() and others, please see
"1.9 Fork() and Parent-child synchronization" in doc/old/C-Test-API.asciidoc
or online
https://github.com/linux-test-project/ltp/blob/master/doc/old/C-Test-API.asciidoc#19-fork-and-parent-child-synchronization
(still not yet converted docs to sphinx)
Also worth to read if you have time (because people would put at least some usleep() instead of plain while(1);
https://people.kernel.org/metan/why-sleep-is-almost-never-acceptable-in-tests
Kind regards,
Petr
> + ;
> + }
> +
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2025-02-19 16:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 2:31 [LTP] [PATCH] Add test case to cover the setting resource limit64 for process chunfuwen
2025-02-18 11:44 ` Ricardo B. Marlière
2025-02-18 13:29 ` Andrea Cervesato via ltp
2025-02-19 2:35 ` Chunfu Wen
2025-02-19 9:29 ` Andrea Cervesato via ltp
2025-02-19 6:47 ` [LTP] [PATCH v2] " chunfuwen
2025-02-19 16:44 ` Petr Vorel
2025-02-20 2:08 ` Li Wang
2025-02-20 9:35 ` Petr Vorel
2025-02-20 8:01 ` Chunfu Wen
2025-02-20 8:35 ` [LTP] [PATCH v3] " Chunfu Wen
2025-02-21 10:34 ` Andrea Cervesato via ltp
2025-02-24 3:06 ` Chunfu Wen
2025-02-24 3:07 ` [LTP] [PATCH v4] " Chunfu Wen
2025-02-26 1:15 ` Chunfu Wen
2025-02-28 3:41 ` Li Wang
2025-02-28 7:45 ` Andrea Cervesato via ltp
2025-02-28 8:39 ` Li Wang
2025-02-28 9:22 ` Li Wang
2025-02-28 11:37 ` Petr Vorel
2025-02-26 9:21 ` Li Wang
2025-02-19 16:50 ` Petr Vorel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250219165006.GC2590174@pevik \
--to=pvorel@suse.cz \
--cc=chwen@redhat.com \
--cc=ltp@lists.linux.it \
--cc=rbm@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.