Abhinandan Ekande wrote: > On 08/10/12 00:21, Danek Duvall wrote: > >t_pkgrepo.py: > > > > - line 1372: We only test both because the OS happens to test for the > > EINVAL condition before the EEXIST condition. It could go the other > > way around, and then we'd only be testing the EEXIST condition. > >>If multiple versions exists in repository for a package and if "pkgrepo > >>remove" is executed from package directory, then first error always will > >>be EINVAL. > >Is that dictated by anything other than the current implementation of the > >VFS or filesystem code? I don't know why you can rely on that. > > As per filesystem code the EINVAL will occur before EEXIST.
Right. My question is, is there any standard preventing the ZFS guys from going and reversing the order of the tests for whatever reason they feel like, thereby breaking our test, or is this error ordering defined somewhere? If it's not defined, then you need to be more careful. > Also what I meant by comment at line 1372 was that the removal > of [email protected] will verify both error code paths in rmdir() definition > in repository.py. I know what you meant, but it's not generally true, even if it happens to be true today for ZFS (or maybe today for all filesystems?). > In addition I have made changes to check for truck@2 after removing > [email protected], for example : > + # Verify truck@2 still exists in repo > + self.pkgrepo("list -s %s [email protected],5.11-0" % src_repo) I don't see how that helps. Danek _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
