[LTP] [Question] Why test C API failed in github CI
Li Wang
liwang@redhat.com
Tue Dec 21 13:35:17 CET 2021
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20211221/fb0451db/attachment.htm>
More information about the ltp
mailing list