From owner-freebsd-testing@freebsd.org Tue Jan 17 23:01:28 2017 Return-Path: Delivered-To: freebsd-testing@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C395CB5DAE for ; Tue, 17 Jan 2017 23:01:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 180B41907 for ; Tue, 17 Jan 2017 23:01:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 175AFCB5DAD; Tue, 17 Jan 2017 23:01:28 +0000 (UTC) Delivered-To: testing@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16FDDCB5DAC for ; Tue, 17 Jan 2017 23:01:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x232.google.com (mail-pg0-x232.google.com [IPv6:2607:f8b0:400e:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E642A1905 for ; Tue, 17 Jan 2017 23:01:27 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x232.google.com with SMTP id 14so28095165pgg.1 for ; Tue, 17 Jan 2017 15:01:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:date:message-id:to:mime-version; bh=6WziePpQi/8/5m8rY6SxWiVGYxc4y0ol/ZBvp/ucDnk=; b=aV66LobATNRXBrmCR4L+kJcgXnhJQpBJBJjutdbjTakcFagv47/3N+axbRqbSFLNin VpfNF/0NYPoA6a9Q2MemhQgK75gEwrYMU5oAqQrvpV2sEQFJTD84RhKwZWQwPlXyARd7 AmfAgjEPJGE5dqHHx76OUC6CsvoE7g1siqfvFfHDs4I+Wqtxo50flVYM71pCFgHAEYRN nby4vxXVYiAxBXY0dDl0ZqcuJi0oY3FFwoVg4JsKzBLXteFnRej0z1x/EEEDzqxSBaZ9 7/suCxQhDpZIBZ1EPB6zy0OE/cvPWg3gSj1dZaunqByNC1l5F3PwfANxPuX6DTcNdw7c Ljyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:date:message-id:to:mime-version; bh=6WziePpQi/8/5m8rY6SxWiVGYxc4y0ol/ZBvp/ucDnk=; b=I9FkPpS/OaInZ6DbTD2Zrsf5W8J/rkP1C7Xa27rq9p6CpbsJJR67/vQmv9AMvLlXPu HaHcQm9TyutvQlRfWdstPwQxSN4Bb5hkzu77Cl6ZcwCVkz3Hndnzj0Pmp426mK1ulB8e TOw/ymhUmJ5GIHqmyd9tWFhS9VvIZyVOFNsrBBic0gENhouhd4YADItRUzKvkdTZLX3T bu3GZZ9GisO2M3xrYbEAvGY1h9wViWqofAE3QH8vIJdf8ugz2WZTtYUFAAhk1+pkABRK E262lMzxQyk5c5ErFiMh8Wp/98Vq20DGBGwNmpBE8/slEzMRgeeTqdseP7cgpRCfpR/Q Sgew== X-Gm-Message-State: AIkVDXKDnpgNjjI+j+TZegarSceezuc9Qhldsiw3SjV3v7p7mZgWBTAYAK5w80Q5oaOnqQ== X-Received: by 10.99.222.85 with SMTP id y21mr91986pgi.119.1484694086941; Tue, 17 Jan 2017 15:01:26 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id p67sm58210640pfb.2.2017.01.17.15.01.26 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Jan 2017 15:01:26 -0800 (PST) From: "Ngie Cooper (yaneurabeya)" X-Pgp-Agent: GPGMail Content-Type: multipart/signed; boundary="Apple-Mail=_742A2872-7A6F-49B5-B87B-648383D50897"; protocol="application/pgp-signature"; micalg=pgp-sha512 Subject: Looking at replacing ATF/Kyua (in a limited fashion) with Google Test/shunit2 Date: Tue, 17 Jan 2017 15:01:25 -0800 Message-Id: <45D23581-C780-4C55-80CF-19A81813D672@gmail.com> To: "freebsd-testing@freebsd.org" Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2017 23:01:28 -0000 --Apple-Mail=_742A2872-7A6F-49B5-B87B-648383D50897 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello all, I had an initial discussion with a handful of other test = stakeholders and due to the number of caveats with ATF/Kyua and a = variety of issues in contributing back to the ATF/Kyua projects (time on = maintainer=E2=80=99s end, legal issues, technical issues, etc), I'm = seriously considering replacing parts of ATF/Kyua with GoogleTest and = shunit2. In particular, I want to do these things [better]: - Detecting kernels features and modules. It is ad hoc and done = on a per-testcase basis or in ad hoc common routines, which bloats tests = unnecessarily. - Detecting network interfaces. My employer desires that =E2=80=94= we had something in use internally for detecting interfaces in tests, = but it was really messy; it would be nice if there was a clean, = generalized way to do this. - Adding test fixtures to ease testing on a per-suite basis. For = example, setting up a service like bsnmpd for testing, running pjdfstest = in different configurations, (a temporarily setup UFS or ZFS filesystem, = etc), collecting core files after tests for analysis purposes, etc. Why these frameworks? GoogleTest: - It is easier to extend upon. - It is better documented than ATF/Kyua. - It has more brevity in terms of writing testcases. - It has features that I (and others who write tests) really = want. - It is very similar to atf-c-api in core ways, in terms of = macros. - It has been accepted by multiple open source projects, like = clang/llvm, so including them in the FreeBSD Test Suite is more trivial = after the porting and integrating work. - It is lightweight and a good candidate for inclusion in the = base system. - Google and other groups are actively maintaining the project. shunit2: - It has more brevity in terms of writing testcases. - It has features that I (and others who write tests) really = want. - It has syntactic sugar/API construction patterned after = JUnit/XUnit in other ways, so it=E2=80=99s familiar to testers who have = written JUnit/XUnit tests. Some concerns that have been brought up: Q: Why those frameworks? Have you considered other options? A: Yes. A number of users have provided a matrix on Wikipedia = and I=E2=80=99ve looked at the list to try and determine : a. C: = https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#C b. C++: = https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#C.2B.2B c. sh: = https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#Shell Q: Google sometimes tinkers with projects, then abandons them = later. Is GoogleTest one of those projects? A: As far as I can tell, no. This is widely used internally and = developed on by their engineers. It is used external to Google by larger = projects like LLVM, so even if Google disappeared tomorrow I believe = there=E2=80=99s enough inertia and interest to keep things going here. Q: What about C test integration? A: I=E2=80=99m trying to see how far I can get with GoogleTest = integration on the C API side, and if replacing atf-c-api is = possible/doable using C integration in libc++ (the syntax/API = construction for atf-c-api and GoogleTest is similar in some regards). I=E2=80=99m really early on in the evaluation phase, so if = anyone has any input to provide with the direction I=E2=80=99m going, I = would really love the input. Writing tests for bsnmp will be my first = proof of concept (I hope to use both GoogleTest and shunit2). Thank you, -Ngie --Apple-Mail=_742A2872-7A6F-49B5-B87B-648383D50897 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYfqJFAAoJEPWDqSZpMIYV7osP/j9ymv75+SXLwsIs+K2wXAuj TTR64vU0LtW30FLT3Y2iNOsXPLxoUlTeG1IQY/yTjGiVYTdtLsRmfYW1DbMmpMF1 OOoe2yUHZrx4NcbR8dU9CHSqhFyDI+WBmAxoZrvF+VylhukqlrZJtfwKGhH4quK9 pdHQM8b8pX/kh9I8NZcZHfYeKZf3qbO/e7Nid2dIvx0D7v2ws7Y+8Zjq/PP0beuf Sw3CM4YZkKtiOif6/gQ1JTBh7sSwcE4soWeCuuEOEmdGJqd1yeEb/MO5fGbMAD6c dcRkyDcmm03P63JKbW0qjlnFED2DPGuhmKjBue4vaHtjTCoFhWE8yPti3lBwHqBU Yby6KI0hlh0skECSRYm1njc8oNviyMpv5wpSIOtMqSVqn5lcSBnK4a8XK70K1oPC aiuV7eFkUQNU1jfnebm6q4pIX4NSWuhiSchvPrIxpommGftriNXwovf2BohkNSxT hfq4oLe/SDZ9+kN2HRdhoM1xUKC35m0jIrXZDg30MlCiR9+wI1yAIvfJukfUxHld kj4zrk5XeznSHgO2aaSozTNdwkgH/1Cplhj6RGtN1B7FO+xUTqkT8UKeJ/8RCd00 gtBnventU9as9Deb9mjS4kS13lh9eQrqrXQlebVn3ZgNeTOaBu27ONdNaJqA5KSj 59btJvmEZ7uMu+P4ifnk =1ThW -----END PGP SIGNATURE----- --Apple-Mail=_742A2872-7A6F-49B5-B87B-648383D50897--