FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 06-21-2008, 03:22 AM
Allan McRae
 
Default 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



_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 06-23-2008, 02:26 AM
"Dan McGee"
 
Default pactest coverage

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

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 07:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org