From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 59F02423F2; Mon, 16 Jan 2023 18:27:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E8B940F16; Mon, 16 Jan 2023 18:27:36 +0100 (CET) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id 3473440691 for ; Mon, 16 Jan 2023 18:27:35 +0100 (CET) Received: by mail-pl1-f180.google.com with SMTP id b17so23463843pld.7 for ; Mon, 16 Jan 2023 09:27:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5YtcvGflO3MvCB/H8Gimi2/yTh3WYRBCOfEDR4INog8=; b=326m8846Y2/Boebchl5lwjZJcX40kbPkQRVAMvLPg4sgdCJtLy8eO+ipqf54+3WZYA 2mDgeTgWO4p3Q2kAwn2ZeEG9mKgoCjPVFnFIEpuLFFvJ1xtBdHTQ0SSfCwwLrqarvsTc EH0YdO4nc84IvukYq446tM5dE0hN+erFP7GBG9cFoUTAFT3I9C9pC58L2ruzzHsQOARq kN4BrBSJbvXK8ecXrsrFpiQRtKGaXxlMJya0EzM0KstoNlK3jPlLojPBisAzG0vqTg3D KlcGiUUNQu4EcGgQ+7K3gxTkEUDObbn4frrxZTPC9srMoUBr9qLJ9BzuSe1I1yWTaLEC gOQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5YtcvGflO3MvCB/H8Gimi2/yTh3WYRBCOfEDR4INog8=; b=lz4c2CDcK/LtFVqtVTDhOoCt0ckN1acMIhCQe+dfBR1gl87NcXAfTTCRajyZO74sqE S6AURtaGvT/6YOxV8mWLCVdJlA/98LH5H8G7zaap0Sk0DOG7yuOVJuadIKrzAAiBInZD ekExizIvTbTARLq/uSfbVQL0I6P7DXdUC9jTAwwh0JtNjcdJeE6CPhKkohZEctql6KyK tkl7PEi8AywhQGsTgoeU1m0F112onIMbqE484Lkbwj9eMtzJoEP6T4S/FqYbjNvVGyKi aKJSzcmeQY0ZZiM5vXD00K0TnL5TedHYLcpFroCkWo7Td5/iuJPYfz9Q2Nh+KKk9gj4Z GycA== X-Gm-Message-State: AFqh2kpfyY2hypbV6dftBhXazOy6Gfnvsf738t0uNiA/e+R3SX0PJ8m6 /wygcpCCUlZB2BcIJhoBVcGDt5dWt7MaNVgrB14= X-Google-Smtp-Source: AMrXdXt6zKgV2tD2od0FjEMlEIddp4TNVOqXFryFocY4xuq/8gd7xpsK4mWnWqp7cZlrH5SFGau25w== X-Received: by 2002:a17:903:278b:b0:193:a5b:cd01 with SMTP id jw11-20020a170903278b00b001930a5bcd01mr21276102plb.19.1673890054095; Mon, 16 Jan 2023 09:27:34 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j3-20020a170902c3c300b001945b984341sm3992635plj.100.2023.01.16.09.27.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 09:27:33 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Yipeng Wang , Sameh Gobriel , Bruce Richardson , Vladimir Medvedkin , Anatoly Burakov , Olivier Matz Subject: [PATCH 1/7] test: fix whitespace Date: Mon, 16 Jan 2023 09:27:25 -0800 Message-Id: <20230116172732.84976-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230116172732.84976-1-stephen@networkplumber.org> References: <20230116172732.84976-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The style standard is to use blank after keywords. I.e "if (" not "if(" Signed-off-by: Stephen Hemminger --- app/test/test_debug.c | 4 ++-- app/test/test_hash.c | 6 +++--- app/test/test_malloc.c | 10 +++++----- app/test/test_mbuf.c | 12 ++++++------ app/test/test_spinlock.c | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/test/test_debug.c b/app/test/test_debug.c index 2704f5b92726..c66748019d9f 100644 --- a/app/test/test_debug.c +++ b/app/test/test_debug.c @@ -53,7 +53,7 @@ test_panic(void) return -1; } wait(&status); - if(status == 0){ + if (status == 0){ printf("Child process terminated normally!\n"); return -1; } else @@ -84,7 +84,7 @@ test_exit_val(int exit_val) } wait(&status); printf("Child process status: %d\n", status); - if(!WIFEXITED(status) || WEXITSTATUS(status) != (uint8_t)exit_val){ + if (!WIFEXITED(status) || WEXITSTATUS(status) != (uint8_t)exit_val){ printf("Child process terminated with incorrect status (expected = %d)!\n", exit_val); return -1; diff --git a/app/test/test_hash.c b/app/test/test_hash.c index 3e45afaa67fc..39e847530c1a 100644 --- a/app/test/test_hash.c +++ b/app/test/test_hash.c @@ -50,7 +50,7 @@ static uint32_t hashtest_key_lens[] = {0, 2, 4, 5, 6, 7, 8, 10, 11, 15, 16, 21, if (handle) rte_hash_free(handle); \ return -1; \ } \ -} while(0) +} while (0) #define RETURN_IF_ERROR_FBK(cond, str, ...) do { \ if (cond) { \ @@ -58,7 +58,7 @@ static uint32_t hashtest_key_lens[] = {0, 2, 4, 5, 6, 7, 8, 10, 11, 15, 16, 21, if (handle) rte_fbk_hash_free(handle); \ return -1; \ } \ -} while(0) +} while (0) #define RETURN_IF_ERROR_RCU_QSBR(cond, str, ...) do { \ if (cond) { \ @@ -728,7 +728,7 @@ static int test_five_keys(void) key_array[i] = &keys[i]; ret = rte_hash_lookup_bulk(handle, &key_array[0], 5, (int32_t *)pos); - if(ret == 0) + if (ret == 0) for(i = 0; i < 5; i++) { print_key_info("Lkp", key_array[i], pos[i]); RETURN_IF_ERROR(pos[i] != expected_pos[i], diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c index de40e506113a..f28a3f69d4fd 100644 --- a/app/test/test_malloc.c +++ b/app/test/test_malloc.c @@ -87,7 +87,7 @@ test_align_overlap_per_lcore(__rte_unused void *arg) break; } for(j = 0; j < 1000 ; j++) { - if( *(char *)p1 != 0) { + if ( *(char *)p1 != 0) { printf("rte_zmalloc didn't zero the allocated memory\n"); ret = -1; } @@ -158,7 +158,7 @@ test_reordered_free_per_lcore(__rte_unused void *arg) break; } for(j = 0; j < 1000 ; j++) { - if( *(char *)p1 != 0) { + if ( *(char *)p1 != 0) { printf("rte_zmalloc didn't zero the allocated memory\n"); ret = -1; } @@ -331,12 +331,12 @@ test_multi_alloc_statistics(void) /* After freeing both allocations check stats return to original */ rte_malloc_get_socket_stats(socket, &post_stats); - if(second_stats.heap_totalsz_bytes != first_stats.heap_totalsz_bytes) { + if (second_stats.heap_totalsz_bytes != first_stats.heap_totalsz_bytes) { printf("Incorrect heap statistics: Total size \n"); return -1; } /* Check allocated size is equal to two additions plus overhead */ - if(second_stats.heap_allocsz_bytes != + if (second_stats.heap_allocsz_bytes != size + overhead + first_stats.heap_allocsz_bytes) { printf("Incorrect heap statistics: Allocated size \n"); return -1; @@ -495,7 +495,7 @@ test_realloc_socket(int socket) return -1; } /* calc an alignment we don't already have */ - while(RTE_PTR_ALIGN(ptr7, new_align) == ptr7) + while (RTE_PTR_ALIGN(ptr7, new_align) == ptr7) new_align *= 2; char *ptr8 = rte_realloc_socket(ptr7, size7, new_align, socket); if (!ptr8){ diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 53fe898a384c..d505fd25e022 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -120,7 +120,7 @@ static unsigned refcnt_lcore[RTE_MAX_LCORE]; printf("mbuf test FAILED (l.%d): <" str ">\n", \ __LINE__, ##__VA_ARGS__); \ goto fail; \ -} while(0) +} while (0) /* * test data manipulation in mbuf with non-ascii data @@ -154,7 +154,7 @@ test_pktmbuf_with_non_ascii_data(struct rte_mempool *pktmbuf_pool) return 0; fail: - if(m) { + if (m) { rte_pktmbuf_free(m); } return -1; @@ -701,12 +701,12 @@ test_pktmbuf_pool(struct rte_mempool *pktmbuf_pool) } struct rte_mbuf *extra = NULL; extra = rte_pktmbuf_alloc(pktmbuf_pool); - if(extra != NULL) { + if (extra != NULL) { printf("Error pool not empty"); ret = -1; } extra = rte_pktmbuf_clone(m[0], pktmbuf_pool); - if(extra != NULL) { + if (extra != NULL) { printf("Error pool not empty"); ret = -1; } @@ -966,7 +966,7 @@ test_pktmbuf_free_segment(struct rte_mempool *pktmbuf_pool) struct rte_mbuf *mb, *mt; mb = m[i]; - while(mb != NULL) { + while (mb != NULL) { mt = mb; mb = mb->next; rte_pktmbuf_free_seg(mt); @@ -1195,7 +1195,7 @@ verify_mbuf_check_panics(struct rte_mbuf *buf) return -1; } wait(&status); - if(status == 0) + if (status == 0) return -1; return 0; diff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c index 3f59372300c3..3ee82fa963a5 100644 --- a/app/test/test_spinlock.c +++ b/app/test/test_spinlock.c @@ -237,7 +237,7 @@ test_spinlock(void) /* * Try to acquire a lock that we already own */ - if(!rte_spinlock_recursive_trylock(&slr)) { + if (!rte_spinlock_recursive_trylock(&slr)) { printf("rte_spinlock_recursive_trylock failed on a lock that " "we already own\n"); ret = -1; -- 2.39.0