-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Labels
Description
I was testing this for inclusion in gentoo and found the tests failing. Please advise.
Thanks!
make -j1 earlyoom
cc -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Os -march=native -mtune=native -pipe -frecord-gcc-switches -Wall -Wextra -DVERSION=\""(unknown version)"\" -g -fstack-protector-all -std=gnu99 -o earlyoom meminfo.c kill.c msg.c globals.c main.c sanitize.c
>>> Source compiled.
>>> Test phase: sys-apps/earlyoom-1.3
make -j1 test
cd tests ; go test -v
=== RUN TestCli
--- FAIL: TestCli (1.83s)
cli_test.go:117: Testcase #0: earlyoom -h
cli_test.go:117: Testcase #1: earlyoom --help
cli_test.go:117: Testcase #2: earlyoom
cli_test.go:117: Testcase #3: earlyoom -p
cli_test.go:117: Testcase #4: earlyoom -v
cli_test.go:137: stderr should contain "earlyoom v", but does not
cli_test.go:148: stderr:
earlyoom (unknown version)
cli_test.go:149: stdout:
(empty)
cli_test.go:117: Testcase #5: earlyoom -d
cli_test.go:129: stdout should contain "^ new victim (higher badness)", but does not
cli_test.go:148: stderr:
earlyoom (unknown version)
mem total: 31812 MiB, swap total: 37278 MiB
sending SIGTERM when mem <= 10 % and swap <= 10 %,
SIGKILL when mem <= 5 % and swap <= 5 %
Could not lock memory - continuing anyway: Cannot allocate memory
cli_test.go:149: stdout:
dry-running kill_largest_process()...
pid 4: badness 0 vm_rss 1704 sandbox
^ new victim (higher vm_rss)
pid 5: badness 0 vm_rss 6532 ebuild.sh
^ new victim (higher vm_rss)
pid 22: badness 0 vm_rss 5684 ebuild.sh
pid 41: badness 0 vm_rss 2816 make
pid 45: badness 0 vm_rss 3692 sh
pid 46: badness 0 vm_rss 17224 go
^ new victim (higher vm_rss)
pid 682: badness 0 vm_rss 4744 tests.test
pid 695: badness 0 vm_rss 2088 earlyoom
selecting victim took 0.832 ms
mem avail: 22746 of 31812 MiB (71 %), swap free: 36742 of 37278 MiB (98 %)
adaptive sleep time: 1000 ms
cli_test.go:117: Testcase #6: earlyoom -m 1
cli_test.go:117: Testcase #7: earlyoom -m 0
cli_test.go:117: Testcase #8: earlyoom -m -10
cli_test.go:117: Testcase #9: earlyoom -m 100
cli_test.go:117: Testcase #10: earlyoom -s 2
cli_test.go:117: Testcase #11: earlyoom -s 100
cli_test.go:117: Testcase #12: earlyoom -s 101
cli_test.go:117: Testcase #13: earlyoom -s 0
cli_test.go:117: Testcase #14: earlyoom -s -10
cli_test.go:117: Testcase #15: earlyoom -M 645064
cli_test.go:117: Testcase #16: earlyoom -M 9999999999999999
cli_test.go:117: Testcase #17: earlyoom -r 0
cli_test.go:117: Testcase #18: earlyoom -r 0.1
cli_test.go:117: Testcase #19: earlyoom --avoid MyProcess1
cli_test.go:117: Testcase #20: earlyoom --prefer MyProcess2
cli_test.go:117: Testcase #21: earlyoom xyz
cli_test.go:117: Testcase #22: earlyoom -i 1
cli_test.go:117: Testcase #23: earlyoom -m 2,1
cli_test.go:117: Testcase #24: earlyoom -m 1,2
cli_test.go:117: Testcase #25: earlyoom -m 1,-1
cli_test.go:117: Testcase #26: earlyoom -m 1000,-1000
cli_test.go:117: Testcase #27: earlyoom -s 2,1
cli_test.go:117: Testcase #28: earlyoom -s 1,2
cli_test.go:117: Testcase #29: earlyoom -m 5,0
cli_test.go:117: Testcase #30: earlyoom -m 5,9
cli_test.go:117: Testcase #31: earlyoom -S 1133844
=== RUN TestSanitize
--- PASS: TestSanitize (0.00s)
=== RUN TestParseTuple
warning: SIGTERM value 5 is below SIGKILL value 9, setting SIGTERM = SIGKILL = 9
warning: SIGTERM value 0 is below SIGKILL value 5, setting SIGTERM = SIGKILL = 5
warning: SIGTERM value 4 is below SIGKILL value 5, setting SIGTERM = SIGKILL = 5
--- PASS: TestParseTuple (0.00s)
=== RUN TestIsAlive
--- PASS: TestIsAlive (0.00s)
=== RUN Test_fix_truncated_utf8
--- PASS: Test_fix_truncated_utf8 (0.00s)
FAIL
exit status 1
FAIL _/var/tmp/portage/sys-apps/earlyoom-1.3/work/earlyoom-1.3/tests 1.832s
make: *** [Makefile:84: test] Error 1