Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3462670ybi; Fri, 5 Jul 2019 07:46:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5/UY96cCxweyQyQl3JP/hZsUDV47k4IgN1ouiks/l05PYMOn6hD62Ukb3JX60T+T9PIuw X-Received: by 2002:a65:65c5:: with SMTP id y5mr3573695pgv.342.1562338004580; Fri, 05 Jul 2019 07:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562338004; cv=none; d=google.com; s=arc-20160816; b=GCimVipGs3yQ/3MTMW+e3D0Kwky0Zb0K3g6wGbDDLVU7En7Kh++AxkiynUOPVbr81h 3aSsbcUm44hpNOhWag+N6hLtLzAiw0PePfONDExKD9m6KF5uU3NoYAzebophKBMFEw0X uICjbtm6ki0EDSdd4x8z3N5KQq3ikBYr0b5bbAgltC+NzjtgcSpdBnsJyJlE5UeeiQIw aSjNVNe7KwG+rVfIfUXUI2HgskdkK/+8jn7AwdQwITdW2WjR/WDHHl74G+XKooN4xRdp /nWL4Eyyx6GTkkHv1AfLE+GC4WfOjk+fbWxlu72AFPZL20pb2wb2N4zp+J5IYLI2oXC1 n5pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=vKOcC08az8Ei8LVV6KxAWMsSgNK8yAN/5iii8HCvg+0=; b=GV7OhWi/CuK9jXLHsbz+okhS/jjnmo1B2ISjgBSrzRfX+ltgcjloh5QeF0x9oPVDLy DPrkgLMLApZYd/0hOYPK6ZvVngnJ5wvKYa0w2vOuJlnToGtDDq6TWhkBotg2TzjXWT5T oD5hAT5rZgFz13ie8RcaofagHPUPdLA1tya4Q7+s88PJf8PF5+Mjoq3pxIoLOLy9NyWX hehKYmLirg1YG7M/citQ1ZRE1c+zjiV8h0CHMSqH11HgCOJnfXmGw1NxFQWQqc6aIQJX pa+gFEwvoaBhJun94HG0YeOJgi5hY2bN6gfs1EExZOZiy/KF0C2Jq1RSksVcdhpb1FFE vZDg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c8si9211253pfn.208.2019.07.05.07.46.29; Fri, 05 Jul 2019 07:46:44 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725681AbfGEOkh (ORCPT + 99 others); Fri, 5 Jul 2019 10:40:37 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:46910 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726555AbfGEOkh (ORCPT ); Fri, 5 Jul 2019 10:40:37 -0400 Received: (qmail 1961 invoked by uid 2102); 5 Jul 2019 10:40:36 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 5 Jul 2019 10:40:36 -0400 Date: Fri, 5 Jul 2019 10:40:36 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Greg Kroah-Hartman cc: David Howells , , Casey Schaufler , Stephen Smalley , , , Christian Brauner , , , , , , , Subject: Re: [PATCH 6/9] Add a general, global device notification watch list [ver #5] In-Reply-To: <20190705084459.GA2579@kroah.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 5 Jul 2019, Greg Kroah-Hartman wrote: > On Fri, Jul 05, 2019 at 09:04:17AM +0100, David Howells wrote: > > Greg Kroah-Hartman wrote: > > > > > Hm, good point, but there should be some way to test this to verify it > > > works. Maybe for the other types of events? > > > > Keyrings is the simplest. keyutils's testsuite will handle that. I'm trying > > to work out if I can simply make every macro in there that does a modification > > perform a watch automatically to make sure the appropriate events happen. > > That should be good enough to test the basic functionality. After this > gets merged I'll see if I can come up with a way to test the USB > stuff... You can create USB connect and disconnect events programmatically by using dummy-hcd with gadget-zero. Turning off the port's POWER feature will cause a disconnect, and turning it back on will cause a connect. Alan Stern