From patchwork Tue Jul 4 14:48:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 784054 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x26R61kPbz9t2R for ; Wed, 5 Jul 2017 00:52:01 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ahPYOnqK"; dkim-atps=neutral Received: from localhost ([::1]:41772 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSPBG-0002iA-Kt for incoming@patchwork.ozlabs.org; Tue, 04 Jul 2017 10:51:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSP7h-0008DX-P5 for qemu-devel@nongnu.org; Tue, 04 Jul 2017 10:48:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSP7f-000157-3G for qemu-devel@nongnu.org; Tue, 04 Jul 2017 10:48:17 -0400 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:37446) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dSP7e-00014M-Ts for qemu-devel@nongnu.org; Tue, 04 Jul 2017 10:48:15 -0400 Received: by mail-wm0-x232.google.com with SMTP id i127so140860454wma.0 for ; Tue, 04 Jul 2017 07:48:14 -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=F8yl9dSoVDbMRq5dc/P7Ahv4mo8YJHu1zH25w5Joy/E=; b=ahPYOnqKtKYi9hX3oPQxIqRMsK4hTaEzKVJNBoy/XrZoQggu2UjQGsJdDOhVY6azf5 YpN6DCOCPqz3jZijr6K9wm2Z6z4Xw98ATB0rq1X5CNJc9R1jp6dcpscb1wvFYaByxp8N bouH2KraSzembDP3tIBu75vjaqL51qHaDZIWo= 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=F8yl9dSoVDbMRq5dc/P7Ahv4mo8YJHu1zH25w5Joy/E=; b=OFEFirH8vTZErDG4Z4J2Db0ZUtUjBQyzGDpsj7froRMWm3lFBtPPPtaLnSnyuKlTm6 p6WunDub8t7XADB2bQmAekMgePOdUiytsPBjTcPwVrgqWEFTJCViG47on1SsPaVcsnog ZSLJUQWiFrSbIerj4R8P138ao06sxIglxE4RBzhPDNFqUcfmJALio8g3r5cnSTghFki7 Tifqr3ZJHZdKrvEFyBumxvjV1NQvLBChVAVluf01GDgzEl3OWeYb9UldamyH4mAWkoLF +egWVaN+XLaPO0Wpq3hMTsrMi+Am9PTwKrRz3l0hGELcaQ829VB7/mErEX4+D3kZHD6C n33Q== X-Gm-Message-State: AKS2vOx4FYoe51SsiodxDgbP1fVHozFfUlz+5QUFGjMi6mi5x65vQj7W KkolGlTX8B0b8YdXJkbC/Q== X-Received: by 10.28.31.203 with SMTP id f194mr18534533wmf.44.1499179693756; Tue, 04 Jul 2017 07:48:13 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id w96sm15739393wrc.33.2017.07.04.07.48.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jul 2017 07:48:09 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id D68673E21EE; Tue, 4 Jul 2017 15:49:10 +0100 (BST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Tue, 4 Jul 2017 15:48:50 +0100 Message-Id: <20170704144859.17644-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170704144859.17644-1-alex.bennee@linaro.org> References: <20170704144859.17644-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::232 Subject: [Qemu-devel] [RISU PATCH 02/11] reginfo.c: always return 1 on OP_TESTEND 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: qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" In the master/apprentice setup the response byte of 1 is returned by write_fn. However when tracing it will happily report 0 as it successfully writes the last bytes. To avoid running of the end when tracing we just always return 1 at this point. Signed-off-by: Alex Bennée --- reginfo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reginfo.c b/reginfo.c index d9d37b3..76f24f9 100644 --- a/reginfo.c +++ b/reginfo.c @@ -39,7 +39,10 @@ int send_register_info(write_fn write_fn, void *uc) switch (op) { case OP_TESTEND: - return write_fn(&ri, sizeof(ri)); + write_fn(&ri, sizeof(ri)); + /* if we are tracing write_fn will return 0 unlike a remote + end, hence we force return of 1 here */ + return 1; case OP_SETMEMBLOCK: memblock = (void *)(uintptr_t)get_reginfo_paramreg(&ri); break;