| Tim Windelschmidt | 6d33a43 | 2025-02-04 14:34:25 +0100 | [diff] [blame] | 1 | // Copyright The Monogon Project Authors. |
| 2 | // SPDX-License-Identifier: Apache-2.0 |
| 3 | |
| Lorenz Brun | fba5da0 | 2022-12-15 11:20:47 +0000 | [diff] [blame] | 4 | package nvme |
| 5 | |
| 6 | import ( |
| 7 | "encoding/binary" |
| 8 | "testing" |
| 9 | ) |
| 10 | |
| 11 | // TestStruct tests if the struct passed to Linux's ioctl has the ABI-specified |
| 12 | // size. |
| 13 | func TestStruct(t *testing.T) { |
| 14 | passthruCmdSize := binary.Size(passthruCmd{}) |
| 15 | if passthruCmdSize != 72 { |
| 16 | t.Errorf("passthroughCmd is %d bytes, expected 72", passthruCmdSize) |
| 17 | } |
| 18 | } |