summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2023-02-23Fix CVE-2021-20266: hdrblobInit() needs bounds checks toosubmit/tizen_7.0_base/20230222.163040accepted/tizen/7.0/base/tool/20230227.052649wang biao5-0/+118
https://github.com/rpm-software-management/rpm/commit/8f4b3c3cab8922a2022b9e47c71f1ecf906077ef Fix CVE-2021-3521: Validate and require subkey binding signatures on PGP public keys https://github.com/rpm-software-management/rpm/commit/bd36c5dc9fb6d90c46fbfed8c2d67516fc571ec8 Change-Id: I3daeff22a4f7240923cb1eb82bc9822cd3737d86 Signed-off-by: wang biao <biao716.wang@samsung.com>
2021-01-05upgrade rpm version to 4.14.1upstream/4.14.1.1submit/tizen_base/20210113.025730submit/tizen_base/20210105.160930accepted/tizen/base/tool/20210118.215949biao716.wang61-329/+37432
Change-Id: Iab5438d6e4d45c937b191c03e9ef5dd3fad165c8 Signed-off-by: biao716.wang <biao716.wang@samsung.com>
2017-02-28Revert "Add support for Recommends:, Suggests:, Supplements: and Enhances:"submit/tizen_base/20170228.034447accepted/tizen/base/20170228.084720SoonKyu Park3-40/+6
This reverts commit c31c49f42b54dcf6edb8804e633e6b6985acbb41. Change-Id: I94a88f43ba2db764c7c3a9435683ca26fe97c565
2017-01-09Add support for Recommends:, Suggests:, Supplements: and Enhances:Florian Festi3-6/+40
Change-Id: I24f0b1c0e98003a75b097c8afe7be19e21506695 Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2013-02-02Add support for weak dependencies:Anas Nashif1-0/+8
A) use RPMTAG_SUGGESTS and RPMTAG_ENHANCES to store them. This is different to upstream, which uses RPMSENSE_MISSINGOK and RPMTAG_REQUIRES/RPMTAG_PROVIDES instead. I chose different tags because I wanted to be compatible. The point is that applications that don't know about the new MISSINGOK semantics will mis-interpret the provides/requires otherwise, which I deemed to risky. B) use RPMSENSE_STRONG to support a "strong" version, "Recommends" instead of "Suggests" and "Supplements" instead of "Enhances".
2013-01-31Adjust ghost config test case to match legacy behaviorPanu Matilainen1-4/+5
- Rpm has traditionally (at least for the last decade) preserved existing %ghost %config file on erasure. Whether this was intentional or not, changing the behavior now risks data loss in case people are relying on this long-standing behavior. - This fails now: The behavior changed as (an unexpected) side-effect of commit 389b1ab706be8eddba9f00c7084759f670ce96ac. (cherry picked from commit 4efec66338ef04d2f1ed20cfba84c47145269d0d)
2013-01-30Add testcase for %ghost shared with a real filePanu Matilainen2-1/+39
- Further parametrize conflicttest.spec to allow for different attributes - Verify that the real file gets created without conflicts, that it doesn't get removed when ghost is removed and gets normally removed on erase. - This is the case commit a712252392eca75443ca45c10a72873cabec7963 was supposed to fix (which it does but with, ahem, "slight" side-effects) (cherry picked from commit 0485eab2c96173d1e34e4edb3570e58a693e255e)
2013-01-30Add testcase for %ghost %config behaviorPanu Matilainen2-1/+53
- Further parametrize configtest.spec to allow for different attributes - Verify pre-existing %ghost %config is preserved on install, that it survives upgrades and gets removed on erase. This fails now because it IS broken due to commit a712252392eca75443ca45c10a72873cabec7963. (cherry picked from commit 5121ea2151f13e58740b7b4e7dc20cff5f2475fb)
2012-09-24Test obsoletions within the transaction set, both waysPanu Matilainen2-0/+59
- Similar to commit f7c1eb5ef041b9b06cbb81dac7d7972a602cad44 but on obsoletions
2012-09-24Test different versions in same transaction both waysPanu Matilainen1-4/+27
- Different versions can happen two ways: older first or older last, test both cases - Add verbose output for install to get the warning messages too and require that matches as well
2012-08-29Add further multilib resolution test-casesPanu Matilainen1-6/+118
- Also test for the cases where packages are installed in different transactions, the outcome should be exactly the same in every case regardless of the order. - Change the expected output to something slightly more readable for us humans
2012-08-29Tweak the conflict test descriptions a bitPanu Matilainen1-13/+13
2012-08-24Oops, replacetest spec missing from dist tarballsPanu Matilainen1-0/+1
- Should've been in commit 0bbcbb050d3a1d93eafa5ee353d4b89a9946b68f
2012-08-24Detect attempts to replace directory symlink to directory in packagePanu Matilainen2-9/+7
- Rpm cannot currently *correctly* deal with directory symlink changing to a directory through updates, detect early and abort with conflicts instead of proceeding with known-broken results: previously these would seemingly succeed but without actually doing the requested changes, and leaving orphans on the disk. Far less evil than the directory replacement failure but incorrect anyway. - Same %pretrans wackiness as with directory replacements applies here. - Adjust test-suite to match the new behavior. - It's possible there are packages that have been relying on the former broken "success" results, so this might need further fine-tuning...
2012-08-24Detect attempts to replace directories and report as conflictsPanu Matilainen2-4/+0
- Rpm cannot currently deal with directory changing to something else through upgrades. Until now we've barfed up an ugly error in the middle of transaction, leaving partially installed broken junk behind. It'd sure be nice to be able to actually handle this some day, but until then detecting and aborting early is a far better option than the former behavior. - There are some "only in rpm" level bizarre quirks here: packages can work around this limitation by using a %pretrans scriptlet, which runs before the conflict detection. But this means a possible test-transaction (as done by eg yum) will still see the conflicts, as we obviously dont want to run disk-modifying scripts on test-transaction. So when looking at these removal conflicts, we filter them out on test-transaction IFF the package has a %pretrans script so there's a chance it might actually fix the conflict when we get to it in a real transaction. Obviously %pretrans from any package could in theory fix such issues, but as this is evil enough as it is, try to limit the damage... Without %pretrans, the only other option to get around these is manual intervention.
2012-08-24Add pile of new test-cases for file type changes in upgradesPanu Matilainen5-5/+628
- Of particular interest is directory changing to something else (including the infamous symlink case), which we miserably fail currently. Until we can somehow manage them someday, we should abort early (by conflicts) instead of barfing up garbage in middle of transaction.
2012-08-24Clean up testroot /opt throughly to avoid other test from affecting usPanu Matilainen1-2/+2
2012-08-23Axe the if-what jungle in rpmfiDecideFateIndex()Panu Matilainen1-6/+0
- Unless the file does not exist on disk, we cannot determine the correct action for config files and symlinks before we actually check them. Those are also the only types that *can* result in FA_ALTNAME/FA_SAVE action, anything else we can just create. Besides making the logic a whole lot easier to follow, it also fixes our remaining test-case failures. Who would've thought? - Might be worth noting that this requires the pile of fsm fixes from previous commits to work.
2012-08-23Use fsm->action to decide whether we need a backup or not.Panu Matilainen1-6/+0
- We already have a carefully precalculated action decided for these things, use that instead of bunch of arbitrary (except for osuffix) conditions depending on several nasty hacks and hidden assumptions. Doing so fixes stuff, who would've thought of that? - Adjust test-suite expectations
2012-08-23Simplify the non-modified config file vs directory testPanu Matilainen1-13/+3
- Replacing a directory with something else is more complicated than other cases and deserves tests of its own. For simplicity in the config cases, remove the "and back" part of the test, and now this test actually succeeds.
2012-08-23Doh, gotta love it when test-suite expectations are wrong.Panu Matilainen1-0/+3
- Clearly if we have three cats we should be seeing three outputs as well...
2012-08-22Use rpmfiConfigConflictIndex() for modified config testing on erase tooPanu Matilainen1-2/+0
- Besides eliminating another copy-paste variant of the config file digest calculation and comparison, this fixes the case modified %config symlink gets silently erased. Unlike a regular config file, a symlink does not contain a whole lot of carefully tuned data, but if it's marked %config I think we should honor the %config file rules. - Adjust test-suite expectations to match the new behavior.
2012-08-21Polish the symlink config file comparison a bitPanu Matilainen1-4/+0
- Similar treatment as in commit 9f9ed70e2d85b0e8f5e2d9cf9969046034d9ad31, pay more attention to what kind of files we're comparing in each case, add a little breathing room and extra comments. - Handle the case where on-disk link is identical to the one in new package in which case no backup will be needed, fixing two cases of unwanted backups in the test-suite. (similar to commit 7a50e9de80ab3c47618dad1e9a5b2d9b79bfc8dc) - Other than the on-disk vs new package change, probably doesn't change anything yet, but prepares us for the next steps.
2012-08-21Erm, remember to actually enable all the new testsPanu Matilainen1-0/+2
2012-08-21Add a third set of config tests for file type changes testingPanu Matilainen2-0/+327
- Several (expected) breakages here too, some backups missing, and some redundant backups taken - This is by no means complete set of the possible changes but gotta start someplace...
2012-08-21Add similar set of %config tests on symlinksPanu Matilainen2-0/+770
- Several cases are (expectedly) broken here: sometimes backup not taken when wanted, sometimes redundant backups taken
2012-08-21Prepare config test-suite to cleaning up directoriesPanu Matilainen1-23/+23
2012-08-21Further parametrize the config test spec file to allow more casesPanu Matilainen1-2/+14
2012-08-21And yet more %config test-casesPanu Matilainen1-0/+172
- Test behavior when installing over a pre-existing file - Test behavior on erasure - Two of the erasure-tests are currently failing due to regression introduced in commit 1845c1d711b88723e596c88e8a7730a360029089
2012-08-20Dont create redundant %config backups when on-disk content is same as newPanu Matilainen1-16/+8
- When on-disk %config file contents match the contents of the new package (such as config in old package was buggy, fixed in new and admin worked around in the meantime) there's no point creating a backup that's identical to what you already have. Note that we create the new config anyway instead of skipping as timestamp might have changed. - Adjust test-cases to the new saner behavior.
2012-08-20Dont create %config backups on skipped filesPanu Matilainen1-3/+1
- This cosmetical only, but there's no point creating the same backup twice. Depends on commit f7f5f88f9f3d6587e747b034ccb64a3f00ff4e1e.
2012-08-20Test that the %config backup contents are what we expectPanu Matilainen1-0/+8
- Note we're only checking the contents where backups *should* be created, not much point checking buggy behavior.
2012-08-20Yet more %config test-cases - shared configs have quirks of their ownPanu Matilainen1-0/+287
2012-08-20Add similar set of %config(noreplace) testsPanu Matilainen1-0/+170
- The first tests are kinda redundant but extra tests never hurt anybody...
2012-08-20Adjust the config test descriptions a bit to make room...Panu Matilainen1-5/+5
2012-08-20Add further "parametrization" to our config file test specPanu Matilainen1-2/+2
- Currently unused but to allow for testing further cases with the same base spec...
2012-08-20Add a test-case for another %config file special casePanu Matilainen1-1/+36
- When an existing config file content changes between package versions but the file has already been changed to match the content of the new version, we still create a backup file that's identical to the one that ends up being installed. This is a bug of sorts, but documenting the existing behavior before changing it.
2012-08-20Tighten the existing %config tests a bitPanu Matilainen1-9/+36
- Test for actual file content - Also clean up any .rpm[new|save|orig] files from the testroot
2012-08-17Add a test-case for the shared file timestamp behaviorPanu Matilainen1-0/+29
- Prior to commit f7f5f88f9f3d6587e747b034ccb64a3f00ff4e1e, this would've failed: removing the last package to be installed would cause timestamp failure on all others. The order is arbitrary in this testcase but it matters in real-world situations such as secondary arch packages.
2012-08-07Add test for file verification from originating packagePanu Matilainen1-1/+23
2012-08-07Add tests for invalid --relocate detection and --badreloc functionalityPanu Matilainen1-0/+33
2012-05-30Add a test-case for various %files manifest globbing scenariosPanu Matilainen3-0/+74
- In particular (aside from basics working) we're interested in the broken symlink behavior: at least glibc and Solaris have a weird glob() which doesn't return broken symlinks at all, yet we need to be able to package them (and that's why rpm carries its own copy of a differently broken, old glibc glob) - Also test for directory-only match (RhBug:505995 cases)
2012-04-23Add a few basic test-cases for tilde in version comparisonPanu Matilainen1-0/+10
2012-04-21Add further version comparison test-casesPanu Matilainen1-6/+87
- Add pile of further tests for the more common constructs, collect various (old and new) corner cases from bugzilla.
2012-04-17Use a bit more complicated test for the install/remove file verificationPanu Matilainen1-21/+16
- Previous test only used a single file and no package-specific directories, now we have multiple files and multiple directories, some owned by the package and some not. - This test fails right now due to previously unnoticed regression in commit 1845c1d711b88723e596c88e8a7730a360029089
2012-04-16Add test-cases for identical basenames within packagePanu Matilainen3-0/+60
- One test for the normal situation where identical basenames are not a problem, and another one where this causes a self-conflict because of a directory symlink.
2012-04-05Oops, automake isn't happy with comment here...Panu Matilainen1-1/+0
2012-04-05Arrange unified /bin <-> $(bindir) in test-suite rootPanu Matilainen1-0/+3
- Rpm traditionally insists on putting itself into /bin and expects to find various things, especially /bin/sh there as well. This is normally the case, but on systems where the host /bin is symlink to eg /usr/bin, the test-suite /bin will be empty except for rpm itself causing a big number of bogus test-suite failures. Making test-suite root bin/ always a symlink to $(bindir) avoids this issue and works whether the host /bin is a real directory or not.
2012-04-05Fix test-suite root population wrt "optional" directoriesPanu Matilainen1-1/+1
- /proc, /sys and especially selinux directories are mostly Linux creatures and even those vary between versions. Use if to avoid the error code "leaking" in case the last directory is not present.
2012-03-21Add test case for scriptlet behaviorPanu Matilainen5-0/+86
- The test-root has a shell but rpm doesn't know about it, add a fakeshell metapackage that provides it. Should come in handy for other cases as well, up to now we've been limited to lua scripts only. - Test that all the "normal" scripts get executed, in expected order and with expected arguments, on install, upgrade and erase. - This would've saved the rather embarrassing breakage with commit 274dbf557d1cac90f7c278f9b6d6af05997d92df at least, but better late than never as they say... It also serves to highlight and document the arguably broken arguments to %pre- and %posttrans scripts (ie always 0)