Skip to content
This repository was archived by the owner on Sep 22, 2020. It is now read-only.

Commit 07bccae

Browse files
authored
Merge pull request #276 from mdlayher/aoe-macmasklist-test
block/aoe: add test that indicates MAC mask list is unimplemented
2 parents 1bb7dd3 + b1dfbca commit 07bccae

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

block/aoe/aoe_test.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,32 @@ func TestServeCommandQueryConfigInformation(t *testing.T) {
6060
}
6161
}
6262

63+
func TestServeCommandMACMaskList(t *testing.T) {
64+
// Request that the server send its current MAC mask list
65+
req := &aoe.Header{
66+
Version: aoe.Version,
67+
Major: 1,
68+
Minor: 1,
69+
Command: aoe.CommandMACMaskList,
70+
Tag: [4]byte{0xde, 0xad, 0xbe, 0xef},
71+
Arg: &aoe.MACMaskArg{
72+
Command: aoe.MACMaskCommandRead,
73+
},
74+
}
75+
76+
res := testRequest(t, req)
77+
78+
// At this time, MAC mask lists are not implemented in the AoE server.
79+
err := *req
80+
err.FlagResponse = true
81+
err.FlagError = true
82+
err.Error = aoe.ErrorUnrecognizedCommandCode
83+
84+
if want, got := err, *res; !headersEqual(got, want) {
85+
t.Fatalf("unexpected AoE header:\n - want: %+v\n- got: %+v", want, got)
86+
}
87+
}
88+
6389
func TestBPFProgramWrongMajorAddress(t *testing.T) {
6490
s := &Server{
6591
major: 1,

0 commit comments

Comments
 (0)