On 22.9.2015 11:21, Oleg Fayans wrote: > Hi all, > > I've noticed that in some tests some low-level functions can return False in a > number of different conditions, which severely complicates test debugging. > This patch implements the approach widely used in the Go language (and maybe, > some other): The function returns not only a boolean, but a boolean plus any > error message caught during the execution. This error message may be used by > the higher level code for logging. For example, compare these outputs: > 1. AssertionError: Zone example.test. is not signed (master): request timed > out > 2. AssertionError: Zone example.test. is not signed (master) > > What do you think?
I'm not against this patch in principle but honestly, it seems as waste of time to me. E.g. a timeout can be caused by several different problems (LDAP down, KDC down, named down, firewall ...), the fact that the zone is not signed can be caused by different problems (time skew between replica and master, one of dnssec helpers does not work, LDAP replication is broken ...), and the error you are going to display can be very misleading. In all cases you have to try it using dig or drill and read logs to see what happened and why. (I did not test the patch because it would take too much time I do not have now.) -- Petr^2 Spacek -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code