Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 86BD6200C80 for ; Thu, 25 May 2017 23:44:56 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 85559160BCA; Thu, 25 May 2017 21:44:56 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CB661160BB4 for ; Thu, 25 May 2017 23:44:55 +0200 (CEST) Received: (qmail 104 invoked by uid 500); 25 May 2017 21:44:54 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 99993 invoked by uid 99); 25 May 2017 21:44:54 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 May 2017 21:44:54 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 5F488C0040 for ; Thu, 25 May 2017 21:44:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.397 X-Spam-Level: X-Spam-Status: No, score=-2.397 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id ZtJJFtix9rTf for ; Thu, 25 May 2017 21:44:53 +0000 (UTC) Received: from mail-pf0-f173.google.com (mail-pf0-f173.google.com [209.85.192.173]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 795225F36F for ; Thu, 25 May 2017 21:44:52 +0000 (UTC) Received: by mail-pf0-f173.google.com with SMTP id m17so178592034pfg.3 for ; Thu, 25 May 2017 14:44:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=IrFWt9GwXg+H9NJYwcK5xboIPJl/8VmxviUhO/p+BZI=; b=PzBzqmSsUuSf+oOW7Dy5FxsMmbe6PKnpCGhS/u3IqjnpvO7ykxTGtfo1/vlvU296gW d2A8g1AWqQzkmvf7tB44gRSZvf2+y+nQ7OWd1w14Ep2q7OI/sjBC6Gc2SYjzoDqw0HaK DWKHe851b2LucF5ymBYN3AO3jkqVrPvN4hch3HRoW17+SJFcNulnqb9LjWFFItrvhzbW EG5v5/iwZlmbBc7XTZT9Qdi7rHSUehmqLI08V/Rl0qkK2JQXqJ+cnoYBBch+ImWNj7xC q95ZoUXkpEvxZs+afrq3Ghc41bRHqcsgT+OkjyhU+Q01ZABC/1zmfJFxRfTfWQsaIyyg cZNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=IrFWt9GwXg+H9NJYwcK5xboIPJl/8VmxviUhO/p+BZI=; b=uhjiqOZBN4pyAdYoq7d9uD1DHcpCzgJQCOa8ZppDRYu6woQwOF/lJByrVAmXTzJ1W4 exn8D2fH7TST+SeGI/a7/bBBUzHva1husqN+CZfdRVpsLgvxXYtjGStyovmbc8cMVo86 bj62p1Uocjs2mAsEI/Yl7j8dNtALTLaPP663JG/IrtLlK5jgpPrB2nvtSlPkeX675Ppq ucSrdLxnm+oxL5tPvBLv/tx4c3briccBA8UEQbaMqs0jm1ujNqkbNkM6Vef0mFOXyIRJ x/cgsNbDzkTS+MTBCWBSFtlJRep/wAiSmZFTyXXAxRt9v1TSP2j+637ZSSzI7E7kRjJn rffA== X-Gm-Message-State: AODbwcBsrXe1SCNiMcQ0vug5VawPG5ew9F+gmzvRPMKeE0u+o5F2UVbR 623IUidxvjbviIYEsuM= X-Received: by 10.84.139.195 with SMTP id 61mr2205382plr.152.1495748690754; Thu, 25 May 2017 14:44:50 -0700 (PDT) Received: from [192.168.1.2] (50-39-112-180.bvtn.or.frontiernet.net. [50.39.112.180]) by smtp.gmail.com with ESMTPSA id l16sm6216366pgu.45.2017.05.25.14.44.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 May 2017 14:44:49 -0700 (PDT) To: httpd-dev From: Jacob Champion Subject: Experimental C unit test suite available for hacking Message-ID: <999df616-48d6-07d6-25ab-72406bfb3d36@gmail.com> Date: Thu, 25 May 2017 14:44:49 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit archived-at: Thu, 25 May 2017 21:44:56 -0000 Hi all, Last week I had a personal hackathon since I couldn't make it out to ApacheCon. As a result there is now a C-language unit test suite available in branches/httpdunit (based on trunk). I've tested it with a Windows+CMake toolchain as well as an Ubuntu+autoconf toolchain. The suite itself is based on Check, which is a testing library I've had some success with in the past. It's supported on a wide variety of platforms and has a nice feature of running each test in a separate process space, so a crash doesn't derail the entire suite. (Note: Check is LGPL.) The build system has been augmented slightly to generate some of the more tedious boilerplate code. If you want to give it a try, just install Check (and, if using the configure scripts, make sure Check is visible via pkg-config). The test suite will then automatically be added to the default targets. Once everything builds you just run the suite directly with $ ./test/httpdunit As a Check binary, it has multiple knobs to control which tests run and how the reporting is done, but by default it just runs all the tests and prints TAP to stdout. The example tests that are currently running are testing a new API for strict Base64 decoding. Right now it's a feature without a client; I included it here because it was a good showcase of the test suite (see test/unit/base64.c for the test case code). Let me know what you think! --Jacob