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 B70C245646; Thu, 18 Jul 2024 19:43:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A3AAA40697; Thu, 18 Jul 2024 19:43:05 +0200 (CEST) Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) by mails.dpdk.org (Postfix) with ESMTP id C6A974028A for ; Thu, 18 Jul 2024 19:43:04 +0200 (CEST) Received: by mail-ot1-f43.google.com with SMTP id 46e09a7af769-70446231242so522537a34.1 for ; Thu, 18 Jul 2024 10:43:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1721324584; x=1721929384; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=RCsvWSm30+Fbgb67sY/+0FrFdsfZOFL8mjF4jNxTTWU=; b=m1O2Q+mx35lrAuZhJS8WUAv6gguBPSVvCmGCGtlW4PJ0t3YzpW/vIXSOlsIuUB81fV xMwS7f9+DhGohdyAZEUqj/1kvf6DP0nGzLDgiPzIdN0z6yMELo7PsBiogUtbf8kYqZR+ iNHHKx7OnenCdTbYzeZZPr7bBZHKU7/V2BfTN56CQ4R+X6EycCrTCMgPe1bAyiGD1Xpm KTZkQerfYiVM/uGZ0YSSNMkA/VtVYiH1/OQGrsV4x25R0Uk8nN9xmVl6u4FSSyZzkQOv k7yv97yVC4CNkDN/sMEt6/pXBe9oSRkzfl8zavbu1Lf+P+xZ+ponvbpOTJ2XU19hDIDd BPug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721324584; x=1721929384; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RCsvWSm30+Fbgb67sY/+0FrFdsfZOFL8mjF4jNxTTWU=; b=rXTUOwlwzSQ3F9kSwWNx4Xs/9PNqkoz8Ex1MKmuBoSESKUY/4zVDviG4k8tt69VJtD 2da+WHybInHNTWbzD5y/T7TbYhrhjjA6jYm0KQa41yrydGKDrjfgw2yrzSUAVXHFh9lm bhkMa0npZgfwyxDjdfFBlymJOVAs1gowsxQoX/fDvvMmuzLPbP4cUH2gcnt3BB86Xfq4 Kekpiqse1KRFgO3GOG4WAnu3GrUzxS9WBXC3L3Q96QsILkd5Kb42gzfNvy53fyUHGBnP FNcpStGiB/KPFpqnPURHkuS41GvDG9Hdtj7+gee3dSAmUt3PmF9hUZnNGunVX+Hdx4Im WKEg== X-Gm-Message-State: AOJu0YyXC/I6Q29LMsZfWxJVTFSq7v8CfYH9MRwQOp9mVQSJpXLRI2H9 sgHQuN5A4GWarsKnGaZgrFu1/4vhjEdHnLhWTQqNbQUjJe/d0oaY2TjQyewEISqFkQcAtyRJLQb gSho= X-Google-Smtp-Source: AGHT+IEbRCkuu6N+8QTJFmKUH3l5cO7QId4wAroW2QOzuJ7RXrTqNoBvq0ax1gXEOEZC/YKvqcN/VQ== X-Received: by 2002:a05:6830:439e:b0:708:b3c0:1442 with SMTP id 46e09a7af769-708e37673f3mr6180725a34.1.1721324583885; Thu, 18 Jul 2024 10:43:03 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70cfc83f4ddsm85226b3a.201.2024.07.18.10.43.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 10:43:03 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Luca Boccassi , Stephen Hemminger , Reshma Pattan Subject: [PATCH] test: fix 32 bit overflow in pcapng test Date: Thu, 18 Jul 2024 10:42:31 -0700 Message-ID: <20240718174253.16346-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 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 conversion from seconds to nanoseconds in the pcapng test would overflow on 32 bit platforms leading to this test failing. Reported-by: Luca Boccassi Signed-off-by: Stephen Hemminger --- app/test/test_pcapng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_pcapng.c b/app/test/test_pcapng.c index 89535efad0..2665b08c76 100644 --- a/app/test/test_pcapng.c +++ b/app/test/test_pcapng.c @@ -235,7 +235,7 @@ parse_pcap_packet(u_char *user, const struct pcap_pkthdr *h, * but the file is open in nanonsecond mode therefore * the timestamp is really in timespec (ie. nanoseconds). */ - ns = h->ts.tv_sec * NS_PER_S + h->ts.tv_usec; + ns = (uint64_t)h->ts.tv_sec * NS_PER_S + h->ts.tv_usec; if (ns < ctx->start_ns || ns > ctx->end_ns) { char tstart[128], tend[128]; -- 2.43.0