From: Thierry Escande <firstname.lastname@example.org> To: Petr Mladek <email@example.com> Cc: Andy Shevchenko <firstname.lastname@example.org>, Andrew Morton <email@example.com>, David Miller <firstname.lastname@example.org>, Rasmus Villemoes <email@example.com>, "Tobin C . Harding" <firstname.lastname@example.org>, Linux Kernel Mailing List <email@example.com> Subject: Re: [PATCH RESEND] lib/test_printf.c: call wait_for_random_bytes() before plain %p tests Date: Fri, 8 Jun 2018 13:28:58 +0200 [thread overview] Message-ID: <firstname.lastname@example.org> (raw) In-Reply-To: <email@example.com> On 08/06/2018 13:22, Petr Mladek wrote: > On Fri 2018-06-08 12:32:33, Thierry Escande wrote: >> On 08/06/2018 11:46, Andy Shevchenko wrote: >>> On Fri, Jun 8, 2018 at 12:07 PM, Thierry Escande >>> <firstname.lastname@example.org> wrote: >>> >>>> But as I type I realize it's not necessary. I will simply enclose the call >>>> to wait_for_random_bytes() by #if IS_MODULE() #endif so it gets called only >>>> if built as a module, which is how run_kselftest.sh wants it... If >>>> test_printf is compiled built-in and the crng is not yet initialized the >>>> test will fail anyway so there is no need to add an extra check. >>> >>> Unfortunately I can't support this as is. >>> We have environments where crng will be ready minutes after the boot. >>> It's unacceptable. >>> >>> So, we need to have means to not delay test for so long. >> >> I agree we can't delay test execution for too long. In my case the crng is >> ready only a few seconds after the boot. So we may just skip this plain 'p' >> printf test if crng is not ready then. > > Alternative solution would be to accept > const char *str = sizeof(ptr) == 8 ? "(____ptrval____)" : "(ptrval)"; > as a valid result. It would make sense to print some warning in that case. > > In each case, it would look ugly to use add_random_ready_callback() > wihtout passing a callback. If you really needed to check crng_ready(), > it would be better to make it public. Agree but even with crng_ready() public we would have to block the test until it's ready which is not good either. Accepting "(ptrval)" as a valid result seems the least bad alternative... Regards, Thierry
next prev parent reply other threads:[~2018-06-08 11:29 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-06-04 11:37 Thierry Escande 2018-06-05 12:43 ` Andy Shevchenko 2018-06-07 12:24 ` Petr Mladek 2018-06-07 18:47 ` Thierry Escande 2018-06-08 8:04 ` Petr Mladek 2018-06-08 9:07 ` Thierry Escande 2018-06-08 9:46 ` Andy Shevchenko 2018-06-08 10:32 ` Thierry Escande 2018-06-08 11:22 ` Petr Mladek 2018-06-08 11:28 ` Thierry Escande [this message] 2018-06-22 20:53 ` Steven Rostedt 2018-06-22 21:50 ` Thierry Escande 2018-06-25 7:50 ` Petr Mladek 2018-06-25 12:04 ` Petr Mladek
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 \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [PATCH RESEND] lib/test_printf.c: call wait_for_random_bytes() before plain %p tests' \ /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
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.