[LTP] [Question] Why test C API failed in github CI
Petr Vorel
pvorel@suse.cz
Tue Dec 21 13:59:44 CET 2021
Hi Li,
> Hi Petr and all,
> Firstly, I'm sorry to push the patchset about oom protection cursorily.
> The GitHub CI complained about the following failures, I feel confused
> when I add a bit of debug code in my private branch then. It gets passed
> in access(score_path, R_OK|W_OK) but failed in closing the file and
> give no EACCESS errno, that's wired.
> Did I miss anything?
> https://github.com/wangli5665/ltp/runs/4594473907?check_suite_focus=true
Well, looking at the upstream failure:
https://github.com/linux-test-project/ltp/runs/4594201240?check_suite_focus=true
tst_memutils.c:114: TWARN: Failed to close FILE '/proc/93483/oom_score_adj'
=> FILE_PRINTF(score_path, "%d", value);
tst_memutils.c:120: TWARN: '/proc/93483/oom_score_adj' cannot be set to -1000, are you root?
=> tst_res(TWARN, "'%s' cannot be set to %i, are you root?",
Summary:
passed 1
failed 0
broken 0
skipped 0
warnings 2 => non zero exit => test fail.
I meant in my comment in [1] that only when running as root you can adjust for
values < 0. Because we run it for each test in the library, including non-root.
There needs to be test for root on value < 0 at the beginning with return.
Kind regards,
Petr
[1] https://lore.kernel.org/ltp/YcGRST7vAycVk0AA@pevik/
More information about the ltp
mailing list