(t *testing.T)
| 401 | } |
| 402 | |
| 403 | func TestLoadInvalidMap(t *testing.T) { |
| 404 | file := testutils.NativeFile(t, "testdata/invalid_map-%s.elf") |
| 405 | cs, err := LoadCollectionSpec(file) |
| 406 | if err != nil { |
| 407 | t.Fatal("Can't load CollectionSpec", err) |
| 408 | } |
| 409 | |
| 410 | ms, ok := cs.Maps["invalid_map"] |
| 411 | if !ok { |
| 412 | t.Fatal("invalid_map not found in CollectionSpec") |
| 413 | } |
| 414 | |
| 415 | m, err := NewMap(ms) |
| 416 | t.Log(err) |
| 417 | if err == nil { |
| 418 | m.Close() |
| 419 | t.Fatal("Creating a Map from a MapSpec with non-zero Extra is expected to fail.") |
| 420 | } |
| 421 | } |
| 422 | |
| 423 | func TestLoadInvalidMapMissingSymbol(t *testing.T) { |
| 424 | file := testutils.NativeFile(t, "testdata/invalid_map_static-%s.elf") |
nothing calls this directly
no test coverage detected
searching dependent graphs…