| Lorenz Brun | fba5da0 | 2022-12-15 11:20:47 +0000 | [diff] [blame] | 1 | package nvme |
| 2 | |||||
| 3 | import ( | ||||
| 4 | "encoding/binary" | ||||
| 5 | "testing" | ||||
| 6 | ) | ||||
| 7 | |||||
| 8 | // TestStruct tests if the struct passed to Linux's ioctl has the ABI-specified | ||||
| 9 | // size. | ||||
| 10 | func TestStruct(t *testing.T) { | ||||
| 11 | passthruCmdSize := binary.Size(passthruCmd{}) | ||||
| 12 | if passthruCmdSize != 72 { | ||||
| 13 | t.Errorf("passthroughCmd is %d bytes, expected 72", passthruCmdSize) | ||||
| 14 | } | ||||
| 15 | } | ||||