MCPcopy
hub / github.com/microsoft/retina / TestGenerateAllProbesIncludingNfqueue

Function TestGenerateAllProbesIncludingNfqueue

shell/tracescript_test.go:606–635  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

604}
605
606func TestGenerateAllProbesIncludingNfqueue(t *testing.T) {
607 // Verify all probes can be generated together
608 config := TraceConfig{
609 EnableDrops: true,
610 EnableRST: true,
611 EnableErrors: true,
612 EnableRetransmits: true,
613 EnableNfqueueDrops: true,
614 }
615
616 gen := NewScriptGenerator(config)
617 script := gen.Generate()
618
619 // All probes should be present
620 if !strings.Contains(script, "tracepoint:skb:kfree_skb") {
621 t.Error("script missing kfree_skb probe")
622 }
623 if !strings.Contains(script, "tcp_send_reset") {
624 t.Error("script missing RST probe")
625 }
626 if !strings.Contains(script, "inet_sk_error_report") {
627 t.Error("script missing socket error probe")
628 }
629 if !strings.Contains(script, "tcp_retransmit_skb") {
630 t.Error("script missing retransmit probe")
631 }
632 if !strings.Contains(script, "fexit:vmlinux:__nf_queue") {
633 t.Error("script missing NFQUEUE probe")
634 }
635}

Callers

nothing calls this directly

Calls 4

GenerateMethod · 0.95
NewScriptGeneratorFunction · 0.85
ContainsMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected