From owner-freebsd-testing@FreeBSD.ORG Fri Oct 24 23:18:40 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 E3DC99CA for ; Fri, 24 Oct 2014 23:18:40 +0000 (UTC) Received: from mail-qg0-f45.google.com (mail-qg0-f45.google.com [209.85.192.45]) (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 A36DEC8C for ; Fri, 24 Oct 2014 23:18:40 +0000 (UTC) Received: by mail-qg0-f45.google.com with SMTP id q107so1733764qgd.32 for ; Fri, 24 Oct 2014 16:18:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=KOUP62hXSajIW7ejXljLzrEBMgzOGMTXBU1OYjFHc5s=; b=Uq7hisrKTHxkdCHLvAZi9Rt4QF23YP6tAu+fX00MDfFlzwDv5oq8h3OA517nwn4XrY 1eosx3RQqhXhVlU7mjMnMPRMIYsQBEtNRn8YTZybJP4RSEwWsZF9NGg5Oz0IkA5epEhQ oKMw6MHEpWsBhSKe/98hUgq2PhqQt4rVj4r5z/wAJA05B0IrwdhiQ+HM42BrtzmeXk6D LA9NyqpZXq1A2JK2oM21nzHEKv7XUF393Tanfd8DSTaQo9v7Xr3e3GvVswPPyehWQdvi T9LjA4W8mNiZqMydo/YsZRbv5NZLpkLhyQHoiOeLassMmE/n04zlYYDshl1beXOLDQF1 55Fg== X-Gm-Message-State: ALoCoQnBb8p2+F7CipPjYGJz+GLm9prGO2fJYYITWrGqLnY2U+wq5G85rMTRTnZTNikjUeaY9pYE X-Received: by 10.140.28.10 with SMTP id 10mr10185907qgy.15.1414192713565; Fri, 24 Oct 2014 16:18:33 -0700 (PDT) MIME-Version: 1.0 Sender: jmmv@meroh.net Received: by 10.96.75.134 with HTTP; Fri, 24 Oct 2014 16:18:13 -0700 (PDT) X-Originating-IP: [81.184.188.119] In-Reply-To: References: <41d8a2fb.75b47028@fabiankeil.de> From: Julio Merino Date: Sat, 25 Oct 2014 01:18:13 +0200 X-Google-Sender-Auth: p7EUoGNFvf1mXcaCzqUcavCPrkg Message-ID: Subject: Re: atf_check() equivalent to test individual shell functions? To: Fabian Keil Content-Type: text/plain; charset=UTF-8 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, 24 Oct 2014 23:18:41 -0000 On Mon, Jul 28, 2014 at 2:00 AM, Julio Merino wrote: > On Sat, Jul 26, 2014 at 4:30 AM, Fabian Keil > wrote: >> What I'm looking for is something like this: >> >> | atf_check_shell_function -s return:0 -o empty -e empty zogftw_string_ends_with "abc" "c" > > That could be interesting. > > However, note that atf_check currently is just a thin wrapper over the > atf-check binary and that's the reason why you cannot feed shell > functions into it. Implementing an atf_check_shell_function would > involve rewriting atf-check's functionality in libatf-sh.subr. FYI Take a look at this email I just sent: https://groups.google.com/forum/#!topic/kyua-discuss/yhcDuchVtrs The new code I'm prototyping in that repository has atf-check functionality that can be invoked on shell functions, so it would solve your problem. (Don't start using that code just yet given that it's not even merged into the master branch, but please let me know if you'd be interested in it!) Cheers