From nobody Wed Nov 27 04:46:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1701649713; cv=none; d=zohomail.com; s=zohoarc; b=aBNfjIRCHmnmU39wKr0+oId2OKPYP0cnMjrxZWPMA6VVY6YzeZnp+Lb1FDCfH+t2S1Sr3qJ1z5GlX3lOEwQoC+6fbV5HUt5lUvAv2wzwK8OONzAsqiBq1iehJbPY/1NAHNcBBgpUnQGpz/xJa4XPdQj9PQd0RD11IKSUOYUs5XY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701649713; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=QIUscvz7pf1VFtRN5hHqsbtj5B7mCmCi2M+oBvF9ZJ8=; b=iqBOZRqtNam4TxXCJRZYtSZt3/CAQvtQGUNJlAjQMO5vnuj/RmlrczaLtiB1DGua4+o8hSnYVLjd9fpfO/H4mEc4Eg2DxYfuoA/zADA4w9MScuE6UhJMJfmhp3KVTIOW/0aJxEUeZu0YWkWW+A/By8xFViJdrLKtYJ5QbP5G+TE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701649713503195.00873206787924; Sun, 3 Dec 2023 16:28:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r9woN-0006Zh-1c; Sun, 03 Dec 2023 19:27:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r9wnw-0004xu-SY; Sun, 03 Dec 2023 19:27:20 -0500 Received: from mail-yw1-x1130.google.com ([2607:f8b0:4864:20::1130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r9wnu-0000KK-MQ; Sun, 03 Dec 2023 19:27:20 -0500 Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-5b383b4184fso42270547b3.1; Sun, 03 Dec 2023 16:27:18 -0800 (PST) Received: from localhost.localdomain ([201.206.180.22]) by smtp.gmail.com with ESMTPSA id l63-20020a0de242000000b005d3e6ce07e7sm2443187ywe.6.2023.12.03.16.27.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 16:27:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701649637; x=1702254437; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QIUscvz7pf1VFtRN5hHqsbtj5B7mCmCi2M+oBvF9ZJ8=; b=F9GthGd1GiYZX2G1+uiux7KUAvDGtoEdjyUaBlu0zOeT3rywMSJKkVYY3odDWwxAYC REL4yOv9ehCXEmDde8CLxl364z/7DU9kZ+rz7aYKyLialOs4noAi+lFFbxYtrJVIGBq0 Uw3BobQpPNCEpYmsff1+8xL/i3kRsk+zOAfxXirvDq6poT3wHkxhhZl5H/utyWoOoRJz BOkUH5cpmdyRepaEhifiBhldQW36i7dMo5Wz2L0NoQ9AYi14zHupzPv7rqnGcBXAUfLB yaCBSLo+4te6ZLgnyT1/qXrY90iJwHPb6S+Ec5OdAWSPzeI1rnxqLtbwRCWB3wEtmjxz 1Kvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701649637; x=1702254437; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QIUscvz7pf1VFtRN5hHqsbtj5B7mCmCi2M+oBvF9ZJ8=; b=WkN3l8Sfcr76LKizgmHUm8YdgaGbsb7S1tbJKoxR1ijOa4iXCQQ/XqjPdAiVVOYkIR 3PozXZoRfkaatzaDaHg/wZQKpGfASSnsWdkqCg0zbgAk7SqL1CYOBvbwu2haBd4gDFk4 D98TRG/HMT/Y8kTj1fdOe6Ss2w3xqVnPLSkf1FJsszJRUMXEfY1yfsURh+02CwH6HmM6 14ufq/65hyizlFND21rSrRYzDh5UPyadTjRWKABMsMYtaNV4tDi5cWqrwQSLo0jsDKu9 KeLCAOIP2wWeDPy48MRV6XHpQ7hztlUgnEB5todVFT07Zv4m+RO9H3ums49bW1znrxth r2kA== X-Gm-Message-State: AOJu0Yz3RK3FHjpS5jZobay9ozCVIa+PAPuIjMjQV+Paj9Q9KuiMu9Ds dvas7NcbKhR6Jz8gHu5+TNIVqReDuGr+XA== X-Google-Smtp-Source: AGHT+IH6vv7TSWlMdTuPnjG0o72KrjSPjfDASnpBarED5pI+wI1eODywdxLh9lXfx9EkF99CfiZubg== X-Received: by 2002:a05:690c:1e:b0:5d8:56f7:abe6 with SMTP id bc30-20020a05690c001e00b005d856f7abe6mr736539ywb.48.1701649637106; Sun, 03 Dec 2023 16:27:17 -0800 (PST) From: Sergey Kambalin X-Google-Original-From: Sergey Kambalin To: qemu-arm@nongnu.org Cc: qemu-devel@nongnu.org, Sergey Kambalin Subject: [PATCH v3 42/45] Add mailbox property tests. Part 3 Date: Sun, 3 Dec 2023 18:26:16 -0600 Message-Id: <20231204002619.1367044-43-sergey.kambalin@auriga.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231204002619.1367044-1-sergey.kambalin@auriga.com> References: <20231204002619.1367044-1-sergey.kambalin@auriga.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1130; envelope-from=serg.oker@gmail.com; helo=mail-yw1-x1130.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_PDS_OTHER_BAD_TLD=0.01, T_SCC_BODY_TEXT_LINE=-0.01, UPPERCASE_50_75=0.008 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1701649714846100009 Content-Type: text/plain; charset="utf-8" Signed-off-by: Sergey Kambalin --- tests/qtest/bcm2838-mbox-property-test.c | 213 ++++++++++++++++++++++- 1 file changed, 212 insertions(+), 1 deletion(-) diff --git a/tests/qtest/bcm2838-mbox-property-test.c b/tests/qtest/bcm2838= -mbox-property-test.c index 5322c563a0..1b4a2ed9cb 100644 --- a/tests/qtest/bcm2838-mbox-property-test.c +++ b/tests/qtest/bcm2838-mbox-property-test.c @@ -361,7 +361,194 @@ DECLARE_TEST_CASE_SETUP(SET_FB_VIRT_WIDTH) { tag->request.value.height =3D 600; } =20 -//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(TEST_FB_DEPTH) { + g_assert_cmpint(tag->response.value.bpp, =3D=3D, DUMMY_VALUE); +} +DECLARE_TEST_CASE_SETUP(TEST_FB_DEPTH) { + tag->request.value.bpp =3D DUMMY_VALUE; +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(GET_FB_DEPTH) { + g_assert_cmpint(tag->response.value.bpp, =3D=3D, 16); +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(SET_FB_DEPTH) { + g_assert_cmpint(tag->response.value.bpp, =3D=3D, 24); +} +DECLARE_TEST_CASE_SETUP(SET_FB_DEPTH) { + tag->request.value.bpp =3D 24; +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(TEST_PIXEL_ORDER) { + g_assert_cmphex(tag->response.value.pixel_order, =3D=3D, DUMMY_VALUE); +} +DECLARE_TEST_CASE_SETUP(TEST_PIXEL_ORDER) { + tag->request.value.pixel_order =3D DUMMY_VALUE; +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(GET_PIXEL_ORDER) { + g_assert_cmphex(tag->response.value.pixel_order, =3D=3D, PIXEL_ORDER_R= GB); +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(SET_PIXEL_ORDER, BGR) { + g_assert_cmphex(tag->response.value.pixel_order, =3D=3D, PIXEL_ORDER_B= GR); +} +DECLARE_TEST_CASE_SETUP(SET_PIXEL_ORDER, BGR) { + tag->request.value.pixel_order =3D PIXEL_ORDER_BGR; +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(SET_PIXEL_ORDER, RGB) { + g_assert_cmphex(tag->response.value.pixel_order, =3D=3D, PIXEL_ORDER_B= GR); +} +DECLARE_TEST_CASE_SETUP(SET_PIXEL_ORDER, RGB) { + tag->request.value.pixel_order =3D PIXEL_ORDER_BGR; +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(TEST_FB_ALPHA_MODE) { + g_assert_cmphex(tag->response.value.alpha_mode, =3D=3D, DUMMY_VALUE); +} +DECLARE_TEST_CASE_SETUP(TEST_FB_ALPHA_MODE) { + tag->request.value.alpha_mode =3D DUMMY_VALUE; +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(GET_FB_ALPHA_MODE) { + g_assert_cmphex(tag->response.value.alpha_mode, =3D=3D, ALPHA_MODE_IGN= ORED); +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(SET_FB_ALPHA_MODE, ENABLED) { + g_assert_cmphex(tag->response.value.alpha_mode, =3D=3D, ALPHA_MODE_ENA= BLED); +} +DECLARE_TEST_CASE_SETUP(SET_FB_ALPHA_MODE, ENABLED) { + tag->request.value.alpha_mode =3D ALPHA_MODE_ENABLED; +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(SET_FB_ALPHA_MODE, REVERSED) { + g_assert_cmphex(tag->response.value.alpha_mode, =3D=3D, ALPHA_MODE_REV= ERSED); +} +DECLARE_TEST_CASE_SETUP(SET_FB_ALPHA_MODE, REVERSED) { + tag->request.value.alpha_mode =3D ALPHA_MODE_REVERSED; +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(SET_FB_ALPHA_MODE, IGNORED) { + g_assert_cmphex(tag->response.value.alpha_mode, =3D=3D, ALPHA_MODE_IGN= ORED); +} +DECLARE_TEST_CASE_SETUP(SET_FB_ALPHA_MODE, IGNORED) { + tag->request.value.alpha_mode =3D ALPHA_MODE_IGNORED; +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(GET_PITCH) { + g_assert_cmpint(tag->response.value.pitch, =3D=3D, 1280); +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(TEST_VIRTUAL_OFFSET) { + g_assert_cmpint(tag->response.value.x, =3D=3D, DUMMY_VALUE); + g_assert_cmpint(tag->response.value.y, =3D=3D, DUMMY_VALUE); +} +DECLARE_TEST_CASE_SETUP(TEST_VIRTUAL_OFFSET) { + tag->request.value.x =3D DUMMY_VALUE; + tag->request.value.y =3D DUMMY_VALUE; +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(GET_VIRTUAL_OFFSET) { + g_assert_cmpint(tag->response.value.x, =3D=3D, 0); + g_assert_cmpint(tag->response.value.y, =3D=3D, 0); +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(SET_VIRTUAL_OFFSET, _0_) { + g_assert_cmpint(tag->response.value.x, =3D=3D, 0); + g_assert_cmpint(tag->response.value.y, =3D=3D, 0); +} +DECLARE_TEST_CASE_SETUP(SET_VIRTUAL_OFFSET, _0_) { + tag->request.value.x =3D 0; + tag->request.value.y =3D 0; +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(SET_VIRTUAL_OFFSET, _42_) { + g_assert_cmpint(tag->response.value.x, =3D=3D, 42); + g_assert_cmpint(tag->response.value.y, =3D=3D, 42); +} +DECLARE_TEST_CASE_SETUP(SET_VIRTUAL_OFFSET, _42_) { + tag->request.value.x =3D 42; + tag->request.value.y =3D 42; +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(GET_OVERSCAN) { + g_assert_cmpint(tag->response.value.top, =3D=3D, 0); + g_assert_cmpint(tag->response.value.bottom, =3D=3D, 0); + g_assert_cmpint(tag->response.value.left, =3D=3D, 0); + g_assert_cmpint(tag->response.value.right, =3D=3D, 0); +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(TEST_OVERSCAN) { + g_assert_cmpint(tag->response.value.top, =3D=3D, 0); + g_assert_cmpint(tag->response.value.bottom, =3D=3D, 0); + g_assert_cmpint(tag->response.value.left, =3D=3D, 0); + g_assert_cmpint(tag->response.value.right, =3D=3D, 0); +} +DECLARE_TEST_CASE_SETUP(TEST_OVERSCAN) { + tag->request.value.top =3D DUMMY_VALUE; + tag->request.value.bottom =3D DUMMY_VALUE; + tag->request.value.left =3D DUMMY_VALUE; + tag->request.value.right =3D DUMMY_VALUE; +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(SET_OVERSCAN) { + g_assert_cmpint(tag->response.value.top, =3D=3D, 0); + g_assert_cmpint(tag->response.value.bottom, =3D=3D, 0); + g_assert_cmpint(tag->response.value.left, =3D=3D, 0); + g_assert_cmpint(tag->response.value.right, =3D=3D, 0); +} +DECLARE_TEST_CASE_SETUP(SET_OVERSCAN) { + tag->request.value.top =3D DUMMY_VALUE; + tag->request.value.bottom =3D DUMMY_VALUE; + tag->request.value.left =3D DUMMY_VALUE; + tag->request.value.right =3D DUMMY_VALUE; +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(GET_DMA_CHANNELS) { + g_assert_cmphex(tag->response.value.mask, =3D=3D, GPIO_MASK); +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(GET_COMMANDLINE) { + /* No special checks are needed for this test case */ +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(GET_NUM_DISPLAYS) { + g_assert_cmpint(tag->response.value.num_displays, =3D=3D, 1); +} + +/*------------------------------------------------------------------------= ----*/ +DECLARE_TEST_CASE(SET_PITCH) { + /* No special checks are needed for this test case */ +} +DECLARE_TEST_CASE_SETUP(SET_PITCH) { + tag->request.value.pitch =3D DUMMY_VALUE; +} + +/*------------------------------------------------------------------------= ----*/ int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); @@ -395,6 +582,30 @@ int main(int argc, char **argv) QTEST_ADD_TEST_CASE(TEST_FB_VIRT_WIDTH); QTEST_ADD_TEST_CASE(GET_FB_VIRT_WIDTH, INITIAL); QTEST_ADD_TEST_CASE(SET_FB_VIRT_WIDTH); + QTEST_ADD_TEST_CASE(TEST_FB_DEPTH); + QTEST_ADD_TEST_CASE(GET_FB_DEPTH); + QTEST_ADD_TEST_CASE(SET_FB_DEPTH); + QTEST_ADD_TEST_CASE(TEST_PIXEL_ORDER); + QTEST_ADD_TEST_CASE(GET_PIXEL_ORDER); + QTEST_ADD_TEST_CASE(SET_PIXEL_ORDER, BGR); + QTEST_ADD_TEST_CASE(SET_PIXEL_ORDER, RGB); + QTEST_ADD_TEST_CASE(TEST_FB_ALPHA_MODE); + QTEST_ADD_TEST_CASE(GET_FB_ALPHA_MODE); + QTEST_ADD_TEST_CASE(SET_FB_ALPHA_MODE, ENABLED); + QTEST_ADD_TEST_CASE(SET_FB_ALPHA_MODE, REVERSED); + QTEST_ADD_TEST_CASE(SET_FB_ALPHA_MODE, IGNORED); + QTEST_ADD_TEST_CASE(GET_PITCH); + QTEST_ADD_TEST_CASE(TEST_VIRTUAL_OFFSET); + QTEST_ADD_TEST_CASE(GET_VIRTUAL_OFFSET); + QTEST_ADD_TEST_CASE(SET_VIRTUAL_OFFSET, _0_); + QTEST_ADD_TEST_CASE(SET_VIRTUAL_OFFSET, _42_); + QTEST_ADD_TEST_CASE(GET_OVERSCAN); + QTEST_ADD_TEST_CASE(TEST_OVERSCAN); + QTEST_ADD_TEST_CASE(SET_OVERSCAN); + QTEST_ADD_TEST_CASE(GET_DMA_CHANNELS); + QTEST_ADD_TEST_CASE(GET_COMMANDLINE); + QTEST_ADD_TEST_CASE(GET_NUM_DISPLAYS); + QTEST_ADD_TEST_CASE(SET_PITCH); =20 return g_test_run(); } --=20 2.34.1