php-src/ext/snmp/tests
Boris Lytochkin b448bb5e01 more tuning based on discussion in FR #40816:
* parse all OIDs earlier, detect all wrong OIDs before any query
   is made (GET-operations)
 * introduce ERRNO_MULTIPLE_SET_QUERIES:
    warn if request contains more OIDs than max_oids and SET operation
    (and type&value checks) will be done in chunks.
fix set method when request contains more OIDs than max_oids (2nd and
 subsequent chunk were ignored)
2011-08-31 08:28:13 +00:00
..
clean.inc
generic_timeout_error.phpt more code coverage 2011-08-20 14:50:49 +00:00
ipv6.phpt Adding IPv6 support (FR #42918) 2011-08-20 15:53:44 +00:00
README tune test's README more per FR #55474 2011-08-25 06:00:11 +00:00
skipif.inc
snmp2_get.phpt reformat OID parsing procedure, 2011-08-27 07:24:44 +00:00
snmp2_getnext.phpt
snmp2_real_walk.phpt
snmp2_set-nomib.phpt follow CS: 2011-03-20 20:07:33 +00:00
snmp2_set.phpt * fix warning about redefining REGISTER_PDO_CLASS_CONST_LONG (damn copy'n'paste) 2011-03-04 18:58:01 +00:00
snmp2_walk.phpt * tune snmp2_walk.phpt 2011-03-04 19:23:25 +00:00
snmp3-error.phpt more tuning based on discussion in FR #40816: 2011-08-31 08:28:13 +00:00
snmp3.phpt
snmp_get_quick_print.phpt
snmp_get_valueretrieval.phpt fix FR #54502: allow user to change OID value output mode when SNMP_VALUE_OBJECT is used. 2011-07-17 17:27:00 +00:00
snmp_getvalue.phpt fix FR #54502: allow user to change OID value output mode when SNMP_VALUE_OBJECT is used. 2011-07-17 17:27:00 +00:00
snmp_include.inc Adding IPv6 support (FR #42918) 2011-08-20 15:53:44 +00:00
snmp_read_mib.phpt
snmp_set_enum_print.phpt
snmp_set_oid_output_format.phpt
snmp-object-errno-errstr.phpt export ERRNO_OID_PARSING_ERROR constant: 2011-08-27 08:16:32 +00:00
snmp-object-error.phpt swap non_repeaters and max_repetitions in walk query, max_repetitions whould be used more frequently 2011-07-17 18:17:43 +00:00
snmp-object-properties.phpt s/noOIDIncreasingCheck/oid_increasing_check/ 2011-07-21 12:47:07 +00:00
snmp-object-setSecurity_error.phpt move SNMP VERSION constants into SNMP class itself 2011-06-12 11:58:49 +00:00
snmp-object.phpt more tuning based on discussion in FR #40816: 2011-08-31 08:28:13 +00:00
snmpd.conf apply docs fixes suggested in BR #55474 2011-08-23 19:13:49 +00:00
snmpget.phpt reformat OID parsing procedure, 2011-08-27 07:24:44 +00:00
snmpgetnext.phpt
snmprealwalk.phpt
snmpset-nomib.phpt follow CS: 2011-03-20 20:07:33 +00:00
snmpset.phpt
snmpwalk.phpt
wrong_hostname.phpt Adding IPv6 support (FR #42918) 2011-08-20 15:53:44 +00:00

SNMP Tests
----------

To enable these tests, you must have :
- PHP compiled with SNMP (--with-snmp)
- an SNMP server running.


** How to test **
You need to give credentials with environment vars if default ones are not
sutable (see snmp_include.inc for more info):
SNMP_HOSTNAME : IPv4 of remote SNMP agent
SNMP_HOSTNAME : IPv6 or remote SNMP agent
SNMP_PORT : SNMP port for queries
SNMP_COMMUNITY : community name
SNMP_COMMUNITY_WRITE : community used for write tests (snmpset()).
SNMP_MIBDIR : Directory containing MIBS

To run test suite you may use this command (presuming that you pwd is where
this README file is located):
> make -C ../../.. test TESTS="`cd ../../..; /bin/ls -1 ext/snmp/tests/*.phpt | xargs echo`"
Running run-tests.php directly will clear your environment and therefore
tests will fail if your SNMP configuration does not fit into default values
specified in snmp_include.inc.

** Configuring the SNMPD server **

On Linux/FreeBSD
--------

- Install package net-snmpd (name may differ based on your distribution).
- Replace config file (by default this is /etc/snmp/snmpd.conf on Linux and
  /usr/local/etc/snmp/snmpd.conf on FreeBSD) with snmpd.conf supplied.
  
Before launching daemon make sure that there is no file /var/net-snmp/snmpd.conf
Delete it if exists. Ingoring to to so will fail SNMPv3 tests.

- Launch snmpd (service snmpd start or /etc/init.d/snmpd start).
  Alternatively you can start snmpd daemon using following command line:
    sudo snmpd -C -c ./snmpd.conf -f -Le


On Windows
----------

[to be completed]