From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E93ECC48BDF for ; Sun, 13 Jun 2021 12:48:10 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 509C461264 for ; Sun, 13 Jun 2021 12:48:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 509C461264 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivier.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsPX7-0003q6-CN for qemu-devel@archiver.kernel.org; Sun, 13 Jun 2021 08:48:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsPWR-0002z2-66; Sun, 13 Jun 2021 08:47:27 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:54075) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsPWP-0003ml-EC; Sun, 13 Jun 2021 08:47:26 -0400 Received: from [192.168.100.1] ([82.142.19.46]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.119]) with ESMTPSA (Nemesis) id 1M7auJ-1lxbeH3k21-0086uF; Sun, 13 Jun 2021 14:47:13 +0200 Subject: Re: [PATCH v2] fuzz: Display hexadecimal value with '0x' prefix To: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , qemu-devel@nongnu.org References: <20210612195842.1595999-1-f4bug@amsat.org> From: Laurent Vivier Message-ID: Date: Sun, 13 Jun 2021 14:47:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210612195842.1595999-1-f4bug@amsat.org> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:O9ZrO2uIQRQF4OBTX7aBAnH6dfD/sTWq819yiIMHI1O+GFdzugq Z6h25jhgx1v3P2XqVO123YInw0EWXLV/rprq5XmaB3IZTZHGmOBc3z1lG1Crg+UG2TxR6kx bVfBwpi5xodnLS/sRg//1AWGDfigmEFm8zATzM2E6tYiyjjWA53JyChg4bubK3zxFCAKyO0 WxdRaABikaSTjvnFbMe0w== X-UI-Out-Filterresults: notjunk:1;V03:K0:7qKzFYOEnpE=:RXXy/Dh5IWftt/mMuY3+HM Cto8nNFKrrEEyaSEVeeuHfJMsHcIaXYElf6Vbp1vKB0FNWPLZDVa0M3jun3AD7Oj+S5hdEaCg jGf1cejuc6c2tK4Oq4+1sotzsOfIvjp2o5ImTmq7DAcPZPcKeklVPEgn3aj+5pfBzgBwRQVBQ ttU+3WpPQ8iFp0T1n1YNcbo7dP9b9+0n9AJlk2eBhqbkWhEeRA73H7/9tinKckv5sfel244gd UUR55l3aer4UtmhcPWJHdnMPQRrf+IcUZknvsoJ95NvyPWg5D9sGBhxhCMqJbCbjp+AY0ImzO jvo540OuM9oRVCqfkiXDtkYs1WrMzQqgxQ+XCJIbbeLOJturgxAbrxy0sb2R9rJbhuTK//YZc 78eV+V9RPafxb83mMpw36SN8bZdkWVdIf5kH10EDOHPCG2QBtgUvFCA1WpqTipqRRLVoYwg33 rjSEFqWoOhBQ5mtBkdKGwEKna+A+v/9TSkoe5Km8n5+Toe84qEQmfO4Af1gahozW2xqUaBy0U gWVAw0MQKHAP9/tZuEUC6A= Received-SPF: none client-ip=212.227.17.13; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.144, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , qemu-trivial@nongnu.org, Alexander Bulekov , Bandan Das , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Le 12/06/2021 à 21:58, Philippe Mathieu-Daudé a écrit : > Use memory_region_size() to get the MemoryRegion size, > and display it with the '0x' prefix. > > Signed-off-by: Philippe Mathieu-Daudé > --- > v2: > - Use PRIx64 (lvivier) > - Use memory_region_size() > --- > tests/qtest/fuzz/generic_fuzz.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c > index cea7d4058e8..6c675227174 100644 > --- a/tests/qtest/fuzz/generic_fuzz.c > +++ b/tests/qtest/fuzz/generic_fuzz.c > @@ -841,9 +841,9 @@ static void generic_pre_fuzz(QTestState *s) > > g_hash_table_iter_init(&iter, fuzzable_memoryregions); > while (g_hash_table_iter_next(&iter, (gpointer)&mr, NULL)) { > - printf(" * %s (size %lx)\n", > + printf(" * %s (size 0x%" PRIx64 ")\n", > object_get_canonical_path_component(&(mr->parent_obj)), > - (uint64_t)mr->size); > + memory_region_size(mr)); > } > > if (!g_hash_table_size(fuzzable_memoryregions)) { > Reviewed-by: Laurent Vivier