Open flaviojs opened 11 months ago
I tried a bunch of stuff while converting to rust and found a decent baseline test. Only thing left is make a script to automate the test.
Non-hypervisor "can boot" test: 1) run dynamips with options for a particular image and TCP console 2) telnet to the TCP console and wait for either "bytes of NVRAM" or "bytes of processor board System flash" 3) Result: 3.a) PASS if the target text is found 3.b) FAIL if dynamips crashes 3.c) FAIL if telnet fails to connect X times 3.d) FAIL if there is no telnet text during X time 3.e) FAIL if IOS keeps rebooting
When the target text appears we know that: 1) the microcode and cpu (jit/nojit) seem to work 2) all the hardware that IOS can detect has been detected (memory,pci,eeprom,fpga,...) without crashing or rebooting 3) the config file has not been read yet
I don't use this software so I'm asking help from anyone that uses it.
Requirements of the script:
Optional, would be nice to have:
Long story:
I'm playing around with rust in this project. After a few tries I arrived at a nice solution. I have access to the public structures and functions that the C code provides and can easily replace any C function with a rust function.
I make mistakes all the time, so I need a baseline test to avoid the accumulation of mistakes that comes with blind development. My focus/interest is the virtual hardware, which I want to experiment with, possibly complete or fix.
It sucks to see this project with security bugs, but I'm not gonna touch C code unless someone integrates Coverity Scan or similar into the CI (so I can see a list of bugs). I find C to be very error-prone, I don't intend to repeat that frustrating development experience now that I know rust.