From patchwork Tue Sep 3 13:50:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 1157014 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=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=virtuozzo.com 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 ozlabs.org (Postfix) with ESMTPS id 46N7kl64B5z9sN1 for ; Tue, 3 Sep 2019 23:55:27 +1000 (AEST) Received: from localhost ([::1]:46486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i59HJ-0008Aa-DZ for incoming@patchwork.ozlabs.org; Tue, 03 Sep 2019 09:55:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60759) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i59CY-0002yC-Pz for qemu-devel@nongnu.org; Tue, 03 Sep 2019 09:50:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i59CX-0003dU-PT for qemu-devel@nongnu.org; Tue, 03 Sep 2019 09:50:30 -0400 Received: from relay.sw.ru ([185.231.240.75]:39660) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i59CV-0003Zb-7u; Tue, 03 Sep 2019 09:50:27 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1i59CS-0003gY-92; Tue, 03 Sep 2019 16:50:24 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Date: Tue, 3 Sep 2019 16:50:24 +0300 Message-Id: <20190903135024.498239-1-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.18.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 185.231.240.75 Subject: [Qemu-devel] [PATCH v2] iotests: skip 232 when run tests as root 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: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" chmod a-w don't help under root, so skip the test in such case. Signed-off-by: Vladimir Sementsov-Ogievskiy --- v2: move new check under TEST_IMG=TEST_IMG_FILE workaround [Kevin] tests/qemu-iotests/232 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/232 b/tests/qemu-iotests/232 index 2063f78876..65b0e42063 100755 --- a/tests/qemu-iotests/232 +++ b/tests/qemu-iotests/232 @@ -74,6 +74,12 @@ if [ -n "$TEST_IMG_FILE" ]; then TEST_IMG=$TEST_IMG_FILE fi +chmod a-w $TEST_IMG +(echo test > $TEST_IMG) 2>/dev/null && \ + _notrun "Readonly attribute is ignored, probably you run this test as" \ + "root, which is unsupported." +chmod a+w $TEST_IMG + echo echo "=== -drive with read-write image: read-only/auto-read-only combinations ===" echo