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 continuation records Date: Tue, 03 Mar 2026 13:34:48 +1000 Message-ID: In-Reply-To: <20260302-cmdq-continuation-v4-9-c011f15aad58@nvidia.com> References: <20260302-cmdq-continuation-v4-0-c011f15aad58@nvidia.com> <20260302-cmdq-continuation-v4-9-c011f15aad58@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 Good test coverage using kunit_tests. The tests: 1. Use a non-zero-sized `TestHeader` (64 bytes) to exercise the `MAX_FIRST_= PAYLOAD` calculation realistically. 2. Generate a non-trivial test pattern (`i ^ (i >> 8)`) that doesn't repeat= every 256 bytes. 3. Cover boundary conditions precisely: - 0 payload =E2=86=92 0 continuations - `MAX_FIRST_PAYLOAD` =E2=86=92 0 continuations (exact fit) - `MAX_FIRST_PAYLOAD + 1` =E2=86=92 1 continuation (just over) - `MAX_FIRST_PAYLOAD + MAX_CMD_SIZE` =E2=86=92 1 continuation (exact 2nd= chunk) - `MAX_FIRST_PAYLOAD + MAX_CMD_SIZE + 1` =E2=86=92 2 continuations (just= over 2 chunks) - `MAX_FIRST_PAYLOAD + 3.5 * MAX_CMD_SIZE` =E2=86=92 4 continuations 4. Verify both the number of continuations AND that the reassembled data ma= tches the original pattern. The `read_payload` helper correctly creates an SBufferIter with an empty se= cond slice (`&mut []`), which works because each individual chunk (split co= mmand payload or continuation record) fits within a single buffer. **Minor observation:** `TestHeader` manually implements `FromBytes` and `As= Bytes` with `// SAFETY` comments. This is correct for `[u8; 64]`, but if th= e `derive` macros from zerocopy/kernel::transmute were available for this t= ype, it would be cleaner. However, this is likely a constraint of the kerne= l's transmute API and is fine as-is. --- Generated by Claude Code Patch Reviewer