Thread (18 messages) 18 messages, 3 authors, 2021-12-21

Re: [LTP] [PATCH v3 1/3] lib: add functions to adjust oom score

From: Petr Vorel <pvorel@suse.cz>
Date: 2021-12-21 10:44:43

Hi!
quoted
So, I will push (the improved) code like below, after getting
Petr and you ack again:
quoted
+static void set_oom_score_adj(pid_t pid, int value)
+{
+       int val;
+       char score_path[64];
+
+       if (access("/proc/self/oom_score_adj", F_OK) == -1) {
+               tst_res(TINFO, "Warning: oom_score_adj does not exist,
+                               skipping the adjustement");
I'm not sure about the "Warning:" in this message, I would just dully
informed the user that the interface is not available.
I'd also prefer not having to print "Warning:" in TINFO message
(I know TWARN exit non-zero).

Kind regards,
Petr


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help