From owner-freebsd-testing@FreeBSD.ORG Thu Jun 26 19:05:56 2014 Return-Path: Delivered-To: freebsd-testing@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4096BDD; Thu, 26 Jun 2014 19:05:56 +0000 (UTC) Received: from mail-ie0-x22b.google.com (mail-ie0-x22b.google.com [IPv6:2607:f8b0:4001:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DF192CDD; Thu, 26 Jun 2014 19:05:56 +0000 (UTC) Received: by mail-ie0-f171.google.com with SMTP id x19so3462398ier.16 for ; Thu, 26 Jun 2014 12:05:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=c6v1tCX6A0FL1H7XuHkl6YpNPRDx7q4w3eyfKkHiOUw=; b=GCcKRWYRFx0HejPtz8swnYBIsV4siOcf2FrLGRtqWgU59Yuc+NoUi46vdLPgK4m0fh Xy+5a2SochmQjRXbPgr864SF7LTJYZNMMGtuL6Jv0mJkCGDR0zemjD7N4TVJ0B8z4F7A s6/uKTUHDdS/uHK26VWHovT59j1LyHijH6d0HIa/4y7k5js8+TtHFyYMFTbTt7j6+7MR a8ixYOwZ8f4cOtvt8fK8pnJfC+QCnjI7YGISsuvQ357RM+sVHqnA4gsQAwe/+M0D5DX5 JhqdqInJQ88xC7zxiNpGGVKBIInpEmtUrNUltjeSyrsZsPzH5NTz5BBNrPVF1Kcc0ui7 KVMg== MIME-Version: 1.0 X-Received: by 10.50.138.105 with SMTP id qp9mr7008745igb.2.1403809556005; Thu, 26 Jun 2014 12:05:56 -0700 (PDT) Received: by 10.50.28.198 with HTTP; Thu, 26 Jun 2014 12:05:55 -0700 (PDT) Date: Thu, 26 Jun 2014 12:05:55 -0700 Message-ID: Subject: How do I extend Kyua requirements checking for FreeBSD? From: Garrett Cooper To: Julio Merino Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-testing@freebsd.org" X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 19:05:56 -0000 Hello Julio! I'm looking at extending Kyua to create special FreeBSD-specific functionality, and I'm wondering how I should do it. In particular there are a couple items that could be checked as prerequisite requirements before running tests to avoid running tests: 1. Is a service running? 2. Is a driver loaded? 3. Is a driver loaded as a kernel module or is it statically compiled in to the kernel? 4. Am I running on a particular filesystem? Etc. If I was to add these "requirements functions" to kyua, how would I query the values in an interface agnostic way? I would usually set environment variables, but this makes things potentially messier (especially in C/C++ unless I create a standalone library to handle this)/harder to grep for than having a command which fetches this information, like atf-config does for the ATF tester interface. Thank you! -Garrett