[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] netif that reads from pcap / hoards writes

Cool idea.

For most tests I think it would be an advantage to use a stub implementation of OS.Time.sleep so that the tests would run almost instantly, regardless of time-outs. When you need to verify that the unit under test is sleeping for the correct amount of time then you'd need to record the calls to sleep, or something similar.

The ARP test fails for me onÂtest_queries_retried (extra debug messages added):

ARP: sending gratuitous from
ARP: updating -> 00:16:3e:7b:2b:4d
ARP: transmitting probe ->
# written: 2

ff ff ff ff ff ff ff ff ff ff ff ff 08 06 00 01Â
08 00 06 04 00 01 ff ff ff ff ff ff c0 a8 02 deÂ
ff ff ff ff ff ff c0 a8 02 04Â

ff ff ff ff ff ff ff ff ff ff ff ff 08 06 00 01Â
08 00 06 04 00 02 ff ff ff ff ff ff c0 a8 02 deÂ
ff ff ff ff ff ff 00 00 00 00Â
Fatal error: exception OUnitTest.OUnit_failure("expected: Success but got: Last 3 sent packets weren't ARP probes")
Raised at file "src/core/lwt.ml", line 894, characters 22-23
Called from file "src/unix/lwt_main.ml", line 34, characters 8-18
Called from file "main.ml", line 36, characters 2-28

Looks like the second packet is a gratuitous ARP.


On 12 March 2015 at 20:54, Mindy <mindy@xxxxxxxxxxxxxxxxxxx> wrote:
Hi all,

I've just made public `mirage-net-pcap`, a module that satisfies V1.NETWORK by supplying packets from a prerecorded pcap file (via crunch) and keeping written packets in memory for later examination. You can see it at https://github.com/yomimono/mirage-net-pcap , and there's an example unikernel using it under `arp_tester` in my example-unikernels repository at https://github.com/yomimono/example-unikernels . `mirage-net-pcap` works with both unix and xen backends, although the example code works only with Unix because of its use of oUnit.

Right now there isn't facility for saving writes to persistent storage (i.e., writing to a pcap). I started writing this and then realized it was generally the opposite of what I actually wanted when writing testing code that used `mirage-net-pcap`, but I do plan on adding this in a later release.

I don't have a fork of the mirage frontend tool that nicely sets up a netif in `config.ml` for the user currently, but stacks can be built on top of one in the normal way (i.e., as in `mirage-skeleton/ethifv4`).

Bad, horrible, okay, other?


MirageOS-devel mailing list

MirageOS-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.