Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp701462ybl; Fri, 31 Jan 2020 06:31:59 -0800 (PST) X-Google-Smtp-Source: APXvYqyBlRBqTwfR90XnIjykfgo1Mb2BjXq97DfUqmzOeR2O3+Zq5DyqmLBaCSt/pCtRwZ4XIZa1 X-Received: by 2002:a05:6830:1218:: with SMTP id r24mr8057270otp.144.1580481118977; Fri, 31 Jan 2020 06:31:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580481118; cv=none; d=google.com; s=arc-20160816; b=ZMNVZVjXI0nUq1ohpgQZodEJrbtdFzYMEQyupzQKoZmIVK7xalmSxyx8DC9mnOK8XZ P6+/uhRZ4n9DYzuTWy4omfg10jUKm1roLqumHCWs1fN9IaI44bsg7CRwP3uRDY7mTbzt AbGY179F6domzxuOsQBLZodNT/JJhPR7BxmzqDzne7AgOrRFtUbsVO9Q08Z4l+ZWQ00/ uKNngmp0xU9E9rnzjh7Gxjh+BjhAScOjo4eLB2zK2xGbOaPvUBLDCZBy8HU/78rgIjdB Gjilp0IfYoTCVz5VH9XNbSgsoA4szfPY1qM5woWAkWom0zPklH93A1sH2GFIpnmwcYEr WLrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=PejrRp0WLHfGD9bvxIDUPY9VeT1zBnFCJg8McZ4Axj8=; b=dL9hXSXlHBX/wlPGlRhqVIhLK4J9NJYU3PSTTQ6aE/PflA/xiaOeCh6k2DuWHAd9Da NxfsGem3cWI5sQUK/E1GYdhrK7ZLdDCjKKxZKDlioK7iJbp1orDwa8DnlJG3itsLJsLi dccCh2JJKcEoKQfyUqqwQQFk/bZtPbZU8d8B1sGef8j2sDfqQeUkvcrEszUvon0K/4hW IoKdgx6iHL38o64FSqgAH1zfuHYY2X+j1ut/HL65ksq3BX31g9gpq9jvXCTBwactClt3 w31XaJYYxMzbiolRfHRKGJnXWHViV+pHU8+rQR7KkoMMrJktBWfoCknutwSLyWTjFU9d bo2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EhHg0u+G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o25si5106202otk.28.2020.01.31.06.31.46; Fri, 31 Jan 2020 06:31:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EhHg0u+G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729036AbgAaO3u (ORCPT + 99 others); Fri, 31 Jan 2020 09:29:50 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:23339 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728827AbgAaO3u (ORCPT ); Fri, 31 Jan 2020 09:29:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580480988; 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=PejrRp0WLHfGD9bvxIDUPY9VeT1zBnFCJg8McZ4Axj8=; b=EhHg0u+G90tDa9IjBcl4cCMyDIbEjNMCE0sOLqmGgJfwWIgdAvXsDfUaDumLXS4hzi6Kde 8bRopaCrg2tQCXuSDEUOTqowwYzkPH2rc6fZ7yHta5uTMBpr4Ccwr9YL3+aezmQpAUjqsu 4JgWkRiCX2lBpDuZY2nKa6duhvoGKjw= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-135-fp9GCCR0OpGgaItFZ1Y57Q-1; Fri, 31 Jan 2020 09:29:47 -0500 X-MC-Unique: fp9GCCR0OpGgaItFZ1Y57Q-1 Received: by mail-wm1-f72.google.com with SMTP id m18so2111880wmc.4 for ; Fri, 31 Jan 2020 06:29:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PejrRp0WLHfGD9bvxIDUPY9VeT1zBnFCJg8McZ4Axj8=; b=q7hDKQfFzDAOsCGHIlfao3WeHvCCCZg0sJC7kbx67HxHuGNrdhWd8xMkf5jupt4Kt8 PuFB7rW3iVH8aHV5Ng37dNBb/nRSRrUsW+OfNZ6wUEd923811s/CFhEOmU2b8XrXLUJS YXVbN9XFxPUJ7kVHFMKI7Jst9gVNEYV45axqihlAh6MTFTySOddHdS77DTi0pXdSk5xz qbYCJsEmm0aP5zFA1rp3DGY5dOBxv0KSNDpq+pkYn+8wEIz8fV0I0SVEyDpW0ZAf9gyO jizlTlS+SbvXkW9wD5vsK6i1E0afnIR+WgTwUEvOQOKJklTAn1M3gPYBh929XDT2z3W1 zdpQ== X-Gm-Message-State: APjAAAU/I8+9RyRzWogewD9tMB9CNKN7LN0NJdQ/JsyNY1GwfGDhvqeL mysua2ODedGmxKM909Pj26F63v+d+hWasrnCSQ05tZZxTQkNi1Lwke+rEBi3eBG7rYa2RQJjCbI AgEWB965vfnt/ZLzu8SGkKOa1 X-Received: by 2002:a5d:44cd:: with SMTP id z13mr12704422wrr.104.1580480985569; Fri, 31 Jan 2020 06:29:45 -0800 (PST) X-Received: by 2002:a5d:44cd:: with SMTP id z13mr12704407wrr.104.1580480985325; Fri, 31 Jan 2020 06:29:45 -0800 (PST) Received: from steredhat.redhat.com (host209-4-dynamic.27-79-r.retail.telecomitalia.it. [79.27.4.209]) by smtp.gmail.com with ESMTPSA id z19sm10394558wmi.43.2020.01.31.06.29.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2020 06:29:44 -0800 (PST) From: Stefano Garzarella To: Jens Axboe Cc: linux-kernel@vger.kernel.org, io-uring@vger.kernel.org Subject: [PATCH liburing v2 0/1] test: add epoll test case Date: Fri, 31 Jan 2020 15:29:42 +0100 Message-Id: <20200131142943.120459-1-sgarzare@redhat.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jens, this is a v2 of the epoll test. v1 -> v2: - if IORING_FEAT_NODROP is not available, avoid to overflow the CQ - add 2 new tests to test epoll with IORING_FEAT_NODROP - cleanups There are 4 sub-tests: 1. test_epoll 2. test_epoll_sqpoll 3. test_epoll_nodrop 4. test_epoll_sqpoll_nodrop In the first 2 tests, I try to avoid to queue more requests than we have room for in the CQ ring. These work fine, I have no faults. In the tests 3 and 4, if IORING_FEAT_NODROP is supported, I try to submit as much as I can until I get a -EBUSY, but they often fail in this way: the submitter manages to submit everything, the receiver receives all the submitted bytes, but the cleaner loses completion events (I also tried to put a timeout to epoll_wait() in the cleaner to be sure that it is not related to the patch that I send some weeks ago, but the situation doesn't change, it's like there is still overflow in the CQ). Next week I'll try to investigate better which is the problem. I hope my test make sense, otherwise let me know what is wrong. Anyway, when I was exploring the library, I had a doubt: - in the __io_uring_get_cqe() should we call sys_io_uring_enter() also if submit and wait_nr are zero, but IORING_SQ_NEED_WAKEUP is set in the sq.kflags? Thanks, Stefano Stefano Garzarella (1): test: add epoll test case .gitignore | 1 + test/Makefile | 5 +- test/epoll.c | 386 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 390 insertions(+), 2 deletions(-) create mode 100644 test/epoll.c -- 2.24.1