[Nagiosplug-devel] [Pkg-nagios-devel] Bug#392610: nagios-plugins-basic: check_jabber always return warning

Ton Voon ton.voon at altinity.com
Tue Jan 30 15:41:41 CET 2007


On 30 Jan 2007, at 14:23, Thomas Guyot-Sionnest wrote:

> Aww, that's definitely a bug. Why '-j' works but not '--jail' is a
> mistery for me though :/
>
> Ton, do you have any idea why -j worked but not --jail? Should we use
> all long options in "make test" scripts?

It's because of the two ways of specifying required arguments. The  
long options definition said (before your patch) that if argument is  
required. However, when using short options, getopt_long uses the  
string "+hVv46EH:s:e:q:m:c:w:t:p:C:W:d:Sr:jD:M:" which does not  
specify an argument (no colon after the j).

In tests, I vary between using short and long options. It is probably  
overkill to test every possible permutation, given this was a  
relatively small error.

Ton

http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon






More information about the Devel mailing list