5 Commits

Author SHA1 Message Date
Rainer Gerhards
50e4a06b18
helper utils: clean up python indentation
* Add note for indentation cleanup
* Converted tabs to spaces in various Python scripts to match PEP 8 indentation.

With the help of AI-Agent: Codex, Google Gemini Code review
2025-07-05 14:34:43 +02:00
7a38a1172e testbench: Write started dummy file in python snmpreceiver script
When the snmpreceiver is fully started and listening, the file is created.
diag.sh checks for the .started file before proceeding with the textbench

see also: https://github.com/rsyslog/rsyslog/pull/5558
2025-02-12 16:22:23 +01:00
251e29dc00 testbench: Added new version of snmptrapreceiver.py for python 3.11+
The system packages on Ubuntu 24 appear to be broken for python3-pysnmp4.
And when we update the package using
	pip install pyasn1 pysnmp --break-system-packages --upgrade

We need adapt the code, so a new version snmptrapreceiverv2.py
has been added which will automatically been chosen if Python is >3.10

closes: https://github.com/rsyslog/rsyslog/issues/5554
2025-02-10 17:03:33 +01:00
Rainer Gerhards
618f743299
testbench: fix final issues for python 3 transition
Thanks to Michael Biebl for his help on this issue.

This patch also contains some slight test modernization and
a "name fix" for a non-valgrind test.

closes https://github.com/rsyslog/rsyslog/issues/3853
2020-01-23 12:38:03 +01:00
fd6c32c2f2 testbench: Add two real tests for omsnmp
Adds a python based SNMP Trap Receiver which outputs received
SNMP Traps by UDP onyl at the moment. Can be extended later.
Tests results are verified by content_check.

The tests have to be enabed with ./configure --enable-snmp-tests

Test sndrcv_omsnmpv1_udp_dynsource.sh checks the new snmpv1dynsource
option.

In order to work, the following python packages needs to be installed:
	pip install pysnmp

On Ubuntu 18, we need these packages to be installed:
	apt install snmp libsnmp-dev snmp-mibs-downloader

closes: https://github.com/rsyslog/rsyslog/issues/3985
2019-12-03 13:26:36 +01:00