From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f48.google.com (mail-pb0-f48.google.com [209.85.160.48]) by dpdk.org (Postfix) with ESMTP id 77390B105 for ; Tue, 24 Jun 2014 18:05:19 +0200 (CEST) Received: by mail-pb0-f48.google.com with SMTP id rq2so427045pbb.7 for ; Tue, 24 Jun 2014 09:05:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=zj6nqaNy94UE8PndSGCCcG+TgYYJjxZ/a9tAfokPt4c=; b=FHvGIdo/eu1rBuj2OkyON6o4IM/iL0vCMW8yCphjkIdXbtlzMluxF6Yra8sf1URFRU 15tlgyHmZmTRQdTrbxtiFO/8K2Bxe3AkSnfCGIAdTdyX4D3kIaUp5HNksVS7NIeGwmir JTVsnXTLvPnrf32WeOH70F153g+fe4+pWG7VprwUj+pT2ClzpiK865VFVn98bhL1E/U9 0kaI/L1zi2gQhrv/MEwE5DbmorI73cXL22u4Ad6I3GRqsLvz6xfuBxCtqFP5qKeb7wBL 4n0UqRvqftbrGouydMQLYj8LpsXMte5kZBIZOXxW9dElA6BN8X6hkkb5jlOvGohD7rTO VySg== X-Gm-Message-State: ALoCoQm1oSUFEmjf+LUHR1gRYZXOpTDDkdR1aVAuy+w/zGYOIZLIAnRdhe+ZhKEeI6hg3pmyLugZ X-Received: by 10.68.164.67 with SMTP id yo3mr2961187pbb.104.1403625937129; Tue, 24 Jun 2014 09:05:37 -0700 (PDT) Received: from nehalam.linuxnetplumber.net (static-50-53-83-51.bvtn.or.frontiernet.net. [50.53.83.51]) by mx.google.com with ESMTPSA id op3sm1061177pbc.40.2014.06.24.09.05.36 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 24 Jun 2014 09:05:36 -0700 (PDT) Date: Tue, 24 Jun 2014 09:03:45 -0700 From: Stephen Hemminger To: Stephen Hemminger Message-ID: <20140624090345.6b568f4f@nehalam.linuxnetplumber.net> In-Reply-To: <20140624090253.140206a7@nehalam.linuxnetplumber.net> References: <20140624090253.140206a7@nehalam.linuxnetplumber.net> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH 2/3] test: remove no longer valid tests X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 16:05:19 -0000 Since GCC catches calling snprintf() with NULL argument at compile time (which is even better). These string function tests are unnecessary and no longer compile. Signed-off-by: Stephen Hemminger --- a/app/test/test_string_fns.c 2014-06-24 08:48:52.558007950 -0700 +++ b/app/test/test_string_fns.c 2014-06-24 08:48:52.558007950 -0700 @@ -149,32 +149,6 @@ test_snprintf(void) return -1; } - memset(buf, DATA_BYTE, sizeof(buf)); - /* call with a NULL format and zero-size should return error - * without affecting the buffer */ - if (snprintf(buf, 0, NULL) != -1 || - errno != EINVAL) { - LOG("Failed to get suitable error when passing NULL buffer\n"); - return -1; - } - if (buf[0] != DATA_BYTE) { - LOG("Error, zero-length buffer modified after call with NULL" - " format string\n"); - return -1; - } - - /* call with a NULL format should return error but also null-terminate - * the buffer */ - if (snprintf(buf, sizeof(buf), NULL) != -1 || - errno != EINVAL) { - LOG("Failed to get suitable error when passing NULL buffer\n"); - return -1; - } - if (buf[0] != '\0') { - LOG("Error, buffer not null-terminated after call with NULL" - " format string\n"); - return -1; - } } while (0); LOG("%s - PASSED\n", __func__);