aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2020-01-02 16:22:52 +0100
committerFabian Groffen <grobian@gentoo.org>2020-01-02 16:22:52 +0100
commit6d6d693b3e0cd3aa6ea19ffe036e5f50c15aa7dd (patch)
tree1762c16a78b534cd3df2338bd0e8096d39053945
parentlibq/tree: ensure we don't leak scandir results on sorted foreach_pkg (diff)
downloadportage-utils-6d6d693b.tar.gz
portage-utils-6d6d693b.tar.bz2
portage-utils-6d6d693b.zip
qcheck: fix tests
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r--qcheck.c5
-rw-r--r--tests/qcheck/list04.good2
-rw-r--r--tests/qcheck/list05.good2
-rw-r--r--tests/qcheck/list06.good2
-rw-r--r--tests/qcheck/list07.good2
5 files changed, 7 insertions, 6 deletions
diff --git a/qcheck.c b/qcheck.c
index e8db1b84..1217a8a2 100644
--- a/qcheck.c
+++ b/qcheck.c
@@ -346,7 +346,7 @@ qcheck_cb(tree_pkg_ctx *pkg_ctx, void *priv)
(num_files_ignored > 1 ? "s were" : " was"));
qcprintf("\n");
- if (num_files_ok != num_files)
+ if (num_files_ok != num_files && !state->qc_update)
return EXIT_FAILURE;
else
return EXIT_SUCCESS;
@@ -410,6 +410,7 @@ int qcheck_main(int argc, char **argv)
ret = -1;
if (vdb != NULL) {
if (array_cnt(atoms) != 0) {
+ ret = 0;
array_for_each(atoms, i, atom) {
ret |= tree_foreach_pkg_sorted(vdb, qcheck_cb, &state, atom);
}
@@ -427,5 +428,5 @@ int qcheck_main(int argc, char **argv)
array_for_each(atoms, i, atom)
atom_implode(atom);
xarrayfree_int(atoms);
- return ret;
+ return ret != 0;
}
diff --git a/tests/qcheck/list04.good b/tests/qcheck/list04.good
index 604d20c2..2f9f5128 100644
--- a/tests/qcheck/list04.good
+++ b/tests/qcheck/list04.good
@@ -8,4 +8,4 @@ Checking a-b/pkg ...
AFK: /missing-dir/missing-sym
* 4 out of 11 files are good (2 files were ignored)
Checking virtual/pkg ...
- * 0 out of 0 file are good
+ * 0 out of 0 files are good
diff --git a/tests/qcheck/list05.good b/tests/qcheck/list05.good
index 35a0ff50..688c1773 100644
--- a/tests/qcheck/list05.good
+++ b/tests/qcheck/list05.good
@@ -8,4 +8,4 @@ Checking a-b/pkg ...
AFK: /missing-dir/missing-sym
* 4 out of 11 files are good (2 files were ignored)
Checking virtual/pkg ...
- * 0 out of 0 file are good
+ * 0 out of 0 files are good
diff --git a/tests/qcheck/list06.good b/tests/qcheck/list06.good
index fb241dbc..61290324 100644
--- a/tests/qcheck/list06.good
+++ b/tests/qcheck/list06.good
@@ -5,4 +5,4 @@ Checking a-b/pkg ...
MTIME: /bin/bad-mtime-sym
* 4 out of 8 files are good (5 files were ignored)
Checking virtual/pkg ...
- * 0 out of 0 file are good
+ * 0 out of 0 files are good
diff --git a/tests/qcheck/list07.good b/tests/qcheck/list07.good
index ae80975e..847b0b50 100644
--- a/tests/qcheck/list07.good
+++ b/tests/qcheck/list07.good
@@ -1,4 +1,4 @@
Checking a-b/pkg ...
* 4 out of 4 files are good (9 files were ignored)
Checking virtual/pkg ...
- * 0 out of 0 file are good
+ * 0 out of 0 files are good