diff options
Diffstat (limited to 'tests/libs/zbxsysinfo/linux/net_if_total.yaml')
-rw-r--r-- | tests/libs/zbxsysinfo/linux/net_if_total.yaml | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/tests/libs/zbxsysinfo/linux/net_if_total.yaml b/tests/libs/zbxsysinfo/linux/net_if_total.yaml new file mode 100644 index 00000000000..327b827fa2b --- /dev/null +++ b/tests/libs/zbxsysinfo/linux/net_if_total.yaml @@ -0,0 +1,125 @@ +--- +test case: "#1.1 successfully read 'bytes'" +files: + /proc/net/dev: | + Inter-| Receive | Transmit + face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed + eno1: 1395994481 5343265 0 0 2 0 0 83760 111280259 741237 0 0 1 0 0 0 + lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0 +in: + param: 'net.if.total[eno1,bytes]' +out: + result: '1507274740' + return: 'SYSINFO_RET_OK' + +--- +test case: "#1.2 successfully read 'packets'" +files: + /proc/net/dev: | + Inter-| Receive | Transmit + face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed + eno1: 1395994481 5343265 0 0 2 0 0 83760 111280259 741237 0 0 1 0 0 0 + lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0 +in: + param: 'net.if.total[eno1,packets]' +out: + result: '6084502' + return: 'SYSINFO_RET_OK' + +--- +test case: "#1.3 successfully read 'errors'" +files: + /proc/net/dev: | + Inter-| Receive | Transmit + face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed + eno1: 1395994481 5343265 2 0 0 0 0 83760 111280259 741237 1 0 0 0 0 0 + lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0 +in: + param: 'net.if.total[eno1,errors]' +out: + result: '3' + return: 'SYSINFO_RET_OK' + +--- +test case: "#1.4 successfully read 'dropped'" +files: + /proc/net/dev: | + Inter-| Receive | Transmit + face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed + eno1: 1395994481 5343265 0 2 0 0 0 83760 111280259 741237 0 1 0 0 0 0 + lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0 +in: + param: 'net.if.total[eno1,dropped]' +out: + result: '3' + return: 'SYSINFO_RET_OK' + +--- +test case: "#1.5 successfully read 'overruns'" +files: + /proc/net/dev: | + Inter-| Receive | Transmit + face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed + eno1: 1395994481 5343265 0 0 2 0 0 83760 111280259 741237 0 0 1 0 0 0 + lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0 +in: + param: 'net.if.total[eno1,overruns]' +out: + result: '3' + return: 'SYSINFO_RET_OK' + +--- +test case: "#1.6 successfully read 'compressed'" +files: + /proc/net/dev: | + Inter-| Receive | Transmit + face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed + eno1: 1395994481 5343265 0 0 0 0 2 83760 111280259 741237 0 0 0 0 0 1 + lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0 +in: + param: 'net.if.total[eno1,compressed]' +out: + result: '3' + return: 'SYSINFO_RET_OK' + +--- +test case: "#2.1 unsuccessfully read 'Too many parameters.'" +files: + /proc/net/dev: | + Inter-| Receive | Transmit + face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed + eno1: 1395994481 5343265 0 0 2 0 0 83760 111280259 741237 0 0 1 0 0 0 + lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0 +in: + param: 'net.if.total[eno1,overruns,XXX]' +out: + result: 'Too many parameters.' + return: 'SYSINFO_RET_FAIL' + +--- +test case: "#2.2 unsuccessfully read 'Cannot find information'" +files: + /proc/net/dev: | + Inter-| Receive | Transmit + face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed + eno1: 1395994481 5343265 0 0 2 0 0 83760 111280259 741237 0 0 1 0 0 0 + lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0 +in: + param: 'net.if.total[enoX,overruns]' +out: + result: 'Cannot find information for this network interface in /proc/net/dev.' + return: 'SYSINFO_RET_FAIL' + +--- +test case: "#2.3 unsuccessfully read 'Invalid second parameter.'" +files: + /proc/net/dev: | + Inter-| Receive | Transmit + face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed + eno1: 1395994481 5343265 0 0 2 0 0 83760 111280259 741237 0 0 1 0 0 0 + lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0 +in: + param: 'net.if.total[eno1,XXX]' +out: + result: 'Invalid second parameter.' + return: 'SYSINFO_RET_FAIL' |