From patchwork Thu Mar 7 13:33:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Shinkevich X-Patchwork-Id: 10842941 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 09BF7922 for ; Thu, 7 Mar 2019 13:41:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB9932E7FC for ; Thu, 7 Mar 2019 13:41:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DFC3A2E88D; Thu, 7 Mar 2019 13:41:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9803C2E7FC for ; Thu, 7 Mar 2019 13:41:51 +0000 (UTC) Received: from localhost ([127.0.0.1]:51945 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1tHT-00078v-0H for patchwork-qemu-devel@patchwork.kernel.org; Thu, 07 Mar 2019 08:41:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1t9w-0002LG-IY for qemu-devel@nongnu.org; Thu, 07 Mar 2019 08:34:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1t9v-0003LK-UX for qemu-devel@nongnu.org; Thu, 07 Mar 2019 08:34:04 -0500 Received: from relay.sw.ru ([185.231.240.75]:56234) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h1t9v-0003Et-Jz; Thu, 07 Mar 2019 08:34:03 -0500 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1h1t9s-0001kQ-E9; Thu, 07 Mar 2019 16:34:00 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Thu, 7 Mar 2019 16:33:56 +0300 Message-Id: <1551965640-164939-1-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 185.231.240.75 Subject: [Qemu-devel] [PATCH v2 0/4] iotests: check whitelisted formats X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, armbru@redhat.com, mreitz@redhat.com, rkagan@virtuozzo.com, andrey.shinkevich@virtuozzo.com, den@openvz.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Some test cases require specific formats to be supported by QEMU. The list of formats supported by the block layer doesn't take whitelists into account. This series manages this issue. The method decorator skip_if_unsupported() checks if requested formats are whitelisted. The sample output is shown with the test #139. v1: Discussed in the email thread with the message ID: <1551694120-768127-1-git-send-email-andrey.shinkevich@virtuozzo.com> Fixes and amendments suggested by Kevin Wolf were applied in v2. Andrey Shinkevich (4): iotests: open notrun files in text mode block: iterate_format with account of whitelisting iotests: ask QEMU for supported formats iotests: check whitelisted formats block.c | 23 ++++++++++++++++++---- blockdev.c | 4 +++- include/block/block.h | 2 +- qemu-img.c | 2 +- tests/qemu-iotests/139 | 3 +++ tests/qemu-iotests/check | 13 ++++++++++++- tests/qemu-iotests/iotests.py | 45 ++++++++++++++++++++++++++++++++++++++++++- 7 files changed, 83 insertions(+), 9 deletions(-)