libsnapshot: test: add test-only override for ublk mode
This change introduces a test-only mechanism to force-enable or
force-disable the use of ublk for virtual A/B snapshots, overriding the
device's default behavior for testing purposes.
The IsUblkEnabled() function is modified to check for a new system
property, `snapuserd.test.ublk.force_mode`. This allows tests to control
the ublk feature path without altering the underlying device configuration.
The `vts_libsnapshot_test` is updated with a new `--force_ublk_mode`
command-line flag, which can be set to "enabled", "disabled", or "auto".
This flag controls the `snapuserd.test.ublk.force_mode` property,
ensuring that both the test process and the `snapuserd` daemon see consistent
behavior.
This change enables testing of both ublk and non-ublk code
paths, regardless of the device's default configuration.
Bug: 362683283
Test: vts_libsnapshot_test --force_ublk_mode=enabled
Test: vts_libsnapshot_test --force_ublk_mode=disabled
Test: vts_libsnapshot_test --force_ublk_mode=auto (default)
Change-Id: Ibe5e534ba492ce989596b7edea85dc94d6e53b09
Signed-off-by:
Sandeep Dhavale <dhavale@google.com>
Loading
Please register or sign in to comment