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 -----error log------ runtest TINFO: * test05 14tst_memutils.c:118: TWARN: Failed to close FILE '/proc/63046/oom_score_adj' 15tst_memutils.c:119: TBROK: Failed to close FILE '/proc/63046/oom_score_adj': EACCES (13) ... ---------------------- --- a/lib/tst_memutils.c +++ b/lib/tst_memutils.c @@ -111,7 +111,13 @@ static void set_oom_score_adj(pid_t pid, int value) tst_brk(TBROK, "%s does not exist, please check if PID is valid", score_path); } + //debug code + if (access(score_path, R_OK | W_OK) == -1) + tst_brk(TBROK, "%s not readable/writeable", score_path); + FILE_PRINTF(score_path, "%d", value); + SAFE_FILE_PRINTF(score_path, "%d", value); + FILE_SCANF(score_path, "%d", &val); if (val != value) { -- Regards, Li Wang