I have learned the hard way to never trust anything I write until
I've run tests on it... The worst part is that I keep having to
relearn it. The hard way...
These days, I try to write the tests with the code, pounding on
the edge cases, first.
On 5/25/23 12:39 PM, Rob Jarratt wrote:-----Original Message----- From: Paul Koning <paulkoning@comcast.net> Sent: 24 May 2023 19:36 To: The Hobbyist DECnet mailing list <hecnet@lists.dfupdate.se> Subject: [HECnet] Re: DECnet Regression Tests?On May 24, 2023, at 2:15 PM, Paul Koning <paulkoning@comcast.net>wrote:On May 19, 2023, at 8:23 PM, Johnny Billquist <bqt@softjar.se> wrote: There are some test scripts and tools in the RSX DECnet sources, buttheyare really RSX specific, and for testing RSX against different types ofsystems.I've never used them, and I don't know what would be required for themto even be usable.Apart from those, I don't think I've seen anything. But there is something for RSX, which might be answering parts of yourquestion, but it's nothing general.PyDECnet comes with a large body of unit tests.And that suggests an interesting notion. Many of those tests are of theform:1. Construct a test packet 2. Submit that test packet to the system being tested (PyDECnet) 3. If a response is expected, check that it arrives and contains what we expect 4. Check the resulting sytem state Those could, in many cases, be adapted to do "black box" testing of other DECnet implementations. The key difference is that as written the tests typically poke at a single protocol layer, and check state by looking intotheinternals of the layer. A black box test would have to wrap the testpackets inthe necessary lower layer envelopes to get them to the destination, andthestate checks would be limited to what is visible via the managementinterface(counters and state) or other application APIs. Those would not be terribly difficult things to do. For example, PyDECnet already contains lower layer envelope descriptions, so to take, say, anNSPtest packet and wrap it in routing and datalink layer envelopes is nothard todo, nor is unwrapping the reply. One part of my PyDECnet tests is random packet tests, where I construct random crud to send to a layer to verify that it doesn't die. Obviously random packets don't do anything useful, and typically would just get discarded, but it's well known that such abuse tests often break code that isn't sufficiently paranoid. It would be entertaining to subject otherDECnetsto such abuse.I usually write a lot of automated tests, but for my own user mode router I didn't do that, which makes me feel very bad. It would be interesting to subject my router to a fuzz test to see how it copes .paul _______________________________________________ HECnet mailing list -- hecnet@lists.dfupdate.se To unsubscribe send anto hecnet-leave@lists.dfupdate.se_______________________________________________ HECnet mailing list -- hecnet@lists.dfupdate.se To unsubscribe send an email to hecnet-leave@lists.dfupdate.se