From 2084273e64d39585f7fefb7f828b7ed98ef7d0e2 Mon Sep 17 00:00:00 2001 From: Peter Rugg Date: Mon, 13 Jan 2025 14:56:20 +0000 Subject: [PATCH 1/3] Fix timeout value --- src/QuickCheckVEngine/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/QuickCheckVEngine/Main.hs b/src/QuickCheckVEngine/Main.hs index 3df06e4..19df4cc 100644 --- a/src/QuickCheckVEngine/Main.hs +++ b/src/QuickCheckVEngine/Main.hs @@ -122,7 +122,7 @@ defaultOptions = Options , testExcludeRegex = Nothing , instrPort = Nothing , saveDir = Nothing - , timeoutDelay = 6000000000 -- 60 seconds + , timeoutDelay = 20000000 -- 20 seconds , testLen = 2048 , optShrink = True , optStrict = False From a821ccf457951991d2bf31fd365526cb34969879 Mon Sep 17 00:00:00 2001 From: Peter Rugg Date: Mon, 13 Jan 2025 14:56:38 +0000 Subject: [PATCH 2/3] Use Discard feature rather than spuriously Succeeding --- src/QuickCheckVEngine/MainHelpers.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/QuickCheckVEngine/MainHelpers.hs b/src/QuickCheckVEngine/MainHelpers.hs index 0710d60..3998845 100644 --- a/src/QuickCheckVEngine/MainHelpers.hs +++ b/src/QuickCheckVEngine/MainHelpers.hs @@ -212,8 +212,7 @@ prop connA m_connB alive onFail arch delay verbosity saveDir ignoreAsserts stric -- We don't want to shrink once one of the implementations has died, -- so always return that the property is true onSubsequentDeaths _ = do - putStrLn "Warning: reporting success since implementations not running" - return $ property True + return $ property Discard -- | Send a sequence of instructions ('[DII_Packet]') to the implementations -- running behind the two provided 'Sockets's and recieve their respective From 15955360b98369526d59260bb413a86d701e4555 Mon Sep 17 00:00:00 2001 From: Peter Rugg Date: Wed, 15 Jan 2025 10:02:08 +0000 Subject: [PATCH 3/3] Fix prints to reflect new discard behaviour --- src/QuickCheckVEngine/MainHelpers.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/QuickCheckVEngine/MainHelpers.hs b/src/QuickCheckVEngine/MainHelpers.hs index 3998845..16bb0da 100644 --- a/src/QuickCheckVEngine/MainHelpers.hs +++ b/src/QuickCheckVEngine/MainHelpers.hs @@ -250,8 +250,8 @@ doRVFIDII connA m_connB alive delay verbosity saveDir test = do m_traceAB <- maybe (return . Just $ emptyTrace traceA) (receive "implementation B" traceA) m_connB -- when (isNothing m_traceA || isNothing m_traceAB) $ writeIORef alive False - when (isNothing m_traceA) $ putStrLn "Error: implementation A timeout. Forcing all future tests to report 'SUCCESS'" - when (isNothing m_traceAB) $ putStrLn "Error: implementation B timeout. Forcing all future tests to report 'SUCCESS'" + when (isNothing m_traceA) $ putStrLn "Error: implementation A timeout. Discarding all future tests." + when (isNothing m_traceAB) $ putStrLn "Error: implementation B timeout. Discarding all future tests." -- case saveDir of Nothing -> do return () @@ -266,7 +266,7 @@ doRVFIDII connA m_connB alive delay verbosity saveDir test = do Right t -> return $ Just $ (\((x,y),z) -> (x,y,z)) <$> t Left (SomeException e) -> do writeIORef alive False - putStrLn ("Error: exception on IO with implementations. Forcing all future tests to report 'SUCCESS': " ++ show e) + putStrLn ("Error: exception on IO with implementations. Discarding all future tests: " ++ show e) return Nothing else do putStrLn "Warning: doRVFIDII called when both implementations are not alive"