From patchwork Wed Jul 1 10:05:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 50515 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id ED230214B3 for ; Wed, 1 Jul 2015 10:08:01 +0000 (UTC) Received: by lbbui3 with SMTP id ui3sf4376274lbb.2 for ; Wed, 01 Jul 2015 03:08:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=REzb32sZ/YRFVsuZBlqJjU9AYyghvWP0KGvpt+09BuE=; b=ZXYDRf6KeKSmF2pqlhvJqZGOtC2l4jBGgTFU+gkElkynG65pdswgew6yNdFZYggGB/ 4YLYx02HyYFSVP30XehGr6DcXb9U6qb4u19Urf4wzA33t2gpzJ2OKrYstUC4UEC6e7hX T4TaXCti2EoVZpvKpKayWE6EkchMGjd+8RKkzopFBSObmI902FOR7mVJjEIynmuq3+Nj ofc0SoRYdbwUHPjJugvM/uBDL7VoUkBsc46fWgOnGtMLBGtQD7qGM5HUfLmilyp+gO9C 1FQNfhd/yukXs1FM2uB9NUj2uUFQgohZl+AY6pPjOL3SZNDQe/Xde0GXF1dmp9xsQi2V aRTQ== X-Gm-Message-State: ALoCoQmqoSmJTVGBM3MMHENlAdrEnsGtSLMMmXtVzqI4P1OWtpgHHV6WFIBjKrl9SN0uTaU/Rp9+ X-Received: by 10.112.188.233 with SMTP id gd9mr16741524lbc.12.1435745280863; Wed, 01 Jul 2015 03:08:00 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.102 with SMTP id lb6ls181417lab.49.gmail; Wed, 01 Jul 2015 03:08:00 -0700 (PDT) X-Received: by 10.112.147.233 with SMTP id tn9mr24191151lbb.119.1435745280465; Wed, 01 Jul 2015 03:08:00 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id ur9si1269576lac.98.2015.07.01.03.08.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jul 2015 03:08:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by lagc2 with SMTP id c2so37312004lag.3 for ; Wed, 01 Jul 2015 03:08:00 -0700 (PDT) X-Received: by 10.112.222.133 with SMTP id qm5mr24391016lbc.86.1435745280063; Wed, 01 Jul 2015 03:08:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp494822lbb; Wed, 1 Jul 2015 03:07:59 -0700 (PDT) X-Received: by 10.55.23.149 with SMTP id 21mr53521830qkx.67.1435745278824; Wed, 01 Jul 2015 03:07:58 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q106si1590934qgq.84.2015.07.01.03.07.57; Wed, 01 Jul 2015 03:07:58 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 9E27061F09; Wed, 1 Jul 2015 10:07:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id DE38061EFA; Wed, 1 Jul 2015 10:06:49 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 0C13B61CCB; Wed, 1 Jul 2015 10:06:42 +0000 (UTC) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com [209.85.215.52]) by lists.linaro.org (Postfix) with ESMTPS id 9447761C6B for ; Wed, 1 Jul 2015 10:06:40 +0000 (UTC) Received: by lagc2 with SMTP id c2so37290831lag.3 for ; Wed, 01 Jul 2015 03:06:39 -0700 (PDT) X-Received: by 10.152.203.233 with SMTP id kt9mr21726269lac.99.1435745199572; Wed, 01 Jul 2015 03:06:39 -0700 (PDT) Received: from erachmi-VirtualBox.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by mx.google.com with ESMTPSA id ew6sm370004lbc.40.2015.07.01.03.06.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jul 2015 03:06:38 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org, stuart.haslam@linaro.org, maxim.uvarov@linaro.org Date: Wed, 1 Jul 2015 12:05:39 +0200 Message-Id: <1435745141-1078-4-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435745141-1078-1-git-send-email-christophe.milard@linaro.org> References: <1435745141-1078-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCH 3/5] validation: cosmetic changes in odp_cpumask.c X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christophe.milard@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 To please check-patch as much as possible before the file gets moved (and rechecked by check-odp) Signed-off-by: Christophe Milard --- test/validation/odp_cpumask.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/validation/odp_cpumask.c b/test/validation/odp_cpumask.c index 958cb59..1a78cd9 100644 --- a/test/validation/odp_cpumask.c +++ b/test/validation/odp_cpumask.c @@ -7,7 +7,6 @@ #include #include "odp_cunit_common.h" - /* * The following string are used to build cpu masks with * odp_cpumask_from_str(). Both 0x prefixed and non prefixed @@ -30,8 +29,6 @@ /* padding pattern used to check buffer overflow: */ #define FILLING_PATTERN 0x55 - - /* * returns the length of a string, excluding terminating NULL. * As its C lib strlen equivalent. Just rewritten here to avoid C lib @@ -60,6 +57,7 @@ static void cpu_to_str(char *buff, int cpu) { const char *hex_nibble = "1248"; int i = 0; + buff[i++] = '0'; buff[i++] = 'x'; buff[i++] = hex_nibble[cpu % CPUS_PER_NIBBLE]; @@ -80,7 +78,6 @@ static unsigned int get_max_number_of_cpus_in_a_mask(void) return odp_cpu_count(); } - static void cpumask_test_odp_cpumask_to_from_str(void) { odp_cpumask_t mask; @@ -99,7 +96,7 @@ static void cpumask_test_odp_cpumask_to_from_str(void) buf_sz = (get_max_number_of_cpus_in_a_mask() >> 2) + 20; buf_in = malloc(buf_sz); buf_out = malloc(buf_sz); - CU_ASSERT_FATAL((buf_in != NULL) && (buf_out != NULL)); + CU_ASSERT_FATAL(buf_in && buf_out); /* test 1 CPU at a time for all possible cpu positions in the mask */ for (cpu = 0; cpu < get_max_number_of_cpus_in_a_mask(); cpu++) { @@ -188,6 +185,7 @@ static void cpumask_test_odp_cpumask_zero(void) { odp_cpumask_t mask1; odp_cpumask_t mask2; + odp_cpumask_from_str(&mask1, TEST_MASK_NO_CPU); odp_cpumask_from_str(&mask2, TEST_MASK_CPU_0); odp_cpumask_zero(&mask2); @@ -198,6 +196,7 @@ static void cpumask_test_odp_cpumask_set(void) { odp_cpumask_t mask1; odp_cpumask_t mask2; + odp_cpumask_from_str(&mask1, TEST_MASK_NO_CPU); odp_cpumask_from_str(&mask2, TEST_MASK_CPU_0); odp_cpumask_set(&mask1, 0); @@ -388,6 +387,7 @@ static void cpumask_test_odp_cpumask_copy(void) { odp_cpumask_t mask1; odp_cpumask_t mask2; + odp_cpumask_from_str(&mask1, TEST_MASK_CPU_0); odp_cpumask_copy(&mask2, &mask1); CU_ASSERT(odp_cpumask_equal(&mask1, &mask2));