[pacman-dev] pactest coverage
Hi all, I "discovered" gcov so was testing out the coverage of the pactests. During searching for more info about gcov I saw Dan already had written something on it (http://toofishes.net/blog/using-gcov-code-coverage-testing/) so not as novel as I thought... Anyway, as an FYI, here is a list of functions/important sections of the code that are not covered by pactests. libalpm/add.c 372-375: case 11 - symlink in package to existing dir 386-389: dir in package, symlink to non-dir in filesystem 393-396: case 10 - trying to overwrite dir tree with file, don't allow it 399: case 6 - trying to overwrite file with dir libalpm/package.c changelog functions libalpm/remove.c 191-192: -Rcs libalpm/sync.c 290-300: _alpm_sync_addtarget() - adding target from given repo pacman/package.c dump_pkg_backups() dump_pkg_files() dump_pkg_changelog() pacman/query.c resolve_path() query_fileowner() query_group() query_upgrades() is_foreign() is_unrequired() pacman/sync.c sync_cleandb() sync_cleandb_all() sync_cleancache() sync_group() pacman/upgrade.c pacman_upgrade() - URL targets pacman/util.c needs_transaction() makepath() rmrf() mdirname() strtoupper() pm_vasprintf() and everything to do with deltas... We really should have coverage for the sections in libalpm/add.c so I am writing pactests for those now. It would be easy to add one for -Rcs and changelogs as well so that will give fairly complete coverage of libalpm. Allan
On Fri, Jun 20, 2008 at 10:22 PM, Allan McRae <allan@archlinux.org> wrote:
We really should have coverage for the sections in libalpm/add.c so I am writing pactests for those now. It would be easy to add one for -Rcs and changelogs as well so that will give fairly complete coverage of libalpm.
I completely agree, thanks for this. I tried to add a few tests way back when for some of the frontend things that we never really "tested", which could be as simple as the output of the -Q set of commands. However, these tests help bring the coverage to 100% so we catch awesome segfaults and such, so I would be more than happy to take pactests that increase our coverage. -Dan
participants (2)
-
Allan McRae
-
Dan McGee