octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58800] BIST for rng sometimes fails


From: Hg200
Subject: [Octave-bug-tracker] [bug #58800] BIST for rng sometimes fails
Date: Tue, 21 Jul 2020 11:56:03 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

URL:
  <https://savannah.gnu.org/bugs/?58800>

                 Summary: BIST for rng sometimes fails
                 Project: GNU Octave
            Submitted by: hg200
            Submitted on: Tue 21 Jul 2020 03:56:01 PM UTC
                Category: Test Suite
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: hg200
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

I am testing mxe-octave hg id a65cacd05892 as win-32 and win-64 target on a
windows 7 laptop with a T5500. This bug report is closely related to bug
#58795 and bug #58790.

The BIST

++
test ('rng')
--

sometimes passes, sometimes it fails in both 32-bit and 64-bit builds. Some
further investigations show that the initialization of the random number
generator sometimes returns the same seed after three consecutive
rng('shuffle') calls. Inserting of a "pause(0.1)" command into the BIST as
follows solves the problem.

++
%! state = rng ();
%! unwind_protect
%!   rng ("shuffle");
%!   rng ("shuffle", "twister");
%!   pause (0.1);
%!   s = rng ("shuffle");
%!   assert (! isequal (s, rng ("shuffle")));
%!   s = rng ("shuffle", "twister");
%!   assert (! isequal (s, rng ("shuffle", "twister")));
%! unwind_protect_cleanup
%!   rng (state);
%! end_unwind_protect
--

Comments?





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58800>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]