summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* StringToBool: only act if the entire string is consumed by strtol()Michael Vogt2014-07-161-0/+29
| | | | | | | | | StringToBool uses strtol() internally to check if the argument is a number. This function stops when it does not find any more numbers. So a string like "0ad" (which is a valid packagename) is interpreted as a "0". The code now checks that the entire string is consumed not just a part of it. Thanks to Johannes Schauer for raising this issue.
* build: Convert from DebianDoc SGML to DocBook XMLGuillem Jover2014-07-082-3/+3
|
* use printf instead of echo in testing frameworkMichele Orrù2014-07-072-31/+31
| | | | | | | | | The behaviour of echo "\tA\t" differs between dash/zsh which interprets the \t as tab and bash which prints it literally. Similar things happen for other escape sequences – without the -e flag. Switching to printf makes this more painless^Wportable, so that the tests are also working correctly with bash as sh. (commit message by committer, patch otherwise unmodified)
* properly handle (currently unused) dpkg pass-throughDavid Kalnischkies2014-07-071-13/+16
| | | | Git-Dch: ignore
* use exit instead of incorrect return in test wrapperMichele Orrù2014-07-071-4/+5
| | | | | | bash as sh doesn't like it, too. Git-Dch: Ignore
* do not call resolver twice on (dist-)upgradeDavid Kalnischkies2014-06-181-0/+6
|
* fix SubstVar to be usable as a replace_all methodDavid Kalnischkies2014-06-181-0/+35
| | | | | | | The name suggests that it is supposed to substitute a variable with a value, but we tend to use it in a more liberal replace_all() fashion, but this breaks if either of the parameters is empty or more importantly if two "variable" occurrences follow each other directly.
* Merge remote-tracking branch 'mvo/debian/sid' into debian/sidMichael Vogt2014-06-181-1/+1
|\
| * test/integration/test-essential-force-loopbreak: fix on non-amd64 systemsMichael Vogt2014-06-121-1/+1
| |
* | fix test-apt-ftparchive-cachedb-lp1274466 and apt-internal-solver testsMichael Vogt2014-06-112-2/+4
| |
* | fix autopkgtest testsMichael Vogt2014-06-112-1/+3
|/
* fix test/integration/test-apt-ftparchive-cachedb-lp1274466 in travisMichael Vogt2014-06-101-4/+4
|
* Merge remote-tracking branch 'mvo/feature/apt-update-info' into debian/sidMichael Vogt2014-06-101-0/+17
|\
| * show upgradable packages after apt updateMichael Vogt2014-05-221-0/+17
| | | | | | | | Closes: 748389
* | Merge remote-tracking branch ↵Michael Vogt2014-06-101-0/+31
|\ \ | | | | | | | | | 'mvo/bugfix/apt-get-source-unauthenticated-warning' into debian/sid
| * | Show unauthenticated warning for source packages as wellMichael Vogt2014-06-021-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | This will show the same unauthenticated warning for source packages as for binary packages and will not download a source package if it is unauthenticated. This can be overridden with --allow-unauthenticated Closes: #749795
* | | Merge remote-tracking branch 'mvo/bugfix/lp1274466-cache' into debian/sidMichael Vogt2014-06-103-0/+51
|\ \ \
| * | | Add compat mode for old (32bit FileSize) CacheDB (LP: #1274466)Michael Vogt2014-06-043-0/+51
| | | |
* | | | support Acquire::GzipIndexes in dumpavailDavid Kalnischkies2014-06-101-0/+2
| | | | | | | | | | | | | | | | Closes: 742835
* | | | do not revert candidate for protected packagesDavid Kalnischkies2014-06-071-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 21b3eac8 I promoted the check for installable dependencies to a pre-install check, which also reverts to a known good candidate (the installed version) if it fails. This revert was done even for user requested candidate switches which disabled our Broken detection so that install requests which are impossible to satisfy do not fail anymore, but print an (incomplete) solution proposal and then exit successfully. Closes: 745046
* | | | use 'native' instead of 'amd64' as pkg archDavid Kalnischkies2014-05-301-9/+9
| | | | | | | | | | | | | | | | Git-Dch: Ignore
* | | | show current/total testcase statistic also in concise modeDavid Kalnischkies2014-05-301-1/+1
| | | | | | | | | | | | | | | | Git-Dch: Ignore
* | | | support parsing EDSP requests Architecture{,s} stanzaDavid Kalnischkies2014-05-302-0/+71
| |/ / |/| | | | | | | | | | | | | | Adds also a small testcase for EDSP Git-Dch: Ignore
* | | Merge remote-tracking branch 'mvo/debian/sid' into debian/sidMichael Vogt2014-05-291-1/+1
|\| |
| * | Fix uninitialized valueMichael Vogt2014-05-281-1/+1
| | | | | | | | | | | | Reported-By: scan-build
* | | (try to) fix travis-ci build failuresDavid Kalnischkies2014-05-293-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dpkg on Ubuntu 12.04 does not seem to support parsing arch-specific dependencies, so we try to detect if we face such a dpkg in the test. In the other test the order depends on libdb, which changes per arch, so we just run it through our sorting binary and be happy (hopefully). Git-Dch: Ignore
* | | fix tight loop detection and temporary removesDavid Kalnischkies2014-05-224-18/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As outlined in #748355 apt segfaulted if it encountered a loop between a package pre-depending on a package conflicting with the previous as it ended up in an endless loop trying to unpack 'the other package'. In this specific case as an essential package is involved a lot of force needs to be applied, but can also be caused by 'normal' tight loops and highlights a problem in how we handle breaks which we want to avoid. The fix comes in multiple entangled changes: 1. All Smart* calls are guarded with loop detection. Some already had it, some had parts of it, some did it incorrect, and some didn't even try. 2. temporary removes to avoid a loop (which is done if a loop is detected) prevent the unpack of this looping package (we tried to unpack it to avoid the conflict/breaks, but due to a loop we couldn't, so we remove/deconfigure it instead which means we can't unpack it now) 3. handle conflicts and breaks very similar instead of duplicating most of the code. The only remaining difference is, as it should: deconfigure is enough for breaks, for conflicts we need the big hammer
* | | make test independent from the actual Install-SizeDavid Kalnischkies2014-05-221-2/+2
| | | | | | | | | | | | Git-Dch: Ignore
* | | add an additional test for arch specific conflictsDavid Kalnischkies2014-05-161-0/+36
|/ / | | | | | | | | | | | | | | | | | | | | In bugreport #747261 I confirmed with this testcase that apt actually supports the requested architecture-specific conflicts already since 2012 with commit cef094c2ec8214b2783a2ac3aa70cf835381eae1. The old test only does simulations which are handy to check apt, this one builds 'real' packages to see if dpkg agrees with us. Git-Dch: Ignore
* | Never parse Version/Architecture tags in a Translation-$lang fileMichael Vogt2014-05-151-0/+41
| | | | | | | | | | | | | | | | | | | | Version/Architecture information in a Translation-$lang file is not allowed, so don't try to parse it. This is a fix for a bugreport where a Translation-en file contained the content of the regular Packages file (probably due to local FS corruption). This lead to strange error messages on file download. Thanks to Thomas Reusch for the report.
* | show progress in run-testsMichael Vogt2014-05-071-1/+2
| |
* | Merge remote-tracking branch 'mvo/feature/apt-ftparchive-srccache2' into ↵Michael Vogt2014-05-073-1/+297
|\ \ | | | | | | | | | debian/sid
| * | ensure "--db" also works with the new srcpkgdbMichael Vogt2014-04-071-1/+26
| | |
| * | ensure clean worksMichael Vogt2014-04-042-0/+13
| | |
| * | add test for binary cachedb and contents generationMichael Vogt2014-04-042-3/+94
| | |
| * | Implement CacheDB for source packages in apt-ftparchiveMichael Vogt2014-04-042-1/+168
| | |
* | | Only do openpty() if both stdin/stdout are terminalsMichael Vogt2014-04-301-1/+1
| | | | | | | | | | | | Closes: 746434
* | | handle pkgnames shorter than modifiersDavid Kalnischkies2014-04-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bugreport highlights the problem with an empty package name. We fix this by 'ignoring' these so that it behaves just like "apt-get install". The deeper problem is that modifier strings can be longer than a package name in which case the comparison doesn't make sense, so don't compare then. Was not noticed so far as all modifiers are of length 1, so the only package name shorter than this is in fact the empty package name. Closes: 744940
* | | use Google C++ Testing Framework for libapt testsDavid Kalnischkies2014-04-1628-2085/+1917
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My commit 45df0ad2 from 26. Nov 2009 had a little remark: "The commit also includes a very very simple testapp." This was never intended to be permanent, but as usually… The commit adds the needed make magic to compile gtest statically as it is required and links it against a small runner. All previous testcase binaries are reimplemented in gtest and combined in this runner. While most code is a 1:1 translation some had to be rewritten like compareversion_test.cc, but the coverage remains the same.
* | | clear HitEof flag in FileFd::SeekDavid Kalnischkies2014-04-163-24/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | fseek and co do this to their eof-flags and it is more logic this way as we will usually seek away from the end (e.g. to re-read the file). The commit also improves the testcase further and adds a test for the binary compressor codepath (as gz, bzip2 and xz are handled by libraries) via the use of 'rev' as a 'compressor'.
* | | Merge remote-tracking branch 'mvo/feature/helpful-apt-list' into debian/sidMichael Vogt2014-04-111-0/+13
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: test/integration/test-apt-cli-list
| * | | Notice the user about "apt list -a" when only a single hit if foundMichael Vogt2014-04-091-0/+12
| | |/ | |/| | | | | | | | | | | | | If the user is using "apt list pattern" and there is only a single hit, notice about "--all-versions" as this is what the user may be interessted in
* | | Merge remote-tracking branch 'mvo/bugfix/apt-list-rc-pkgs' into debian/sidMichael Vogt2014-04-111-0/+5
|\ \ \
| * | | fix apt list output for pkgs in dpkg ^rc stateMichael Vogt2014-04-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Packages in the "deinstall ok config-file" have no candidate or instaleld version. So they must be special cased in the apt list generation.
* | | | consider priorities only for downloadable pkgs in resolverDavid Kalnischkies2014-04-111-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A package which can't be downloaded anymore is very likely dropped from a release and can therefore no longer be 'standard' (or similar). We therefore do not grant points for them anymore and demote them to prio:extra instead which helps other packages breaking them away even if they have a lower priority. The testcase was initially created by Michael Vogt and just amended.
* | | | extend FileFd test behond basic permission testsDavid Kalnischkies2014-04-111-10/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now do Open, Write and Read (the later multiple ways) for each permission and each compressor we have configured to cover more cases and especially ensure that compressors do not change our premissions. This test is also to be credited for discovering the skippos-fix. Git-Dch: Ignore
* | | | fix test-failure in adtMichael Vogt2014-04-101-1/+7
| | | |
* | | | Fix insecure file permissions when using FileFd with OpenMode::AtomicMichael Vogt2014-04-101-0/+31
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7335eebea6dd43581d4650a8818b06383ab89901 introduced a bug that caused FileFd to create insecure permissions when FileFd::Atomic is used. This commit fixes the permissions and adds a test. The bug is most likely caused by the confusing "Perm" parameter that is passed to Open() - its not the file permissions but intead the "mode" part of open/creat.
* | | Fix possible race when stunnel/aptwebserver create their PID filesMichael Vogt2014-04-091-0/+19
|/ / | | | | | | | | | | This patch should fix spurious test failures in jenkins or travis that are caused by a race condition in the {stunnel,aptwebserver}.pid file creation
* | Merge branch 'bugfix/apt-search-case' into debian/sidMichael Vogt2014-04-081-1/+6
|\ \