pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/ocaml



Module Name:    pkgsrc
Committed By:   he
Date:           Tue Dec  8 08:53:16 UTC 2020

Modified Files:
        pkgsrc/lang/ocaml: Makefile
Added Files:
        pkgsrc/lang/ocaml/patches:
            patch-testsuite_tests_lib-systhreads_testyield.ml

Log Message:
Apply a workaround for NetBSD to the testyield.ml test.

On NetBSD, the "thread scheduler" appears to just schedule two
threads out of 4 when all they in essence to is "yield", and not
do round-robin scheduling, causing the test to loop.  Reduce the
number of threads in the test to 2.

Bump PKGREVISION.

OK'ed by jaapb@


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 pkgsrc/lang/ocaml/Makefile
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/ocaml/patches/patch-testsuite_tests_lib-systhreads_testyield.ml

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/ocaml/Makefile
diff -u pkgsrc/lang/ocaml/Makefile:1.136 pkgsrc/lang/ocaml/Makefile:1.137
--- pkgsrc/lang/ocaml/Makefile:1.136    Tue Dec  1 23:44:00 2020
+++ pkgsrc/lang/ocaml/Makefile  Tue Dec  8 08:53:16 2020
@@ -1,9 +1,11 @@
-# $NetBSD: Makefile,v 1.136 2020/12/01 23:44:00 he Exp $
+# $NetBSD: Makefile,v 1.137 2020/12/08 08:53:16 he Exp $
 
 .include "Makefile.common"
 
 #CONFIGURE_ENV+=               disable_x11=yes
 
+PKGREVISION=           1
+
 BUILD_TARGET=          world
 MAKE_JOBS_SAFE=                no
 UNLIMIT_RESOURCES=     stacksize

Added files:

Index: pkgsrc/lang/ocaml/patches/patch-testsuite_tests_lib-systhreads_testyield.ml
diff -u /dev/null pkgsrc/lang/ocaml/patches/patch-testsuite_tests_lib-systhreads_testyield.ml:1.1
--- /dev/null   Tue Dec  8 08:53:16 2020
+++ pkgsrc/lang/ocaml/patches/patch-testsuite_tests_lib-systhreads_testyield.ml Tue Dec  8 08:53:16 2020
@@ -0,0 +1,19 @@
+$NetBSD: patch-testsuite_tests_lib-systhreads_testyield.ml,v 1.1 2020/12/08 08:53:16 he Exp $
+
+Reduce the number of threads to 2, so that we don't loop forever
+on NetBSD, where the scheduler appears to only alternate between
+two threads instead of doing round-robin scheduling.
+
+Ref. https://github.com/ocaml/ocaml/issues/10067
+
+--- testsuite/tests/lib-systhreads/testyield.ml.orig   2020-03-18 15:02:03.000000000 +0000
++++ testsuite/tests/lib-systhreads/testyield.ml
+@@ -7,7 +7,7 @@
+    ** native
+ *)
+ 
+-let threads = 4
++let threads = 2
+ 
+ let are_ready = ref 0
+ 



Home | Main Index | Thread Index | Old Index