Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc0de475 authored by Sandeep Dhavale's avatar Sandeep Dhavale
Browse files

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: default avatarSandeep Dhavale <dhavale@google.com>
parent ac9ef741
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment