Xilinx-CNS / solarcapture

SolarCapture network packet capture suite
Other
13 stars 8 forks source link

Add post-rotate test #12

Open abrunnin-xilinx opened 4 months ago

abrunnin-xilinx commented 4 months ago

We should self-test the post-rotate command actually executes. (Both on time and on byte count.)

Note that it is known that when you cause solarcapture to quit (via ^C) this kills it before it spawns a final rotate command. Which is sort of legitimate (we didn't rotate, after all) but is actually kind of annoying. So the test would need to note that as a known exception.

Sadly, just adding a new call to the postrotate on exit isn't quite enough - if it's done in the wrapper script, then it fires before the last packets are flushed to the pcap, and if it is done in the C code then the python wrapper is already dead and so isn't around to respond to the request to run an additional rotation. Needs some though t on how to implement properly.