(t *testing.T)
| 604 | } |
| 605 | |
| 606 | func 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 | } |
nothing calls this directly
no test coverage detected