diff options
Diffstat (limited to 'tests/libs/zbxsysinfo/linux/net_if_out.yaml')
-rw-r--r-- | tests/libs/zbxsysinfo/linux/net_if_out.yaml | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/tests/libs/zbxsysinfo/linux/net_if_out.yaml b/tests/libs/zbxsysinfo/linux/net_if_out.yaml new file mode 100644 index 00000000000..a1424763ced --- /dev/null +++ b/tests/libs/zbxsysinfo/linux/net_if_out.yaml @@ -0,0 +1,153 @@ +--- +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.out[eno1,bytes]' +out: + result: '111280259' + 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.out[eno1,packets]' +out: + result: '741237' + 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.out[eno1,errors]' +out: + result: '1' + 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.out[eno1,dropped]' +out: + result: '1' + 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.out[eno1,overruns]' +out: + result: '1' + return: 'SYSINFO_RET_OK' + +--- +test case: "#1.6 successfully read 'colls'" +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 2 0 83760 111280259 741237 0 0 0 1 0 0 + lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0 +in: + param: 'net.if.out[eno1,collisions]' +out: + result: '1' + return: 'SYSINFO_RET_OK' + +--- +test case: "#1.7 successfully read 'carrier'" +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 1 0 + lo: 6410206 43792 0 0 0 0 0 0 6410206 43792 0 0 0 0 0 0 +in: + param: 'net.if.out[eno1,carrier]' +out: + result: '1' + return: 'SYSINFO_RET_OK' + +--- +test case: "#1.8 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.out[eno1,compressed]' +out: + result: '1' + 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.out[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.out[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.out[eno1,XXX]' +out: + result: 'Invalid second parameter.' + return: 'SYSINFO_RET_FAIL' |