Skip to content
Snippets Groups Projects
Commit a257ebcd authored by Steven Murray's avatar Steven Murray
Browse files

bug #96536: rmlabelinfo() of tape/initlabel.c corrupts memory if called more than once

The ability to reserve drives from many DGNS was blocked by the previous
commit modifying the initlabelroutines() (SVN revision 24307).  This commit
adds the following two unit tests:

 Ctape_reserveTest::testCtape_reserveWithCountOf2
 Ctape_reserveTest::testCtape_reserveWith1DgnReservationWithDriveCountOf2

These two tests currently fail (test driven development). The first is a repeat
of trying to reserve drives from more than one DGN, though this time via a
different function Ctape_reservei().  The second and more important test is for
the case of using Ctape_reserve to try and reserve many drives from a single DGN.
In order to pass the unit-tests the Ctape_reserve() function needs to be
modified to return -1 and set serrno to EINVAL if either a DGN or a drive count
is anything other than 1.
parent d3deba6a
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment