From patchwork Fri May 20 15:20:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Vlad X-Patchwork-Id: 9129839 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 151976048B for ; Fri, 20 May 2016 15:17:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04B6821BED for ; Fri, 20 May 2016 15:17:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAD8327CCD; Fri, 20 May 2016 15:17:13 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F4EA21BED for ; Fri, 20 May 2016 15:17:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 02DEF6EB0F; Fri, 20 May 2016 15:17:12 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id 8CB4C6EB0E for ; Fri, 20 May 2016 15:17:09 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP; 20 May 2016 08:17:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,339,1459839600"; d="scan'208";a="107566875" Received: from mcvlad-wk.rb.intel.com ([10.237.105.57]) by fmsmga004.fm.intel.com with ESMTP; 20 May 2016 08:17:09 -0700 From: Marius Vlad To: intel-gfx@lists.freedesktop.org Date: Fri, 20 May 2016 18:20:05 +0300 Message-Id: <1463757605-27042-1-git-send-email-marius.c.vlad@intel.com> X-Mailer: git-send-email 2.8.0.rc3 Subject: [Intel-gfx] [PATCH i-g-t] tests/drv_module_reload_basic: Don't use rmmod exit code when reloading the module. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Either we return $IGT_EXIT_FAILURE or remove it entirely (like in this patch). If rmmod returns non-zero (i.e., Module: i915 is still in use), reload will bail with $IGT_EXIT_SKIP, making the check with lsmod useless. Also use the return value in the fault-injection loop. Signed-off-by: Marius Vlad --- tests/drv_module_reload_basic | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic index 3bba796..3a8df33 100755 --- a/tests/drv_module_reload_basic +++ b/tests/drv_module_reload_basic @@ -30,7 +30,7 @@ function reload() { #ignore errors in ips - gen5 only rmmod intel_ips &> /dev/null - rmmod i915 || return $IGT_EXIT_SKIP + rmmod i915 #ignore errors in intel-gtt, often built-in rmmod intel-gtt &> /dev/null # drm may be used by other devices (nouveau, radeon, udl, etc) @@ -76,7 +76,7 @@ finish_load || exit $? # Repeat the module reload trying to to generate faults for i in $(seq 1 4); do - reload inject_load_failure=$i + reload inject_load_failure=$i || exit $? done reload || exit $?