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

[MirageOS-devel] irmin + mirage-vnetif + alcotest + good ol' arp



Hi folks,

I've been working on a sort of ARP thing for the week or so which I've just put up publicly on GitHub: https://github.com/yomimono/irmin-arp

It's an ARP implementation that uses an Irmin store wrapped around a Map to access and modify the cache, meaning that with each change you get history and a commit message. You can choose to use an in-memory Irmin store or you can use the Git-backed filesystem Irmin store interface; choosing a filesystem store means you can read back the store from another thread and make assertions about its state. With Magnus Skjegstad's mirage-vnetif software bridge and Thomas Gazagnaire's alcotest, I've used this to write tests attempting to verify reasonable (and documentation-compliant) behaviour of the implementation. Although I've currently disabled this, it's also possible to have the test history automatically committed to the repository (currently it will commit this to a subdirectory, test_results, which is not included in the overall code repo).

For a quick demo, run `make test` and have a look in the `test_results` directory, where git repositories reflecting the changes in cache state for each test are reflected, e.g. showing the changes in the cache for a listening Arp.t when a speaker on the same software bridge sets four different IPs:

~/irmin-arp/test_results/input_changed_ip/listener$ git log --oneline
87fc498 entry added: 192.168.3.1 -> 02:50:2a:16:6d:01
6958e03 entry added: 10.20.254.2 -> 02:50:2a:16:6d:01
829df48 entry added: 10.50.20.22 -> 02:50:2a:16:6d:01
b903b4f entry added: 10.23.10.1 -> 02:50:2a:16:6d:01
fc34d1f Arp.create: Initial empty cache
...

The overall repository in `test_results` has commits for test passes or failures, e.g.:

~/irmin-arp/test_results$ git log --oneline
f978c35 merge_pairwise: remove_expired -> master
53c2c4b merge_pairwise: update expired
f6106c1 merge_pairwise: remove expired
81ad78b merge_pairwise: original map
70d203f merge_conflicts_difft_noeds: test succeeded; removing data
70185f5 merge_conflicts_difft_nodes: expired_removed -> master
1195bff merge_conflicts_difft_nodes: remove expired entries
2618f4f merge_conflicts_difft_nodes: resolve arp entry
7bd9391 merge_conflicts_difft_nodes: set original map
067f38b merge_conflicts_difft_nodes: beginning new test
...


I'm not that far into doing anything interesting with this pile of code, but I wanted to solicit your thoughts and feedback given all the mumbling and general noise-making about testing we've been doing.

Thanks for your consideration and support. :)

-Mindy

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


 


Rackspace

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