linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Logan Gunthorpe <logang@deltatee.com>, Omar Sandoval <osandov@fb.com>
Cc: linux-block@vger.kernel.org, Johannes Thumshirn <jthumshirn@suse.de>
Subject: Re: [PATCH blktests 1/4] tests/nvme/rc: Modify the approach for disabling and re-enabling Ctrl-C
Date: Thu, 8 Aug 2019 14:00:40 -0700	[thread overview]
Message-ID: <a6b0bea2-3efb-fc04-f5a3-1dad562c72da@acm.org> (raw)
In-Reply-To: <a90e327d-ea09-0286-f985-2d3775a38728@deltatee.com>

On 8/8/19 1:08 PM, Logan Gunthorpe wrote:
> On 2019-08-08 2:05 p.m., Bart Van Assche wrote:
>> Avoid that the following error messages are reported when redirecting stdin:
>>
>> stty: 'standard input': Inappropriate ioctl for device
>> stty: 'standard input': Inappropriate ioctl for device
>>
>> Cc: Logan Gunthorpe <logang@deltatee.com>
>> Cc: Johannes Thumshirn <jthumshirn@suse.de>
>> Fixes: a987b10bc179 ("nvme: Ensure all ports and subsystems are removed on cleanup")
>> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
>> ---
>>   tests/nvme/rc | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/nvme/rc b/tests/nvme/rc
>> index d4e18e635dea..40f0413d32d2 100644
>> --- a/tests/nvme/rc
>> +++ b/tests/nvme/rc
>> @@ -36,7 +36,7 @@ _cleanup_nvmet() {
>>   	fi
>>   
>>   	# Don't let successive Ctrl-Cs interrupt the cleanup processes
>> -	stty -isig
>> +	trap '' SIGINT
> 
> Did you test this? Pretty sure I tried using trap and it didn't work,
> probably because it's already running inside a trapped SIGINT.
> 
> Maybe it'd be better to just ignore any errors stty produces and pipe to
> /dev/null?

Hi Logan,

I don't think that redirecting the stty errors would be sufficient 
because Ctrl-C still works even if stdin, stdout and stderr are 
redirected. A command like sleep 60 </dev/null >&/dev/null can be 
interrupted with Ctrl-C but stty -isig >&/dev/null does not suppress 
Ctrl-C if stdin is redirected.

Are there other trap SIGINT statements in the blktests code? Does that 
mean that I overlooked something?

Thanks,

Bart.

  reply	other threads:[~2019-08-08 21:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 20:05 [PATCH blktests 0/4] Four blktests patches Bart Van Assche
2019-08-08 20:05 ` [PATCH blktests 1/4] tests/nvme/rc: Modify the approach for disabling and re-enabling Ctrl-C Bart Van Assche
2019-08-08 20:08   ` Logan Gunthorpe
2019-08-08 21:00     ` Bart Van Assche [this message]
2019-08-08 21:11       ` Logan Gunthorpe
2019-08-08 21:18         ` Bart Van Assche
2019-08-08 20:05 ` [PATCH blktests 2/4] tests/nvmeof-mp/rc: Make simulate_network_failure_loop() more robust Bart Van Assche
2019-08-08 20:05 ` [PATCH blktests 3/4] tests/nvmeof-mp/rc: Make the NVMeOF multipath tests more reliable Bart Van Assche
2019-08-08 20:05 ` [PATCH blktests 4/4] tests/srp/014: Add a test that triggers a SCSI reset while I/O is ongoing Bart Van Assche
2019-09-04 17:49 ` [PATCH blktests 0/4] Four blktests patches Bart Van Assche
2019-09-04 17:55   ` Omar Sandoval

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=a6b0bea2-3efb-fc04-f5a3-1dad562c72da@acm.org \
    --to=bvanassche@acm.org \
    --cc=jthumshirn@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=osandov@fb.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).