[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5761CE79.8090703@deltatee.com>
Date: Wed, 15 Jun 2016 15:54:01 -0600
From: Logan Gunthorpe <logang@...tatee.com>
To: Allen Hubbe <Allen.Hubbe@....com>, 'Jon Mason' <jdmason@...zu.us>,
'Dave Jiang' <dave.jiang@...el.com>
Cc: 'Shuah Khan' <shuahkh@....samsung.com>,
'Sudip Mukherjee' <sudipm.mukherjee@...il.com>,
'Arnd Bergmann' <arnd@...db.de>, linux-kernel@...r.kernel.org,
linux-ntb@...glegroups.com, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v3 09/10] ntb_test: Add a selftest script for the NTB
subsystem
On 15/06/16 03:49 PM, Allen Hubbe wrote:
>> +function link_test()
>> +{
>> + LOC=$1
>> + REM=$2
>> + EXP=0
>> +
>> + echo "Running link tests on: $(basename $LOC) / $(basename $REM)"
>> +
>> + write_file "N" "$LOC/link"
>> + write_file "N" "$LOC/link_event"
>
> If it fails to bring down the link, won't it just block waiting on link_event and never make it to the next step of the test?
>
>> + if [[ $(read_file "$REM/link") != "N" ]]; then
>> + echo "Expected remote link to be down in $REM/link" >&2
>> + exit -1
>> + fi
>> +
>> + write_file "Y" "$LOC/link"
>> + write_file "Y" "$LOC/link_event"
>> +
>> + echo " Passed"
>> +}
Well, the test is really intended to ensure both sides of the link see
changes to the link status. If the driver is somehow buggy and the link
never goes down/up when requested there's little I can do here except
block forever. Unless we want to add a timeout to the link_event file
(which I'd rather not).
You'd have the same issue if, when bringing the link up for the first
time, the link does not come back.
Logan
Powered by blists - more mailing lists