From patchwork Mon Dec 21 13:49:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Edmondson X-Patchwork-Id: 11984611 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3B97C433E0 for ; Mon, 21 Dec 2020 13:51:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9695D2222A for ; Mon, 21 Dec 2020 13:51:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9695D2222A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krLbI-0004JC-Hf for qemu-devel@archiver.kernel.org; Mon, 21 Dec 2020 08:51:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krLZK-0002DD-KX; Mon, 21 Dec 2020 08:49:46 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:54330) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krLZF-00050A-Oh; Mon, 21 Dec 2020 08:49:46 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BLDiaah080311; Mon, 21 Dec 2020 13:49:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2020-01-29; bh=UgLEVAEDzCGblbDeByYDA+kCXgohKbFMlBdOWSVFmyI=; b=dbE7guwDmfIjtEahYIt4Ltlo3iEPPXRtZ0OCoyHibwv3Orbi2edfgoWl2B1yVpD4ECTm xB9EoeoUEis8zVmuNyvucEQqEgkkPsyQutmoTaMutlnewR55fheO5AeDbcFhs//8fiiR cYpjxkAIZsmp2wtErdGBva/qn7WR9Tfwjzs3KAGJKo/uUTXbOHd4s4Ql98/J9hYFsKNj blow9iX1+mpWrTB1FO6GI54BSkeh0yNehsR/3Yf2/1BtHP+BXK3frZ0Q5aeMLgolw+YL NySe0pB5EUACG6PGg5DYcvUsuUw1zv/rFjAyKYRfHsvctY++AltyYAlkp4T1n1kLRBPH Ag== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 35h8xqwcj2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 21 Dec 2020 13:49:36 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BLDjYm0075096; Mon, 21 Dec 2020 13:49:35 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 35hu3mcqn9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 21 Dec 2020 13:49:35 +0000 Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0BLDnYGM029744; Mon, 21 Dec 2020 13:49:34 GMT Received: from disaster-area.hh.sledj.net (/81.187.26.238) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 21 Dec 2020 05:49:33 -0800 Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 95b2af05; Mon, 21 Dec 2020 13:49:31 +0000 (UTC) From: David Edmondson To: qemu-devel@nongnu.org Subject: [PATCH v2 0/2] block: report errno when flock fcntl fails Date: Mon, 21 Dec 2020 13:49:29 +0000 Message-Id: <20201221134931.1194806-1-david.edmondson@oracle.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9841 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=950 malwarescore=0 spamscore=0 phishscore=0 suspectscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012210098 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9841 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 clxscore=1015 priorityscore=1501 mlxscore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=968 suspectscore=0 phishscore=0 impostorscore=0 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012210098 Received-SPF: pass client-ip=156.151.31.86; envelope-from=david.edmondson@oracle.com; helo=userp2130.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , David Edmondson , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" As Kevin pointed out, adding the error reported by fcntl to the reported error required updates to the tests. When running the tests there were lots of failures due to output comparison problems, such as: @@ -6,7 +6,9 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE { 'execute': 'qmp_capabilities' } {"return": {}} -{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}} +{'execute':'drive-mirror', 'arguments':{ + 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', + 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. To avoid this, the second patch flattens the input command that will be sent to the tool before it is echoed back for later comparison. v2: - Update the tests appropriately (Kevin). - Removed qemu-trivial given that there was debate. - Filter the input echoed before sending to qemu* during testing such that comparisons succeed. David Edmondson (2): block: report errno when flock fcntl fails tests: Collapse echoed JSON input to a single line block/file-posix.c | 20 ++++----- tests/qemu-iotests/153.out | 76 ++++++++++++++++---------------- tests/qemu-iotests/182.out | 2 +- tests/qemu-iotests/common.filter | 6 +++ tests/qemu-iotests/common.qemu | 2 +- 5 files changed, 56 insertions(+), 50 deletions(-)