Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp84715lqj; Thu, 11 Apr 2024 10:26:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVOHX0XhhqjODvWJeHFyJh2NAw8Y05DTFeOYD2CSoL3ec38C19y61V31foC8eI38oWR2cf8sDvTVI2/Y/c7VKiPOUyFnWIB59gs1xqSag== X-Google-Smtp-Source: AGHT+IEfCDzYqKtJibq6i8xYKk75RYuSKd+mP4gQ/gXC0BwJljpMkYltweoR4SsnVoIyAAGcjTMw X-Received: by 2002:a17:90a:d408:b0:2a5:ffb1:debd with SMTP id r8-20020a17090ad40800b002a5ffb1debdmr192553pju.33.1712856397950; Thu, 11 Apr 2024 10:26:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712856397; cv=pass; d=google.com; s=arc-20160816; b=ZMgn4xv13WfTOvGW7xwh4lES0IEJEyjswKeZhch2NCwwicpxW8sHy5Z/+W1G1EPIy0 RbGvFAcbMX98y/iObFPDSuEa+KMVse+f5hALMXvS+eCqSwxR0DMgTkDLApYefGxHxNdZ y1UXSetllFeen7Xkk6SyF25jJJBPAawnC5g/zMGSgbuR+IWD1Z+cc9gOy9y6H+L17JZa mj88kyFpT8vC1MYdxhvUUQHcyWVEXaxOunYsO+UvJowm9VToNOf43pSIU7Sr6fZ9R4XD ketn99cEcLARPTuAEz/7hNycy7nWyilvLfu6yk5J36Ia8H+4OUMcJcJIY+q5+jirZ7K5 cbJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=QCBZYuEx8E6Ilt7WeXhmEcjbf72dLVjaYQUFG/SF9i0=; fh=aQEkf5Ok4MWqvcHARagZ5SyuALV1QK8XYtt7dTU1hfU=; b=jTz/OnFjRVx92WeNWJCHIMNHIRqFEftT1C2TS7MFl5FAoggkdGddDPsOcGjFhQY3Pj gzm8vWPK692nT0gXg5fR6bYtTl0TElgCCVVhGxQlJzb1jVssxb0bkjRxnJZCuQOL8fu0 CvRG2/j/7EkwMI+QpfVZGViSLDUR6xEQza0LsNP2KoQzVFiqYB6uWvRitsd/VnSVtbEm g8gLcWtzAMC56M6TjuAsED10lra2rpWHlI912djXL09iV44+94FoaOe66N4bMOGPuhqM vd0tpiSEWeFFc2bG9tMm2gYby+t0BGJGN6C57qa2cV2ggomdL5Lh+ayT8mkt3JXCVBEk TKVA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LTJLN0Xl; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-141234-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141234-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w19-20020a17090a8a1300b002a6b9d7fc45si245888pjn.37.2024.04.11.10.26.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 10:26:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141234-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LTJLN0Xl; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-141234-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141234-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 69293287955 for ; Thu, 11 Apr 2024 17:23:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B28DB2941F; Thu, 11 Apr 2024 15:52:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LTJLN0Xl" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 58EE32941E for ; Thu, 11 Apr 2024 15:52:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712850754; cv=none; b=eTd/kxfepYrBwt7XFhN2tYE29JTuLzKbpfLJkljbc/cfZe+AH7D1i7AVCnXD7xgzqOp/agXD0+/Bhj7y/5TY0kUQ/lqFTsU81/xwGKSp19VdJYTLuOfq5dXcUt8Gp5dBhYgOZExjhs4qwm8jCMbpmXnuhbMC+IC1TG06B83xxZA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712850754; c=relaxed/simple; bh=nDZMCq6OOx0OiVELF/ddgdMVhELl/RKgZdcDQsB7ojI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aQbowgS2RqNs2lHAgFqehdHTHP3NrdmlH2FmwS0vMCQdhQJ9mv8uaeU+giZMDUB6rQX77SwGJDYFtHJYw1aL64uV3LbHHinxr9i4t+6eW/+3alqdH0H1Wsf/3aCbsdvetf49bS1Ikh49ELVV/wNsR1VDPN9DkpDMRgQ1EdgfdD8= 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=LTJLN0Xl; arc=none smtp.client-ip=170.10.133.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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712850752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QCBZYuEx8E6Ilt7WeXhmEcjbf72dLVjaYQUFG/SF9i0=; b=LTJLN0XlukiWIaAfHljvKtWjVm7hCra2jhYTW+o0ZnuWem5oQihuOYE/5zMurLB0F2T9Rt choD9j70swihQNBAOV1hU8P+vzSBWkGp0JFKyqmKA7Dy4exF8uBwn2aHW3V3AcaQx5k77z HIoTAki37aoBjdv5R4W55Ia589Y+5sg= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-264-0IQtr4SfPViOJ6MMcKm6dw-1; Thu, 11 Apr 2024 11:52:28 -0400 X-MC-Unique: 0IQtr4SfPViOJ6MMcKm6dw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 D84DD1E441CD; Thu, 11 Apr 2024 15:52:27 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.225.235]) by smtp.corp.redhat.com (Postfix) with SMTP id BCF632166B34; Thu, 11 Apr 2024 15:52:24 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 11 Apr 2024 17:51:01 +0200 (CEST) Date: Thu, 11 Apr 2024 17:50:53 +0200 From: Oleg Nesterov To: Thomas Gleixner Cc: Mark Brown , John Stultz , Marco Elver , Peter Zijlstra , Ingo Molnar , "Eric W. Biederman" , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Dmitry Vyukov , kasan-dev@googlegroups.com, Edward Liaw , Carlos Llamas , Greg Kroah-Hartman Subject: Re: [PATCH] selftests/timers/posix_timers: reimplement check_timer_distribution() Message-ID: <20240411155053.GD5494@redhat.com> References: <87r0fmbe65.ffs@tglx> <87o7aqb6uw.ffs@tglx> <87frw2axv0.ffs@tglx> <20240404145408.GD7153@redhat.com> <87le5t9f14.ffs@tglx> <20240406150950.GA3060@redhat.com> <87il0o0yrc.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87il0o0yrc.ffs@tglx> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 On 04/11, Thomas Gleixner wrote: > > On Thu, Apr 11 2024 at 13:44, Mark Brown wrote: > > > > Further to my previous mail it's also broken the arm64 selftest builds, > > they use kselftest.h with nolibc in order to test low level > > functionality mainly used by libc implementations and nolibc doesn't > > implement uname(): > > > > In file included from za-fork.c:12: > > ../../kselftest.h:433:17: error: variable has incomplete type 'struct utsname' > > struct utsname info; > > ^ > > ../../kselftest.h:433:9: note: forward declaration of 'struct utsname' > > struct utsname info; > > ^ > > ../../kselftest.h:435:6: error: call to undeclared function 'uname'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] > > if (uname(&info) || sscanf(info.release, "%u.%u.", &major, &minor) != 2) > > ^ > > ../../kselftest.h:435:22: error: call to undeclared function 'sscanf'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] > > if (uname(&info) || sscanf(info.release, "%u.%u.", &major, &minor) != 2) > > Grrr. Let me stare at this. Damn ;) Can't we just turn ksft_min_kernel_version() into static inline int ksft_min_kernel_version(unsigned int min_major, unsigned int min_minor) { #ifdef NOLIBC return -1; #else unsigned int major, minor; struct utsname info; if (uname(&info) || sscanf(info.release, "%u.%u.", &major, &minor) != 2) ksft_exit_fail_msg("Can't parse kernel version\n"); return major > min_major || (major == min_major && minor >= min_minor); #endif } ? Not sure what should check_timer_distribution() do in this case, to me ksft_test_result_fail() is fine. Oleg.