From patchwork Mon May 23 15:09:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 9132051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 19452607D5 for ; Mon, 23 May 2016 15:27:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FCDD2822F for ; Mon, 23 May 2016 15:27:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04AEA28239; Mon, 23 May 2016 15:27:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 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 mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 990042822F for ; Mon, 23 May 2016 15:27:21 +0000 (UTC) Received: from localhost ([::1]:48883 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rlI-0000HP-4A for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 May 2016 11:27:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rV4-0002TH-3W for qemu-devel@nongnu.org; Mon, 23 May 2016 11:10:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4rUt-000498-VW for qemu-devel@nongnu.org; Mon, 23 May 2016 11:10:32 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:34003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rUt-00048s-K0 for qemu-devel@nongnu.org; Mon, 23 May 2016 11:10:23 -0400 Received: by mail-wm0-x242.google.com with SMTP id n129so16053401wmn.1 for ; Mon, 23 May 2016 08:10:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=h66/kCKDQO1ogGf5L6Chib6nwyzMUeDr80mK+9AHXRg=; b=FlQ5joGp8sbUCpsEAnSFBqzk3Tojr/xkZhYJXpemaLf6t5DC7si/J1sNCjsdBhU2T3 4n/NsllIYrd3rx030SaAShQEiRJyy8tOxG0oFtoEqGfVArqqHhJ9PuHZuWr+T3bbDcxi n+CBn9UnouTgsbhSn1VL5vqfCDFQuGvfxMgVB7obs4z5VNxHY13ftVEeIaEUvzVf+TYG gdSw6VNDeEVcNuizgQ1EsERm9UqpyRvByX+W+R4Ol0VybsGDuKp0N85IGPhPXPT5YHbj V+MzTmqE92KFB+Z8EpGggGfUt6ioQFfFsVsQpMdaQxbTaZXdXLDgmnvW9YMupi33+J8+ cCkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=h66/kCKDQO1ogGf5L6Chib6nwyzMUeDr80mK+9AHXRg=; b=ccmVzk1z2HAS7+uPgS8Et2QtCCI3gVf6UacYF+TP30yXsJFPaKx8dikidw2PEs3oU5 l5GMe/fGCa/T3KQFp4bi7wgr65g4ZEFKCSIqU1csXvnAAF1ppxUAjsFMkvbxBga4agM1 vUIN+tirBcqgU9IsaauixkYf3PhzBGAtbfG5BdunZ6RPaCCZmjQxenCantEznv8U/KG4 sjSsjVxX3sJqyVF5eD1rLdQ4wkRR0KFfJif7RQyoMfas6zW+77524Rs0uqj8Xdtd6PF3 M6hAH4b/qIn8We/LhpIRf4e30qtyf80Q/rYjnglchiehnpqIhxYkwQI9uwafdOFm6zW/ IIUQ== X-Gm-Message-State: AOPr4FVzq4Un5SmgZeLFZXq1tstIyoeD0wSrXtu3V9OVnylYm9HimRYF/roNuOzZa/TUrA== X-Received: by 10.28.153.147 with SMTP id b141mr18188985wme.90.1464016223143; Mon, 23 May 2016 08:10:23 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-252-58.clienti.tiscali.it. [78.12.252.58]) by smtp.gmail.com with ESMTPSA id ac2sm19250359wjc.35.2016.05.23.08.10.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 May 2016 08:10:22 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 23 May 2016 17:09:56 +0200 Message-Id: <1464016199-43768-22-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1464016199-43768-1-git-send-email-pbonzini@redhat.com> References: <1464016199-43768-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PULL 21/24] coccinelle: add g_assert_cmp* to macro file 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: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This helps applying semantic patches to unit tests. Signed-off-by: Paolo Bonzini --- scripts/cocci-macro-file.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h index eceb4be..9f2e72e 100644 --- a/scripts/cocci-macro-file.h +++ b/scripts/cocci-macro-file.h @@ -117,3 +117,9 @@ struct { \ type *tqe_next; /* next element */ \ type **tqe_prev; /* address of previous next element */ \ } + +/* From glib */ +#define g_assert_cmpint(a, op, b) g_assert(a op b) +#define g_assert_cmpuint(a, op, b) g_assert(a op b) +#define g_assert_cmphex(a, op, b) g_assert(a op b) +#define g_assert_cmpstr(a, op, b) g_assert(strcmp(a, b) op 0)