From patchwork Thu May 2 19:47:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 10927585 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5310E15A6 for ; Thu, 2 May 2019 19:47:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 420671FFC8 for ; Thu, 2 May 2019 19:47:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3323126224; Thu, 2 May 2019 19:47:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C43BC1FFC8 for ; Thu, 2 May 2019 19:47:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726520AbfEBTro (ORCPT ); Thu, 2 May 2019 15:47:44 -0400 Received: from mail-it1-f196.google.com ([209.85.166.196]:34482 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbfEBTrn (ORCPT ); Thu, 2 May 2019 15:47:43 -0400 Received: by mail-it1-f196.google.com with SMTP id p18so6428431itm.1 for ; Thu, 02 May 2019 12:47:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BlRlXXCdCQ8ojS85wg4oVL7jRwgqCApJr9d2CW9N/kk=; b=hlmMwKaTwo8QkQ4w59AlaHa1gPjDqmFKP51ibnEIOqxvpVM4+UHLOj35EdfiGp9C1i g7B7YmNkJtO8upmjc7K+jEym4Fyf4w+4UzkCuroDMQxsNLAS1DjyfCCM3mi9zNkZHmaX W9BdloyTGe2xFOCDO8SMbUzbt1HoTTeAB47cI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BlRlXXCdCQ8ojS85wg4oVL7jRwgqCApJr9d2CW9N/kk=; b=W/1ea9SvRor/buiOYQ22CaO0m6PSEgcMB12Z6ty+e3t1dwkmAcMrpingsyVupKzXkJ b28CRFGa5CFYK7Zue+DQI/ekrd2skjrhc1EjssGg+sfsm1zHA7qhoM5hLTojmu+Xuvnr ODKlwwsFfmA3TtKZ9weErFgvg309E3HoP2TXs7uwR9+dFd5cbMyzdu5elTHpD/6rFCR+ BAoBmjGY9Va9jgT59P13kPQZ5O96TXmBXXgEYqCHZ1eE4XXNrva9+G605B8WtIbjo0D2 CE5kBZbQyKeEnVlTdNDAC1nttw0lvI/bfSg6SEfH411lxmGkVgt5pcms5m65LrtYgLSm Ho4A== X-Gm-Message-State: APjAAAVX2GjUfFgqSupzPiSo1IFLkR4PZIsikcVHE6ByTBbNC3akG7JG koSN5Tltbs65WjMniLS6+mFdyA== X-Google-Smtp-Source: APXvYqzxV1flOpU2yjAYsjvpcGQ06uNmg+YUXTWwTD4S3a4FvSgciwOuQPCWH1C2VXlxaZHzEYUFTg== X-Received: by 2002:a02:3b55:: with SMTP id i21mr4012523jaf.128.1556826463209; Thu, 02 May 2019 12:47:43 -0700 (PDT) Received: from shuah-t480s.internal (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id n4sm14741ioh.52.2019.05.02.12.47.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 May 2019 12:47:42 -0700 (PDT) From: Shuah Khan To: valentina.manea.m@gmail.com, shuah@kernel.org Cc: Shuah Khan , linux-usb@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] selftests: add sleep between detach and usbip list -l Date: Thu, 2 May 2019 13:47:40 -0600 Message-Id: <20190502194740.15344-1-skhan@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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; + echo "Expect to see export-able devices"; src/usbip list -l; echo "==============================================================" + echo "Remove usbip_host module"; rmmod usbip_host;