From owner-freebsd-testing@freebsd.org Sat Sep 12 12:55:13 2020 Return-Path: Delivered-To: freebsd-testing@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 96E173D7780 for ; Sat, 12 Sep 2020 12:55:13 +0000 (UTC) (envelope-from ahsanbarkati@gmail.com) Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BpXf86g7tz3g8r for ; Sat, 12 Sep 2020 12:55:12 +0000 (UTC) (envelope-from ahsanbarkati@gmail.com) Received: by mail-yb1-xb32.google.com with SMTP id p81so8269118ybc.12 for ; Sat, 12 Sep 2020 05:55:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4nNVSeZxp3xZI8GiK6+VyMYL5fMtYI288oB5xiwaAjs=; b=ehXeu3qqs6YWZ/7GIIQrv3KlGsRCGJTwiNblIXa6tFc8bBoPfPX7+v56UjiMY+2FDI 8tmvoK9Xq8EvGHy0nLOHVrStSh/+UsZ7MZo+3sbgp8pX6akjLCx4Z2/b+kHnulVjb7DU Nx/y5EAbm5oduipCjdy+kFDRUnIixy97JtWufrBBO4r3s72/oqkDBfq58yIb+9X7Q2Lh uCUjjEZDW73NisbOHkMZnHOx9ipVdMMWHgbUaFxt0P0jumeWfPdUEqNvuTEdvH3Womma ynp/e7lsHMCTIv5oVPFhRu56vsbbIxr7BOwuuAF+IXDFAmcuOKaFTapolD2DIqmV3qik WKFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4nNVSeZxp3xZI8GiK6+VyMYL5fMtYI288oB5xiwaAjs=; b=nkk+SJ33ysbFHvnxsq9IzOAtd4n9pZNWPdeYaEX2rbmo/IglA/rI93XVTzQfKcCc2Y 7At/H3iREU1scpauetpxPO4vPNfweEt69Fgy99HQ24ij8CLLMti28YEoabCQ1xt45oFc TGIx0LiEmNuokVRVmGiJUBvNRR9sBbYcSuKKenYRjL68Uc2E6Z77c9akXghcXRIeiTvz dLx1ewcrTX1tfUZYfRJP0ZU0umEepxUUVOZYCsti+TsM76YFrAJvtNcLNhNYQ77aT+Im BM5GLOlx1T8KUai278qqbAEGd4i4wSCAKjzGQMe9sEEBHfQxVy+CJ4qAO60rzE7H4A/3 lGmw== X-Gm-Message-State: AOAM5321slZwJWKiFywhGTg2Od/UdJpy9wywPZ8tasCEniyHX/9V+hHX 3UnraH57ZHaHf3J/V09dKDiQghqGMGVDmnw7+N32Feji91CDgvga X-Google-Smtp-Source: ABdhPJy8FLIJz9LKQH0uDl6reK6Yuuv5p23qWUW8UI0JbUeHyf+yDQrM8Isbd054oawJwch4R8rkI+kMQS5DUI7wQxE= X-Received: by 2002:a25:3857:: with SMTP id f84mr8230214yba.356.1599915311534; Sat, 12 Sep 2020 05:55:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ahsan Barkati Date: Sat, 12 Sep 2020 18:25:00 +0530 Message-ID: Subject: Re: Developers' Handbook: Chapter on testing To: Lawrence Greening Cc: "freebsd-testing@freebsd.org" X-Rspamd-Queue-Id: 4BpXf86g7tz3g8r X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=ehXeu3qq; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ahsanbarkati@gmail.com designates 2607:f8b0:4864:20::b32 as permitted sender) smtp.mailfrom=ahsanbarkati@gmail.com X-Spamd-Result: default: False [-3.14 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.21)[-0.208]; FREEMAIL_TO(0.00)[outlook.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.95)[-0.947]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.987]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-testing@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b32:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-testing] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Sep 2020 12:55:13 -0000 On Fri, Sep 11, 2020 at 6:33 AM Lawrence Greening wrote: > Hi. > > I am writing a chapter on testing for the FreeBSD Developers' Handbook. > That's great. We have been looking for it for quite a long time. > > The following topics are expected to be covered: > > * FreeBSD Test Suite > * Kyua > * Automated Testing Framework (ATF) > * Organization of current FreeBSD tests. > * Using automation and virtualization to reduce the overhead in setting up > the test infrastructure. > * Examples of standard types of testing, e.g. unit tests, functional > testing, load testing, etc. > * Reproducibility in building and testing. > > However, this list is just a starting point. The scope and organization > will evolve as the chapter is written. > > After reading the chapter, the reader should be able to do at least the > following: > > * Install and configure the necessary testing tools, test suites, etc. for > the purposes of testing FreeBSD. > * Run tests. > * Write tests. > * Submit tests. > > The chapter will include walkthroughs and guided or cumulative examples. > > At this preliminary stage, I am interested in the following feedback: > > (1) What material do you want to see covered? > (2) What material do you want to see prioritized? > (3) What general approach(es) do you want to see taken towards the subject > matter? > (4) Are there good example tests or areas of the code base that deserve > focus, either because of their importance, usefulness as examples, history > of regressions, etc.? We have some good tests for the firewalls, which makes use of vnet jails to create a network setup required for testing. This method can be very useful for any network related tests. We have example tests in `/tests/sys/netpfil/pf` and also have a method to write tests for all the three firewalls in a single body (tests for common functionalities in the firewalls) here -> `/tests/sys/netpfil/common`. You can also find a small writeup on this common testing method here -> https://ahsan.live/Framework-for-testing-multiple-firewalls.html. I'd love to provide you with any assistance which falls under my reach. I am excitedly looking forward to a chapter on testing.