Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp566241lqt; Mon, 18 Mar 2024 17:15:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVeZps+zXPbM+ytSm9Zf+hChje1sYdJJpTTFN5aAYFt4UQOH9p9dwj/tlRlbyVOjZDFWBdHFUmNxuJ7LNAVO+cQjcAO8zBHXIqB8zJjnA== X-Google-Smtp-Source: AGHT+IFU6Q8DUeSu/j++G0mzze7jpDtawuS5q7IY7ZsvqI+stnYf8MSb07gXMPa0RvvcWy5VuL8y X-Received: by 2002:a17:903:32cc:b0:1dd:8daf:99d7 with SMTP id i12-20020a17090332cc00b001dd8daf99d7mr1365333plr.32.1710807313493; Mon, 18 Mar 2024 17:15:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710807313; cv=pass; d=google.com; s=arc-20160816; b=H6i4Fv2NEy0Yoqxo8+GFGzuYlOk9NNZl8GqSVuhLy97vEhiU9NTJb+RcbTdj86MKVk N02x9pJkolePWznLWdKS5pAQRzApjUmfq408OOtvT4qYZofP5ayEsqArqR3gMQ7MMtGX XmR4uHWXeCM6CNg7fhlIy65rdnvPAukU3fhsUc/eL2tWp914u3TaaAsazVnlnz7vt2rP lXNFgh4awRj8JXLE94eO9G6dV+6tfAg686dzUIhTDnDD3qlxU6URyut8OeLowPbBjG+4 AKqTesTtqV3w5vGizY3ZA6Frqf4XOUweDNcBU5LIbhVHI5DHAaVGBfdwweCfa1dxydFa xong== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=5g8p3IqxgARfKYTGktm7aut6cdCT60gi+hlyJV5ViYE=; fh=928S+YzQjj1jjbevhFR4MR+qQsN+oA8JshlJXkOfPA4=; b=iEN7Bxhwslz27AyrJ77gGVV7oky4FAb1qu5Zj+CjluPkX+kNevx0m9/gOvpcQebOAD +d3HWaXyUejewSCymjY/dF+eX1jLF0oU7LoCbQ1odxEwKx7TFp4Q+wYf/L9avmtHhgY0 Q3Is9LcQ0Gii3RGTXrlGzV5Y5av5bcwBNNpNUDnfZYf+LYuXEZNUmpq1/f3chnKucTex QoA5JG9UZv7DNfEoPUE0nVxkPB9leHqKDlhmx2bnAmcalcJBKVonJfaDnKipoPownuVH REQbes+GxzHUUgRUI5MdpgDxY7JyqQTsrSDdOz6QD+fzxhkqQo5O69TPrvV0bFbOc/mj Tr0Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JWIKtc9+; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-106847-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106847-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e9-20020a17090301c900b001dde0089b54si3737470plh.314.2024.03.18.17.15.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 17:15:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106847-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JWIKtc9+; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-106847-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106847-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 C8E2B282CB6 for ; Tue, 19 Mar 2024 00:15:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E895CA3D; Tue, 19 Mar 2024 00:15:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JWIKtc9+" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AC2E7EB; Tue, 19 Mar 2024 00:15:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710807302; cv=none; b=HGXgOLsghnxipFqw2dujGRDNrwqpFLbrivGvGdPHDrnVHxwsfwbp5MznhF11r67CQ5ITFbIMu0y+nHN9wXMC801vIXhZGy882lP6/VFBvvZtQima6Tu0lNdDRB30RvfmmHxtU33KgP9+hZ/YNrNsA5FpMxmfbFhUFOSFK2cP2LQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710807302; c=relaxed/simple; bh=Xml8UrA+/N9DI1sriDiEA3m1U8/jThWp7kGRn7KX/W8=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=oHnS+OcSI1S4YiFUXzxDvsyvA7Id3xutcwGW7SfTkuiDyG4KL1bGjCoqSAdLrNs7iFu0SgQQXQzqlYLlopjddzH+/Qcngmxpy8hrSho+wa9y/tIQ00+LFj3+zJ3aY5Hd152MSUcpDruS3BmljosKb1Z7ubU1Y32ZmE88LBzdvFY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JWIKtc9+; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a46cf8f649dso140536566b.3; Mon, 18 Mar 2024 17:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710807299; x=1711412099; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id:from:to :cc:subject:date:message-id:reply-to; bh=5g8p3IqxgARfKYTGktm7aut6cdCT60gi+hlyJV5ViYE=; b=JWIKtc9+v6qs5pn6mlGt2C0b9Tp7fXAUPJzrYiS54FQjXvSph6RsVubdYRN3kSa67h XsJphIWilsfbb0shYONdC9MwJNO1ne/bXXJSoL1PrhtMCQiOfCifN5jFqLQXm7xaC03p FDoIZLv7Y7NTTbhOVUcijalnJ69yXE/yuK3FqAhbWTUfGDN5qF5ymZp+YDNueFa8bQBM 0+hwcHPz9nl7HpqpEYlAy0Jm0y2IdVFpFX0KfQr3YpdQxFsuijlGSggDIzhAvF13bpsO 8VB/u4rqZrC48dgXTDi+1vJJJk5hqw5r9cXWQcuQpPSskznNhTGVnZ67d7yveZNsYrV5 1wOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710807299; x=1711412099; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5g8p3IqxgARfKYTGktm7aut6cdCT60gi+hlyJV5ViYE=; b=QoZVeVTxYswgfuEFHhILjdNoKGYdPMN01V7pJBg8FU9it7otZ54SlAPe/YatYhOtXX 4C8nYpc8HmrXe4dvv3Nnl9XzTloLU209R7z5cVqnmCKswPcfNqodDmA4ih+tCSj5dbc4 RkOMc71Cu4ZvdQiWbWRf38X7r1jn7QCzQs4URucy5bpJ64FX4FtQ+eg8cDwr3GlBb28D PwlCsE27fplLN/52kFaN5YuZkA4Rxfc2SNk584eVpRDI3CAh+kThiyt58uUNCZn/SVvH ahl+Njqm0Kn+FybDiNnBOVXfjkYoTNgYxuAt91GzQAlL9sTJr75UZxHuElZ/hAoEjghk WiBg== X-Forwarded-Encrypted: i=1; AJvYcCVtpf0Gsv5kf25X3QTuWJs6B5UYEedqU76byYrY15wSEwnhK41UN03JZpyC7lEFOmpjyGR/75xsErJlsUQk1bHaMQzClN8OzjG1SOVOAOMrsMZmUCb18hdYSwBtBfx4R5eXVtK9UwRQrBhWD+OC X-Gm-Message-State: AOJu0YwWntR9lQkQhIuBpWXVqU48nPxq6a0txkYrfBQYZ2czZl4zkT7v zZEZbN7lJZo91SnvYYvuMR1+SMuXawuSxMXqH4B9h1Gr6u1K9skr X-Received: by 2002:a17:907:7886:b0:a46:aaaa:4220 with SMTP id ku6-20020a170907788600b00a46aaaa4220mr572354ejc.32.1710807298480; Mon, 18 Mar 2024 17:14:58 -0700 (PDT) Received: from [192.168.6.255] ([5.1.5.0]) by smtp.gmail.com with ESMTPSA id o12-20020a170906358c00b00a46cffe6d06sm802577ejb.42.2024.03.18.17.14.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 17:14:57 -0700 (PDT) Message-ID: <89e76fa5834bd34ef94761bcbc987a1be245b261.camel@gmail.com> Subject: Re: [PATCH bpf-next v4 6/6] selftests/bpf: add sleepable timer tests From: Eduard Zingerman To: Benjamin Tissoires , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Date: Tue, 19 Mar 2024 02:14:56 +0200 In-Reply-To: <20240315-hid-bpf-sleepable-v4-6-5658f2540564@kernel.org> References: <20240315-hid-bpf-sleepable-v4-0-5658f2540564@kernel.org> <20240315-hid-bpf-sleepable-v4-6-5658f2540564@kernel.org> Autocrypt: addr=eddyz87@gmail.com; prefer-encrypt=mutual; keydata=mQGNBGKNNQEBDACwcUNXZOGTzn4rr7Sd18SA5Wv0Wna/ONE0ZwZEx+sIjyGrPOIhR14/DsOr3ZJer9UJ/WAJwbxOBj6E5Y2iF7grehljNbLr/jMjzPJ+hJpfOEAb5xjCB8xIqDoric1WRcCaRB+tDSk7jcsIIiMish0diTK3qTdu4MB6i/sh4aeFs2nifkNi3LdBuk8Xnk+RJHRoKFJ+C+EoSmQPuDQIRaF9N2m4yO0eG36N8jLwvUXnZzGvHkphoQ9ztbRJp58oh6xT7uH62m98OHbsVgzYKvHyBu/IU2ku5kVG9pLrFp25xfD4YdlMMkJH6l+jk+cpY0cvMTS1b6/g+1fyPM+uzD8Wy+9LtZ4PHwLZX+t4ONb/48i5AKq/jSsb5HWdciLuKEwlMyFAihZamZpEj+9n91NLPX4n7XeThXHaEvaeVVl4hfW/1Qsao7l1YjU/NCHuLaDeH4U1P59bagjwo9d1n5/PESeuD4QJFNqW+zkmE4tmyTZ6bPV6T5xdDRHeiITGc00AEQEAAbQkRWR1YXJkIFppbmdlcm1hbiA8ZWRkeXo4N0BnbWFpbC5jb20+iQHUBBMBCgA+FiEEx+6LrjApQ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K+SiLLXt51G7P30TVavIeB6s2lCt1QKt62ccLqUAEQEAAYkBvAQYAQoAJhYhBMfui64wKUMqp1wmBC4MZXpJYEQJBQJijTUBAhsMBQkDwmcAAAoJEC4MZXpJYEQJkRAMAKNvWVwtXm/WxWoiLnXyF2WGXKoDe5+itTLvBmKcV/b1OKZF1s90V7WfSBz712eFAynEzyeezPbwU8QBiTpZcHXwQni3IYKvsh7s t1iq+gsfnXbPz5AnS598ScZI1oP7OrPSFJkt/z4acEbOQDQs8aUqrd46PV jsdqGvKnXZxzylux29UTNby4jTlz9pNJM+wPrDRmGfchLDUmf6CffaUYCbu4FiId+9+dcTCDvxbABRy1C3OJ8QY7cxfJ+pEZW18fRJ0XCl/fiV/ecAOfB3HsqgTzAn555h0rkFgay0hAvMU/mAW/CFNSIxV397zm749ZNLA0L2dMy1AKuOqH+/B+/ImBfJMDjmdyJQ8WU/OFRuGLdqOd2oZrA1iuPIa+yUYyZkaZfz/emQwpIL1+Q4p1R/OplA4yc301AqruXXUcVDbEB+joHW3hy5FwK5t5OwTKatrSJBkydSF9zdXy98fYzGniRyRA65P0Ix/8J3BYB4edY2/w0Ip/mdYsYQljBY0A== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Fri, 2024-03-15 at 15:29 +0100, Benjamin Tissoires wrote: > bpf_experimental.h and ../bpf_testmod/bpf_testmod_kfunc.h are both > including vmlinux.h, which is not compatible with including time.h > or bpf_tcp_helpers.h. >=20 > So prevent vmlinux.h to be included, and override the few missing > types. >=20 > Signed-off-by: Benjamin Tissoires [...] > @@ -6,6 +6,14 @@ > #include > #include "bpf_tcp_helpers.h" > =20 > +#define __VMLINUX_H__ > +#define u32 __u32 > +#define u64 __u64 > +#include "bpf_experimental.h" > +struct prog_test_member1; > +#include "../bpf_testmod/bpf_testmod_kfunc.h" > +#undef __VMLINUX_H__ Tbh, this looks very ugly. Would it be possible to create a new tests file sleepable_timer.c and include bpf_experimental.h there, skipping time.h? It appears that for the new tests the only necessary definition from time.h is CLOCK_MONOTONIC.