Re: [LTP] [PATCH v2 5/5] swapon03: Remove grep dependency

Cyril Hrubis
2025-11-14T14:37:33Z

Hi!
> Do you mean to use full swap file path from /proc/mounts, i.e.
> /tmp/LTP_swaNzeMJr/mntpoint/testswap, /tmp/LTP_swamEVVAc/mntpoint/testswap03,
> ... (example from run which created /tmp/LTP_swamEVVAc with all swap files,
> cleanup interrupted by ctrl+C and following one which created /tmp/LTP_swaNzeMJr
> single swap file only):

If we make the swapfile names unique enough we can match just that
instead. I think one of the patches did just that by including the test
name in the swap filenames. If we want to be extra sure we can take last
directory component of the test temporary directory as well. What I'm
trying to point out is that the $TMPDIR part of the test temporary
directory is not adding anything unique to the path since that is prefix
that is used by all LTP tests.

--
Cyril Hrubis
chrubis@suse.cz