Re: Unit test proposal

Kenneth McMillan <kenmcmil@microsoft.com> Wed, 27 February 2019 19:57 UTC

Return-Path: <kenmcmil@microsoft.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C4D4B1310AC for <quic@ietfa.amsl.com>; Wed, 27 Feb 2019 11:57:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.011
X-Spam-Level:
X-Spam-Status: No, score=-0.011 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=1.989, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZuhNLqeMYvwb for <quic@ietfa.amsl.com>; Wed, 27 Feb 2019 11:57:48 -0800 (PST)
Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-eopbgr820113.outbound.protection.outlook.com [40.107.82.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BD870128766 for <quic@ietf.org>; Wed, 27 Feb 2019 11:57:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2pPhbFnkCezT4nf9yXkYIQNd0lxyxg9rWpFfFSEl0P4=; b=iPnfeyCWbXlISVgPpgPIJlfsJ+jtnb6xn1sFWt3JVlWhwGjdtM4ccntMi17Y++Y2OLT7VEj12YC/y486XMgTwWT33wzcGGZ2YZZ8RngEUOF/vsDiJLa1zhLDVdiHMEiqswUKfYKQfmgYRNHjqZ1EHx0Hg+7S6YS7TPTo0MvGZuk=
Received: from SN6PR2101CA0024.namprd21.prod.outlook.com (2603:10b6:805:106::34) by MW2PR2101MB0938.namprd21.prod.outlook.com (2603:10b6:302:4::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.2; Wed, 27 Feb 2019 19:57:45 +0000
Received: from BL2NAM06FT008.Eop-nam06.prod.protection.outlook.com (2a01:111:f400:7e55::202) by SN6PR2101CA0024.outlook.office365.com (2603:10b6:805:106::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1686.3 via Frontend Transport; Wed, 27 Feb 2019 19:57:45 +0000
Received-SPF: Pass (protection.outlook.com: domain of microsoft.com designates 157.58.196.103 as permitted sender) receiver=protection.outlook.com; client-ip=157.58.196.103; helo=mail.exchange.microsoft.com;
Received: from mail.exchange.microsoft.com (157.58.196.103) by BL2NAM06FT008.mail.protection.outlook.com (10.152.106.128) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1686.0 via Frontend Transport; Wed, 27 Feb 2019 19:57:45 +0000
Received: from CYS-E16DFM04.exchange.corp.microsoft.com (10.221.226.71) by CYS-E16DFM04.exchange.corp.microsoft.com (10.221.226.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1713.5; Wed, 27 Feb 2019 11:57:44 -0800
Received: from CYS-E16DFM04.exchange.corp.microsoft.com ([fe80::42:8cff:fe36:8759]) by CYS-E16DFM04.exchange.corp.microsoft.com ([fe80::42:8cff:fe36:8759%17]) with mapi id 15.01.1713.004; Wed, 27 Feb 2019 11:57:44 -0800
From: Kenneth McMillan <kenmcmil@microsoft.com>
To: Ian Swett <ianswett=40google.com@dmarc.ietf.org>, Dirkjan Ochtman <dirkjan@ochtman.nl>
CC: QUIC WG <quic@ietf.org>
Subject: Re: Unit test proposal
Thread-Topic: Unit test proposal
Thread-Index: AQHUyLDljBly2P/KJkCJ6nDqOPEc3KXqcbIAgAn0IwD//6lhrw==
Date: Wed, 27 Feb 2019 19:57:44 +0000
Message-ID: <0d0a01a4a7e04b408885dc9ccb7a980f@CYS-E16DFM04.exchange.corp.microsoft.com>
References: <e53f540dae3845659b99ea0c0626aeba@CYS-E16DFM04.exchange.corp.microsoft.com> <CAKmKYaB8pqV4cJuUFf8Kz5wVD=FRo1vCAXHNJWkSXro=aO-WmQ@mail.gmail.com>, <CAKcm_gMmzOUGZDXRCA2cxNTV27MaQeG4zehH+M+7CwtTatCQ4Q@mail.gmail.com>
In-Reply-To: <CAKcm_gMmzOUGZDXRCA2cxNTV27MaQeG4zehH+M+7CwtTatCQ4Q@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.221.255.3]
Content-Type: multipart/alternative; boundary="_000_0d0a01a4a7e04b408885dc9ccb7a980fCYSE16DFM04exchangecorp_"
MIME-Version: 1.0
X-EOPAttributedMessage: 0
X-MS-Office365-Filtering-HT: Tenant
X-Forefront-Antispam-Report: CIP:157.58.196.103; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(396003)(376002)(39860400002)(136003)(346002)(2980300002)(189003)(199004)(110136005)(6246003)(236005)(478600001)(126002)(476003)(7116003)(8936002)(7736002)(10290500003)(229853002)(446003)(486006)(11346002)(561944003)(7066003)(440504004)(7696005)(606006)(517774005)(966005)(86612001)(86362001)(53936002)(14454004)(5070765005)(53366004)(53376002)(81156014)(8676002)(81166006)(55016002)(5660300002)(6306002)(54896002)(3846002)(14444005)(53546011)(3480700005)(26005)(186003)(71190400001)(336012)(84326002)(24736004)(4326008)(97736004)(108616005)(356004)(6116002)(102836004)(2906002)(6346003)(76176011)(106466001)(316002)(10090500001)(19627405001)(426003)(68736007)(22452003)(106002)(16586007)(10090945008); DIR:OUT; SFP:1102; SCL:1; SRVR:MW2PR2101MB0938; H:mail.exchange.microsoft.com; FPR:; SPF:Pass; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1;
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: c41a89e9-6561-4544-7400-08d69cedd776
X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4608103)(4709054)(2017052603328)(7193020); SRVR:MW2PR2101MB0938;
X-MS-TrafficTypeDiagnostic: MW2PR2101MB0938:
X-MS-Exchange-PUrlCount: 2
X-O365-Sonar-Daas-Pilot: True
X-Microsoft-Exchange-Diagnostics: 1; MW2PR2101MB0938; 20:BpszMalC/eTeriCZwBJPC/J+UkgXN/Wuo+i0pkEm2GhzMxhcuc1rc7N2WSJI0Z9mxNu38YxqSty+VXAgjX1a7BIzhfn0s2Od4JBfYXGDgpDLLWoLR5yBassN46X2KfVdRmg9R0v/xPvFDX7GvoPqPqinPG8CUM6qBzJgExW9hkmBg8qhwFbWi5KodMjtF0sbu5AMA8FNMYgHc9dTPG6LXV5Y3zyf/yVQ1wH8ZdGXM+6edv5HBXjT0S+145Qmbl4P8ZSOf4to1Rlr6spM9CvxML8tdy7wHtNYXf8bUqnK2O6J4Zo6/RVi0dHKNXv7YHnR1OnKeL7LrpO/sF9ZqlME1tmGO07HwM4pOhLNxrUdrLaI6HkRMpzVxEAEtqjfN1S7r+Cc1QVEevb5X6Q40SJFzmwAIsBB1MFIZ4NPRw8awX1+QDjU9cLtXXb2iCmyb/sEwPDLi8aip81AImAY45xX+EZS2KshNYfKtTcDIu/PzUJUOhtGxK2cnjQUstNLgskt
X-Microsoft-Antispam-PRVS: <MW2PR2101MB0938CC2497A279B83693C26CC7740@MW2PR2101MB0938.namprd21.prod.outlook.com>
X-Forefront-PRVS: 0961DF5286
X-Microsoft-Exchange-Diagnostics: 1; MW2PR2101MB0938; 23:3qBk5OHjIYXpcoEuaIt2B0U3rmPduXPrpQ9xXt+x5WE/qIrCJJRqtRiv/6mg5ZM0egUgDHigWQFuDBb5XKr6OIId7uvocpEZEu0DBFpSH7orB7oLojl+PEgOA8N6f52BwmGjkyF4w3vhLDU22HdkjyF8p0md08LTbmWMHCLKCsQgwrellb2qjDmeoG2oc0RyafHKfwr3JWXO4yA8k7tRu9WMPv2CvC6UV5XTmQ8pE4y23xM1SzDpRS1eFcFy8zh+wOFJEr+fzcxRFe6VhW9sUUQGJ1bBHDbotRwky6XsyEm+e+PrmlXtG+DAS6Fs27X5t6op6fyJCTLmERhnL+8AvM8azuUFcSdepXOJ++Lw0Yz1ldkvIe7NOQKgFamUvtBRQljoLnHe2z+La+FTlmfygWw9SELZK+VolhvsekQNh4nnkUiYgE4ARevun/7wm69aQuz+qHLekzFckU/eTaYzu0jpcxdtBxnz+9VmK3GV8ZBUzEqyAOWi6QFUYYFmwyw2/54P/lVNsHx+78cuARqARcJqRYcQGuRyEwwuFYs9VKhF1zf8M2Hra5NTprCwL7pcUWT8KH559b9YAILh4SHCDHKme82xT43PUtJCkDPoN0E8MhTxc/wIi/KMbIDJqqcC1+allHwE1Ho90EHdO3g0zzmF7gbEhxJ3jOMWwezrSwwf78ZwLtN5TW/Z8TVwDglLT1jUUGb0hKISnJOVx8Oe2avCP3ncaOjgtYto7IfN4vhAnWIwA0T0C96rzlglKm3PmR2hXREAMAAddioKRWrIn9+1f/vV2O6ka/Q4BEcCNoj/zMh9Jbbm2nZphohidl+0ZBhii5fqq8kGrxZADOhBoZv+8jlRXoYepyiL48/6N/a3AUa9u/TkyaVRn2vtEYEBd+hzN3BQtw3NpkOXiJtMaV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+d7yiHaKz5zJE4+yqrymtPJuMAMMznyLU04HYD4kn5d2YtDplFdguzogPLlC0cdqWgjTHJgVUdY=
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2019 19:57:45.4481 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: c41a89e9-6561-4544-7400-08d69cedd776
X-MS-Exchange-CrossTenant-Id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=72f988bf-86f1-41af-91ab-2d7cd011db47; Ip=[157.58.196.103]; Helo=[mail.exchange.microsoft.com]
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR2101MB0938
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/aBlnUQ-gUP3mRCiuEXOv_4T2rI0>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 27 Feb 2019 19:57:53 -0000

Hi Ian,


I'm thinking of doing just QUIC for now and not HTTP/3.  So the upper interface would have operations like "listen", "connect", "open stream", "send/receive" and so on. The lower interface would have operations like "datagram send/receive", "sleep", "random bytes" and so on. I'm also thinking of an interface for cooperative multitasking. This would have two calls: "block" would be called by a thread when it is about to do an operation that might block, like taking a lock, and "unblock" would be called when the operation completes. This would give the test harness the ability to schedule threads, which would allow deterministic replay, as well as exploring thread schedules.


The interface would be defined in terms of simple C-style calls and callbacks, with basic serializable data structures and opaque pointers or ID's. This makes logging and replay possible. One option is to use an IDL (for example, gRPC) to make the interface language-independent and also generate a lot of boilerplate code automatically.


Dirkjan makes a good point that it may be difficult to capture all the functionality  of the various

implementations in different languages. On the other hand, a lot of the complexity of interfaces is for

efficiency purposes, and we are not concerned with efficiency here. We can make the interface very simple

and  the adapters as inefficient as we like, since this code is only for functional testing purposes.


Bets -- Ken











Sent from Outlook<http://aka.ms/weboutlook>


________________________________
From: Ian Swett <ianswett=40google.com@dmarc.ietf.org>
Sent: Wednesday, February 27, 2019 8:21 AM
To: Dirkjan Ochtman
Cc: Kenneth McMillan; QUIC WG
Subject: Re: Unit test proposal

This would be interesting, but I'm a bit unclear on exactly what the unit test interface would be.  And are you thinking of interfacing at the QUIC transport layer, the HTTP layer, or both?

Agreed that logging and replay is extremely important in debugging.

The closest work I can think of is QUIC-Tracker, which I believe is somewhat different than what you have in mind: https://github.com/QUIC-Tracker/quic-tracker<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FQUIC-Tracker%2Fquic-tracker&data=02%7C01%7Ckenmcmil%40exchange.microsoft.com%7Ce441287ef6474c7bb7eb08d69ccfbad1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636868813340085808&sdata=RWtaXX39RKM0YnGrLFSGHjKLTp6%2FeVUiOVRp0fNsjQ4%3D&reserved=0>

On Thu, Feb 21, 2019 at 3:22 AM Dirkjan Ochtman <dirkjan@ochtman.nl<mailto:dirkjan@ochtman.nl>> wrote:
On Wed, Feb 20, 2019 at 2:05 AM Kenneth McMillan <kenmcmil=40microsoft.com@dmarc.ietf.org<mailto:40microsoft.com@dmarc.ietf.org>> wrote:
Please let me know if you think this seems worthwhile, or if it's redundant with any existing work.

 It sounds useful to me. On the other hand, I'm not sure a language-independent API is the best form here? It seems that languages are sufficiently different that a single API might be hard to implement sanely/simply across different languages. Maybe it would make more sense to define a file format, similar to what's already been done for QPACK (I believe it's called QIF)? It could probably be based on how Wireshark pcaps are defined.

Regards,

Dirkjan