Simon Jakobi pushed to branch wip/sjakobi/nonmoving-gc-test-fixes at Glasgow Haskell Compiler / GHC Commits: 1ac1d554 by Simon Jakobi at 2026-07-30T10:43:09+02:00 testsuite: Make listThreads1 insensitive to the RTS's own threads listThreads1 expected `listThreads` to return exactly [ThreadId 1]. That holds only under a non-threaded RTS. Under a threaded RTS however there are more threads present, so we change the test to simply check that `myThreadId` is present in the list. Assisted-by: Claude Opus 5 - - - - - 2 changed files: - libraries/base/tests/listThreads1.hs - libraries/base/tests/listThreads1.stdout Changes: ===================================== libraries/base/tests/listThreads1.hs ===================================== @@ -2,5 +2,10 @@ module Main where import GHC.Conc.Sync +-- Regression test for the JS backend's ListThreadsOp, which used to omit the +-- running thread. Whatever other threads the RTS has is irrelevant here. main :: IO () -main = listThreads >>= print +main = do + tid <- myThreadId + ts <- listThreads + print (tid `elem` ts) ===================================== libraries/base/tests/listThreads1.stdout ===================================== @@ -1 +1 @@ -[ThreadId 1] +True View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1ac1d5549cd160d095e42d3b42fdac8f... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1ac1d5549cd160d095e42d3b42fdac8f... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Simon Jakobi (@sjakobi)