Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dns_forward_lwt_unix/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(library
(name dns_forward_lwt_unix)
(libraries dns_forward lwt lwt.unix cstruct-lwt io-page.unix))
(libraries dns_forward lwt lwt.unix cstruct-lwt))
2 changes: 1 addition & 1 deletion src/dns_forward_test/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

(executable
(name test_fake)
(libraries dns_forward dns_forward_lwt_unix lwt-dllist logs logs.fmt alcotest fake_sleep fake_time))
(libraries dns_forward dns_forward_lwt_unix lwt-dllist logs logs.fmt alcotest mirage-mtime.mock))

(rule
(alias runtest)
Expand Down
4 changes: 0 additions & 4 deletions src/dns_forward_test/fake_sleep/dune

This file was deleted.

33 changes: 0 additions & 33 deletions src/dns_forward_test/fake_sleep/mirage_sleep.ml

This file was deleted.

4 changes: 0 additions & 4 deletions src/dns_forward_test/fake_time/dune

This file was deleted.

10 changes: 0 additions & 10 deletions src/dns_forward_test/fake_time/fake_time_state.ml

This file was deleted.

19 changes: 0 additions & 19 deletions src/dns_forward_test/fake_time/mirage_mtime.ml

This file was deleted.

8 changes: 4 additions & 4 deletions src/dns_forward_test/test_fake.ml
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,20 @@ let test_good_dead_server () =
let t = R.answer request r in
(* First request will trigger the internal timeout and mark the bad server
as offline. The sleep timeout here will only trigger if this fails. *)
Fake_time_state.advance Duration.(of_sec 1);
Mirage_mtime_set.tick_for Duration.(of_sec 1);
(* HACK: we want to let all threads run until they block but we don't have
an API for that. This assumes that all computation will finish in 0.1s *)
Lwt_unix.sleep 0.1 >>= fun () ->
Fake_time_state.advance Duration.(of_sec 1);
Mirage_mtime_set.tick_for Duration.(of_sec 1);
Lwt_unix.sleep 0.1 >>= fun () ->
Lwt.pick [
(Lwt_unix.sleep 1. >>= fun () -> Lwt.fail_with "test_good_dead_server: initial request had no response");
t >>= fun _ -> Lwt.return_unit
]
>>= fun () ->
(* The bad server should be marked offline and no-one will wait for it *)
Fake_time_state.reset ();
Fake_time_state.advance Duration.(of_ms 500); (* avoid the timeouts winning the race with the actual result *)
Mirage_mtime_set.reset ();
Mirage_mtime_set.tick_for Duration.(of_ms 500); (* avoid the timeouts winning the race with the actual result *)
let request =
R.answer request r
>>= function
Expand Down
2 changes: 1 addition & 1 deletion src/hostnet/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
tcpip.tcp tcpip.stack-direct charrua charrua-server dns dns_lwt ofs luv
luv_unix lwt.unix threads astring fs9p dns_forward tar
mirage-vnetif uuidm cohttp-lwt mirage-channel ezjsonm
duration mirage-time
duration io-page
tcpip.checksum forwarder cstructs sha)
(foreign_stubs (language c) (names stubs_utils))
(wrapped false))
2 changes: 1 addition & 1 deletion src/ofs/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(library
(name ofs)
(libraries protocol-9p cstruct io-page-unix logs astring mirage-time
(libraries protocol-9p cstruct logs astring
mirage-flow duration)
(wrapped false))
12 changes: 4 additions & 8 deletions vpnkit.opam
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ depends: [
"charrua" {>= "1.3.0"}
"charrua-client"
"charrua-server"
"hvsock" {>= "3.0.1"}
"hvsock" {>= "3.1.0"}
"fd-send-recv" {>= "2.0.0"}
"logs"
"fmt"
Expand All @@ -52,15 +52,15 @@ depends: [
"mirage-net" {>= "4.0.0"}
"mirage-channel" {>= "4.0.1"}
"cohttp-lwt" {>= "0.99.0" & < "6.0.0"}
"protocol-9p" {>= "2.0.2"}
"protocol-9p" {>= "2.1.0"}
"mirage-vnetif" {>= "0.5.0"}
"io-page-unix"
"io-page" {>= "3.0.0"}
"uuidm"
"ezjsonm" {>= "0.4.0"}
"sha" {with-test}
"stringext"
"mirage-sleep" {>= "4.0.0"}
"mirage-mtime" {>= "5.0.0"}
"mirage-mtime" {>= "5.1.0"}
"re" {>= "1.9.0"}
"ppx_inline_test"
]
Expand All @@ -70,7 +70,3 @@ HyperKit is a hypervisor which runs on macOS using the "hypervisor.framework".
VPNKit implements a virtual ethernet device for HyperKit VMs in a VPN-friendly
way, by terminating and proxying all the TCP flows, caching and forwarding
DNS requests etc. HyperKit and VPNKit are used in Docker for Mac and Windows."""
pin-depends:[
[ "hvsock.dev" "git+https://github.com/patricoferris/ocaml-hvsock#addfc643a4d784b95540a7e3148db74e3943758d" ]
[ "protocol-9p.dev" "git+https://github.com/patricoferris/ocaml-9p#2d512928b4dc06c28a9a171e0163b59c19155495" ]
]