From patchwork Fri Oct 28 01:37:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 688008 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t4mn92fXnz9svs for ; Fri, 28 Oct 2016 12:46:05 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.b=Oo19h1nL; dkim-atps=neutral Received: from localhost ([::1]:45512 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzwF9-0008A3-7U for incoming@patchwork.ozlabs.org; Thu, 27 Oct 2016 21:46:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60083) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzw8T-0001zB-Lg for qemu-devel@nongnu.org; Thu, 27 Oct 2016 21:39:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzw8P-0002o8-DT for qemu-devel@nongnu.org; Thu, 27 Oct 2016 21:39:09 -0400 Received: from ozlabs.org ([103.22.144.67]:46947) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bzw8P-0002lw-2R; Thu, 27 Oct 2016 21:39:05 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3t4mcL5PXxz9t1Q; Fri, 28 Oct 2016 12:38:26 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1477618706; bh=x6BHk4YeH/3JooYLIppeNVkm9ypib3aLsaqg71ca4cQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Oo19h1nLrcMNpsb7fZuQcjL4pHDrZOqu07QT9iPggCtMqrcTKfztzPFOlzAt10Cqi mb3PQoFw8GQflLz5zHBAsWFd2zhZoVbSRcG+PO/vOPryPROfg2E+mTN8gJ5tYDHbg0 E+ltFgAVouNxGActFUsASFl/abiGVSKKq7w1PwoQ= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 28 Oct 2016 12:37:05 +1100 Message-Id: <1477618694-21019-5-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477618694-21019-1-git-send-email-david@gibson.dropbear.id.au> References: <1477618694-21019-1-git-send-email-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 04/73] tests: don't check if qtest_spapr_boot() returns NULL 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: lvivier@redhat.com, thuth@redhat.com, qemu-devel@nongnu.org, aik@ozlabs.ru, mark.cave-ayland@ilande.co.uk, agraf@suse.de, mdroth@linux.vnet.ibm.com, qemu-ppc@nongnu.org, clg@kaod.org, bharata@linux.vnet.ibm.com, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Laurent Vivier qtest_spapr_boot()/qtest_pc_boot()/qtest_boot() call qtest_vboot() and qtest_vboot() calls g_malloc(), and g_malloc() never fails: if memory allocation fails, the application is terminated. Signed-off-by: Laurent Vivier Reviewed-by: Thomas Huth Reviewed-by: Greg Kurz Signed-off-by: David Gibson --- tests/libqos/libqos.c | 2 ++ tests/rtas-test.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/libqos/libqos.c b/tests/libqos/libqos.c index 7abb482..6226546 100644 --- a/tests/libqos/libqos.c +++ b/tests/libqos/libqos.c @@ -10,6 +10,8 @@ /** * Launch QEMU with the given command line, * and then set up interrupts and our guest malloc interface. + * Never returns NULL: + * Terminates the application in case an error is encountered. */ QOSState *qtest_vboot(QOSOps *ops, const char *cmdline_fmt, va_list ap) { diff --git a/tests/rtas-test.c b/tests/rtas-test.c index ba0867a..276c87e 100644 --- a/tests/rtas-test.c +++ b/tests/rtas-test.c @@ -14,7 +14,6 @@ static void test_rtas_get_time_of_day(void) time_t t1, t2; qs = qtest_spapr_boot("-machine pseries"); - g_assert(qs != NULL); t1 = time(NULL); ret = qrtas_get_time_of_day(qs->alloc, &tm, &ns);