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 4A4BA426B2; Tue, 3 Oct 2023 22:29:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0FF18402EE; Tue, 3 Oct 2023 22:29:23 +0200 (CEST) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mails.dpdk.org (Postfix) with ESMTP id B4E2140262 for ; Tue, 3 Oct 2023 22:29:21 +0200 (CEST) Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1c735473d1aso10792105ad.1 for ; Tue, 03 Oct 2023 13:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1696364960; x=1696969760; darn=dpdk.org; 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=4QZe6WYA0CDFej04+XTXp3gVPaIsdae0CLYbbl20RYE=; b=KByKKFvFK7maFn5RH9P52KPjGblaUwO5nEoEV8kV4NrUi8Fj/DAQUICLXzsUhKm+NG IEWkqrUzB1YBgEH3VFHWWvBR4IafOSP2BJLiCKmxAryZGVXNqYfhlXI0S3PcmNIHjbFd nQnb24svn878vVMjvbNFX3nsWhb6xZaYsF56aUxc+Mxbh7rtqBYAk6Nrsc6+OW4p/d3v elLfj6xEHDLxd1R2AZa1exdz1O0zmB73BNEIwlmLyR5mu0hNdJa8S2XHJ7ijEjN0ydB9 cVHLvZglkSs6mHSNe4wbfGgBj6k/d23kmV0D+as+l9C0E4LDxJmbldmq0Uo07zZkKL5I jT/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696364960; x=1696969760; 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=4QZe6WYA0CDFej04+XTXp3gVPaIsdae0CLYbbl20RYE=; b=ocq5QujnNebV55tCf0lenV3RB7m+zmTKYjbgkrnGLm6EUvMm3BBzasfxxhwWl3MFn0 ue728SUH1jNd2wi06pWKg1LBQWFnVqKovVjIHj7GTyee69SRoNuhTYx3u+RUKKjajHdx gQwEmqbF3BxhZ9yQWPDZQYfWFP++RZuve3iSZwTcVleqRzoDr83jUIiARkePY7o+jULI LiWaCSACR4Y8GWyHHHvaWUYNGa3ga24JLdARpGNw9My9wJqsYy8OH16aRQsL4ztkwbCc +AZQR+3jmVRd+MkrhaBEjsjMYzDz3XMF55QB4wsxLaFNCR/us1DVaw4ot6u0IDt0dI0D icAg== X-Gm-Message-State: AOJu0YzNwXdTh4h9cSlhAjQAw0NYfBoA7+N8RWoPwTOV3TB3dTCi0bbK 0r4BHBml8vpROPZT4Gw2eduecbzvzQxpAdmXYdQ= X-Google-Smtp-Source: AGHT+IGOEByuWDm8N5uMGlLWkR1JPElvJA5l2u/x9jJ/HKE6gbAwfYKZPs27i4xT0DWJTkjPfDG7Cw== X-Received: by 2002:a17:902:e74f:b0:1c6:112f:5cff with SMTP id p15-20020a170902e74f00b001c6112f5cffmr766905plf.61.1696364960540; Tue, 03 Oct 2023 13:29:20 -0700 (PDT) Received: from hermes.local (204-195-126-68.wavecable.com. [204.195.126.68]) by smtp.gmail.com with ESMTPSA id a11-20020a1709027d8b00b001c5f62a639asm2014138plm.196.2023.10.03.13.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 13:29:20 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Olivier Matz Subject: [PATCH v3 1/4] test: remove some strings from cmdline_etheraddr tests Date: Tue, 3 Oct 2023 13:29:06 -0700 Message-Id: <20231003202909.391330-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231003202909.391330-1-stephen@networkplumber.org> References: <20230929163611.62691-1-stephen@networkplumber.org> <20231003202909.391330-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 Some of the ethernet address formats which were invalid will now become valid inputs when rte_ether_unformat_addr is modified to allow leading zeros. Also, make local variables static. Acked-by: Morten Brørup Signed-off-by: Stephen Hemminger --- app/test/test_cmdline_etheraddr.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/test/test_cmdline_etheraddr.c b/app/test/test_cmdline_etheraddr.c index 9691c32ba250..74953dea6cb9 100644 --- a/app/test/test_cmdline_etheraddr.c +++ b/app/test/test_cmdline_etheraddr.c @@ -20,7 +20,7 @@ struct ether_addr_str { }; /* valid strings */ -const struct ether_addr_str ether_addr_valid_strs[] = { +static const struct ether_addr_str ether_addr_valid_strs[] = { {"01:23:45:67:89:AB", 0xAB8967452301ULL}, {"4567:89AB:CDEF", 0xEFCDAB896745ULL}, }; @@ -30,7 +30,7 @@ const struct ether_addr_str ether_addr_valid_strs[] = { * end of token, which is either space chars, null char or * a hash sign. */ -const char * ether_addr_garbage_strs[] = { +static const char * const ether_addr_garbage_strs[] = { "00:11:22:33:44:55\0garbage", "00:11:22:33:44:55#garbage", "00:11:22:33:44:55 garbage", @@ -46,14 +46,13 @@ const char * ether_addr_garbage_strs[] = { #define GARBAGE_ETHERADDR 0x554433221100ULL /* corresponding address */ -const char * ether_addr_invalid_strs[] = { +static const char * const ether_addr_invalid_strs[] = { /* valid chars, invalid syntax */ "0123:45:67:89:AB", "01:23:4567:89:AB", "01:23:45:67:89AB", "012:345:678:9AB", "01:23:45:67:89:ABC", - "01:23:45:67:89:A", "01:23:45:67:89", "01:23:45:67:89:AB:CD", /* invalid chars, valid syntax */ @@ -61,7 +60,6 @@ const char * ether_addr_invalid_strs[] = { "INVA:LIDC:HARS", /* misc */ "01 23 45 67 89 AB", - "01.23.45.67.89.AB", "01,23,45,67,89,AB", "01:23:45\0:67:89:AB", "01:23:45#:67:89:AB", -- 2.39.2