From patchwork Fri May 11 17:31:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Punit Agrawal X-Patchwork-Id: 912094 X-Patchwork-Delegate: chrubis@suse.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40jHGX5wwDz9s16 for ; Sat, 12 May 2018 03:32:20 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 657F63E76AF for ; Fri, 11 May 2018 19:32:17 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [IPv6:2001:4b78:1:20::3]) by picard.linux.it (Postfix) with ESMTP id 6238C3E6744 for ; Fri, 11 May 2018 19:32:16 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by in-3.smtp.seeweb.it (Postfix) with ESMTP id 83B0D1A00791 for ; Fri, 11 May 2018 19:32:13 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D03B51435; Fri, 11 May 2018 10:32:09 -0700 (PDT) Received: from localhost (e105922-lin.cambridge.arm.com [10.1.206.33]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 747AE3F23C; Fri, 11 May 2018 10:32:09 -0700 (PDT) From: Punit Agrawal To: ltp@lists.linux.it Date: Fri, 11 May 2018 18:31:56 +0100 Message-Id: <20180511173156.30197-1-punit.agrawal@arm.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 X-ARM-No-Footer: FoSSMail X-Virus-Scanned: clamav-milter 0.99.2 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-3.smtp.seeweb.it Cc: rpalethorpe@suse.com Subject: [LTP] [PATCH] runtest/fs: Don't read files in /dev indiscriminately X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" read_all_dev attempts to read 1024 bytes from all devices in /dev. As nodes in /dev represent devices, any access can have side-effects - sometimes fatally so, e.g., accessing /dev/port on Juno R2 and AMD Seattle lead to synchronous external abort or SError (system error) interrupt depending on the access pattern. There isn't much the kernel can do about the aborts other than panic the system. The side-effects problem is also highlighted by the recent exclusion added for watchdog devices. See commit 4a41aa6b48c134e ("runtest/fs: filter /dev/watchdog* for read_all_dev by default"). It would be better to replace indiscriminate reading of /dev files with tests targeting specific files in /dev which have defined known behaviour, e.g., /dev/null, /dev/urandom, etc. In the meanwhile, drop the indiscriminate reading of files in /dev. Signed-off-by: Punit Agrawal Cc: xuyang.jy@cn.fujitsu.com Cc: naresh.kamboju@linaro.org Cc: rpalethorpe@suse.com Cc: chrubis@suse.cz Cc: james.morse@arm.com --- Hi, The test leads to panic during nightly ltp runs on internal systems. Looking at the crash report from Naresh[0], it looks likely that he's facing the same problem. Please consider including in upcoming release. Thanks, Punit [0] http://lists.linux.it/pipermail/ltp/2018-May/007954.html --- runtest/fs | 1 - 1 file changed, 1 deletion(-) diff --git a/runtest/fs b/runtest/fs index 42a9bfcbf..c7ed64fbf 100644 --- a/runtest/fs +++ b/runtest/fs @@ -69,7 +69,6 @@ fs_di fs_di -d $TMPDIR # Was not sure why it should reside in runtest/crashme and won´t get tested ever proc01 proc01 -m 128 -read_all_dev read_all -d /dev -e '/dev/watchdog?(0)' -q -r 10 read_all_proc read_all -d /proc -q -r 10 read_all_sys read_all -d /sys -q -r 10