linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Logan Gunthorpe <logang@deltatee.com>
To: Allen Hubbe <Allen.Hubbe@emc.com>,
	"'Jon Mason'" <jdmason@kudzu.us>,
	"'Dave Jiang'" <dave.jiang@intel.com>
Cc: "'Shuah Khan'" <shuahkh@osg.samsung.com>,
	"'Sudip Mukherjee'" <sudipm.mukherjee@gmail.com>,
	"'Arnd Bergmann'" <arnd@arndb.de>,
	linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v3 09/10] ntb_test: Add a selftest script for the NTB subsystem
Date: Wed, 15 Jun 2016 15:54:01 -0600	[thread overview]
Message-ID: <5761CE79.8090703@deltatee.com> (raw)
In-Reply-To: <007901d1c74f$dcdab6c0$96902440$@emc.com>



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

  reply	other threads:[~2016-06-15 21:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1466025130.git.logang@deltatee.com>
     [not found] ` <b1aa9e9977b992621452812f744ff7827ca4f28c.1466025130.git.logang@deltatee.com>
2016-06-15 21:33   ` [PATCH v3 10/10] ntb_perf: clear link_is_up flag when the link goes down Jiang, Dave
2016-06-15 22:20     ` Logan Gunthorpe
2016-06-15 22:24       ` Jiang, Dave
2016-06-15 23:11         ` Logan Gunthorpe
     [not found] ` <d770c327d028ff794c74602268c469d54526675b.1466025130.git.logang@deltatee.com>
2016-06-15 21:48   ` [PATCH v3 08/10] ntb_pingpong: Add a debugfs file to get the ping count Allen Hubbe
     [not found] ` <32ec8e46e2f76dd74046b34c7b50cc84206090b3.1466025130.git.logang@deltatee.com>
2016-06-15 21:48   ` [PATCH v3 07/10] ntb_tool: Add link status and files to debugfs Allen Hubbe
     [not found] ` <a37e02139ad94ab322bfac087524a0394ec0383a.1466025130.git.logang@deltatee.com>
2016-06-15 21:49   ` [PATCH v3 09/10] ntb_test: Add a selftest script for the NTB subsystem Allen Hubbe
2016-06-15 21:54     ` Logan Gunthorpe [this message]
2016-06-15 22:17       ` Allen Hubbe
2016-06-15 22:30         ` Logan Gunthorpe
     [not found] ` <a87bb21ba21f77a722b66ceea75c20baebf3302f.1466025130.git.logang@deltatee.com>
2016-06-15 21:53   ` [PATCH v3 06/10] ntb_tool: Postpone memory window initialization for the user Allen Hubbe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5761CE79.8090703@deltatee.com \
    --to=logang@deltatee.com \
    --cc=Allen.Hubbe@emc.com \
    --cc=arnd@arndb.de \
    --cc=dave.jiang@intel.com \
    --cc=jdmason@kudzu.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-ntb@googlegroups.com \
    --cc=shuahkh@osg.samsung.com \
    --cc=sudipm.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).