Test Scripts

From Net-SNMP Wiki
Revision as of 04:08, 16 August 2010 by Rstory (Talk | contribs) (start documenting test script variables)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Hints and tips on working with test scripts.

Environment variables

fulltests/support/simple_TESTCONF.sh

  • SNMP_LIMIT_VMEM N ; shell limit on memory used (bytes)
  • SNMP_LIMIT_CPU N ; shell limit on cpu used (seconds)
  • SNMP_VERBOSE [0|1]
  • SNMP_PREFER_NEAR_MIBS [0|1] ; if set, set MIBDIRS=${srcdir}/mibs
  • SNMP_TMPDIR dir ; use dir for output/config (default /tmp/snmp-test-$testnum-$$)
  • SNMP_TMP_PERSISTENTDIR dir ; use dir for persistent dir
  • SNMP_SAVE_TMPDIR [yes|no] ; save SNMP_TMPDIR even for successful tests (no)
  • SNMP_TESTDIR dir ; where to look for tests
  • SNMP_CONFIG_FILE path/xxx.conf ; config file to use
  • SNMPTRAPD_CONFIG_FILE path/xxx.conf ; config file to use
  • SNMPAPP_CONFIG_FILE path/xxx.conf ; config file to use
  • SNMP_SNMPD_PID_FILE path/xxx ; pid file for app
  • SNMP_SNMPD_LOG_FILE path/xxx ; log file for app
  • SNMP_SNMPTRAPD_PID_FILE path/xxx ; pid file for app
  • SNMP_SNMPTRAPD_LOG_FILE path/xxx ; log file for app
  • SNMP_AGENTX_PID_FILE path/xxx ; pid file for app
  • SNMP_AGENTX_LOG_FILE path/xxx ; log file for app
  • SNMP_FLAGS flags ; use flags for all snmp commands (-d)
  • SNMP_SNMPD_PORT N ; use port N (default: probe for available high port)
  • SNMP_SNMPTRAPD_PORT N ; use port N (default: probe for available high port)
  • SNMP_AGENTX_PORT N ; use port N (default: probe for available high port)
  • SNMP_TRANSPORT_SPEC X ; use transport x (udp)
  • SNMP_TEST_DEST addr ; use address (127.0.0.1)