All of lore.kernel.org
 help / color / mirror / Atom feed
From: greg at kroah.com (Greg KH)
Subject: [PATCH] selftests: add sleep between detach and usbip list -l
Date: Sun, 5 May 2019 11:13:56 +0200	[thread overview]
Message-ID: <20190505091356.GB25646@kroah.com> (raw)
In-Reply-To: <20190502194740.15344-1-skhan@linuxfoundation.org>

On Thu, May 02, 2019 at 01:47:40PM -0600, Shuah Khan wrote:
> Add a sleep between detach and check for exportable devices to avoid
> the following segfault from libc-2.27.so
> 
> [ 6268.136108] usbip[5565]: segfault at 0 ip 00007f2a947bddfd sp 00007ffd1a8705e8 error 4 in libc-2.27.so[7f2a94703000+1e7000]
> 
> Signed-off-by: Shuah Khan <skhan at linuxfoundation.org>
> ---
>  tools/testing/selftests/drivers/usb/usbip/usbip_test.sh | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh b/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh
> index 128f0ab24307..beacf24a8df7 100755
> --- a/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh
> +++ b/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh
> @@ -171,10 +171,14 @@ echo "Detach invalid port tests - expect invalid port error message";
>  src/usbip detach -p 100;
>  echo "=============================================================="
>  
> +# let detach complete. Avoid segfaults from libc-2.27.so
> +sleep 3;

That feels very "arbitrary", why do we "know" it will take at most 3
seconds?  I guess there's not much else we can do here except maybe
somehow watch sysfs until the device is really gone?

thanks,

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: greg@kroah.com (Greg KH)
Subject: [PATCH] selftests: add sleep between detach and usbip list -l
Date: Sun, 5 May 2019 11:13:56 +0200	[thread overview]
Message-ID: <20190505091356.GB25646@kroah.com> (raw)
Message-ID: <20190505091356.qvi3gcdBRJ2r_HBGZhkrKKrzDTVCctmACSPOsmzjYyw@z> (raw)
In-Reply-To: <20190502194740.15344-1-skhan@linuxfoundation.org>

On Thu, May 02, 2019@01:47:40PM -0600, Shuah Khan wrote:
> Add a sleep between detach and check for exportable devices to avoid
> the following segfault from libc-2.27.so
> 
> [ 6268.136108] usbip[5565]: segfault at 0 ip 00007f2a947bddfd sp 00007ffd1a8705e8 error 4 in libc-2.27.so[7f2a94703000+1e7000]
> 
> Signed-off-by: Shuah Khan <skhan at linuxfoundation.org>
> ---
>  tools/testing/selftests/drivers/usb/usbip/usbip_test.sh | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh b/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh
> index 128f0ab24307..beacf24a8df7 100755
> --- a/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh
> +++ b/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh
> @@ -171,10 +171,14 @@ echo "Detach invalid port tests - expect invalid port error message";
>  src/usbip detach -p 100;
>  echo "=============================================================="
>  
> +# let detach complete. Avoid segfaults from libc-2.27.so
> +sleep 3;

That feels very "arbitrary", why do we "know" it will take at most 3
seconds?  I guess there's not much else we can do here except maybe
somehow watch sysfs until the device is really gone?

thanks,

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <greg@kroah.com>
To: Shuah Khan <skhan@linuxfoundation.org>
Cc: valentina.manea.m@gmail.com, shuah@kernel.org,
	linux-usb@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: selftests: add sleep between detach and usbip list -l
Date: Sun, 5 May 2019 11:13:56 +0200	[thread overview]
Message-ID: <20190505091356.GB25646@kroah.com> (raw)

On Thu, May 02, 2019 at 01:47:40PM -0600, Shuah Khan wrote:
> Add a sleep between detach and check for exportable devices to avoid
> the following segfault from libc-2.27.so
> 
> [ 6268.136108] usbip[5565]: segfault at 0 ip 00007f2a947bddfd sp 00007ffd1a8705e8 error 4 in libc-2.27.so[7f2a94703000+1e7000]
> 
> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
> ---
>  tools/testing/selftests/drivers/usb/usbip/usbip_test.sh | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh b/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh
> index 128f0ab24307..beacf24a8df7 100755
> --- a/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh
> +++ b/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh
> @@ -171,10 +171,14 @@ echo "Detach invalid port tests - expect invalid port error message";
>  src/usbip detach -p 100;
>  echo "=============================================================="
>  
> +# let detach complete. Avoid segfaults from libc-2.27.so
> +sleep 3;

That feels very "arbitrary", why do we "know" it will take at most 3
seconds?  I guess there's not much else we can do here except maybe
somehow watch sysfs until the device is really gone?

thanks,

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <greg@kroah.com>
To: Shuah Khan <skhan@linuxfoundation.org>
Cc: valentina.manea.m@gmail.com, shuah@kernel.org,
	linux-usb@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests: add sleep between detach and usbip list -l
Date: Sun, 5 May 2019 11:13:56 +0200	[thread overview]
Message-ID: <20190505091356.GB25646@kroah.com> (raw)
Message-ID: <20190505091356.Gxs7qeTa0ZGXrbeb2RhESQpK_POyGbqpcPVGRYORZlQ@z> (raw)
In-Reply-To: <20190502194740.15344-1-skhan@linuxfoundation.org>

On Thu, May 02, 2019 at 01:47:40PM -0600, Shuah Khan wrote:
> Add a sleep between detach and check for exportable devices to avoid
> the following segfault from libc-2.27.so
> 
> [ 6268.136108] usbip[5565]: segfault at 0 ip 00007f2a947bddfd sp 00007ffd1a8705e8 error 4 in libc-2.27.so[7f2a94703000+1e7000]
> 
> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
> ---
>  tools/testing/selftests/drivers/usb/usbip/usbip_test.sh | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh b/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh
> index 128f0ab24307..beacf24a8df7 100755
> --- a/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh
> +++ b/tools/testing/selftests/drivers/usb/usbip/usbip_test.sh
> @@ -171,10 +171,14 @@ echo "Detach invalid port tests - expect invalid port error message";
>  src/usbip detach -p 100;
>  echo "=============================================================="
>  
> +# let detach complete. Avoid segfaults from libc-2.27.so
> +sleep 3;

That feels very "arbitrary", why do we "know" it will take at most 3
seconds?  I guess there's not much else we can do here except maybe
somehow watch sysfs until the device is really gone?

thanks,

greg k-h

  reply	other threads:[~2019-05-05  9:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02 19:47 [PATCH] selftests: add sleep between detach and usbip list -l skhan
2019-05-02 19:47 ` Shuah Khan
2019-05-02 19:47 ` Shuah Khan
2019-05-02 19:47 ` [PATCH] " Shuah Khan
2019-05-05  9:13 ` greg [this message]
2019-05-05  9:13   ` Greg KH
2019-05-05  9:13   ` Greg KH
2019-05-05  9:13   ` [PATCH] " Greg KH
2019-05-06 14:47   ` skhan
2019-05-06 14:47     ` Shuah Khan
2019-05-06 14:47     ` Shuah Khan
2019-05-06 15:15     ` greg
2019-05-06 15:15       ` Greg KH
2019-05-06 15:15       ` Greg KH
2019-05-06 15:18       ` skhan
2019-05-06 15:18         ` Shuah Khan
2019-05-06 15:18         ` Shuah Khan

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=20190505091356.GB25646@kroah.com \
    --to=unknown@example.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.