[CRIU] [PATCH v4 4/5] zdtm: add test for oom_score_adj restore
Dmitry Safonov
dsafonov at odin.com
Wed Dec 16 07:36:24 PST 2015
On 12/16/2015 06:26 PM, Pavel Emelyanov wrote:
> This test fails
>
> ================== Run zdtm/live/static/oom_score_adj in uns ===================
> Start test
> ./oom_score_adj --pidfile=oom_score_adj.pid --outfile=oom_score_adj.out
> The test failed (0, 1)
> Makefile:265: recipe for target 'oom_score_adj.pid' failed
> make: *** [oom_score_adj.pid] Error 1
> ############## Test zdtm/live/static/oom_score_adj FAIL at start ###############
> Test output: ================================
> 15:20:07.665: 4: ERR: oom_score_adj.c:60: Write -400 to /proc/self/oom_score_adj failed (errno = 13 (Permission denied))
> 15:20:07.665: 3: ERR: test.c:192: Test exited unexpectedly with code 255
Ok, lets change test value, so it can be used from non-root:
(Higher value means it would be killed earlier so everyone should be
possible to change his value to bigger than zero)
diff --git a/test/zdtm/live/static/oom_score_adj.c
b/test/zdtm/live/static/oom_score_adj.c
index 3135885..b427530 100644
--- a/test/zdtm/live/static/oom_score_adj.c
+++ b/test/zdtm/live/static/oom_score_adj.c
@@ -13,7 +13,7 @@ const char *test_doc = "Check for
/proc/self/oom_score_adj restore";
const char *test_author = "Dmitry Safonov <dsafonov at odin.com>";
const char oom_score_adj_self[] = "/proc/self/oom_score_adj";
-const int test_value = -400;
+const int test_value = 400;
int get_oom_score_adj(const char *path, int *err)
{
--
Regards,
Dmitry Safonov
More information about the CRIU
mailing list