[LTP] [PATCH v1] libswap.c: Improve caculate swap dev number

Petr Vorel pvorel@suse.cz
Sun Mar 3 14:14:02 CET 2024


Hi Wei, Xu,

> Hi  Wei

> > I encounter a dead loop on following code in our test on ppc64 machine:
> > while ((c = fgetc(fp)) != EOF)

> > I think "/proc/swaps" is not normal file and can not get EOF in some situation,
> > so i use fgets a line and caculate swap dev number.

I guess the problem has been fixed by another patch [1], thus closing it in
patchwork. Please let me know if not.

Kind regards,
Petr

[1] https://github.com/linux-test-project/ltp/commit/0f5d8c520d4e5b22325526eab41ed6bcad1847fc


More information about the ltp mailing list