]> git.ipfire.org Git - thirdparty/qemu.git/commit
rust/vmstate: Add unit test for pointer case
authorZhao Liu <zhao1.liu@intel.com>
Tue, 18 Mar 2025 13:02:17 +0000 (21:02 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Mar 2025 11:56:00 +0000 (12:56 +0100)
commit8df1b0012aba2501bb1654cb4fbdf1b52ce22222
tree9fe9d92ea639dee1ca04a72807bcd505413ba20f
parent57c327f3a044ebd6da9efda07e4d264996688110
rust/vmstate: Add unit test for pointer case

Add a unit test to cover some patterns accepted by vmstate_of macro,
which correspond to the following C version macros:
 * VMSTATE_POINTER
 * VMSTATE_ARRAY_OF_POINTER

Note: Currently, vmstate_struct can't handle the pointer to structure
case. Leave this case as a FIXME and use vmstate_unused as a place
holder.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250318130219.1799170-14-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
rust/qemu-api/tests/vmstate_tests.rs