From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: gpu: nova-core: gsp: add tests for SplitState Date: Fri, 27 Feb 2026 12:22:00 +1000 Message-ID: In-Reply-To: <20260226-cmdq-continuation-v3-9-572ab9916766@nvidia.com> References: <20260226-cmdq-continuation-v3-0-572ab9916766@nvidia.com> <20260226-cmdq-continuation-v3-9-572ab9916766@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review Adds kunit tests with a `TestPayload` helper (using `Command =3D ()` and `M= sgFunction::Nop`). The `check_split` function verifies both the number of c= ontinuation records and that concatenating all payloads reproduces the orig= inal data. The boundary conditions tested are: | `payload_size` | Expected continuations | Reason | |---|---|---| | 0 | 0 | Empty payload, no split | | `MAX_CMD_SIZE` | 0 | Exactly fits single element | | `MAX_CMD_SIZE + 1` | 1 | Overflows by 1 byte | | `MAX_CMD_SIZE * 2` | 1 | Two full chunks | | `MAX_CMD_SIZE * 2 + 1` | 2 | Two full + 1 byte overflow | | `MAX_CMD_SIZE * 3.5` | 3 | Partial last chunk | Good coverage of the boundary conditions. The data integrity check (`assert= _eq!(buf.as_slice(), ...)`) validates both splitting and reassembly. **Observation**: Since `TestPayload` uses `Command =3D ()`, `MAX_FIRST_PAYL= OAD_SIZE =3D=3D MAX_CMD_SIZE`. A test with a non-zero-sized `Command` type = would also exercise the case where the first chunk has less variable payloa= d space than continuation chunks. This is a minor gap =E2=80=94 the logic i= s straightforward (`MAX_FIRST_PAYLOAD_SIZE =3D MAX_CMD_SIZE - size_of::()`), but a test would provide extra confidence. --- Generated by Claude Code Patch Reviewer