[LTP] [PATCH RFC] move_pages12: handle errno EBUSY for madvise(..., MADV_SOFT_OFFLINE)

Cyril Hrubis
2019-07-03T13:10:05Z

Hi!
> + if (ret == EINVAL) {
> SAFE_KILL(cpid, SIGKILL);
> SAFE_WAITPID(cpid, &status, 0);
> SAFE_MUNMAP(addr, tcases[n].tpages * hpsz);
> tst_res(TCONF,
> "madvise() didn't support MADV_SOFT_OFFLINE");
> return;
> + } else if (ret == EBUSY) {
> + SAFE_MUNMAP(addr, tcases[n].tpages * hpsz);
> + goto out;

Shouldn't we continue with the test here rather than exit?

I guess that there is no harm in doing a few more iterations if we
manage to hit EBUSY, or is there a good reason to exit the test here?

Otherwise the patch looks good.

--
Cyril Hrubis
chrubis@suse.cz