[LTP] memcg/functional: fix memcg_failcnt intermittent timeout by disabling swap
Andrea Cervesato
andrea.cervesato@suse.com
Mon Aug 3 15:38:37 CEST 2026
Hi Xuewen,
> > memcg/functional: fix memcg_failcnt intermittent timeout by disabling swap
>
> > + swapoff -a 2>/dev/null
> > +
> > start_memcg_process $2 -s ${MEMORY_TO_ALLOCATE}
>
> The 2>/dev/null here hides errors from the very command that implements
> the fix. If swapoff fails, or the command is not present, swap stays
> enabled and the intermittent timeout this patch targets can recur, now
> without any diagnostic to explain it.
>
> memcg_limit_in_bytes.sh, cited as the model for this change, runs
> swapoff -a and swapon -a without redirecting stderr. Would dropping the
> redirect (at least on swapoff) be preferable, so a failure to disable
> swap remains visible?
This is correct. If swapoff fails, we can't understand why.
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
More information about the ltp
mailing list