summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Farina <zerochaos@gentoo.org>2020-01-10 15:40:49 -0500
committerRick Farina <zerochaos@gentoo.org>2020-01-10 15:41:09 -0500
commitb06bbcd1a9c7e7910fe6f156646cdfe8d760c054 (patch)
treea1377b06769c5eb3132d1b1868da272bff076418 /sys-apps/earlyoom
parentwww-client/chromium: security cleanup (diff)
downloadgentoo-b06bbcd1a9c7e7910fe6f156646cdfe8d760c054.tar.gz
gentoo-b06bbcd1a9c7e7910fe6f156646cdfe8d760c054.tar.bz2
gentoo-b06bbcd1a9c7e7910fe6f156646cdfe8d760c054.zip
sys-apps/earlyoom: fix tests, give keywords
Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Rick Farina <zerochaos@gentoo.org>
Diffstat (limited to 'sys-apps/earlyoom')
-rw-r--r--sys-apps/earlyoom/earlyoom-1.3.ebuild8
-rw-r--r--sys-apps/earlyoom/files/earlyoom-1.3-test-fixed.patch34
2 files changed, 39 insertions, 3 deletions
diff --git a/sys-apps/earlyoom/earlyoom-1.3.ebuild b/sys-apps/earlyoom/earlyoom-1.3.ebuild
index 2118282839fe..c1fa70a67919 100644
--- a/sys-apps/earlyoom/earlyoom-1.3.ebuild
+++ b/sys-apps/earlyoom/earlyoom-1.3.ebuild
@@ -11,14 +11,16 @@ SRC_URI="https://github.com/rfjakob/earlyoom/archive/v$PV.tar.gz -> $P.tar.gz"
LICENSE="MIT-with-advertising"
SLOT="0"
-#KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~x86"
IUSE="systemd docs"
DEPEND="docs? ( app-text/pandoc )"
RDEPEND=""
-#https://github.com/rfjakob/earlyoom/issues/156
-RESTRICT="test"
+src_prepare() {
+ eapply "${FILESDIR}/${P}-test-fixed.patch"
+ default
+}
src_compile() {
VERSION="v${PV}" emake earlyoom
diff --git a/sys-apps/earlyoom/files/earlyoom-1.3-test-fixed.patch b/sys-apps/earlyoom/files/earlyoom-1.3-test-fixed.patch
new file mode 100644
index 000000000000..8c6fc3ab6df5
--- /dev/null
+++ b/sys-apps/earlyoom/files/earlyoom-1.3-test-fixed.patch
@@ -0,0 +1,34 @@
+From 3648b351e88331f3f2e46af4ae0ddd19e27bc7c2 Mon Sep 17 00:00:00 2001
+From: Jakob Unterwurzacher <jakobunt@gmail.com>
+Date: Mon, 8 Jul 2019 21:07:04 +0200
+Subject: [PATCH] tests: fix TestCli failure when all processes have badness 0
+
+On a machine with a lot of RAM and no big processes running,
+all processes may have badness 0, and we will get
+
+ ^ new victim (higher vm_rss)
+
+in the debug output, but not
+
+ ^ new victim (higher badness)
+
+. This is not a failure.
+
+Fixes https://github.com/rfjakob/earlyoom/issues/137
+---
+ tests/cli_test.go | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/cli_test.go b/tests/cli_test.go
+index 7085290..ef4abee 100644
+--- a/tests/cli_test.go
++++ b/tests/cli_test.go
+@@ -72,7 +72,7 @@ func TestCli(t *testing.T) {
+ {args: nil, code: -1, stderrContains: startupMsg, stdoutContains: memReport},
+ {args: []string{"-p"}, code: -1, stdoutContains: memReport},
+ {args: []string{"-v"}, code: 0, stderrContains: "earlyoom v", stdoutEmpty: true},
+- {args: []string{"-d"}, code: -1, stdoutContains: "^ new victim (higher badness)"},
++ {args: []string{"-d"}, code: -1, stdoutContains: "^ new victim"},
+ {args: []string{"-m", "1"}, code: -1, stderrContains: " 1 %", stdoutContains: memReport},
+ {args: []string{"-m", "0"}, code: 15, stderrContains: "fatal", stdoutEmpty: true},
+ {args: []string{"-m", "-10"}, code: 15, stderrContains: "fatal", stdoutEmpty: true},