Commit Graph

90 Commits

Author SHA1 Message Date
metagn
720d0aee5c add retries to testament, use it for GC tests (#24279)
Testament now retries a test by a specified amount if it fails in any
way other than an invalid spec. This is to deal with the flaky GC tests
on Windows CI that fail in many different ways, from the linker randomly
erroring, segfaults, etc.

Unfortunately I couldn't do this cleanly in testament's current code.
The proc `addResult`, which is the "final" proc called in a test run's
lifetime, is now wrapped in a proc `finishTest` that returns a bool
`true` if the test failed and has to be retried. This result is
propagated up from `cmpMsgs` and `compilerOutputTests` until it reaches
`testSpecHelper`, which handles these results by recursing if the test
has to be retried. Since calling `testSpecHelper` means "run this test
with one given configuration", this means every single matrix
option/target etc. receive an equal amount of retries each.

The result of `finishTest` is ignored in cases where it's known that it
won't be retried due to passing, being skipped, having an invalid spec
etc. It's also ignored in `testNimblePackages` because it's not
necessary for those specific tests yet and similar retry behavior is
already implemented for part of it.

This was a last resort for the flaky GC tests but they've been a problem
for years at this point, they give us more work to do and turn off
contributors. Ideally GC tests failing should mark as "needs review" in
the CI rather than "failed" but I don't know if Github supports
something like this.
2024-10-12 22:48:44 +02:00
ringabout
379299a5ac fixes #22286; enforce Non-var T destructors by nimPreviewNonVarDestructor (#22975)
fixes #22286
ref https://forum.nim-lang.org/t/10642

For backwards compatibilities, we might need to keep the changes under a
preview compiler flag. Let's see how many packags it break.

**TODO** in the following PRs

- [ ] Turn the `var T` destructors warning into an error with
`nimPreviewNonVarDestructor`

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2023-11-25 18:27:27 +01:00
Bung
6b913b4741 Revert "fix #22173 sink paramers not moved into closure (refc) (#22… (#22376)
Revert "fix #22173 `sink` paramers not moved into closure (refc) (#22359)"

This reverts commit b40da812f7.
2023-08-03 19:56:05 +02:00
Bung
b40da812f7 fix #22173 sink paramers not moved into closure (refc) (#22359)
* use genRefAssign when assign to sink string

* add test case
2023-08-02 14:08:51 +02:00
ringabout
9471b5f964 fixes #22256; fixes GC_disableOrc overflow (#22257) 2023-07-11 19:01:18 +02:00
ringabout
4c46358db1 remove shallowCopy for ARC/ORC (#20070)
* remove shallowCopy for ARC/ORC

* use move

* fix

* more fixes

* typo

* Update lib/system.nim

* follow

* add nodestroy

* move

* copy string

* add a changelog entry

Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-07-26 16:51:01 +02:00
Heiko Nickerl
92cb765714 Raise IndexDefect when deleting element at out of bounds index (#17821)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: Heiko Nickerl <mail@hnicke.de>
Co-authored-by: Heiko Nickerl <heiko.nickerl@flipapp.de>
2021-06-20 08:56:33 -07:00
flywind
7ad49950bd [os:standalone]fix #14011 (#17564) 2021-03-29 17:54:28 +02:00
Timothee Cour
e94aec20da fix #17325 linux 32bit CI; fix #17085 flaky test (#17469) 2021-03-24 10:36:15 +01:00
Andreas Rumpf
4395a26764 fixes #17085 [backport:1.2] (#17101) 2021-02-19 12:30:39 +01:00
flywind
e718a4a058 follow #15860 clean cgi module (#16487)
* follow #15860  clean cgi module

* follow #15860  clean cgi module
2020-12-27 19:46:21 +01:00
alaviss
e9df8ebcfd gc_regions: cleanup & fixes for deallocation (#11920)
* gc_regions: withRegion nows return the modified MemRegion

* gc_regions: make withScratchRegion dealloc correctly

* tests/gc: add tregionleak test

This test checks if memory within regions are freed properly.
2020-08-17 20:20:48 +02:00
Miran
e7f280bd26 Remove deprecated stuff from stdlib (#14699)
* update to the latest Jester

* remove deprecated procs from some stdlib modules

* 'criterion' is not maintained anymore and relies on obsolete stuff
2020-06-17 15:25:02 +02:00
Andreas Rumpf
dedb04fa9e new implementations for --gc:orc (#14121)
* cycle collector: new implementation
* cycle collector: make self-adaptive based on its previous effectiveness
* cycle collector: added Lins's jump stack to improve traversal from 3*N to 2*N
* cycle collector: make tests green
* API extensions and bugfixes
* code cleanup and use --gc:orc for tasyncawait
2020-04-27 11:57:26 +02:00
Miran
8088633250 faster CIs (#13803)
* ttables: smaller table, 5x speedup

* thavlak: less iterations, less loops; 30% speedup

* tasyncclosestall: shorter timeout; 35% speedup

* gcleak4: less iterations, 2x speedup

* ttimes: remove deprecated stuff

* tdangerisrelease: remove cpp backend, 3x speedup

* tfrexp1: smaller range, 2x speedup

* trtree: fix warnings, less iterations, 6x speedup

* tasyncawait_cyclebreaker: smaller swarm size; 2x speedup

* trealloc: smaller number of iterations; 10x speedup

* towned_binary_tree: less iterations, 4x speedup

* tclosure: remove unused code, less iterations; 2x speedup

* twaitany: less durations; 1.4x speedup

* tasync_misc: less iterations, 2x speedup

* t8535: smaller sleep, 1.5x speedup

* tmanyjoin: smaller sleep, 2x speedup

* t12221: shorter sleeps, removed two slower tests; 1.6x speedup

* tfuturestream: smaller sleep; 1.5x speedup

* growobjcrash: less iterations; 2x speedup

* ttryrecv: smaller sleep; 1.5x speedup

* treusetvar: less threads; 2x speedup

* delete tthreadanalysis2, basically a duplicate of tthreadanalysis

* t7758: less iterations, 1.5x speedup

* tasyncawait: smaller swarm, less messages; 1.5x speedup

* tjsandnativeasync: smaller sleep, 1.5x speedup

* tpendingcheck: smaller sleep, 1.5x speedup

* remove rodfiles test category

* move tseq from its own category to 'collections' category

* remove unneeded tests and helpers from 'assert' category

* stdlib: merge tbitops2 into tbitops

* remove 'trepr2' from 'stdlib' cat

* merge 'tstreams' into one file

* remove 'tinefficient_const_table' from 'ccbugs' cat

* merge 'tcollections_to_string' into 'tcollections'

* tblocking_channel: smaller sleep, small speedup

* tconvexhull: less iterartions; 1.2x speedup

* merge 'tdeepcopy2' into 'tdeepcopy'

* merge 'tdisjoint_slice2' into 'tdisjoint_slice1'

* tmissing_deepcopy: smaller sequence

* tsendtwice: smaller arrays; 5x speedup

* remove 'tindexerrorformatbounds'

* disable multimethod tests

* remove 'gc:none' and 'refc' without 'd:useRealtimeGC' from gc tests

* koch.nim: bootstrap just with '-d:release', no need for 'csource'

* add github workflow for documentation

* testament: no need for 8 sub-second decimals
2020-03-30 13:18:12 +02:00
Timothee Cour
73f5f1e80c save another 33s of CI for tests/gc/gcleak.nim 2020-02-27 13:19:31 +01:00
Timothee Cour
fdc5925cbd CI tests run faster: save 120s in azure machines, 335s on local OSX 2020-02-27 13:19:31 +01:00
Timothee Cour
9b8c9abead revert changes to tests/gc/gcleak2.nim 2020-02-27 13:19:31 +01:00
Timothee Cour
81b0718a8f make CI tests faster + more precise 2020-02-27 13:19:31 +01:00
Andreas Rumpf
be795bbf1a TlSF Alloctor: use less memory for --gc:arc (#13280) 2020-01-28 17:09:48 +01:00
Andreas Rumpf
3f6df5cc34 fixes #12899 (#12921)
* fixes #12899

* fixes regression: destroy global variables in reverse declaration order, closureleak test relies on it
2019-12-18 07:54:20 +01:00
Andreas Rumpf
83a736a34a ARC: cycle detector (#12823)
* first implementation of the =trace and =dispose hooks for the cycle collector
* a cycle collector for ARC: progress
* manual: the .acyclic pragma is a thing once again
* gcbench: adaptations for --gc:arc
* enable valgrind tests for the strutils tests
* testament: better valgrind support
* ARC refactoring: growable jumpstacks
* ARC cycle detector: non-recursive algorithm
* moved and renamed core/ files back to system/
* refactoring: --gc:arc vs --gc:orc since 'orc' is even more experimental and we want to ship --gc:arc soonish
2019-12-17 17:37:50 +01:00
Araq
d4cae118dc fixes a flaky test for the realtime GC 2019-11-28 09:33:01 +01:00
Araq
72237e2bcf ARC: ported the GC tests over to --gc:arc 2019-11-26 16:04:28 +01:00
Araq
135774d92b thavlak.nim: more idiomatic code 2019-11-21 20:01:43 +01:00
Araq
d45a736cc8 more thavlak.nim improvements 2019-11-21 16:06:04 +01:00
Araq
f07774d064 more thavlak.nim improvements 2019-11-21 16:03:44 +01:00
Araq
48eed1f522 thavlak.nim test: improved the code style 2019-11-21 15:34:45 +01:00
Andreas Rumpf
3ba3307d61 remove deprecated procs (#12535) 2019-11-05 11:05:46 +01:00
Nindaleth
34dbc5699e fix several typos in documentation and comments (#12553) 2019-10-30 09:08:45 +01:00
Andreas Rumpf
4972d797e4 gcbench: better memory usage report 2019-09-03 12:39:49 +02:00
Clyybber
f9600b7207 Remove ENDB (#12095) 2019-08-31 07:44:53 +02:00
Andreas Rumpf
9eee15f668 thavlak: code style changes 2019-08-21 22:03:04 +02:00
alaviss
1d00f7f9d7 travis: cleanup & add 32-bit Linux testing (#11337) 2019-05-30 07:34:54 +02:00
Araq
795044ed2b make tests green again 2019-05-27 21:29:02 +02:00
Andreas Rumpf
2371b4be96 ported havlak and gcbench benchmarks to work with --gc:regions 2019-01-19 12:48:39 +01:00
Andreas Rumpf
9985706fb8 GC tests: make them take less time to save CI cycles 2019-01-19 12:48:39 +01:00
Araq
81e33b9d87 make thavlak and tmarkerproc_regression tests take fewer iterations in order to speedup the CIs 2018-10-17 13:20:45 +02:00
Araq
27f488e5d9 make more tests green; system.repr does not produce 'nil' for strings and seqs anymore 2018-08-22 15:37:57 +02:00
Araq
dbd21d670c make more things compile without isNil 2018-08-22 15:12:02 +02:00
Araq
74842ed4a9 make growobjcrash complete earlier 2018-08-05 09:20:30 +02:00
Araq
53566f7165 fixes #7833; still to-do: fix setLen 2018-07-30 23:27:01 +02:00
genotrance
c115090f6e Testament should run tests with no action (#8232)
* Testament should run tests with no action

* Fix strutils tests for JS
2018-07-08 20:38:46 -04:00
Andreas Rumpf
0926754e68 make tests green again 2018-07-05 15:51:04 +02:00
Andreas Rumpf
9b31f67859 turn destructors into finalizers 2018-07-05 11:31:27 +02:00
Sergey Avseyev
d9c922fc70 Fix gc tests for BoehmGC (#7094) 2018-01-18 09:04:32 +01:00
Araq
24a6583fa7 hardened gctest 2018-01-15 00:48:52 +01:00
Araq
f71f9f83c2 GC improvements; distinguish between thread local and globals in the marking step 2018-01-14 17:34:27 +01:00
Arne Döring
c9a2acefc1 fix 2017-07-24 23:21:51 +02:00
Anatoly Galiulin
6fa1dba515 Add `tearDownForeignThreadGc` function (#5369) 2017-02-13 13:37:20 +01:00