From patchwork Tue Sep 3 13:21:10 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: 1156981 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 46N6zv14vjz9s00 for ; Tue, 3 Sep 2019 23:21:47 +1000 (AEST) Received: from localhost ([::1]:46009 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i58kj-0007HP-4q for incoming@patchwork.ozlabs.org; Tue, 03 Sep 2019 09:21:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49912) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i58kI-0007F6-GA for qemu-devel@nongnu.org; Tue, 03 Sep 2019 09:21:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i58kH-0006pj-Hu for qemu-devel@nongnu.org; Tue, 03 Sep 2019 09:21:18 -0400 Received: from relay.sw.ru ([185.231.240.75]:38740) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i58kE-0006o6-OZ; Tue, 03 Sep 2019 09:21:14 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1i58kB-0003ZI-DJ; Tue, 03 Sep 2019 16:21:11 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Date: Tue, 3 Sep 2019 16:21:10 +0300 Message-Id: <20190903132110.380933-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] 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, 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 --- tests/qemu-iotests/232 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/232 b/tests/qemu-iotests/232 index 2063f78876..da35a63d85 100755 --- a/tests/qemu-iotests/232 +++ b/tests/qemu-iotests/232 @@ -70,6 +70,12 @@ size=128M _make_test_img $size +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 + if [ -n "$TEST_IMG_FILE" ]; then TEST_IMG=$TEST_IMG_FILE fi