aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: Avoid buffer underflow when checking rmspace resultBoris Staletic2024-04-081-2/+2
| | | | | | | | `s[len - 1]` is not allowed for strings whose length is 0. Caught by clang's UBSAN. PR: https://github.com/gentoo/portage-utils/pull/28 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests: Avoid leaking buf in copy_file/test.cBoris Staletic2024-03-291-0/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests: avoid leaking buf after exiting the loop in atom_explodeBoris Staletic2024-03-291-0/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* buildsys: regenFabian Groffen2024-01-0220-40/+180
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* gnulib: updateFabian Groffen2024-01-0120-140/+1760
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* build-sys: regeneratev0.94.2Fabian Groffen2022-08-2820-1037/+444
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* Remove libtoolDavid Seifert2022-08-284-4/+4
| | | | | | | | | | * Libtool was only used for convenience libraries, which can be done in vanilla Automake. This allows passing `static` in LDFLAGS. Bug: https://bugs.gentoo.org/841898 Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/atom: fix atom_compare for "0" version componentsv0.94.1Fabian Groffen2022-06-152-0/+2
| | | | | Bug: https://bugs.gentoo.org/852197 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* build-sys: update gnulibFabian Groffen2022-05-2620-0/+20
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/atom: implement strict PMS 3.3 in atom_compareFabian Groffen2022-04-182-1/+3
| | | | | | | | Version comparisons are complex, stick with strict PMS definition for it, so we produce the same results as Portage. Bug: https://bugs.gentoo.org/838856 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qcheck: fix config-protect check, bug #837188Fabian Groffen2022-04-092-2/+2
| | | | | | | | | ensure we break out of the config-protect directories loop, instead of just skipping one directory, such that we don't produce bogus amounts of files, and also don't check despite we were told not to check (-P) Bug: https://bugs.gentoo.org/837188 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/dep: print single nodes on a single lineFabian Groffen2022-04-073-9/+3
| | | | | | | | | | | | | | | condense conditional and use-deps to a single line when there's a single target, e.g.: use? ( cat/pkg ) instead of use? ( cat/pkg ) Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* buildsys: regenerateFabian Groffen2022-04-0620-0/+20
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* buildsys: regen, add ALL gnulib files this timeFabian Groffen2022-02-2720-7420/+10160
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* buildsys: regen with older gnulibFabian Groffen2022-02-2720-10160/+7420
| | | | | | | | some weird basename-lgpl problems occur with the newer gnulib snapshot, so stick with older version for now Bug: https://bugs.gentoo.org/834136 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* buildsys: regenFabian Groffen2022-02-2720-7420/+10160
| | | | | Bug: https://bugs.gentoo.org/834136 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests/init: remove last Travis cruftFabian Groffen2022-02-061-5/+2
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* travis: removeFabian Groffen2022-02-061-1/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests/init.sh.in: filter NOCOLOR, bug #830105Fabian Groffen2021-12-271-1/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests: drop all -C/NOCOLOR usageFabian Groffen2021-12-236-39/+37
| | | | | | this actually hides a problem, and we don't want that Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* Revert "tests/init: force colours off for all tests"Fabian Groffen2021-12-231-2/+0
| | | | | | | | This reverts commit 704a36ae325d8cbd3cee5b40cd4ad7bf937ab724. It actually hides a problem (as seen in bug #829837) Bug: https://bugs.gentoo.org/829837 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests/qlist: add missing filev0.93Fabian Groffen2021-12-211-0/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qlist: fix matching of USE-flagsFabian Groffen2021-12-193-0/+5
| | | | | | | | | | | | | | | Thanks to Michael Yagliyan for finding this bug and proposing the fix. We cannot perform merge-sort if the comparison in use is different between sorting and processing afterwards. Use case-sensitive sort everywhere, for it is cheaper, matches Portage and is safer/more correct/inline with PMS. This does change the default output ordering of the flags though. Added a test that ensures capital USE-flag is now matched correctly. Bug: https://bugs.gentoo.org/829579 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests/source: remove some checksFabian Groffen2021-12-161-68/+6
| | | | | | | | | | these tests are somewhat expensive, so reduce them - style is kind of personal - noone should really have the need to use PATH_MAX any more (wrapped) - combine obsolete funcs and headers Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* main: fix memory overwrite in strincr_varFabian Groffen2021-12-161-3/+5
| | | | | | This caused memory corruption, and a subsequent crash in qmanifest. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* buildsys: regenerateFabian Groffen2021-12-1322-75/+151
| | | | | | | - sendfile() additions to configure.ac - autoupdate for 2.71 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests/init: force colours off for all testsFabian Groffen2021-12-131-0/+2
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qmerge: run pkg_* phases according to PMS 9.2 Call OrderFabian Groffen2021-06-221-1/+2
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qmerge: once over to make better/more use of libq/treeFabian Groffen2021-06-143-19/+46
| | | | | | | | | | | - unify best_version and grab_binpkg_info, into single function using tree_match_atom to benefit from cache and abstract any particulars - default to install action when no action given - unmerge previous package on merge upgrade again - possibly fix bug #792273 by exporting vars Bug: https://bugs.gentoo.org/792273 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* buildsys: regenFabian Groffen2021-03-131-1/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests/atom_compare: drop portage testFabian Groffen2021-02-271-1/+1
| | | | | | | | We have no real need to test what Portage's doing here, and dropping the test means we're Python and Portage free. Bug: https://bugs.gentoo.org/772983 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* build-sys: regen with automake 1.16.3Fabian Groffen2021-02-1720-20/+20
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* buildsys: regenv0.90.1Fabian Groffen2020-11-1320-40/+40
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* test/init: qmerge makes valgrind coredump too, Travis--Fabian Groffen2020-05-251-0/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests/init: re-enact valgrind block on TravisFabian Groffen2020-05-251-0/+2
| | | | | | | Somehow Travis env cannot be replicated, and still has a coredumping valgrind Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests/init: drop valgrind exclusionsFabian Groffen2020-05-251-2/+0
| | | | | | | | After some manual testing and fixes on a Bionic VM, valgrind no longer dumps core there, so let's hope we can finally run the full suite using valgrind on Travis too. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests/valgrind-wrapper: use --track-origins for easier debuggingFabian Groffen2020-05-251-0/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests: add qmerge tests for different compression schemes in binpkgsFabian Groffen2020-05-251-1/+35
| | | | | | | | | | | While we had support for installing various compressed binpkgs, we never tested this at all. Especially since zstd now became the new standard Portage uses, it is a good idea to ensure we cope well with this. This new blob of tests, checks qtbz2, qlist and qmerge to disassemble, assemble and install binpkgs with all known supported compressors. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* travis: disable qcheck for valgrind tooFabian Groffen2020-05-171-2/+3
| | | | | | it's really a shame that valgrind crashes so often in the travis setup Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests/init.sh: clear PORTDIR from envFabian Groffen2020-01-181-1/+1
| | | | | | | | | Portage seems to inject PORTDIR (with a weird value) in the environment. This shows up during make check on some systems. (Bug #701402.) Always remove it from the environment to avoid interference. Bug: https://bugs.gentoo.org/701402 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests/qmerge: test masking an intermediate level in INSTALL_MASKFabian Groffen2020-01-031-0/+12
| | | | | | | | this tests the case from the archives: /usr/foo -/usr/foo/bar /usr/foo/bar/baz Bug: https://bugs.gentoo.org/699376 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests/qmerge: add 2-level negation INSTALL_MASK testFabian Groffen2020-01-033-4/+17
| | | | | Bug: https://bugs.gentoo.org/699376 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests/qmerge: add case for INSTALL_MASKFabian Groffen2020-01-031-0/+26
| | | | | | | | This tests INSTALL_MASK on a simple and a inversed path, with one level difference. Bug: https://bugs.gentoo.org/699376 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests: fix retrieving test nameFabian Groffen2020-01-021-1/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* tests: workound env issue on TravisFabian Groffen2020-01-021-2/+6
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* qcheck: fix testsFabian Groffen2020-01-024-4/+4
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* travis: try running tests using ValgrindFabian Groffen2020-01-021-0/+2
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/atom: stick to PMS for PVRFabian Groffen2020-01-011-4/+18
| | | | | | | rework allocations somewhat, and make sure PVR does NOT include -r0, in addition add PF to the structure, so this one can be grabbed more easily Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* main: replace iniparser by a small bit of custom codeFabian Groffen2019-12-311-1/+1
| | | | | | | | | | This make portage-utils dep-free (when qmanifest/qtegrity are not compiled in) again, thus easier for the static binary case. Small bonus is that the repo order is now deterministic (as found in the config file(s)), which may help reduce test differences. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* buildsys: regen after configure.ac changeFabian Groffen2019-12-2920-0/+20
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>