From patchwork Thu Feb 8 17:57:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Abeni X-Patchwork-Id: 13550235 X-Patchwork-Delegate: kuba@kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D67997CF15 for ; Thu, 8 Feb 2024 17:58:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415086; cv=none; b=Ys6KQXpplkWJzq4zFFX6Y/I+t2jjC7SSkAqorxWGzg078w5T8klXjEe9w5jwmeQDL0/tfaW1abDF/z2AbInpUj+iiMZgnNfspMdwAWlMC2saGfn0EgQgwp3axTjAKGdk6O5lYJzdqzvCQ8nNAN270pbgJtXFw/NUzSynFDCAI+s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415086; c=relaxed/simple; bh=Z7VO71pXoZegGiktT4itHsuvL45306hW2cI2M2BBd3g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=fD9KM7skMq1ze1aYjhQDbN5UhK6qncW/F1FyBPiOVdp6qrLd2h/Axu63/Qh8La2F9aJRQ1U1rbsEIGEw81cnbkDMkt3FyxNIp1q3i12+vdMbuwvkzNrEUpPznV2cyS1JxIgguazJpYBd+3v3yDbpufe7wQoONexARxB7XQfUh+c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=YjvD+otd; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YjvD+otd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707415083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Iz8MKrilgB5RR4P9uodXji3Zfn9p3LF9RKyva2gdw0k=; b=YjvD+otdPt8ewTg2p7HOZQBnbfsBk2rwlFJIteQxDYLx1nKNvXsakHLx5FDGmjo2S3qypI VmWzKfzXb8WSgBbaCPElN5C8s/LtWH5WF3Y/jdPZjQcMy3vRYtKHGfQjr8bcJkXrI7rX10 BfgmlF6m9Mf9yZgwvMiXCCvqhfqVdXE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-203-ly2duhYZP8ykGzYrkeQpmw-1; Thu, 08 Feb 2024 12:58:01 -0500 X-MC-Unique: ly2duhYZP8ykGzYrkeQpmw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 61F20185A784; Thu, 8 Feb 2024 17:58:01 +0000 (UTC) Received: from gerbillo.redhat.com (unknown [10.45.224.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2AB951C14B04; Thu, 8 Feb 2024 17:58:00 +0000 (UTC) From: Paolo Abeni To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Shuah Khan , linux-kselftest@vger.kernel.org Subject: [PATCH net-next] selftests: net: ignore timing errors in txtimestamp if KSFT_MACHINE_SLOW Date: Thu, 8 Feb 2024 18:57:49 +0100 Message-ID: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Patchwork-Delegate: kuba@kernel.org This test is time sensitive. It may fail on virtual machines and for debug builds. Similar to commit c41dfb0dfbec ("selftests/net: ignore timing errors in so_txtime if KSFT_MACHINE_SLOW"), optionally suppress failure for timing errors (only). Signed-off-by: Paolo Abeni Reviewed-by: Willem de Bruijn --- tools/testing/selftests/net/txtimestamp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/txtimestamp.c b/tools/testing/selftests/net/txtimestamp.c index 10f2fde3686b..ec60a16c9307 100644 --- a/tools/testing/selftests/net/txtimestamp.c +++ b/tools/testing/selftests/net/txtimestamp.c @@ -163,7 +163,8 @@ static void validate_timestamp(struct timespec *cur, int min_delay) if (cur64 < start64 + min_delay || cur64 > start64 + max_delay) { fprintf(stderr, "ERROR: %" PRId64 " us expected between %d and %d\n", cur64 - start64, min_delay, max_delay); - test_failed = true; + if (!getenv("KSFT_MACHINE_SLOW")) + test_failed = true; } }