From: "Dmitry V. Levin" <ldv@altlinux.org>
To: devel@lists.altlinux.org
Subject: Re: [devel] Q: энтропия на сборочнице [bolt-0.9.1-alt1: Sisyphus/i586 test rebuild failed]
Date: Mon, 1 Mar 2021 20:56:20 +0300
Message-ID: <20210301175620.GA14812@altlinux.org> (raw)
In-Reply-To: <20210301171032.GA968021@lks.home>
On Mon, Mar 01, 2021 at 06:10:32PM +0100, Konstantin Lepikhov wrote:
> Привет!
>
> Давно мучает меня эта "ошибка" пересборки
>
> Код теста:
>
> static void
> test_strv_permute (TestRng *tt, gconstpointer user_data)
> {
> g_auto(GStrv) tst = NULL;
> const char *ref[] = {"a", "b", "c", "d", NULL};
> char *empty[] = {NULL};
> guint N;
> guint k = 0;
>
> bolt_strv_permute (NULL);
> bolt_strv_permute (empty);
>
> g_assert_cmpuint (bolt_strv_length (empty), ==, 0U);
>
> tst = g_strdupv ((char **) ref);
>
> /* there are 4! = 24 possible permutations, do it
> * at least N = 4! and pick a rather large threshold
> * instead of a larger N */
> N = (4 * 3 * 2 * 1);
>
> for (guint i = 0; i < N; i++)
> {
> bolt_strv_permute (tst);
> if (bolt_strv_equal ((char **) ref, (char **) tst))
> k++;
> }
>
> g_debug ("permutation-test: %u of %u were equal", k, N);
> g_assert_cmpuint (k, <, 5);
> }
>
> ...
>
> У меня есть смутные подозрения, что в какой-то момент в сборочнице
> кончается энтропия и начинается фигня
Это что, неустранимо вероятностный тест, который, если его запускать
достаточно много раз, обязательно упадёт? А где он добывает себе
рандомизацию?
--
ldv
next prev parent reply other threads:[~2021-03-01 17:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 17:10 Konstantin Lepikhov
2021-03-01 17:40 ` Alexey V. Vissarionov
2021-03-01 17:56 ` Dmitry V. Levin [this message]
2021-03-02 9:36 ` Konstantin Lepikhov
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=20210301175620.GA14812@altlinux.org \
--to=ldv@altlinux.org \
--cc=devel@lists.altlinux.org \
/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
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git