Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71982C6FD1C for ; Tue, 21 Mar 2023 01:06:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230103AbjCUBGx (ORCPT ); Mon, 20 Mar 2023 21:06:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230036AbjCUBGf (ORCPT ); Mon, 20 Mar 2023 21:06:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 537CB113C2; Mon, 20 Mar 2023 18:06:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8AA16618F5; Tue, 21 Mar 2023 01:05:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5F32C433A0; Tue, 21 Mar 2023 01:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679360750; bh=hzxbobp7VDJfB0mAKMDP5Yx+fy49+f/dy9Gh4KPGSzM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ivXTo+F7uAR6LhrH0yOssIFU/QKHzEkkrBBy60bFd8KDzmlEeXNLlkQw5bTsl0vAE YMPGxoCPjnBB8YupXDr6iIzoqcWD+GdPXb+Rpb7Jtz7sEY3DoFtUuDy6HfjgUZmqdX 9s831lPI6xwA6ROiUgBsZmptv8j7fHKJRf85rgxTc+AKWVphvjIltxGX20fotQcRGt udGUYDtpd+d3nCPB9vLykT+thVkxcuHn5ltEHhAqNv63dOBHiz+8lyv+puV6lxmdGG S9uclr3JOkw5vcsrc8rrjgpwdo4XfYmXX1WCyJJ9eOXhbJV1e6iB5V5ThGdNL024Xx yE8XPNBldFhzw== Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 7212E15403A1; Mon, 20 Mar 2023 18:05:50 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, kernel-team@meta.com, mingo@kernel.org Cc: stern@rowland.harvard.edu, parri.andrea@gmail.com, will@kernel.org, peterz@infradead.org, boqun.feng@gmail.com, npiggin@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr, akiyks@gmail.com, "Paul E. McKenney" Subject: [PATCH memory-model scripts 05/31] tools/memory-model: Make judgelitmus.sh detect hard deadlocks Date: Mon, 20 Mar 2023 18:05:23 -0700 Message-Id: <20230321010549.51296-5-paulmck@kernel.org> X-Mailer: git-send-email 2.40.0.rc2 In-Reply-To: <4e5839bb-e980-4931-a550-3548d025a32a@paulmck-laptop> References: <4e5839bb-e980-4931-a550-3548d025a32a@paulmck-laptop> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If a litmus test specifies "Result: Never" and if it contains an unconditional ("hard") deadlock, then running checklitmus.sh on it will not flag any errors, despite the fact that there are no executions. This commit therefore updates judgelitmus.sh to complain about tests with no executions that are marked, but not as "Result: DEADLOCK". Signed-off-by: Paul E. McKenney --- tools/memory-model/scripts/judgelitmus.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/memory-model/scripts/judgelitmus.sh b/tools/memory-model/scripts/judgelitmus.sh index d40439c7b71e..84c62eee321b 100755 --- a/tools/memory-model/scripts/judgelitmus.sh +++ b/tools/memory-model/scripts/judgelitmus.sh @@ -83,6 +83,14 @@ then fi ret=1 fi +elif grep '^Observation' $LKMM_DESTDIR/$litmus.out | grep -q 'Never 0 0$' +then + echo " !!! Unexpected non-$outcome deadlock" $litmus + if ! grep -q '!!!' $LKMM_DESTDIR/$litmus.out + then + echo " !!! Unexpected non-$outcome deadlock" $litmus >> $LKMM_DESTDIR/$litmus.out 2>&1 + fi + ret=1 elif grep '^Observation' $LKMM_DESTDIR/$litmus.out | grep -q $outcome || test "$outcome" = Maybe then ret=0 -- 2.40.0.rc2