[Top][All Lists]

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

[bug #63215] --shuffle=random doesn't properly initialize config.seed

From: James Hilliard
Subject: [bug #63215] --shuffle=random doesn't properly initialize config.seed
Date: Fri, 14 Oct 2022 18:50:46 -0400 (EDT)


                 Summary: --shuffle=random doesn't properly initialize
                 Project: make
               Submitter: jameshilliard
               Submitted: Fri 14 Oct 2022 10:50:44 PM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: SCM
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None


Follow-up Comments:

Date: Fri 14 Oct 2022 10:50:44 PM UTC By: James Hilliard <jameshilliard>
When using submake it seems the seed isn't getting set properly as MAKEFLAGS
just gets passed "--shuffle=0" when the toplevel make is invoked with

I think we need to do something like this so that we initialize the seed
before it gets passed to MAKEFLAGS:
diff --git a/src/shuffle.c b/src/shuffle.c
index 4cfdc943..471c56b1 100644
--- a/src/shuffle.c
+++ b/src/shuffle.c
@@ -82,7 +82,11 @@ shuffle_set_mode (const char *cmdarg)
-      if (strcasecmp (cmdarg, "random") != 0)
+      if (strcasecmp (cmdarg, "random") == 0)
+        {
+          config.seed = make_rand ();
+        }
+      else
           /* Assume explicit seed.  */
           const char *err;


Reply to this item at:


Message sent via Savannah

reply via email to

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