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: Thu, 19 Feb 2026 18:43:08 +1000 Message-ID: In-Reply-To: <20260219-cmdq-continuation-v2-9-2e8b7615536f@nvidia.com> References: <20260219-cmdq-continuation-v2-0-2e8b7615536f@nvidia.com> <20260219-cmdq-continuation-v2-9-2e8b7615536f@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review > + impl CommandToGsp for TestPayload { > + const FUNCTION: MsgFunction = MsgFunction::Nop; > + type Command = (); The tests use `Command = ()` (zero-sized type), which means `MAX_FIRST_PAYLOAD_SIZE == MAX_CMD_SIZE`. This simplifies the boundary testing. It would be nice to also have a test with a non-zero-sized `Command` to exercise the case where `MAX_FIRST_PAYLOAD_SIZE < MAX_CMD_SIZE`, but this is a minor suggestion, not a bug. > + fn check_split(t: SplitTest) -> Result { > + let payload = TestPayload::new(t.payload_size)?; > + let mut state = SplitState::new(&payload)?; > + > + let mut buf = read_payload(&state.command(payload))?; > + assert!(buf.len() <= MAX_CMD_SIZE); The test correctly verifies both the structure (correct number of continuation records, each within the size limit) and the data integrity (reassembled data matches the original pattern). The boundary conditions at `MAX_CMD_SIZE`, `MAX_CMD_SIZE + 1`, `MAX_CMD_SIZE * 2`, and `MAX_CMD_SIZE * 2 + 1` are well-chosen. No issues. --- Generated by Claude Code Patch Reviewer