Commit 7f327cb
committed
tst_net.sh: Print netstress.c logs on unexpected error
When there is an unexpected error, logs should be printed as well to
know the reason:
tcp_fastopen_run 1 TINFO: run server 'netstress -t 0 -d ltp_ns_veth1 -R 3 \
-B /tmp/LTP_tcp_fastopen_run.TpwSlSogBJ'
tcp_fastopen_run 1 TINFO: run client 'netstress -l -t 0 -H 10.0.0.1 -d ltp_ns_veth2 \
-a 2 -r 2000 -c /tmp/LTP_tcp_fastopen_run.TpwSlSogBJ/tst_netload.res' 5 times
tcp_fastopen_run 1 TWARN: netstress failed, ret: 6
tcp_fastopen_run 1 TPASS: netstress passed, median time 123 ms, data: 118 124 122 125
While at it, factor out logging code into new function
tst_netload_print_log().
Link: https://lore.kernel.org/ltp/20260127131427.146592-1-pvorel@suse.cz/
Fixes: da16b66 ("lib/tst_net: calc mean in tst_netload()")
Reviewed-by: Li Wang <liwang@redhat.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>1 parent 648c819 commit 7f327cb
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
735 | | - | |
| 735 | + | |
736 | 736 | | |
737 | 737 | | |
738 | 738 | | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
739 | 744 | | |
740 | 745 | | |
741 | 746 | | |
| |||
853 | 858 | | |
854 | 859 | | |
855 | 860 | | |
| 861 | + | |
856 | 862 | | |
857 | 863 | | |
858 | 864 | | |
| |||
0 commit comments