(t *testing.T)
| 353 | } |
| 354 | |
| 355 | func TestFreezeRodata(t *testing.T) { |
| 356 | testutils.SkipOnOldKernel(t, "5.9", "sk_lookup program type") |
| 357 | |
| 358 | file := testutils.NativeFile(t, "testdata/constants-%s.elf") |
| 359 | spec, err := LoadCollectionSpec(file) |
| 360 | if err != nil { |
| 361 | t.Fatal(err) |
| 362 | } |
| 363 | |
| 364 | var obj struct { |
| 365 | Program *Program `ebpf:"freeze_rodata"` |
| 366 | } |
| 367 | |
| 368 | qt.Assert(t, qt.IsNil(spec.Variables["ret"].Set(uint32(1)))) |
| 369 | |
| 370 | mustLoadAndAssign(t, spec, &obj, nil) |
| 371 | obj.Program.Close() |
| 372 | } |
| 373 | |
| 374 | func TestCollectionSpecDetach(t *testing.T) { |
| 375 | coll := Collection{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…