diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2023-04-26 22:07:06 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2023-04-26 22:07:06 +0200 |
commit | 492568c72273ee2e7f98bc520e46fa01c2959851 (patch) | |
tree | a679607e71a648140774a1e5c739ae247eaaff22 /src/Run.hs | |
parent | 9bf4a7b3e3c44ef8cc255b27d2c6d74af95f73ce (diff) |
Route tracking in namespaces and helper functions
Diffstat (limited to 'src/Run.hs')
-rw-r--r-- | src/Run.hs | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -215,9 +215,9 @@ withDisconnectedUp link inner = do then inner else do local (fmap $ \s -> s { tsDisconnectedUp = S.insert netns $ tsDisconnectedUp s }) $ do - linkDown link + atomicallyWithIO $ linkDown link x <- inner - linkUp link + atomicallyWithIO $ linkUp link return x withDisconnectedBridge :: Link Bridge -> TestRun a -> TestRun a @@ -228,9 +228,9 @@ withDisconnectedBridge bridge inner = do then inner else do local (fmap $ \s -> s { tsDisconnectedBridge = S.insert netns $ tsDisconnectedBridge s }) $ do - linkDown bridge + atomicallyWithIO $ linkDown bridge x <- inner - linkUp bridge + atomicallyWithIO $ linkUp bridge return x withNodePacketLoss :: Node -> Scientific -> TestRun a -> TestRun a |