debian/0000755000000000000000000000000012246410366007172 5ustar debian/control0000644000000000000000000000211412246404660010573 0ustar Source: lcov Section: devel Priority: optional Build-Depends: debhelper (>=9) Maintainer: Alastair McKinstry Homepage: http://ltp.sourceforge.net/coverage/lcov.php Standards-Version: 3.9.5 Package: lcov Architecture: all Depends: ${misc:Depends}, ${perl:Depends}, gcc Recommends: libgd-gd2-perl Section: devel Priority: optional Description: Summarise Code coverage information from GCOV LCOV is an extension of GCOV, a GNU tool which provides information about what parts of a program are actually executed (i.e. "covered") while running a particular test case. The extension consists of a set of Perl scripts which build on the textual GCOV output to implement the following enhanced functionality: . - HTML based output: coverage rates are additionally indicated using bar graphs and specific colors. - Support for large projects: overview pages allow quick browsing of coverage data by providing three levels of detail: directory view, file view and source code view. debian/watch0000644000000000000000000000015012246410213010206 0ustar version=3 http://ltp.sourceforge.net/coverage/lcov.php .*/lcov-(\d.*)\.(?:tgz|tbz2|tar\.(?:gz|bz2|xz)) debian/lcov.examples0000644000000000000000000000001211343202317011656 0ustar example/* debian/source/0000755000000000000000000000000011343202317010462 5ustar debian/source/format0000644000000000000000000000001411343202317011670 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000012246405600010614 5ustar debian/patches/recursion.patch0000644000000000000000000000125511415601500013643 0ustar Description: --no-recursion not passed to geninfo Forwarded: no Origin: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588322 Bug-Debian: http://bugs.debian.org/588322 Author: Guillem Jover Last-Updated: 2010-07-09 Index: lcov-1.8/bin/lcov =================================================================== --- lcov-1.8.orig/bin/lcov 2010-07-09 11:32:15.000000000 +0100 +++ lcov-1.8/bin/lcov 2010-07-09 11:59:48.000000000 +0100 @@ -763,6 +763,10 @@ { @param = (@param, "--base-directory", $base_directory); } + if ($no_recursion) + { + @param = (@param, "--no-recursion"); + } if ($no_compat_libtool) { @param = (@param, "--no-compat-libtool"); debian/patches/series0000644000000000000000000000010012246405600012020 0ustar example_build.patch perl-nocaps.patch handle-equals-signs.patch debian/patches/perl-nocaps.patch0000644000000000000000000000130512246405600014057 0ustar Author: Alastair McKinstry Last-Updated: 2010-10-08 Description: Perl should be spelt "Perl" not PERL. See Perl FAQ. Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589753 Forwarded: no Index: lcov-1.9/contrib/galaxy/genflat.pl =================================================================== --- lcov-1.9.orig/contrib/galaxy/genflat.pl 2010-10-08 14:10:25.000000000 +0100 +++ lcov-1.9/contrib/galaxy/genflat.pl 2010-10-08 14:10:30.000000000 +0100 @@ -1211,7 +1211,7 @@ # escape_regexp(string) # # Escape special characters in STRING which would be incorrectly interpreted -# in a PERL regular expression. +# in a Perl regular expression. # sub escape_regexp($) debian/patches/genhtml_missing_file.patch0000644000000000000000000000161211455165610016030 0ustar Author: Enrico Zini Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578571 Description: Don't crash genhtml on a missing source file Forwarded: no Index: lcov-1.9/bin/genhtml =================================================================== --- lcov-1.9.orig/bin/genhtml 2010-10-08 14:01:00.000000000 +0100 +++ lcov-1.9/bin/genhtml 2010-10-08 14:01:45.000000000 +0100 @@ -4964,6 +4964,15 @@ %count_data = %{$_[2]}; } + if (!-f $source_filename) { + write_source_prolog(*HTML_HANDLE); + push (@result, + write_source_line(HTML_HANDLE, 0, + "(missing file)", 0, 0, 0, 0)); + write_source_epilog(*HTML_HANDLE); + return (@result); + } + open(SOURCE_HANDLE, "<".$source_filename) or die("ERROR: cannot open $source_filename for reading!\n"); debian/patches/three-arg-open.patch0000644000000000000000000001144311754177732014474 0ustar Subject: Replace 2 argument open with 3 argument open Origin: vendor, http://pkgs.fedoraproject.org/gitweb/?p=lcov.git;a=blob_plain;f=lcov-1.9-three-arg-open.patch;hb=25a274d9dbd6813b160e8c8c6ab12791dff8733e Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=706040 Author: Daniel Berrange diff -rup lcov-1.9.orig/bin/geninfo lcov-1.9.new/bin/geninfo --- lcov-1.9.orig/bin/geninfo 2012-03-12 11:11:31.837992625 +0000 +++ lcov-1.9.new/bin/geninfo 2012-03-12 11:11:00.721000276 +0000 @@ -424,7 +424,7 @@ if (defined($output_filename) && ($outpu # Initially create output filename, data is appended # for each data file processed local *DUMMY_HANDLE; - open(DUMMY_HANDLE, ">$output_filename") + open(DUMMY_HANDLE, ">", $output_filename) or die("ERROR: cannot create $output_filename!\n"); close(DUMMY_HANDLE); @@ -906,7 +906,7 @@ sub process_dafile($$) else { # Append to output file - open(INFO_HANDLE, ">>$output_filename") + open(INFO_HANDLE, ">>", $output_filename) or die("ERROR: cannot write to ". "$output_filename!\n"); } @@ -914,7 +914,7 @@ sub process_dafile($$) else { # Open .info file for output - open(INFO_HANDLE, ">$da_filename.info") + open(INFO_HANDLE, ">", "$da_filename.info") or die("ERROR: cannot create $da_filename.info!\n"); } @@ -1267,7 +1267,7 @@ sub solve_ambiguous_match($$$) { # Compare file contents - open(SOURCE, $filename) + open(SOURCE, "<", $filename) or die("ERROR: cannot read $filename!\n"); $no_match = 0; @@ -1337,7 +1337,7 @@ sub read_gcov_header($) my $object; local *INPUT; - if (!open(INPUT, $_[0])) + if (!open(INPUT, "<", $_[0])) { if ($ignore_errors[$ERROR_GCOV]) { @@ -1489,7 +1489,7 @@ sub read_gcov_file($) my $last_line = 0; local *INPUT; - if (!open(INPUT, $filename)) { + if (!open(INPUT, "<", $filename)) { if ($ignore_errors[$ERROR_GCOV]) { warn("WARNING: cannot read $filename!\n"); @@ -1669,7 +1669,7 @@ sub get_gcov_version() my $version_string; my $result; - open(GCOV_PIPE, "$gcov_tool -v |") + open(GCOV_PIPE, "-|", "$gcov_tool -v") or die("ERROR: cannot retrieve gcov version!\n"); $version_string = ; close(GCOV_PIPE); @@ -1757,12 +1757,12 @@ sub system_no_output($@) local *OLD_STDOUT; # Save old stdout and stderr handles - ($mode & 1) && open(OLD_STDOUT, ">>&STDOUT"); - ($mode & 2) && open(OLD_STDERR, ">>&STDERR"); + ($mode & 1) && open(OLD_STDOUT, ">>&", "STDOUT"); + ($mode & 2) && open(OLD_STDERR, ">>&", "STDERR"); # Redirect to /dev/null - ($mode & 1) && open(STDOUT, ">/dev/null"); - ($mode & 2) && open(STDERR, ">/dev/null"); + ($mode & 1) && open(STDOUT, ">", "/dev/null"); + ($mode & 2) && open(STDERR, ">", "/dev/null"); system(@_); $result = $?; @@ -1772,8 +1772,8 @@ sub system_no_output($@) ($mode & 2) && close(STDERR); # Restore old handles - ($mode & 1) && open(STDOUT, ">>&OLD_STDOUT"); - ($mode & 2) && open(STDERR, ">>&OLD_STDERR"); + ($mode & 1) && open(STDOUT, ">>&", "OLD_STDOUT"); + ($mode & 2) && open(STDERR, ">>&", "OLD_STDERR"); return $result; } @@ -1794,7 +1794,7 @@ sub read_config($) my $value; local *HANDLE; - if (!open(HANDLE, "<$filename")) + if (!open(HANDLE, "<", $filename)) { warn("WARNING: cannot read configuration file $filename\n"); return undef; @@ -1866,7 +1866,7 @@ sub get_exclusion_data($) my $flag = 0; local *HANDLE; - if (!open(HANDLE, "<$filename")) { + if (!open(HANDLE, "<", $filename)) { warn("WARNING: could not open $filename\n"); return undef; } @@ -2072,7 +2072,7 @@ sub process_graphfile($$) else { # Append to output file - open(INFO_HANDLE, ">>$output_filename") + open(INFO_HANDLE, ">>", $output_filename) or die("ERROR: cannot write to ". "$output_filename!\n"); } @@ -2080,7 +2080,7 @@ sub process_graphfile($$) else { # Open .info file for output - open(INFO_HANDLE, ">$graph_filename.info") + open(INFO_HANDLE, ">", "$graph_filename.info") or die("ERROR: cannot create $graph_filename.info!\n"); } @@ -2544,7 +2544,7 @@ sub read_bb($$) my $graph; local *HANDLE; - open(HANDLE, "<$bb_filename") or goto open_error; + open(HANDLE, "<", $bb_filename) or goto open_error; binmode(HANDLE); while (!eof(HANDLE)) { $value = read_bb_value(*HANDLE, "data word"); @@ -2721,7 +2721,7 @@ sub read_bbg($$) my $graph; local *HANDLE; - open(HANDLE, "<$bbg_filename") or goto open_error; + open(HANDLE, "<", $bbg_filename) or goto open_error; binmode(HANDLE); # Read magic $word = read_bbg_value(*HANDLE, "file magic"); @@ -2959,7 +2959,7 @@ sub read_gcno($$) my $graph; local *HANDLE; - open(HANDLE, "<$gcno_filename") or goto open_error; + open(HANDLE, "<", $gcno_filename) or goto open_error; binmode(HANDLE); # Read magic $word = read_gcno_word(*HANDLE, "file magic"); debian/patches/example_build.patch0000644000000000000000000000137412246405600014454 0ustar Description: change paths so examples build within Debian examples directory. Author: Alastair McKinstry Uploaded: no diff -ruN lcov-1.7-old/example/Makefile lcov-1.7/example/Makefile --- lcov-1.7-old/example/Makefile 2008-11-17 13:50:26.000000000 +0000 +++ lcov-1.7/example/Makefile 2009-04-25 16:34:32.000000000 +0100 @@ -10,10 +10,10 @@ CC := gcc CFLAGS := -Wall -I. -fprofile-arcs -ftest-coverage -LCOV := ../bin/lcov -GENHTML := ../bin/genhtml -GENDESC := ../bin/gendesc -GENPNG := ../bin/genpng +LCOV := /usr/bin/lcov +GENHTML := /usr/bin/genhtml +GENDESC := /usr/bin/gendesc +GENPNG := /usr/bin/genpng # Depending on the presence of the GD.pm perl module, we can use the # special option '--frames' for genhtml debian/patches/gcc-compat-4.7.patch0000644000000000000000000000233211754176673014202 0ustar Subject: Fix compat with gcc 4.7 Origin: vendor, http://pkgs.fedoraproject.org/gitweb/?p=lcov.git;a=blob_plain;f=lcov-1.9-gcc-compat-4.7.patch;hb=25a274d9dbd6813b160e8c8c6ab12791dff8733e Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=787502 Author: Daniel Berrange diff -rup lcov-1.9.orig/bin/geninfo lcov-1.9.new/bin/geninfo --- lcov-1.9.orig/bin/geninfo 2010-08-06 12:05:17.000000000 +0100 +++ lcov-1.9.new/bin/geninfo 2012-03-12 10:59:11.253999711 +0000 @@ -63,6 +63,7 @@ our $lcov_url = "http://ltp.sourceforge our $gcov_tool = "gcov"; our $tool_name = basename($0); +our $GCOV_VERSION_4_7_0 = 0x40700; our $GCOV_VERSION_3_4_0 = 0x30400; our $GCOV_VERSION_3_3_0 = 0x30300; our $GCNO_FUNCTION_TAG = 0x01000000; @@ -2903,6 +2904,10 @@ sub read_gcno_function_record(*$$$$) graph_expect("function record"); # Skip ident and checksum graph_skip($handle, 8, "function ident and checksum") or return undef; + if ($gcov_version >= $GCOV_VERSION_4_7_0) { + # Skip extra word added by android 4.4.0 / gcc >= 4.7 toolchains. + graph_skip($handle, 4, "android_4_4_0 extra word"); + } # Read function name graph_expect("function name"); $function = read_gcno_string($handle, $big_endian); debian/patches/utf8-output.patch0000644000000000000000000000243311453614460014070 0ustar Author: Guillem Jover Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=590562 Description: Output HTML in UTF-8 rather than ISO-8859-1 format. Forwarded: no Index: lcov-1.9/bin/genhtml =================================================================== --- lcov-1.9.orig/bin/genhtml 2010-10-08 14:04:58.000000000 +0100 +++ lcov-1.9/bin/genhtml 2010-10-08 14:05:34.000000000 +0100 @@ -4010,7 +4010,7 @@ - + $_[3] @@ -4073,7 +4073,7 @@ $_[3] - + @@ -5590,7 +5590,7 @@ - + \@pagetitle\@ debian/patches/handle-equals-signs.patch0000644000000000000000000000137112246405600015503 0ustar Description: Handle "=====" as another form of zero. gcov prints "=====" instead of "######" when an unexecuted line is "reachable only by exceptional paths such as C++ exception handlers." This should be handled the same as "######" for our purposes. Author: Zack Weinberg Last-Update: 2013-02-01 --- lcov-1.10.orig/bin/geninfo +++ lcov-1.10/bin/geninfo @@ -1742,8 +1742,9 @@ sub read_gcov_file($) $number = (split(" ",substr($_, 0, 16)))[0]; # Check for zero count which is indicated - # by ###### - if ($number eq "######") { $number = 0; } + # by ###### or ===== + if ($number eq "######" or + $number eq "=====") { $number = 0; } if ($exclude_line) { # Register uninstrumented line instead debian/patches/debian-changes-1.9-20000644000000000000000000000305111455165715014045 0ustar Description: Upstream changes introduced in version 1.9-2 This patch has been created by dpkg-source during the package build. Here's the last changelog entry, hopefully it gives details on why those changes were made: . lcov (1.9-2) unstable; urgency=low . * Patch to change genhtml got overwritten by autogenerated debian-changes patch. Fixed. Closes: #5999932. . The person named in the Author field signed this changelog entry. Author: Alastair McKinstry Bug-Debian: http://bugs.debian.org/5999932 --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- lcov-1.9.orig/bin/genhtml +++ lcov-1.9/bin/genhtml @@ -4968,7 +4968,7 @@ sub write_source($$$$$$$) write_source_prolog(*HTML_HANDLE); push (@result, write_source_line(HTML_HANDLE, 0, - "(missing file)", 0, 0, 0, 0)); + "(missing file)", 0, 0, 0, 0)); write_source_epilog(*HTML_HANDLE); return (@result); } debian/rules0000755000000000000000000000016712246404673010262 0ustar #!/usr/bin/make -f # Debhelper rules %: dh $@ override_dh_auto_install: $(MAKE) PREFIX=`pwd`/debian/lcov install debian/tests.xml0000644000000000000000000030747211343202317011063 0ustar Check that we can set the personality for a process. Check that we get EINVAL for a bad personality. Check that exit returns the correct values to the waiting parent Check that exit flushes output file buffers and closes files upon exiting Basic test for wait(2) system call. check that a call to wait4() correctly waits for a child process to exit check for ECHILD errno when using an illegal pid value Check that when a child kills itself by generating an alarm exception, the waiting parent is correctly notified. Check that when a child kills itself by generating an integer zero divide exception, the waiting parent is correctly notified. Check that parent waits until specific child has returned. test to check the error conditions in waitpid sys call Check that when a child kills itself with a kill statement after determining its process id by using getpid, the parent receives a correct report of the cause of its death. This also indirectly checks that getpid returns the correct process id. Tests to see if pid's returned from fork and waitpid are same. Tests to see if pid's returned from fork and waitpid are same. Tests to see if pid's returned from fork and waitpid are same Check ability of parent to wait until child returns, and that the child's process id is returned through the waitpid. Check that waitpid returns immediately if no child is present. Tests to see if pid's returned from fork and waitpid are same Tests to see if pid's returned from fork and waitpid are same Tests to see if pid's returned from fork and waitpid are same Tests to see if pid's returned from fork and waitpid are same Test F_DUPFD, F_SETFL cmds of fcntl Basic test for fcntl(2) using F_DUPFD argument. Basic test for fcntl(2) using F_GETFD argument. Basic test for fcntl(2) using F_GETFL argument. Basic test for fcntl(2) using F_GETLK argument. Error checking conditions for remote locking of regions of a file. Close-On-Exec functional test. Close-On-Exec of named pipe functional test. Basic test for fcntl(2) using F_SETFL argument. Basic test for fcntl(2) using F_SETLK argument. Basic test for fcntl(2) using F_SETLKW argument. Testcase to check locking of regions of a file Testcase to test that fcntl() sets EMFILE for F_DUPFD command. Testcase to test that fcntl() sets errno correctly. File locking test cases for fcntl. In Linux, S_ENFMT is not implemented in the kernel. However all standard Unix kernels define S_ENFMT as S_ISGID. So this test defines S_ENFMT as S_ISGID. Check that file locks are removed when file closed Additional file locking test cases for checking proper notification of processes on lock change Check deadlock detection for file locking Test to check the error conditions in fcntl system call Testcase to check locking of regions of a file Check locking of regions of a file Check locking of regions of a file Basic test for dup(2). Negative test for dup(2) with bad fd. Negative test for dup(2) (too many fds). Basic test for dup(2) of a system pipe descriptor. Basic test for dup(2) of a named pipe descriptor. Negative tests for dup2() with bad fd (EBADF), and for "too many open files" (EMFILE) Is the access mode the same for both file descriptors? 0: read only ? "0444" 1: write only ? "0222" 2: read/write ? "0666" Testcase to check the basic functionality of dup2(). Testcase to check the basic functionality of dup2(2). Verify that, msync() succeeds, when the region to synchronize, is part of, or all of a mapped region. Verify that msync() succeeds when the region to synchronize is mapped shared and the flags argument is MS_INVALIDATE. Verify that, msync() fails, when the region to synchronize, is outside the address space of the process. Verify that, msync() fails, when the region to synchronize, is mapped but the flags argument is invalid. Verify that, msync() fails, when the region to synchronize, was not mapped. Testcase to test the basic functionality of the sendfile(2) system call. Testcase to test that sendfile(2) system call returns appropriate errnos on error. Basic test for fork(2). Test correct operation of fork: pid == 0 in child; pid > 0 in parent from wait; Check that child can use a large text space and do a large number of operations. Child inheritance of Environment Variables after fork(). Make sure LDT is propagated correctly Test that a process can fork children a large number of times in succession Check that all children inherit parent's file descriptor Check if the parent's file descriptors are affected by actions in the child; they should not be. Check that child has access to a full set of files. Check inheritance of file descriptor by children, they should all be referring to the same file. Test that parent gets a pid from each child when doing wait Fork a process using vfork() and verify that, the attribute values like euid, ruid, suid, egid, rgid, sgid, umask, inode and device number of root and current working directories are same as that of the parent process. Fork a process using vfork() and verify that, the pending signals in the parent are not pending in the child process. Testcase to check the errnos set by the ioctl(2) system call. Testcase to test the TCGETA, and TCSETA ioctl implementations for the tty driver Verify that ioctl() on sockets returns the proper errno for various failure cases check that a correct call to getitimer() succeeds check that a getitimer() call fails as expected with an incorrect second argument. check that a getitimer() call fails as expected with an incorrect first argument. check that a reasonable setitimer() call succeeds. check that a setitimer() call fails as expected with incorrect values. check that a setitimer() call fails as expected with incorrect values. increase CPUs workload - verify that results of some math functions are stable trigonometric (acos, asin, atan, atan2, cos, sin, tan), hyperbolic (cosh, sinh, tanh), increase CPUs workload - verify that results of some math functions are stable exponential and logarithmic functions (exp, log, log10), Functions that manipulate floating-point numbers (modf, ldexp, frexp), Euclidean distance function (hypot), increase CPUs workload - verify that results of some math functions are stable Bessel (j0, j1, y0, y1), Computes the natural logarithm of the gamma function (lgamma), increase CPUs workload - verify that results of some math functions are stable Computes sqrt, power, fmod increase CPUs workload - verify that results of some math functions are stable Creates a tree of threads Creates n threads Creates a tree of threads does calculations, and returns result to parent Write/close flushes data to the file. Basic test for fpathconf(2) Basic test for gethostid(2) Basic test for pathconf(2) Basic test for the setpgrp(2) system call. Testcase to check the basic functionality of the setpgrp(2) syscall. Basic test for the ulimit(2) system call. Performs General Stress with Race conditions Test the LINUX memory manager. The program is aimed at stressing the memory manager by simultaneous map/unmap/read by light weight processes, the test is scheduled to run for a minimum of 24 hours. Test the LINUX memory manager. The program is aimed at stressing the memory manager by repeated map/write/unmap of a of a large gb size file. Test the LINUX memory manager. The program is aimed at stressing the memory manager by repeated map/write/unmap of file/memory of random size (maximum 1GB) this is done by multiple processes. Tests mmapping a big file and writing it once Verify that, mmap() succeeds when used to map a file where size of the file is not a multiple of the page size, the memory area beyond the end of the file to the end of the page is accessible. Also, verify that this area is all zeroed and the modifications done to this area are not written to the file. Call mmap() with prot parameter set to PROT_READ and with the file descriptor being open for read, to map a file creating mapped memory with read access. The minimum file permissions should be 0444. Call mmap() to map a file creating a mapped region with execute access under the following conditions - - The prot parameter is set to PROT_EXE - The file descriptor is open for read - The file being mapped has execute permission bit set. - The minimum file permissions should be 0555. The call should succeed to map the file creating mapped memory with the required attributes. Call mmap() to map a file creating a mapped region with read/exec access under the following conditions - - The prot parameter is set to PROT_READ|PROT_EXEC - The file descriptor is open for read - The file being mapped has read and execute permission bit set. - The minimum file permissions should be 0555. The call should succeed to map the file creating mapped memory with the required attributes. Call mmap() to map a file creating mapped memory with no access under the following conditions - - The prot parameter is set to PROT_NONE - The file descriptor is open for read(any mode other than write) - The minimum file permissions should be 0444. The call should succeed to map the file creating mapped memory with the required attributes. Call mmap() to map a file creating a mapped region with read access under the following conditions - - The prot parameter is set to PROT_READ - The file descriptor is open for writing. The call should fail to map the file. Call mmap() to map a file creating a mapped region with read access under the following conditions - - The prot parameter is set to PROT_WRITE - The file descriptor is open for writing. - The flags parameter has MAP_PRIVATE set. The call should fail to map the file. Verify that mmap() fails to map a file creating a mapped region when the file specified by file descriptor is not valid. Verify that, mremap() succeeds when used to expand the existing virtual memory mapped region to the requested size where the virtual memory area was previously mapped to a file using mmap(). Verify that, mremap() fails when used to expand the existing virtual memory mapped region to the requested size, if the virtual memory area previously mapped was not page aligned or invalid argument specified. Verify that, mremap() fails when used to expand the existing virtual memory mapped region to the requested size, if there already exists mappings that cover the whole address space requested or the old address specified was not mapped. Verify that, mremap() fails when used to expand the existing virtual memory mapped region to the requested size, if the memory area cannot be expanded at the current virtual address and MREMAP_MAYMOVE flag not set. Verify that, munmap call will succeed to unmap a mapped file or anonymous shared memory region from the calling process's address space and after successful completion of munmap, the unmapped region is no longer accessible. Verify that, munmap call will succeed to unmap a mapped file or anonymous shared memory region from the calling process's address space if the region specified by the address and the length is part or all of the mapped region. Verify that, munmap call will fail to unmap a mapped file or anonymous shared memory region from the calling process's address space if the address and the length of the region to be unmapped points outside the calling process's address space Test the basic functionality of brk. Basic test for the sbrk(2) system call. Testcase to check the error conditions for mprotect(2) Testcase to check the mprotect(2) system call. Testcase to check the mprotect(2) system call. create a message queue, then issue the IPC_STAT command and RMID commands to test the functionality create a message queue, then issue the IPC_SET command to lower the msg_qbytes value. create a message queue, then issue the IPC_RMID command test for EACCES, EFAULT and EINVAL errors using a variety of incorrect calls. test for EPERM error create a message queue, write a message to it and read it back. test for EEXIST and ENOENT errors test for an ENOSPC error by using up all available message queues. test for an EACCES error by creating a message queue with no read or write permission and then attempting to access it with various permissions. test that msgrcv() receives the expected message test for EACCES and EFAULT errors test for EINVAL error test for E2BIG and ENOMSG errors test for EINTR error test for EIDRM error test that msgsnd() enqueues a message correctly test for EACCES and EFAULT errors test for EINVAL error test for EAGAIN error test for EINTR error test for EIDRM error Basic test for link(2) Multi links tests Negative test cases for link(2) Multi links (EMLINK) negative test Verify that, readlink will succeed to read the contents of the symbolic link created the process. Basic test for the readlink(2) system call Verify that, 1) readlink(2) returns -1 and sets errno to EACCES if search/write permission is denied in the directory where the symbolic link resides. 2) readlink(2) returns -1 and sets errno to EINVAL if the buffer size is not positive. 3) readlink(2) returns -1 and sets errno to EINVAL if the specified file is not a symbolic link file. 4) readlink(2) returns -1 and sets errno to ENAMETOOLONG if the pathname component of symbolic link is too long (ie, > PATH_MAX). 5) readlink(2) returns -1 and sets errno to ENOENT if the component of symbolic link points to an empty string. Verify that, readlink call will succeed to read the contents of the symbolic link if invoked by non-root user who is not the owner of the symbolic link. Test of various file function calls, such as rename or open, on a symbolic link file. Basic test for the symlink(2) system call. Verify that, 1) symlink(2) returns -1 and sets errno to EACCES if search/write permission is denied in the directory where the symbolic link is being created. 2) symlink(2) returns -1 and sets errno to EEXIST if the specified symbolic link already exists. 3) symlink(2) returns -1 and sets errno to EFAULT if the specified file or symbolic link points to invalid address. 4) symlink(2) returns -1 and sets errno to ENAMETOOLONG if the pathname component of symbolic link is too long (ie, > PATH_MAX). 5) symlink(2) returns -1 and sets errno to ENOTDIR if the directory component in pathname of symbolic link is not a directory. 6) symlink(2) returns -1 and sets errno to ENOENT if the component of symbolic link points to an empty string. Verify that, symlink will succeed to create a symbolic link of an existing object name path. Verify that, symlink will succeed to create a symbolic link of an non-existing object name path. Basic test for the unlink(2) system call. Test for the unlink(2) system call of a FIFO. Tests for error handling for the unlink(2) system call. More tests for error handling for the unlink(2) system call. Regression test for max links per file This test will verify the rename(2) syscall basic functionality. Verify rename() works when the "new" file or directory does not exist. Basic test for the rename(2) system call This test will verify that rename(2) functions correctly when the "new" file or directory exists This test will verify that rename(2) failed when newpath is a non-empty directory and return EEXIST or ENOTEMPTY This test will verify that rename(2) fails with EISDIR This test will verify that rename(2) failed in EINVAL This test will verify that rename(2) failed in ENOTDIR This test will verify that rename(2) syscall failed in EFAULT check rename() fails with EACCES This test will verify that rename(2) syscall fails with ENAMETOOLONG and ENOENT This test will verify that rename(2) failed in EBUSY check rename() fails with EPERM Verify rename() return successfully and performs no other action when "old" file and "new" file link to the same file. This test will verify that rmdir(2) syscall basic functionality. verify rmdir(2) returns a value of 0 and the directory being removed. This test will verify that rmdir(2) fail in 1. ENOTEMPTY 2. EBUSY 3. ENAMETOOLONG 4. ENOENT 5. ENOTDIR 6. EFAULT 7. EFAULT check rmdir() fails with EPERM or EACCES Basic test for the rmdir(2) system call Verify that rmdir(2) returns a value of -1 and sets errno to indicate the error. Basic errno test for mkdir(2) This test will verify that new directory created by mkdir(2) inherits the group ID from the parent directory and S_ISGID bit, if the S_ISGID bit is set in the parent directory. Check mkdir() with various error conditions that should produce EFAULT, ENAMETOOLONG, EEXIST, ENOENT and ENOTDIR Attempt to create a directory in a directory having no permissions. This test will verify the mkdir(2) syscall basic functionality Basic test for mkdir(2) Basic test for mknod(2) Verify that mknod(2) succeeds when used to create a filesystem node with set group-ID bit set on a directory without set group-ID bit set. The node created should have set group-ID bit set and its gid should be equal to that of its parent directory. Verify that mknod(2) succeeds when used to create a filesystem node with set group-ID bit set on a directory with set group-ID bit set. The node created should have set group-ID bit set and its gid should be equal to the effective gid of the process. Verify that mknod(2) succeeds when used to create a filesystem node on a directory with set group-ID bit set. The node created should not have group-ID bit set and its gid should be equal to the effective gid of the process. Verify that mknod(2) succeeds when used by root to create a filesystem node with set group-ID bit set on a directory with set group-ID bit set. The node created should have set group-ID bit set and its gid should be equal to that of its parent directory. Verify that, 1) mknod(2) returns -1 and sets errno to EEXIST if specified path already exists. 2) mknod(2) returns -1 and sets errno to EFAULT if pathname points outside user's accessible address space. 3) mknod(2) returns -1 and sets errno to ENOENT if the directory component in pathname does not exist. 4) mknod(2) returns -1 and sets errno to ENAMETOOLONG if the pathname component was too long. 5) mknod(2) returns -1 and sets errno to ENOTDIR if the directory component in pathname is not a directory. Verify that, 1) mknod(2) returns -1 and sets errno to EPERM if the process id of the caller is not super-user. 2) mknod(2) returns -1 and sets errno to EACCES if parent directory does not allow write permission to the process. Verify that mknod(2) succeeds when used to create a filesystem node on a directory without set group-ID bit set. The node created should not have set group-ID bit set and its gid should be equal to that of its parent directory. Basic test for access(2) using F_OK, R_OK, W_OK, and X_OK arguments. Verify that access() succeeds to check the read/write/execute permissions on a file if the mode argument passed was R_OK/W_OK/X_OK. Also verify that, access() succeeds to test the accessibility of the file referred to by symbolic link if the pathname points to a symbolic link. EFAULT error testing for access(2). Verify that, 1. access() fails with -1 return value and sets errno to EACCES if the permission bits of the file mode do not permit the requested (Read/Write/Execute) access. 2. access() fails with -1 return value and sets errno to EINVAL if the specified access mode argument is invalid. 3. access() fails with -1 return value and sets errno to EFAULT if the pathname points outside allocate address space for the process. 4. access() fails with -1 return value and sets errno to ENOENT if the specified file doesn't exist (or pathname is NULL). 5. access() fails with -1 return value and sets errno to ENAMETOOLONG if the pathname size is > PATH_MAX characters. Verify that access() succeeds to check the existence of a file if search access is permitted on the pathname of the specified file. EFAULT error testing for access(2). Testcase to check the whether chroot sets errno to EPERM. Test functionality of chroot(2) Testcase to test whether chroot(2) sets errno correctly. This tool can be used to beat on system or named pipes. See the help() function below for user information. Testcase to check the basic functionality of the pipe(2) syscall: Check that both ends of the pipe (both file descriptors) are available to a process opening the pipe. Check what happens when pipe is passed a bad file descriptor. Check what happens when the system runs out of pipes. Check that a SIGPIPE signal is generated when a write is attempted on an empty pipe. Check that two processes can use the same pipe at the same time. Check that parent can open a pipe and have a child read from it Check if many children can read what is written to a pipe by the parent. Creates a semaphore and two processes. The processes each go through a loop where they semdown, delay for a random amount of time, and semup, so they will almost always be fighting for control of the semaphore. The application creates several threads using pthread_create(). One thread performs a semop() with the SEM_UNDO flag set. The change in semaphore value performed by that semop should be "undone" only when the last pthread exits. test the 10 possible semctl() commands test for EACCES error test for EINVAL and EFAULT errors test for EPERM error test for ERANGE error test that semget() correctly creates a semaphore set test for EACCES and EEXIST errors test for ENOENT error test for ENOSPC error test for EINVAL error test that semop() basic functionality is correct test for E2BIG, EACCES, EFAULT and EINVAL errors test for EFBIG error test for EAGAIN error test for EINTR and EIDRM errors create a message queue, then issue the IPC_STAT command and RMID commands to test the functionality create a message queue, then issue the IPC_SET command to lower the msg_qbytes value. create a message queue, then issue the IPC_RMID command test for EACCES, EFAULT and EINVAL errors using a variety of incorrect calls. test for EPERM error create a message queue, write a message to it and read it back. test for EEXIST and ENOENT errors test for an ENOSPC error by using up all available message queues. test for an EACCES error by creating a message queue with no read or write permission and then attempting to access it with various permissions. test that msgrcv() receives the expected message test for EACCES and EFAULT errors test for EINVAL error test for E2BIG and ENOMSG errors test for EINTR error test for EIDRM error test that msgsnd() enqueues a message correctly test for EACCES and EFAULT errors test for EINVAL error test for EAGAIN error test for EINTR error test for EIDRM error test that shmat() works correctly check for EINVAL and EACCES errors test for EACCES error test the IPC_STAT, IPC_SET and IPC_RMID commands as they are used with shmctl() check for EACCES, EFAULT and EINVAL errors check for EACCES, and EPERM errors check that shared memory is detached correctly check for EINVAL error test that shmget() correctly creates a shared memory segment check for ENOENT, EEXIST and EINVAL errors test for ENOSPC error test for EACCES error test for EACCES error Creates files and opens simultaneously Open a file with oflag = O_CREAT set, does it set the sticky bit off? Open "/tmp" with O_DIRECTORY, does it set the S_IFDIR bit on? Test if open without O_CREAT returns -1 if a file does not exist. Basic test for open(2) Testcase to check that open(2) sets EMFILE if a process opens files more than its descriptor size Testcase to check open(2) sets errno to EACCES correctly. Testcase to check open(2) sets errno to ENXIO correctly. Test the open(2) system call to ensure that it sets ELOOP correctly. Check for the following errors: 1. EEXIST 2. EISDIR 3. ENOTDIR 4. ENAMETOOLONG 5. EFAULT 6. ETXTBSY Creates files and opens simultaneously Check proper operation of chdir(): tests whether the system call can it change the current, working directory, and find a file there? Will it fail on a non-directory entry ? Basic test for chdir(2). Testcase for testing that chdir(2) sets EACCES errno Testcase to test whether chdir(2) sets errno correctly. Verify that, chmod(2) succeeds when used to change the mode permissions of a file. Basic test for chmod(2). Verify that, chmod(2) will succeed to change the mode of a file and set the sticky bit on it if invoked by non-root (uid != 0) process with the following constraints, - the process is the owner of the file. - the effective group ID or one of the supplementary group ID's of the process is equal to the group ID of the file. Verify that, chmod(2) will succeed to change the mode of a directory and set the sticky bit on it if invoked by non-root (uid != 0) process with the following constraints, - the process is the owner of the directory. - the effective group ID or one of the supplementary group ID's of the process is equal to the group ID of the directory. Verify that, chmod(2) will succeed to change the mode of a directory but fails to set the setgid bit on it if invoked by non-root (uid != 0) process with the following constraints, - the process is the owner of the directory. - the effective group ID or one of the supplementary group ID's of the process is not equal to the group ID of the directory. Verify that, 1) chmod(2) returns -1 and sets errno to EPERM if the effective user id of process does not match the owner of the file and the process is not super user. 2) chmod(2) returns -1 and sets errno to EACCES if search permission is denied on a component of the path prefix. 3) chmod(2) returns -1 and sets errno to EFAULT if pathname points outside user's accessible address space. 4) chmod(2) returns -1 and sets errno to ENAMETOOLONG if the pathname component is too long. 5) chmod(2) returns -1 and sets errno to ENOTDIR if the directory component in pathname is not a directory. 6) chmod(2) returns -1 and sets errno to ENOENT if the specified file does not exists. Verify that, chmod(2) will succeed to change the mode of a file/directory and sets the sticky bit on it if invoked by root (uid = 0) process with the following constraints, - the process is not the owner of the file/directory. - the effective group ID or one of the supplementary group ID's of the process is equal to the group ID of the file/directory. Basic test for chown(2). Verify that, when chown(2) invoked by super-user to change the owner and group of a file specified by path to any numeric owner(uid)/group(gid) values, - clears setuid and setgid bits set on an executable file. - preserves setgid bit set on a non-group-executable file. Verify that, chown(2) succeeds to change the group of a file specified by path when called by non-root user with the following constraints, - euid of the process is equal to the owner of the file. - the intended gid is either egid, or one of the supplementary gids of the process. Also, verify that chown() clears the setuid/setgid bits set on the file. Verify that, 1) chown(2) returns -1 and sets errno to EPERM if the effective user id of process does not match the owner of the file and the process is not super user. 2) chown(2) returns -1 and sets errno to EACCES if search permission is denied on a component of the path prefix. 3) chown(2) returns -1 and sets errno to EFAULT if pathname points outside user's accessible address space. 4) chown(2) returns -1 and sets errno to ENAMETOOLONG if the pathname component is too long. 5) chown(2) returns -1 and sets errno to ENOTDIR if the directory component in pathname is not a directory. 6) chown(2) returns -1 and sets errno to ENOENT if the specified file does not exists. Verify that, chown(2) succeeds to change the owner and group of a file specified by path to any numeric owner(uid)/group(gid) values when invoked by super-user. Test that closing a regular file and a pipe works correctly Check that an invalid file descriptor returns EBADF Basic test for close(2). create a directory and cd into it. try to cd into a bad directory (bad fd). Basic test for Fchmod(2). Verify that, fchmod(2) will succeed to change the mode of a file/directory set the sticky bit on it if invoked by root (uid = 0) process with the following constraints, - the process is not the owner of the file/directory. - the effective group ID or one of the supplementary group ID's of the process is equal to the group ID of the file/directory. Verify that, fchmod(2) will succeed to change the mode of a file and set the sticky bit on it if invoked by non-root (uid != 0) process with the following constraints, - the process is the owner of the file. - the effective group ID or one of the supplementary group ID's of the process is equal to the group ID of the file. Verify that, fchmod(2) will succeed to change the mode of a directory and set the sticky bit on it if invoked by non-root (uid != 0) process with the following constraints, - the process is the owner of the directory. - the effective group ID or one of the supplementary group ID's of the process is equal to the group ID of the directory. Verify that, fchmod(2) will succeed to change the mode of a directory but fails to set the setgid bit on it if invoked by non-root (uid != 0) process with the following constraints, - the process is the owner of the directory. - the effective group ID or one of the supplementary group ID's of the process is not equal to the group ID of the directory. Verify that, 1) fchmod(2) returns -1 and sets errno to EPERM if the effective user id of process does not match the owner of the file and the process is not super user. 2) fchmod(2) returns -1 and sets errno to EBADF if the file descriptor of the specified file is not valid. Verify that, fchmod(2) succeeds when used to change the mode permissions of a file specified by file descriptor. Basic test for fchown(2). Verify that, when fchown(2) invoked by super-user to change the owner and group of a file specified by file descriptor to any numeric owner(uid)/group(gid) values, - clears setuid and setgid bits set on an executable file. - preserves setgid bit set on a non-group-executable file. Verify that, fchown(2) succeeds to change the group of a file specified by path when called by non-root user with the following constraints, - euid of the process is equal to the owner of the file. - the intended gid is either egid, or one of the supplementary gids of the process. Also, verify that fchown() clears the setuid/setgid bits set on the file. Verify that, 1) fchown(2) returns -1 and sets errno to EPERM if the effective user id of process does not match the owner of the file and the process is not super user. 2) fchown(2) returns -1 and sets errno to EBADF if the file descriptor of the specified file is not valid. Verify that, fchown(2) succeeds to change the owner and group of a file specified by file descriptor to any numeric owner(uid)/group(gid) values when invoked by super-user. Verify that, lchown(2) succeeds to change the owner and group of a file specified by path to any numeric owner(uid)/group(gid) values when invoked by super-user. Verify that, 1) lchown(2) returns -1 and sets errno to EPERM if the effective user id of process does not match the owner of the file and the process is not super user. 2) lchown(2) returns -1 and sets errno to EACCES if search permission is denied on a component of the path prefix. 3) lchown(2) returns -1 and sets errno to EFAULT if pathname points outside user's accessible address space. 4) lchown(2) returns -1 and sets errno to ENAMETOOLONG if the pathname component is too long. 5) lchown(2) returns -1 and sets errno to ENOTDIR if the directory component in pathname is not a directory. 6) lchown(2) returns -1 and sets errno to ENOENT if the specified file does not exists. Testcase to check the basic functionality of the creat(2) system call. Testcase to check whether the sticky bit cleared. Testcase to check creat(2) fails with EACCES Testcase to check that creat(2) system call returns EMFILE. Testcase to check creat(2) sets the following errnos correctly: 1. EISDIR 2. ENAMETOOLONG 3. ENOENT 4. ENOTDIR 5. EFAULT 6. EACCES Testcase to check creat(2) sets the following errnos correctly: 1. ETXTBSY Basic test for creat(2) using 0700 argument. Verify that, truncate(2) succeeds to truncate a file to a specified length. Verify that, truncate(2) succeeds to truncate a file to a certain length, but the attempt to read past the truncated length will fail. Verify that, 1) truncate(2) returns -1 and sets errno to EACCES if search/write permission denied for the process on the component of the path prefix or named file. 2) truncate(2) returns -1 and sets errno to ENOTDIR if the component of the path prefix is not a directory. 3) truncate(2) returns -1 and sets errno to EFAULT if pathname points outside user's accessible address space. 4) truncate(2) returns -1 and sets errno to ENAMETOOLONG if the component of a pathname exceeded 255 characters or entire pathname exceeds 1023 characters. 5) truncate(2) returns -1 and sets errno to ENOENT if the named file does not exist. Verify that, ftruncate(2) succeeds to truncate a file to a specified length if the file indicated by file descriptor opened for writing. Verify that, ftruncate(2) succeeds to truncate a file to a certain length, but the attempt to read past the truncated length will fail. Verify that, 1) ftruncate(2) returns -1 and sets errno to EINVAL if the specified truncate length is less than 0. 2) ftruncate(2) returns -1 and sets errno to EBADF if the file descriptor of the specified file is not valid. Check the return value, and errno of vhangup(2) when a non-root user calls vhangup(). To test the basic functionality of vhangup(2) This program will grow a list of files. Each file will grow by grow_incr before the same file grows twice. Each file is open and closed before next file is opened. Testcase to check the basic functionality of the pipe(2) syscall: Check that both ends of the pipe (both file descriptors) are available to a process opening the pipe. Check what happens when pipe is passed a bad file descriptor. Check what happens when the system runs out of pipes. Check that a SIGPIPE signal is generated when a write is attempted on an empty pipe. Check that two processes can use the same pipe at the same time. Check that parent can open a pipe and have a child read from it Check if many children can read what is written to a pipe by the parent. This tool can be used to beat on system or named pipes. See the help() function below for user information. /ipc_stress/message_queue_test_01.c /ipc_stress/pipe_test_01.c /ipc_stress/semaphore_test_01.c /ipc_stress/single_test_01.c Recursively reads all files within /proc filesystem. The purpose of this test is to verify the file size limitations of a filesystem. It writes one buffer at a time and lseeks from the beginning of the file to the end of the last write position. The intent is to test lseek64. Verify that, llseek() call succeeds to set the file pointer position to an offset larger than file size. Also, verify that any attempt to write to this location fails. Verify that, 1. llseek() returns -1 and sets errno to EINVAL, if the 'Whence' argument is not a proper value. 2. llseek() returns -1 and sets errno to EBADF, if the file handle of the specified file is not valid. Basic test for lseek(2) Negative test for lseek(2) Negative test for lseek(2) whence Negative test for lseek(2) of a fifo Negative test for lseek(2) of a pipe Verify that, lseek() call succeeds to set the file pointer position to less than or equal to the file size, when a file is opened for read or write. Verify that, lseek() call succeeds to set the file pointer position to more than the file size, when a file is opened for reading/writing. Verify that, lseek() call succeeds to set the file pointer position to the end of the file when 'whence' value set to SEEK_END and any attempts to read from that position should fail. Verify that, lseek() call succeeds to set the file pointer position to the current specified location, when 'whence' value is set to SEEK_CUR and the data read from the specified location should match the expected data. Verify that, 1. lseek() returns -1 and sets errno to ESPIPE, if the file handle of the specified file is associated with a pipe, socket, or FIFO. 2. lseek() returns -1 and sets errno to EINVAL, if the 'Whence' argument is not a proper value. 3. lseek() returns -1 and sets errno to EBADF, if the file handle of the specified file is not valid. A wrapper for doio and iogen. a general purpose io initiator with system call and write logging. See doio.h for the structure which defines what doio requests should look like. Currently doio can handle read,write,reada,writea,ssread, sswrite, and many varieties of listio requests. For disk io, if the O_SSD flag is set doio will allocate the appropriate amount of ssd and do the transfer - thus, doio can handle all of the primitive types of file io. A tool for generating file/sds io for a doio process Verify the functionality of pread() by writing known data using pwrite() to the file at various specified offsets and later read from the file from various specified offsets, comparing the data read against the data written. Verify that, 1) pread() fails when attempted to read from an unnamed pipe. 2) pread() fails if the specified offset position was invalid. Verify the functionality of pwrite() by writing known data using pwrite() to the file at various specified offsets and later read from the file from various specified offsets, comparing the data written against the data read using read(). Verify that, 1) pwrite() fails when attempted to write to an unnamed pipe. 2) pwrite() fails if the specified offset position was invalid. Basic test for the read(2) system call test 1: Does read return -1 if file descriptor is not valid, check for EBADF test 2: Check if read sets EISDIR, if the fd refers to a directory test 3: Check if read sets EFAULT, if buf is -1. Testcase to check that read() sets errno to EAGAIN Testcase to check if read returns the number of bytes read correctly. Testcase to check the basic functionality of the readv(2) system call. Testcase to check the error conditions of the readv(2) system call. Basic test for write(2) system call. Basic functionality test: does the return from write match the count of the number of bytes written. Testcase to check that write(2) doesn't corrupt a file when it fails Testcase to check that write() sets errno to EAGAIN Check the return value, and errnos of write(2) - when the file descriptor is invalid - EBADF - when the buf parameter is invalid - EFAULT - on an attempt to write to a pipe that is not open for reading - EPIPE Testcase to check the basic functionality of writev(2) system call. In these testcases, writev() is called with partially valid data to be written in a sparse file. The testcases are written calling writev() with partially valid data to overwrite the contents, to write in the beginning and to write in the end of the file. The testcases are written calling writev() with partially valid data to overwrite the contents, to write in the beginning and to write in the end of the file. This is same as writev03, but the length of buffer used here is 8192 bytes. These testcases are written to test writev() on sparse files. This is same as writev02. But the initial write() with valid data is done at the beginning of the file. Does repeated accesses to a filespec and optionally writes to, reads from, and verifies the data. By default, disktest makes assumptions about the running environment which allows for a quick start of IO generation. However, Disktest has a large number of command line options which can be used to adapt the test for a variety of uses including data integrity, medium integrity, performance, and simple application simulation. get a directory entry check that we get a failure with a bad file descriptor check for an EINVAL error check for an ENOTDIR error check that we get a failure with a bad dirp address. Spawn creates a tree of processes with Dval depth and Bval breadth. Each parent will spawn Bval children. Each child will store information about themselves in shared memory. The leaf nodes will communicate the existence of one another through message queues, once each leaf node has received communication from all of her siblings she will reduce the semaphore count and exit. Meanwhile all parents are waiting to hear from their children through the use of semaphores. When the semaphore count reaches zero then the parent knows all the children have talked to one another. Locking of the connter semaphore is provided by the use of another (binary) semaphore. Exports required environment variables and runs sched_driver This program uses system calls to change the priorities of the throughput measurement testcases. When real-time is in effect, priorities 50 through 64 are used. (MAX_PRI and MIN_PRI) When user-time (normal) is in effect, 0-14 (corresponding to nice() calls) is used. The driver only keeps track of values from 50 to 64, and the testcases will scale them down to 0 to 14 when needed, to change the priority of a user-time process. This programme will determine the context switch (scheduling) overhead on a system. It takes into account SMP machines. True context switches are measured. This utility spawns N tasks, each task sets its priority by making a system call to the scheduler. The thread function reads the priority that the scheduler sets for this task and also reads from /proc the processor this task last executed on the information that is gathered by the thread function may be in real-time. Its only an approximation. Testcase to check sched_getscheduler() returns correct return value To check for the errno ESRCH Testcase to test whether sched_setscheduler(2) sets the errnos correctly. Testcase to test whether sched_setscheduler(2) sets the errnos correctly. Testcase to check that sched_yield returns correct values. Verify that root can provide a negative value to nice() and hence root can decrease the nice value of the process using nice() system call Verify that any user can successfully increase the nice value of the process by passing a higher increment value (> max. applicable limits) to nice() system call. Verify that any user can successfully increase the nice value of the process by passing an increment value (< max. applicable limits) to nice() system call. Verify that, nice(2) fails when, a non-root user attempts to increase the priority of a process by specifying a negative increment value. Basic test for nice(2) Verify that valid open file descriptor must be provided to poll() to succeed. Basic test for the select(2) system call to a fd of regular file with no I/O and small timeout Basic test for the select(2) system call to fd of system pipe with no I/O and small timeout Basic test for the select(2) system call to fd of a named-pipe (FIFO) Verify that select(2) returns immediately (does not block) if the timeout value is zero. Verify that select(2) fails when one or more of the file descriptor sets specify a file descriptor which is not valid. Verify that select(2) fails when a signal is delivered before any of the selected events occur and before the timeout interval expires. Verify that select(2) fails when an invalid timeout interval is specified. Verify the functionality of select(2) by passing non-null writefds which points to a regular file, pipes or FIFO's. Verify the functionality of select(2) by passing non-null readfds which points to a regular file, pipes or FIFO's. Verify that a successful call to select() shall return the desired number of modified descriptors for which bits are set in the bit masks, where descriptors points to a regular file, pipes or FIFO's. Creates a semaphore and two processes. The processes each go through a loop where they semdown, delay for a random amount of time, and semup, so they will almost always be fighting for control of the semaphore. The application creates several threads using pthread_create(). One thread performs a semop() with the SEM_UNDO flag set. The change in semaphore value performed by that semop should be "undone" only when the last pthread exits. test the 10 possible semctl() commands test for EACCES error test for EINVAL and EFAULT errors test for EPERM error test for ERANGE error test that semget() correctly creates a semaphore set test for EACCES and EEXIST errors test for ENOENT error test for ENOSPC error test for EINVAL error test that semop() basic functionality is correct test for E2BIG, EACCES, EFAULT and EINVAL errors test for EFBIG error test for EAGAIN error test for EINTR and EIDRM errors test that shmat() works correctly check for EINVAL and EACCES errors test for EACCES error test the IPC_STAT, IPC_SET and IPC_RMID commands as they are used with shmctl() check for EACCES, EFAULT and EINVAL errors check for EACCES, and EPERM errors check that shared memory is detached correctly check for EINVAL error test that shmget() correctly creates a shared memory segment check for ENOENT, EEXIST and EINVAL errors test for ENOSPC error test for EACCES error test for EACCES error Test the LINUX memory manager. The program is aimed at stressing the memory manager by repeated shmat/write/read/ shmatd of file/memory of random size (maximum 1000 * 4096) done by multiple processes. This program is designed to stress the Memory management sub - system of Linux. This program will spawn multiple pairs of reader and writer threads. One thread will create the shared segment of random size and write to this memory, the other pair will read from this memory. Test some features of sigaction (see below for more details) Testcase to check the basic errnos set by the sigaction(2) syscall. Send a signal using the main stack. While executing the signal handler compare a variable's address lying on the main stack with the stack boundaries returned by sigaltstack(). Verify that, 1. sigaltstack() fails and sets errno to EINVAL when "ss_flags" field pointed to by 'ss' contains invalid flags. 2. sigaltstack() fails and sets errno to ENOMEM when the size of alternate stack area is less than MINSIGSTKSZ. Basic test for the sighold02(2) system call. set the signal handler to our own function Test that we get an error using illegal signals Boundary value and other invalid value checking of signal setup and signal sending. restore signals to default behavior set signals to be ignored Verify that sigprocmask() succeeds to examine and change the calling process's signal mask. Also, verify that sigpending() succeeds to store signal mask that are blocked from delivery and pending for the calling process. Basic test for the sigrelse(2) system call. Verify that sigsuspend() succeeds to change process's current signal mask with the specified signal mask and suspends the process execution until the delivery of a signal. Test case to check the basic functionality of kill(). Sending a signal to processes with the same process group ID Test case to check that kill fails when given an invalid signal. Test case to check that kill() fails when passed a non-existent pid. Test case to check that kill() fails when passed a pid owned by another user. Test case to check the basic functionality of kill() when killing an entire process group with a negative pid. Test case to check that SIGKILL can not be caught. Test case to check the basic functionality of kill() when kill an entire process group. Basic test for kill(2) Signal flooding test. mallocs memory <chunksize> at a time until malloc fails. This program is designed to stress the VMM by doing repeated */ mallocs and frees, with out using the swap space. This is */ achieved by spawning N threads with repeatedly malloc and free*/ a memory of size M. The stress can be increased by increasing */ the number of repetitions over the default number using the */ -l [num] option. Sender: Read contents of data file. Write each line to socket, then read line back from socket and write to standard output. Receiver: Read a stream socket one line at a time and write each line back to the sender. Usage: pthcli [port number] Verify that socket() returns the proper errno for various failure cases Verify that socketpair() returns the proper errno for various failure cases Verify that ioctl() on sockets returns the proper errno for various failure cases Verify that connect() returns the proper errno for various failure cases Verify that getpeername() returns the proper errno for various failure cases Verify that getsockname() returns the proper errno for various failure cases Verify that getsockopt() returns the proper errno for various failure cases Verify that listen() returns the proper errno for various failure cases Verify that accept() returns the proper errno for various failure cases Verify that bind() returns the proper errno for various failure cases Verify that recv() returns the proper errno for various failure cases Verify that recvfrom() returns the proper errno for various failure cases Verify that recvmsg() returns the proper errno for various failure cases Verify that send() returns the proper errno for various failure cases Verify that sendmsg() returns the proper errno for various failure cases Verify that sendto() returns the proper errno for various failure cases Verify that setsockopt() returns the proper errno for various failure cases Basic test for fstat(2) Verify that, fstat(2) succeeds to get the status of a file and fills the stat structure elements though file pointed to by file descriptor not opened for reading. Verify that, fstat(2) returns -1 and sets errno to EBADF if the file pointed to by file descriptor is not valid. Verify that, fstat(2) succeeds to get the status of a file pointed by file descriptor and fills the stat structure elements. Basic test for fstatfs(2) Testcase to check fstatfs() sets errno correctly. Verify that, lstat(2) succeeds to get the status of a file pointed to by symlink and fills the stat structure elements. Basic test for lstat(2) Verify that, 1) lstat(2) returns -1 and sets errno to EACCES if search permission is denied on a component of the path prefix. 2) lstat(2) returns -1 and sets errno to ENOENT if the specified file does not exists or empty string. 3) lstat(2) returns -1 and sets errno to EFAULT if pathname points outside user's accessible address space. 4) lstat(2) returns -1 and sets errno to ENAMETOOLONG if the pathname component is too long. 5) lstat(2) returns -1 and sets errno to ENOTDIR if the directory component in pathname is not a directory. Verify that, stat(2) succeeds to get the status of a file and fills the stat structure elements. Verify that, stat(2) succeeds to get the status of a file and fills the stat structure elements though process doesn't have read access to the file. Verify that, 1) stat(2) returns -1 and sets errno to EACCES if search permission is denied on a component of the path prefix. 2) stat(2) returns -1 and sets errno to ENOENT if the specified file does not exists or empty string. 3) stat(2) returns -1 and sets errno to EFAULT if pathname points outside user's accessible address space. 4) stat(2) returns -1 and sets errno to ENAMETOOLONG if the pathname component is too long. 5) stat(2) returns -1 and sets errno to ENOTDIR if the directory component in pathname is not a directory. Basic test for the stat05(2) system call. Basic test for the statfs(2) system call. Testcase to check that statfs(2) sets errno correctly. Basic test for the read(2) system call test 1: Does read return -1 if file descriptor is not valid, check for EBADF test 2: Check if read sets EISDIR, if the fd refers to a directory test 3: Check if read sets EFAULT, if buf is -1. Testcase to check that read() sets errno to EAGAIN Testcase to check if read returns the number of bytes read correctly. Basic test for the umask(2) system call. Check that umask changes the mask, and that the previous value of the mask is returned correctly for each value. Check that umask changes the mask, and that the previous value of the mask is returned correctly for each value. Getgroups system call critical test Basic test for getgroups(2) Verify that, getgroups() system call gets the supplementary group IDs of the calling process. Verify that, getgroups() fails with -1 and sets errno to EINVAL if the size argument value is -ve. Basic test for gethostname(2) Testcase to check the basic functionality of getpgid(). Testcase to check the basic functionality of getpgid(). Basic test for getpgrp(2) Verify that getpriority() succeeds get the scheduling priority of the current process, process group or user. Verify that, 1) getpriority() sets errno to ESRCH if no process was located was located for 'which' and 'who' arguments. 2) getpriority() sets errno to EINVAL if 'which' argument was not one of PRIO_PROCESS, PRIO_PGRP, or PRIO_USER. Verify that getresgid() will be successful to get the real, effective and saved user id of the calling process. Verify that getresgid() will be successful to get the real, effective and saved user ids after calling process invokes setregid() to change the effective/saved gids to that of specified user. Verify that getresgid() will be successful to get the real, effective and saved user ids after calling process invokes setresgid() to change the effective gid to that of specified user. Verify that getresuid() will be successful to get the real, effective and saved user id of the calling process. Verify that getresuid() will be successful to get the real, effective and saved user ids after calling process invokes setreuid() to change the effective/saved uids to that of specified user. Verify that getresuid() will be successful to get the real, effective and saved user ids after calling process invokes setresuid() to change the effective uid to that of specified user. call getsid() and make sure it succeeds call getsid() with an invalid PID to produce a failure Testcase to check the basic functionality of setfsgid(2) system call. Testcase to test the basic functionality of the setfsuid(2) system call. Basic test for the setgid(2) system call. Testcase to ensure that the setgid() system call sets errno to EPERM Basic test for the setgroups(2) system call. Verify that, 1. setgroups() fails with -1 and sets errno to EINVAL if the size argument value is > NGROUPS 2. setgroups() fails with -1 and sets errno to EPERM if the calling process is not super-user. Verify that, only root process can invoke setgroups() system call to set the supplementary group IDs of the process. Basic test for setpgid(2) system call. Testcase to check that setpgid() sets errno correctly. Test to check the error and trivial conditions in setpgid system call set the priority for the test process lower. test for an expected failure by trying to raise the priority for the test process while not having permissions to do so. test for an expected failure by using an invalid PRIO value setpriority04 test for an expected failure by using an invalid process id test for an expected failure by trying to change a process with an ID that is different from the test process Basic test for the setregid(2) system call. Test that setregid() fails and sets the proper errno values when a non-root user attempts to change the real or effective group id to a value other than the current gid or the current effective gid. Test setregid() when executed by a non-root user. Test setregid() when executed by root. Test setresuid() when executed by root. Test that a non-root user can change the real, effective and saved uid values through the setresuid system call. Test that the setresuid system call sets the proper errno values when a non-root user attempts to change the real, effective or saved uid to a value other than one of the current uid, the current effective uid of the current saved uid. Also verify that setresuid fails if an invalid uid value is given. Basic test for the setreuid(2) system call. Test setreuid() when executed by root. Test setreuid() when executed by an unprivileged user. Test that root can change the real and effective uid to an unprivileged user. Test the setreuid() feature, verifying the role of the saved-set-uid and setreuid's effect on it. Test that EINVAL is set when setreuid is given an invalid user id. Testcase to check the basic functionality of the setrlimit system call. Testcase to test the different errnos set by setrlimit(2) system call. Test for EPERM when the super-user tries to increase RLIMIT_NOFILE beyond the system limit. Test to check the error and trivial conditions in setsid system call Basic test for the setuid(2) system call. Basic test for the setuid(2) system call as root. Test to check the error and trivial conditions in setuid Regression test for Linux filesystem permissions. Basic test for the uname(2) system call. Call uname() with an invalid address to produce a failure Call uname() and make sure it succeeds Testcase for testing the basic functionality of sysctl(2) system call. This testcase attempts to read the kernel parameters using sysctl({CTL_KERN, KERN_ }, ...) and compares it with the known values. Testcase to check that sysctl(2) sets errno to EPERM correctly. Testcase to check that sysctl(2) sets errno to ENOTDIR Testcase to check that sysctl(2) sets errno to EFAULT Basic test for the time(2) system call. Verify that time(2) returns the value of time in seconds since the Epoch and stores this value in the memory pointed to by the parameter. Basic test for the times(2) system call. Testcase to test that times() sets errno correctly Testcase to check the basic functionality of the times() system call. Verify that the system call utime() successfully sets the modification and access times of a file to the current time, if the times argument is null, and the user ID of the process is "root". Verify that the system call utime() successfully sets the modification and access times of a file to the current time, under the following constraints, - The times argument is null. - The user ID of the process is not "root". - The file is owned by the user ID of the process. Verify that the system call utime() successfully sets the modification and access times of a file to the current time, under the following constraints, - The times argument is null. - The user ID of the process is not "root". - The file is not owned by the user ID of the process. - The user ID of the process has write access to the file. Verify that the system call utime() successfully sets the modification and access times of a file to the time specified by times argument, if the times argument is not null, and the user ID of the process is "root". Verify that the system call utime() successfully sets the modification and access times of a file to the value specified by the times argument under the following constraints, - The times argument is not null, - The user ID of the process is not "root". - The file is owned by the user ID of the process. 1. Verify that the system call utime() fails to set the modification and access times of a file to the current time, under the following constraints, - The times argument is null. - The user ID of the process is not "root". - The file is not owned by the user ID of the process. - The user ID of the process does not have write access to the file. 2. Verify that the system call utime() fails to set the modification and access times of a file if the specified file doesn't exist. Testcase to check the basic functionality of settimeofday(). Testcase to check that settimeofday() sets errnos correctly. Verify that the system call stime() successfully sets the system's idea of data and time if invoked by "root" user. Verify that the system call stime() fails to set the system's idea of data and time if invoked by "non-root" user. Testcase to check that gettimeofday(2) sets errno to EFAULT. Basic test for alarm(2). Boundary Value Test for alarm(2). Alarm(2) cleared by a fork. Check that when an alarm request is made, the signal SIGALRM is received even after the process has done an exec(). Check the functionality of the Alarm system call when the time input parameter is non zero. Check the functionality of the Alarm system call when the time input parameter is zero. Check the functionality of the alarm() when the time input parameter is non-zero and the process does a fork. Basic test for getegid(2) Basic test for geteuid(2) Basic test for getgid(2) Testcase to check the basic functionality of getgid(). Testcase to check the basic functionality of getegid(). Basic test for getpid(2) Verify that getpid() system call gets the process ID of the of the calling process. Testcase to check the basic functionality of the getppid() syscall. Basic test for getuid(2) Testcase to check the basic functionality of the geteuid() system call. Testcase to check the basic functionality of the getuid() system call. Verify that nanosleep() will be successful to suspend the execution of a process for a specified time. Verify that nanosleep() will be successful to suspend the execution of a process, returns after the receipt of a signal and writes the remaining sleep time into the structure. Verify that nanosleep() will fail to suspend the execution of a process for a specified time if interrupted by a non-blocked signal. Verify that nanosleep() will fail to suspend the execution of a process if the specified pause time is invalid. debian/compat0000644000000000000000000000000212246404704010367 0ustar 9 debian/changelog0000644000000000000000000001136312246410355011046 0ustar lcov (1.10-1) unstable; urgency=low [Alastair McKinstry] * New upstream release. Closes: #699426. * Standards-Version: 3.9.5 * DH_COMPAT=9 now. * Add watch file. [Zack Weinberg] * Refresh debian/patches: - recursion.patch: Applied upstream (closes: #588322) - three-arg-open.patch: Applied upstream. - genhtml_missing_file.patch: Fixed differently upstream (closes: #578751) - utf8-output.patch: Fixed differently upstream (closes #590562) - gcc-compat-4.7.patch: Fixed differently upstream. - perl-nocaps.patch: Partially applied upstream. * New local patch (handle-equals-signs.patch) for the floods of geninfo: Argument "=====" isn't numeric. errors that you can get when processing C++ with exception handlers. Closes: #699565. -- Alastair McKinstry Sat, 30 Nov 2013 15:51:29 +0000 lcov (1.9-3) unstable; urgency=low * Apply Fedora patches by Daniel Berrange, thanks to Michael Wild: - gcc-compat-4.7.patch: Fix compat with gcc 4.7 - three-arg-open.patch: Replace 2 argument open with 3 argument open * DH_COMPAT=8 now. * Check FTBFS now fixed: Closes: #647138. -- Alastair McKinstry Mon, 14 May 2012 13:42:56 +0100 lcov (1.9-2) unstable; urgency=low * Patch to change genhtml got overwritten by autogenerated debian-changes patch. Fixed. Closes: #5999932. -- Alastair McKinstry Fri, 15 Oct 2010 00:11:27 +0100 lcov (1.9-1) unstable; urgency=low * New upstream release. Closes: #599388, #413834. * Standards-Version: 3.9.1 * Patch from Enrico Zini for genhtml in missing source file case. Closes: #578571. * Patch from Guillem Jover for UTF-8. Closes: #590562. * PERL should be spelt "Perl". Closes: #589753. * Add Depends: on ${perl:Depends}, gcc; Recommends: libgd-gd2-perl -- Alastair McKinstry Fri, 08 Oct 2010 13:52:49 +0100 lcov (1.8-2) unstable; urgency=low * Pass --no-recursion flag to geninfo. Patch thanks to Guillem Jover. Closes: #588322. -- Alastair McKinstry Fri, 09 Jul 2010 12:04:20 +0100 lcov (1.8-1) unstable; urgency=low * New upstream release. Closes: #561111. * Standards-Version: 3.8.4. * Moved to debhelper 7 format , source format 3.0 * Added Homepage: to debian/control. -- Alastair McKinstry Tue, 02 Mar 2010 12:21:21 +0000 lcov (1.7-1) unstable; urgency=low * New upstream release: Closes: #478206. - libtool patch no longer required. * Move to Standards-Version: 3.8.1; no changes required. * Formatted Description better for web display. Closes: #480325. -- Alastair McKinstry Sat, 25 Apr 2009 14:00:15 +0100 lcov (1.6-1) unstable; urgency=low * New upstream version. Closes: #479206, #470072. - remove patch 10_gcov_tool, now implemented upstream. - remove patch 30_compat_libtool, now implemented upstream. -- Alastair McKinstry Tue, 29 Apr 2008 18:48:08 +0100 lcov (1.5-3) unstable; urgency=low * Move DH_COMPAT to debian/compat. * Move to Standards-Version: 3.7.3. No changes required. * debhelper needs to be in Build-Depends, not Build-Depends-Indep. -- Alastair McKinstry Mon, 17 Mar 2008 14:21:22 +0000 lcov (1.5-2) unstable; urgency=low * Add libtool compatability patch from CVS. Closes: #431397. -- Alastair McKinstry Sun, 09 Sep 2007 16:13:14 +0100 lcov (1.5-1) unstable; urgency=low * New upstream release. * Move to DH_COMPAT=5. No changes required. * Move to Standards-Version: 3.7.2. No changes required. -- Alastair McKinstry Tue, 12 Sep 2006 15:46:57 +0100 lcov (1.4-1) unstable; urgency=low * New upstream release 1.4. Closes: #293184. * Include lcov examples. * Add Section: devel to debian/control * Moved to Standards-Version: 3.6.2; no changes required. -- Alastair McKinstry Thu, 4 Aug 2005 21:16:04 +0100 lcov (1.3-4) unstable; urgency=low * Fix breakage for geninfo on C++ headers. Closes: #293184. * Allow option --gcov-tool to change which gcov we use. Closes: #293180. * Work with libtool'd libraries. Closes: #290476. -- Alastair McKinstry Sun, 13 Feb 2005 21:24:35 +0000 lcov (1.3-3) unstable; urgency=low * Depend on dbs, not cdbs: Closes: #253613. -- Alastair McKinstry Sat, 12 Jun 2004 19:34:00 +0100 lcov (1.3-2) unstable; urgency=low * Add dependency on cdbs. Closes: #253613. -- Alastair McKinstry Thu, 10 Jun 2004 19:57:45 +0100 lcov (1.3-1) unstable; urgency=low * Initial Release. -- Alastair McKinstry Wed, 19 May 2004 21:57:53 +0100 debian/copyright0000644000000000000000000000060211343202317011113 0ustar This package was debianized by Alastair McKinstry on Mon, 17 Jul 200s42 23:00:00 +0100. It was downloaded from http://ltp.sourceforge.net/coverage/lcov.php Copyright (c) International Business Machines Corp., 2002,2007 It may be redistributed under the terms of the GNU GPL, Version 2 found on Debian systems in the file /usr/share/common-licenses/GPL-2 .