--TEST-- Function snmpset --CREDITS-- Olivier Doucet Olivier Doucet Boris Lytochkin --SKIPIF-- --FILE-- --EXPECTF-- Check error handing No type & no value (timeout & retries instead) Warning: snmpset(): Bogus type '-1', should be single char, got 2 in %s on line %d bool(false) No value (timeout instead), retries instead of timeout Warning: snmpset(): Could not add variable: OID='%s' type='q' value='%i': Bad variable type ("q") in %s on line %d bool(false) Bogus OID Warning: snmpset(): Error in packet at '%s': (noSuchName) There is no such variable name in this MIB. in %s on line %d bool(false) Checking working Single OID bool(true) bool(true) bool(true) bool(true) Multiple OID bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Multiple OID, single type & value bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Multiple OID, single type, multiple value bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) More error handing Single OID, single type in array, single value Warning: snmpset(): Single objid and multiple type or values are not supported in %s on line %d bool(false) bool(true) bool(true) Single OID, single type, single value in array Warning: snmpset(): Single objid and multiple type or values are not supported in %s on line %d bool(false) bool(true) bool(true) Multiple OID, 1st wrong type Warning: snmpset(): '%s': bogus type 'sw', should be single char, got 2 in %s on line %d bool(false) bool(true) bool(true) Multiple OID, 2nd wrong type Warning: snmpset(): '%s': bogus type 'sb', should be single char, got 2 in %s on line %d bool(false) bool(true) bool(true) Multiple OID, single type in array, multiple value Warning: snmpset(): '%s': no type set in %s on line %d bool(false) bool(true) bool(true) Multiple OID & type, single value in array Warning: snmpset(): '%s': no value set in %s on line %d bool(false) bool(true) bool(true) Multiple OID, 1st bogus, single type, multiple value Warning: snmpset(): Error in packet at '%s': (noSuchName) There is no such variable name in this MIB. in %s on line %d bool(false) bool(true) bool(true) Multiple OID, 2nd bogus, single type, multiple value Warning: snmpset(): Error in packet at '%s': (noSuchName) There is no such variable name in this MIB. in %s on line %d bool(false) bool(true) bool(true) Multiple OID, single multiple type (1st bogus), multiple value Warning: snmpset(): Could not add variable: OID='%s' type='q' value='%s': Bad variable type ("q") in %s on line %d bool(false) bool(true) bool(true) Multiple OID, single multiple type (2nd bogus), multiple value Warning: snmpset(): Could not add variable: OID='%s' type='w' value='%s': Bad variable type ("w") in %s on line %d bool(false) bool(true) bool(true)