|
|
|
|
|
by linuxlizard
2362 days ago
|
|
It's pretty simple. I'm decoding a structure into bit fields (802.11 Information Element). I have a hex dump that I decode into a two structures with almost 100 fields (eyeroll for 802.11 committee). Each field can only be 0, 1, or sometimes up to 15. I have a list of the structure members. I generate an assert for each member being a certain value. The python script builds/runs the C code. On failure, I parse the assertion failure, get the actual value, change the C assert string, rebuild-rerun. Continue until the program succeeds. I've visually verified the decode is correct once. I want to keep the decoder tested if I change the code again so I'm generating complete test coverage. |
|