Re: SNMP tests

From: Date: Sun, 25 Oct 2009 23:31:22 +0000
Subject: Re: SNMP tests
References: 1 2  Groups: php.qa 
Request: Send a blank email to php-qa+get-65417@lists.php.net to get a copy of this message
Hi ! This weekend, I created some tests for SNMP. This lead to several bug reports (http://bugs.php.net/bug.php?id=49990 ; http://bugs.php.net/bug.php?id=49992). Also, I noticed that in some functions, errors from the external SNMP lib are printed, but in some others functions, they are not (C function snmp_disable_stderrlog() called, for example in snmp_read_mib()). To my mind, this is a bug (behaviour should be the same for all PHP functions), but I would like your point of view before creating a bug report. IMO, we may have a php function 'snmp_last_error()' to retrieve last error from the snmp_lib. Else, no external errors should be printed. You can download my tests here: http://www.ajeux.com/phptests/snmptests.zip (compatible PHP6) All these tests lead to a code coverage of 80.1% ! http://www.ajeux.com/phptests/gcov/ext/snmp/ Some tests need adjustments (especially snmp3.phpt). There is no working test for snmpset function yet, because I need to tune my snmpd config file first ;) The whole package is not ready for commit, but any feedback is welcome. For the moment, there should be only 2 tests failing (snmp3.phpt and snmpset.phpt). By the way, I'm still waiting for my svn account ;) When I'll have it, I will commit my previous tests (IMAP) and these SNMP tests (with latest fixes). Olivier

« previous php.qa (#65417) next »