[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] NTP client integration with MirageOS / Mini-OS
On 7 September 2016 at 15:26, Hannes Mehnert <hannes@xxxxxxxxxxx> wrote: > On 22/08/2016 15:16, Thomas Leonard wrote: [ running a test clock at a multiple of the real clock's speed ] >> Right, but this is a hack because we don't have internal state. It >> runs slower that it could (it's still waiting, just for less time) and >> may fail due to timeouts if the real system is under load (or just >> slow). With state, the clock could be set to whatever the unit-tests >> want the time to be, allowing the tests to run at the full speed of >> the CPU and without the behaviour depending on the load. > > I cannot follow, need to see code. I've made a simpler version of the CueKeeper test code I posted earlier: https://github.com/talex5/mirage-clock-test The example runs a test application for 15 virtual seconds (but uses almost no real time to run): ~/w/c/clock-test (master) $ time ./_build/test/test.native [103.00] fizz [105.00] buzz [106.00] fizz [109.00] fizz [110.00] buzz [112.00] fizz [115.00] fizz [115.00] buzz Tests passed! 0.00user 0.00system 0:00.00elapsed 100%CPU (0avgtext+0avgdata 2936maxresident)k 0inputs+0outputs (0major+206minor)pagefaults 0swaps It can be used as a library for other modules' tests. -- talex5 (GitHub/Twitter) http://roscidus.com/blog/ GPG: 5DD5 8D70 899C 454A 966D 6A51 7513 3C8F 94F6 E0CC GPG: DA98 25AE CAD0 8975 7CDA BD8E 0713 3F96 CA74 D8BA _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |