[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878qpazdro.ffs@tglx>
Date: Wed, 12 Mar 2025 12:31:23 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Cyrill Gorcunov <gorcunov@...il.com>, Frederic Weisbecker
<frederic@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Anna-Maria Behnsen
<anna-maria@...utronix.de>, Benjamin Segall <bsegall@...gle.com>, Eric
Dumazet <edumazet@...gle.com>, Andrey Vagin <avagin@...nvz.org>, Pavel
Tikhomirov <ptikhomirov@...tuozzo.com>, Peter Zijlstra
<peterz@...radead.org>
Subject: Re: [patch V3a 17/18] posix-timers: Provide a mechanism to allocate
a given timer ID
On Wed, Mar 12 2025 at 12:24, Thomas Gleixner wrote:
> On Wed, Mar 12 2025 at 10:56, Cyrill Gorcunov wrote:
>> an interface to _read_ this property, don't we? Thus criu will restore such
>> application which already has this bit set incorrectly.
>
> Delta patch below.
That want's a fixup for the selftest too.
---
diff --git a/tools/testing/selftests/timers/posix_timers.c b/tools/testing/selftests/timers/posix_timers.c
index 158138211f51..f0eceb0faf34 100644
--- a/tools/testing/selftests/timers/posix_timers.c
+++ b/tools/testing/selftests/timers/posix_timers.c
@@ -616,6 +616,7 @@ static int do_timer_delete(int id)
# define PR_TIMER_CREATE_RESTORE_IDS 77
# define PR_TIMER_CREATE_RESTORE_IDS_OFF 0
# define PR_TIMER_CREATE_RESTORE_IDS_ON 1
+# define PR_TIMER_CREATE_RESTORE_IDS_GET 2
#endif
static void check_timer_create_exact(void)
@@ -633,6 +634,9 @@ static void check_timer_create_exact(void)
}
}
+ if (prctl(PR_TIMER_CREATE_RESTORE_IDS, PR_TIMER_CREATE_RESTORE_IDS_GET, 0, 0, 0) != 1)
+ fatal_error(NULL, "prctl(GET) failed\n");
+
id = 8;
if (do_timer_create(&id) < 0)
fatal_error(NULL, "timer_create()");
@@ -641,7 +645,10 @@ static void check_timer_create_exact(void)
fatal_error(NULL, "timer_delete()");
if (prctl(PR_TIMER_CREATE_RESTORE_IDS, PR_TIMER_CREATE_RESTORE_IDS_OFF, 0, 0, 0))
- fatal_error(NULL, "prctl()");
+ fatal_error(NULL, "prctl(OFF)");
+
+ if (prctl(PR_TIMER_CREATE_RESTORE_IDS, PR_TIMER_CREATE_RESTORE_IDS_GET, 0, 0, 0) != 0)
+ fatal_error(NULL, "prctl(GET) failed\n");
if (id != 8) {
ksft_test_result_fail("check timer create exact %d != 8\n", id);
Powered by blists - more mailing lists