Skip to content

Commit

Permalink
extend tests
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Lehner <[email protected]>
  • Loading branch information
florianl committed Nov 21, 2024
1 parent ef0df1f commit b62d274
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion q_taprio.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func unmarshalTaPrio(data []byte, info *TaPrio) error {
info.Flags = uint32Ptr(ad.Uint32())
case tcaTaPrioTxTimeDelay:
info.TxTimeDelay = uint32Ptr(ad.Uint32())

case tcaTaPrioPad:
// padding does not contain data, we just skip it
default:
Expand Down
3 changes: 2 additions & 1 deletion q_taprio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ func TestTaPrio(t *testing.T) {
t.Fatalf("Unexpected error: %v", err1)
}
val := TaPrio{}
err2 := unmarshalTaPrio(data, &val)
newData := injectAttribute(t, data, []byte{}, tcaTaPrioPad)
err2 := unmarshalTaPrio(newData, &val)
if err2 != nil {
if errors.Is(err2, testcase.err2) {
return
Expand Down

0 comments on commit b62d274

Please sign in to comment.