From patchwork Tue Mar 1 21:27:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Feiner X-Patchwork-Id: 8470621 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4202B9F314 for ; Tue, 1 Mar 2016 21:27:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 86B7F2034A for ; Tue, 1 Mar 2016 21:27:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B85682034E for ; Tue, 1 Mar 2016 21:27:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752647AbcCAV1p (ORCPT ); Tue, 1 Mar 2016 16:27:45 -0500 Received: from mail-pf0-f172.google.com ([209.85.192.172]:34483 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751501AbcCAV1o (ORCPT ); Tue, 1 Mar 2016 16:27:44 -0500 Received: by mail-pf0-f172.google.com with SMTP id 4so41472239pfd.1 for ; Tue, 01 Mar 2016 13:27:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GN1Fz7twUcorbdl8MA3kkq3QXC3jiLFxViccZ9FQKjU=; b=Moc6FrQTWd2RtY0B6Dj9I+ad0JYxac+bddu6IHMQXcWj2PSV452SOXZ5FPQrzfaFsV 1/a8BcN1LkbMjM+n2kPlnYwds4AMdZyKpWkeImZYIDUnFOuxe3JfXiDwnP/exEkdxZf6 mSqwhdlDjbsD26cSo45HkOvZqbAQAtHQFzqEcNEQaPruNPJNlNi3GSr+q8I31PGEFul9 AgPxNQeEVdN5TBgwGRYFh1sEh7wndt7383H9YCCcsaNsJzv6cW4irwEuJbv3kHIks9JJ 1mp3CG6WuTxwXzkoSzMSz/Jzgn4BctC4xxS1ow7YWe0O9LHj++vHVffsRNZh1E86JEl9 9oFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GN1Fz7twUcorbdl8MA3kkq3QXC3jiLFxViccZ9FQKjU=; b=OcemyfsC4fnoQHttoahwWRfJpXS8jTc+NUkC6EG/xdUlwj2vRP7gR4P4caaGEfkDT6 BcfYs4RqugO0RVpeu6EnDKxwrvFy7Lk0+Zm3BSRRa+slfeizhtplTbRowthFQSBSk1VF Z2Bs8C/3r3MSmsDnUunFjj9Dp08J8xQB7T2y7+4/yyGDc3qcTLEu1vGRjZLQOsc+QUij 1mTbShW6ylSdFOs+Ix8ZvVu8XtbP6FJQkoecAe1NKpR2FXTbZ6GN/Zp5agTIHRis7Bbt baZ1K2ent/TsbX0Ru/wKJuTwtS9Eg+Zel/8/MQyyz81thxQp3W6BbzuH4m29kjq/+eS2 bF9g== X-Gm-Message-State: AD7BkJJR5cmIwv6p5sA07pnmWEIyVVhgzKrq6wqeLhzpOlw3gvwDJFdWEKkdKLYBKhNR2tNZ X-Received: by 10.98.75.8 with SMTP id y8mr5967594pfa.126.1456867663402; Tue, 01 Mar 2016 13:27:43 -0800 (PST) Received: from localhost ([2620:0:1009:3:b1e9:1d95:1ce5:e70c]) by smtp.gmail.com with ESMTPSA id 81sm30870971pfa.12.2016.03.01.13.27.42 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 01 Mar 2016 13:27:42 -0800 (PST) From: Peter Feiner To: kvm@vger.kernel.org, drjones@redhat.com, pbonzini@redhat.com Cc: pfeiner@google.com Subject: [kvm-unit-tests 1/5] lib: print failing assert cond Date: Tue, 1 Mar 2016 13:27:34 -0800 Message-Id: <1456867658-10937-2-git-send-email-pfeiner@google.com> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: <1456867658-10937-1-git-send-email-pfeiner@google.com> References: <1456867658-10937-1-git-send-email-pfeiner@google.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Peter Feiner Reviewed-by: Andrew Jones --- lib/libcflat.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libcflat.h b/lib/libcflat.h index 39100f2..1f0049c 100644 --- a/lib/libcflat.h +++ b/lib/libcflat.h @@ -74,7 +74,8 @@ extern int report_summary(void); #define assert(cond) \ do { \ if (!(cond)) \ - printf("%s:%d: assert failed\n", __FILE__, __LINE__), \ + printf("%s:%d: assert failed: %s\n", \ + __FILE__, __LINE__, #cond), \ abort(); \ } while (0)