Message ID | 20210903090339.1074887-18-alex.bennee@linaro.org |
---|---|
State | Accepted |
Commit | 30b95b44523dbe0f0a0ad2cd23232dbb0c1c6a69 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp830497jai; Fri, 3 Sep 2021 02:19:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzm1kLvnTnU7IrVCXjCFrkiurBjbaV08DAtBp2TVqbOpKPOaYgVYeF3GHobSSb6I9TVsPRa X-Received: by 2002:a25:c74c:: with SMTP id w73mr3438227ybe.311.1630660763570; Fri, 03 Sep 2021 02:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660763; cv=none; d=google.com; s=arc-20160816; b=nGlVaZs8jnucjsfkh1q+KRLoECg4RrzM+j46kbVUjsPR1xFXWJJRu8RJazlSddrDhB 70PZNHPD1LfP1iXzScyt9ptIFby/I9CGsC8Jbr7DeKEV77hFIPxUL9bN8jVi4HKESQGz CcIAa/JrBosaJkjp+N8U8W1l/wGwFccPRqxLBqxj4zeDbs+PQk5h5ZC43ZYXky+r2IfF UxNPuWHU1OLAFp7yuj7/WI9y29Jl5sHtgIPMyVV5jVkAJTVM0jvmUMpcbphRaI6trX3f 0c+XAmVSojwXf2EzsFwaVwo/uGUZ+iZb7jjgp/FJbvTlNlVcpPWm5Q6dg33kjA4JeAXC WaiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=P0i71SO0mUfOxacGplPpPt2MK0kYjZTuvRy4ItPlDSU=; b=zMusf6uwbJDCHGCZBPQA6Eyo1Xrqqf/aCVhHUWmhXs95H0epONq6CPOlvvHCA53XYk UonoLm4BKD5/2MNM1/jxqUKFObOrbQhaWjjryrwRoE/wl1pys1xrq05NBZLOQXf+LpBd ulEBdjqrFkZ2nm5RFCwIdUrkNAdcLL03jTxOwENdxtu4V8nMv1SMR1Py+l/qbjiabE/a yMjBZkqZdsKUGgIjaxBiYlKkxu1b8Aeh4OQOeESIE3Fi2kZsx6S4U1El5FOGTYx2BpEN SMeGlwhP+ORhZ9xqMB0+WJH6crfLysFpxStLTuKFS/aHrzaddWG97T/6DP6IsYUAsrq2 5hhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YLuv6o8Q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s13si5130804ybu.133.2021.09.03.02.19.23 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YLuv6o8Q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1mM5M2-0001bN-Uy for patch@linaro.org; Fri, 03 Sep 2021 05:19:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1mM57K-0006YL-P1 for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:12 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:44928) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1mM57F-0005lS-Co for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:06 -0400 Received: by mail-wr1-x42d.google.com with SMTP id g18so7174978wrc.11 for <qemu-devel@nongnu.org>; Fri, 03 Sep 2021 02:04:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P0i71SO0mUfOxacGplPpPt2MK0kYjZTuvRy4ItPlDSU=; b=YLuv6o8Q6q86KhnHPd4gpYOdVjBAoVIwsG89SLENecGj4DYUgAJ8neNjKnayOQvtKL q0qAvzfj8bRrr6+bR2pkhvYBGJxnxtS1yIinImUwxgZxqe3qjLbZKf1YgFySQjmZQLtL xKA7SlJh78XHtB0udg2goZb39EFpUbX7EqZHOnVi3ikfbkHA7VQsog7yzwcKtUn2Jp9K H3xqchSiZYrhvX8S0zF0ddJOt24+i1Da1So9wlmwu+cV5QU5E6s1PfM9F0aMxrWYCQPW MjawGKTqoBJPUaWKZA04SlwzPCanDFQwG5LGZnrGOoYremBo5ZuUOO59RJ9IjTTxNxYj BDrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P0i71SO0mUfOxacGplPpPt2MK0kYjZTuvRy4ItPlDSU=; b=BWtZWkxIgQxcCbLNyOj1HaCeFdH7nMWsXArL+DukGmYK9coO+RwTIuPZ81UcQV/dP/ cOkJI4s6NJyRzPpg32AKnbSzAjSfIX81dEPbOsHoDilF+VKT2IRB75Edf1miSEdf6Go3 hKUlT8AV/yzbOhxQeRdWfaeSmzcyJ3R5e8UMRpjiSVaSbizQqUA5XXeRpANOGZaIbbzD usN/AkS3GmCxJg2EYWRwngoBURrtIlPBPeJgFSpUPIyLcBDwi0El9bp95o27996VfWFh J9C0Vp34SM8IYTSNNo8q2FHzZwfLENXafXaUw2Aq+kCfEbA2CYD0skkb7tNTsSYM6NJA GaSQ== X-Gm-Message-State: AOAM533g/1ABiWQ/dycBnIDuFG/YFP3BP36ButbDZOZxw+sqTxkQ3IL7 fr5/L/7KIPhf6iDT3lRYDwRJFA== X-Received: by 2002:a05:6000:1091:: with SMTP id y17mr2729359wrw.202.1630659843986; Fri, 03 Sep 2021 02:04:03 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id l2sm3876051wmi.1.2021.09.03.02.03.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:57 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 360151FFB1; Fri, 3 Sep 2021 10:03:41 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: peter.maydell@linaro.org Subject: [PULL 17/22] tests/plugins/bb: adapt to the new arg passing scheme Date: Fri, 3 Sep 2021 10:03:34 +0100 Message-Id: <20210903090339.1074887-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Alexandre Iooss <erdnaxe@crans.org>, Mahmoud Mandour <ma.mandourr@gmail.com>, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
testing and plugin updates
|
expand
|
diff --git a/tests/plugin/bb.c b/tests/plugin/bb.c index de09bdde4e..7d470a1011 100644 --- a/tests/plugin/bb.c +++ b/tests/plugin/bb.c @@ -104,10 +104,17 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, for (i = 0; i < argc; i++) { char *opt = argv[i]; - if (g_strcmp0(opt, "inline") == 0) { - do_inline = true; - } else if (g_strcmp0(opt, "idle") == 0) { - idle_report = true; + g_autofree char **tokens = g_strsplit(opt, "=", 2); + if (g_strcmp0(tokens[0], "inline") == 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_inline)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", opt); + return -1; + } + } else if (g_strcmp0(tokens[0], "idle") == 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &idle_report)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", opt); + return -1; + } } else { fprintf(stderr, "option parsing failed: %s\n", opt); return -1;