summaryrefslogtreecommitdiff
path: root/src/Run.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2023-04-26 22:07:06 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2023-04-26 22:07:06 +0200
commit492568c72273ee2e7f98bc520e46fa01c2959851 (patch)
treea679607e71a648140774a1e5c739ae247eaaff22 /src/Run.hs
parent9bf4a7b3e3c44ef8cc255b27d2c6d74af95f73ce (diff)
Route tracking in namespaces and helper functions
Diffstat (limited to 'src/Run.hs')
-rw-r--r--src/Run.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Run.hs b/src/Run.hs
index 1a0b981..58df868 100644
--- a/src/Run.hs
+++ b/src/Run.hs
@@ -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