Re: [PATCH net-next] selftests: net: add socat syslog for PPPoL2TP
Qingfang Deng <[email protected]> Tue, 26 May 2026 23:23:36 +0800
| Newsgroups | gmane.linux.ppp,gmane.linux.network,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
On 5/26/2026 4:10 PM, Matthieu Baerts wrote:
> Hi Qingfang,
>
> On 26/05/2026 11:41, Qingfang Deng wrote:
>> As done in pppoe.sh, start socat as the syslog listener. In case the
>> test fails, dump its log to see what's going on.
>
> (...)
>
>> diff --git a/tools/testing/selftests/net/ppp/pppol2tp.sh b/tools/testing/selftests/net/ppp/pppol2tp.sh
>> index 5b592785f1f9..96786267ccc7 100755
>> --- a/tools/testing/selftests/net/ppp/pppol2tp.sh
>> +++ b/tools/testing/selftests/net/ppp/pppol2tp.sh
>
> (...)
>
>> +# Dump syslog messages if the test failed
>> +if [ "$RET" -ne 0 ]; then
>
> This only checks for errors with the first test, not with the second one
> below. Should you create a new helper and call it here and below? Or
> only once at the end, using ${EXIT_STATUS} instead?
I'll move it to the end, thanks.
>> + while read -r _sign _date _time len _from _to
>> + do len=${len##*=}
>> + read -n "$len" -r LINE
>> + echo "$LINE"
>> + done < "$PPPOL2TP_LOG"
>> +fi
>> +
>> # Recursion test
>> RET=0
>> # Delete route to LNS IP
>
> Cheers,
> Matt
>