From patchwork Mon Oct 17 11:46:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 13008653 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 59C8FC4332F for ; Mon, 17 Oct 2022 11:52:41 +0000 (UTC) Received: from localhost ([::1]:48970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okOfg-0001OF-84 for qemu-devel@archiver.kernel.org; Mon, 17 Oct 2022 07:52:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okOaB-0003uK-Qc for qemu-devel@nongnu.org; Mon, 17 Oct 2022 07:47:21 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:53820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okOaA-0000Y7-4w for qemu-devel@nongnu.org; Mon, 17 Oct 2022 07:46:59 -0400 Received: by mail-pj1-x1032.google.com with SMTP id fw14so10739291pjb.3 for ; Mon, 17 Oct 2022 04:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=pAE6Kz1UvNwqKa+9AtYhVCWT4MKKxa9z5ogZqixJo/k=; b=oZmHQr4nL2T03sRSdIrN3blWcn6SQrJYq4grPTcMCrmbJ5WalWLDT/A0PB7mxTTk9J C1abtGsH/MDbp0jyL+OlsQNupcN+05CBUYJ1qcSdLumuqYgGIRgoJi8dLy2uTAg1he5R ApmfTkqu/Gbxbyawb0pQqzVEmn9a6YhWy0hB4aJ8bMa/TGwqHGTD9zjAFgsdMF7/3xXq AH/mpT002Wx/JLuK0HxerthLaA6H8Q5tQL1ufWC5YKCAq7bdc9zpUuBPdotcoBxfAGm0 YURsk4QUIPNSdrCVOPtxyS+nZs6ePKbUqWKLydTyftFzUGs3G5q1lm9oVYzfE6uhoWAW bDGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pAE6Kz1UvNwqKa+9AtYhVCWT4MKKxa9z5ogZqixJo/k=; b=mEKEXEgLC4WB3y9CwZv+dLLnKnaesvUGvB+fpUAkE+RTcn5EFxI66VdG1LoBFSZdK/ Mvht18IL1LgHEc4qsJTSUhLu3aivunCxll/R3uQ8a28FCFEHD0qWYddLcDGBogWBv5k3 rcHYx2lNRnzLfEQ4pAmFKveD2DrFO/7viAeVe1dDkeAgXcGZIAFkJZN6IjVIWfclqVTL mi7PIdic8FvuzdUq1T9KPJoJjXC8US4jCPMD7ne5klCbpV4ceIsvpfEA4HYpK6Qi/Ram mEiVCy+Nh8t6AZKlX5sPi7vOkYyi2M4jnJ0ByPF6FTZfzUH7cqjXQtfczFVHQOO//SJy Hxtw== X-Gm-Message-State: ACrzQf1nQ3ChFk+lv8G6y55wAEiWg9Y+oBFdq09IjT6Nrh2sTlojghaw jd/8c2L5vzi+h5iz+R3KzonLcjmn/8aLRQ== X-Google-Smtp-Source: AMsMyM6QrA4PXchLp3qRjAyB06xYlonhBzc5vUBgLlRHFfCggEj/pJOI1IND/f1NZYYl+xy44nXIFQ== X-Received: by 2002:a17:903:2d1:b0:183:2b26:575d with SMTP id s17-20020a17090302d100b001832b26575dmr11651508plk.77.1666007215407; Mon, 17 Oct 2022 04:46:55 -0700 (PDT) Received: from ubuntu.. ([65.20.73.185]) by smtp.gmail.com with ESMTPSA id c28-20020aa7953c000000b0053725e331a1sm6870382pfp.82.2022.10.17.04.46.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 04:46:55 -0700 (PDT) From: Bin Meng To: qemu-devel@nongnu.org Cc: Bin Meng , Shengjiang Wu , "Dr. David Alan Gilbert" , Juan Quintela , Laurent Vivier , Paolo Bonzini , Thomas Huth Subject: [PATCH 1/2] tests/qtest: migration-test: Fix [-Werror=format-overflow=] build warning Date: Mon, 17 Oct 2022 19:46:46 +0800 Message-Id: <20221017114647.2226535-1-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=bmeng.cn@gmail.com; helo=mail-pj1-x1032.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 autolearn=ham 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng When tmpfs is NULL, a build warning is seen with GCC 9.3.0. It's strange that GCC 11.2.0 on Ubuntu 22.04 does not catch this, neither did the QEMU CI. Reported-by: Shengjiang Wu Fixes: e5553c1b8d28 ("tests/qtest: migration-test: Avoid using hardcoded /tmp") Signed-off-by: Bin Meng Reviewed-by: Markus Armbruster --- tests/qtest/migration-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index ef4427ff4d..83a8998e40 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -2481,7 +2481,7 @@ int main(int argc, char **argv) tmpfs = g_dir_make_tmp("migration-test-XXXXXX", &err); if (!tmpfs) { - g_test_message("g_dir_make_tmp on path (%s): %s", tmpfs, + g_test_message("g_dir_make_tmp on path (%s): %s", g_get_tmp_dir(), err->message); } g_assert(tmpfs); From patchwork Mon Oct 17 11:46:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 13008652 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A4292C4332F for ; Mon, 17 Oct 2022 11:52:37 +0000 (UTC) Received: from localhost ([::1]:48960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okOfc-0001NH-DX for qemu-devel@archiver.kernel.org; Mon, 17 Oct 2022 07:52:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okOaE-0003uR-JZ for qemu-devel@nongnu.org; Mon, 17 Oct 2022 07:47:21 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:34729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okOaC-0000YY-P2 for qemu-devel@nongnu.org; Mon, 17 Oct 2022 07:47:01 -0400 Received: by mail-pl1-x62c.google.com with SMTP id n7so10546074plp.1 for ; Mon, 17 Oct 2022 04:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=sz39aI+8kIgh6asFIG5zn5AtcqBaxTiIVgi7IhMIlFg=; b=eozwNccRqJIxNPv22TtrU3n4ATteqbOb4AF0cej29H/9fVs6L/AXM8y+nlAGGEeebx LBr3GIMBFCVNjXu473kT3z+OD2cTMHwxOZgG3tpowsSZCkUJMoJ2ne6hfuKwoDaDlEK3 AWVPI6VpbYSoAk5kmsmGsayQMvRzKYlfxUicE/M0gvLt0yoHsylMUjGZGPTaK73YufyL qLmGV9KxWqohzem2zBpqr52kAg+dlDKOPWg73BxgSqhQIw6bSU2lzcwMafPX1U5MpFIh OFJes+ruryZXxxNhQY6zH8UKskam0wxRPoNYQS84WGtDSIoYPwHesa/ReswRW4/EdlKT v+7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=sz39aI+8kIgh6asFIG5zn5AtcqBaxTiIVgi7IhMIlFg=; b=qbVhrBFN4FuHPjlCKEIkbGhIAAhb4hWh0w+Z5HI6GZXf5vq7ZQDeWHvKIviYlU6CZs EumJEaBtjPOYbKz/RvLH/ZcnHgigVVxNyHjTrK7WkMEvKn/m7Uuxr6nI5cMyuv6G1D9x ifIyTucAnJCLUtTW7Dok0eaWnGhPFaF2o5dnGx0NlH4uDtj6DyYqbpOQpIFRn6rj3E7r hYX/0j9i01moeBKcn/w4Bhcx+9k/GqMrvaHU6dJIzb2WW6C9Aej2Zv2dHK4ASMRMkE0R tZGbgKbTBT+VCjxZYlvNeWp0r0eeys41Xm4/QNIVmmUQ6Mtnt3lnF4yUQqX9JeNSiQmY 8g7g== X-Gm-Message-State: ACrzQf3CKsGdjpz3pvTGnc05jdbtjyuJHgE3TxFYtf/ntn+A5R1mfxbD 4YuUaZ8Y5WbfSq0SfyYnGIXUBJn8qF8c5g== X-Google-Smtp-Source: AMsMyM4dq9nhKZOAddx82AJe3zuDZ8MLCqgmWfacDbc2HdWB0ihuACRzwvmDDHrzEilTg4pvSSn9uw== X-Received: by 2002:a17:903:120d:b0:179:d027:66f0 with SMTP id l13-20020a170903120d00b00179d02766f0mr11570743plh.61.1666007219190; Mon, 17 Oct 2022 04:46:59 -0700 (PDT) Received: from ubuntu.. ([65.20.73.185]) by smtp.gmail.com with ESMTPSA id c28-20020aa7953c000000b0053725e331a1sm6870382pfp.82.2022.10.17.04.46.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 04:46:58 -0700 (PDT) From: Bin Meng To: qemu-devel@nongnu.org Cc: Bin Meng , Shengjiang Wu , Laurent Vivier , Paolo Bonzini , Thomas Huth Subject: [PATCH 2/2] tests/qtest: vhost-user-test: Fix [-Werror=format-overflow=] build warning Date: Mon, 17 Oct 2022 19:46:47 +0800 Message-Id: <20221017114647.2226535-2-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221017114647.2226535-1-bmeng.cn@gmail.com> References: <20221017114647.2226535-1-bmeng.cn@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=bmeng.cn@gmail.com; helo=mail-pl1-x62c.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 autolearn=ham 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng When tmpfs is NULL, a build warning is seen with GCC 9.3.0. It's strange that GCC 11.2.0 on Ubuntu 22.04 does not catch this, neither did the QEMU CI. Reported-by: Shengjiang Wu Fixes: e6efe236c1d1 ("tests/qtest: vhost-user-test: Avoid using hardcoded /tmp") Signed-off-by: Bin Meng Reviewed-by: Markus Armbruster --- tests/qtest/vhost-user-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c index e8d2da7228..819b87df3c 100644 --- a/tests/qtest/vhost-user-test.c +++ b/tests/qtest/vhost-user-test.c @@ -571,7 +571,7 @@ static TestServer *test_server_new(const gchar *name, tmpfs = g_dir_make_tmp("vhost-test-XXXXXX", &err); if (!tmpfs) { - g_test_message("g_dir_make_tmp on path (%s): %s", tmpfs, + g_test_message("g_dir_make_tmp on path (%s): %s", g_get_tmp_dir(), err->message); g_error_free(err); }