All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [Question] Why test C API failed in github CI
@ 2021-12-21 12:35 Li Wang
  2021-12-21 12:59 ` Petr Vorel
  2021-12-21 13:03 ` Cyril Hrubis
  0 siblings, 2 replies; 4+ messages in thread
From: Li Wang @ 2021-12-21 12:35 UTC (permalink / raw)
  To: LTP List


[-- Attachment #1.1: Type: text/plain, Size: 1258 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1982 bytes --]

[-- Attachment #2: Type: text/plain, Size: 60 bytes --]


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-12-22  6:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-21 12:35 [LTP] [Question] Why test C API failed in github CI Li Wang
2021-12-21 12:59 ` Petr Vorel
2021-12-21 13:03 ` Cyril Hrubis
2021-12-22  6:35   ` Li Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.