From owner-freebsd-testing@FreeBSD.ORG Fri Oct 31 22:25:51 2014 Return-Path: Delivered-To: freebsd-testing@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E3C43E4 for ; Fri, 31 Oct 2014 22:25:51 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E6B6CC93 for ; Fri, 31 Oct 2014 22:25:50 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s9VMPm4E045109 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 31 Oct 2014 15:25:49 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s9VMPmhL045108; Fri, 31 Oct 2014 15:25:48 -0700 (PDT) (envelope-from jmg) Date: Fri, 31 Oct 2014 15:25:48 -0700 From: John-Mark Gurney To: Garrett Cooper Subject: Re: help on testing for FreeBSD... Message-ID: <20141031222548.GR8852@funkthat.com> References: <20141016001543.GD1852@funkthat.com> <69C71414-AE05-4AC2-B07D-23F5569C9FCA@gmail.com> <20141016003822.GE1852@funkthat.com> <20141016005248.GF1852@funkthat.com> <20141024230806.GO82214@funkthat.com> <35585EB9-21D0-4AFC-8BA5-F2DD4968590F@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <35585EB9-21D0-4AFC-8BA5-F2DD4968590F@gmail.com> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Fri, 31 Oct 2014 15:25:49 -0700 (PDT) Cc: "freebsd-testing@freebsd.org" X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2014 22:25:51 -0000 Garrett Cooper wrote this message on Fri, Oct 31, 2014 at 14:52 -0700: > On Oct 24, 2014, at 16:08, John-Mark Gurney wrote: > > > John-Mark Gurney wrote this message on Wed, Oct 15, 2014 at 17:52 -0700: > >> NGie Cooper wrote this message on Wed, Oct 15, 2014 at 17:46 -0700: > >>> On Wed, Oct 15, 2014 at 5:38 PM, John-Mark Gurney wrote: > >>>> Garrett Cooper wrote this message on Wed, Oct 15, 2014 at 17:25 -0700: > >>>>> Hey jmg@ (-testing CCed)! > >>>> > >>>> Sure, np... > >>>> > >>>>> On Oct 15, 2014, at 17:15, John-Mark Gurney wrote: > >>>>> > >>>>>> Hello, > >>>>>> > >>>>>> I'm working on testing parts of OpenCrypto. I have committed some work > >>>>>> to p4 at: > >>>>>> https://p4db.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/opencrypto/tests/sys/opencrypto&HIDEDEL=NO > >>>>>> > >>>>>> But it requires a few files to be installed... I'm not sure where the > >>>>>> best location to install these are and now best to install them? > >>>>> > >>>>> I have a couple questions: > >>>>> - Where would the source live in the tree? > >>>> > >>>> Which source are you talking about? The python source? or the source > >>>> for the input data files? If you mean the later, it's where they will > >>>> be committed... They are taken from NIST's CAVP program unchanged... > >>>> I COULD possibly write a complicated rules to fetch and extract the > >>>> files, but decided not to... > >>> > >>> The bulk majority of the driver source (.c, .h, etc). > >> > >> The code that I'm testing is in src/sys/opencrypto (and there are other > >> drivers that can get tested too, but it still goes through the opencrypto > >> code)... Hence why I put them in tests/sys/opencrypto... If that's the > >> wrong location, let me know and I can move them... > >> > >>>>> - Why are they written in python? > >>>> > >>>> Because I'm too lazy to write code in C... I had already written > >>>> framework code in Python, and C doesn't have a standard function to > >>>> decode hex.. :) And error handling it much easier in python... > >>> > >>> I ask because we don't have a means for doing unittest level execution > >>> right now and not being written in something that's in base or > >>> installed automatically (perl for instance) would mean that your test > >>> code wouldn't be run by default on jenkins runs. > >> > >> Yeh... Though as a kld will have to be loaded, and a sysctl set as > >> root, there's other issues to having it automaticly run as part of > >> jenkins... > > > > Hello, any help w/ this? I haven't received a response on how to > > integrate my code.. If I don't get help w/ this soon, I will add it > > to src/tools/regression, and call it a day... > > Sorry for not responding sooner. I?m off today, so I?ll be around the usual channels on #efnet if you need to track me down. Basicly, need help on where to install files that aren't executables, but are necessary for the tests to run... stimulus files and python module files.. If you want to take a look at what I have so far, go ahead and look at the link above to the p4 depot.. Is anyone going to be at MeetBSD that could help me with this?? Then we could sit down and knock this out... > Also, I spotted this in passing while trying to see if we had any arc4random testcases? > > http://svn.freebsd.org/base/head/contrib/netbsd-tests/crypto/opencrypto/ > > This might be more worthwhile to integrate than pursing a custom test infrastructure/tests route as it?s a part of NetBSD?s open crypto testsuite (there?s probably going to be some API differences, but they should be relatively small). Oh, didn't see NetBSD's, but their tests aren't very expansive.. only a single test vector for GCM, no tests for XTS, no tests for 3DES, and 7 tests for SHA1-HMAC... Good thing I looked at this.. our SHA1-HMAC has a bug in that it only allows 20 byte keys instead of arbitrary length keys.. The test vectors for NIST doesn't have any 20 byte keys... Opps... If we fix that, we'd have 1575 tests... So, even though the NetBSD tests would be useful to integrate, it's clear that they don't overlap much... Also, OpenBSD has some tests too, but they mostly compile code directly from the kernel instead of going through /dev/crypto... Which makes it harder for us to use the tests... Thanks for the help! -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."