From ray@isc.org Wed Apr 26 10:04:39 2017 MIME-Version: 1.0 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 content-type: text/plain; charset="utf-8" Message-ID: Received: from mx.ams1.isc.org (mx.ams1.isc.org [199.6.1.65]) by bugs.isc.org (Postfix) with ESMTP id C919E71B5A8 for ; Wed, 26 Apr 2017 10:04:38 +0000 (UTC) Received: from zmx1.isc.org (zmx1.isc.org [149.20.0.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.ams1.isc.org (Postfix) with ESMTPS id 846AC24AE08 for ; Wed, 26 Apr 2017 10:04:34 +0000 (UTC) Received: from zmx1.isc.org (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTPS id 6E8BE16004A for ; Wed, 26 Apr 2017 10:04:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTP id 5E62C160096 for ; Wed, 26 Apr 2017 10:04:35 +0000 (UTC) Received: from zmx1.isc.org ([127.0.0.1]) by localhost (zmx1.isc.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 68XD89dPikjn for ; Wed, 26 Apr 2017 10:04:35 +0000 (UTC) Received: from rays-mbp.local (unknown [46.227.151.81]) by zmx1.isc.org (Postfix) with ESMTPSA id F1BB416004A for ; Wed, 26 Apr 2017 10:04:34 +0000 (UTC) Delivered-To: bind9-bugs@bugs.isc.org Subject: sockaddr_isnetzero() system test broken User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Return-Path: X-Original-To: bind9-bugs@bugs.isc.org Date: Wed, 26 Apr 2017 11:04:33 +0100 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mx.ams1.isc.org To: bind9-bugs@isc.org Content-Transfer-Encoding: 7bit From: "Ray Bellis" X-RT-Original-Encoding: utf-8 X-RT-Interface: Email Content-Length: 411 In lib/isc/tests/sockaddr_test.c The loop variable `i` is never used, causing all tests > 0 to be effectively ignored because the array offset data4[0] is hardcoded: for (i = 0; i < sizeof(data4)/sizeof(data4[0]); i++) { in.s_addr = inet_addr(data4[0].string); isc_sockaddr_fromin(&addr, &in, 1); r = isc_sockaddr_isnetzero(&addr); ATF_CHECK_EQ(r, data4[0].expect); }