aregm / nff-go

NFF-Go -Network Function Framework for GO (former YANFF)
BSD 3-Clause "New" or "Revised" License
1.38k stars 156 forks source link

How do you fuzzy-test an application built with NFF-Go? #707

Closed sitilge closed 4 years ago

sitilge commented 4 years ago

Hi,

As the title says, have you ever fuzzy tested an NFF-Go application? If so, could you share the setup you had?

I tried a simple case:

func Fuzz(data []byte) {
flow.CheckFatal(flow.SystemInit(nil))
...
//Fuzzing here
...
}

but it gives me

EAL: FATAL: already called initialization.
EAL: already called initialization.
ERROR: failed with message and code: Error with EAL already called initialization

So I tried a bit different approach, using flow.SystemReset to release resources and cleanup DPDK. This, however, gets stuck in forever loop (this issue: https://github.com/intel-go/nff-go/issues/706).

If anyone has any ideas about fuzzy testing NFF-Go applications or ideas of what I am doing wrong, I would be glad to hear. Thank you!

aregm commented 4 years ago

You can't do fuzzy testing on DPDK - that's what you will get, as DPDK doesn't support or to be precise that is the done by the design. SystemReset running on a DPDK has a long-lasting problem as DPDK doesn't support on the fly reset. So you need to quit and restart app. On the NFF-Go part you can do fuzzy-testing which is not anyhow different as any other app.