On Wed, Apr 1, 2026 at 11:38 PM Li Wang <[email protected]> wrote: > > zswap writeback is asynchronous, but test_zswap.c checks writeback > counters immediately after reclaim/trigger paths. On some platforms > (e.g. ppc64le), this can race with background writeback and cause > spurious failures even when behavior is correct. > > Add wait_for_writeback() to poll get_cg_wb_count() with a bounded > timeout, and use it in: > > test_zswap_writeback_one() when writeback is expected > test_no_invasive_cgroup_shrink() for the wb_group check > > This keeps the original before/after assertion style while making the > tests robust against writeback completion latency. > > No test behavior change, selftest stability improvement only. > > Signed-off-by: Li Wang <[email protected]>
LGTM. Acked-by: Nhat Pham <[email protected]>

