From owner-svn-src-head@freebsd.org Wed Feb 14 17:51:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2089F129DE; Wed, 14 Feb 2018 17:51:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F92C84BBE; Wed, 14 Feb 2018 17:51:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A8D7131B3; Wed, 14 Feb 2018 17:51:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1EHpp3P027255; Wed, 14 Feb 2018 17:51:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1EHppNe027242; Wed, 14 Feb 2018 17:51:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201802141751.w1EHppNe027242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Feb 2018 17:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329266 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 329266 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Feb 2018 17:51:52 -0000 Author: imp Date: Wed Feb 14 17:51:51 2018 New Revision: 329266 URL: https://svnweb.freebsd.org/changeset/base/329266 Log: A quick test script that we can run to use userboot's test mode to excersize the load loader. Assumes that we already have a suitable root area that you pass in with the first arg. Added: head/tools/boot/lua-test.sh (contents, props changed) Added: head/tools/boot/lua-test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/boot/lua-test.sh Wed Feb 14 17:51:51 2018 (r329266) @@ -0,0 +1,22 @@ +#!/bin/sh +# $FreeBSD$ + +die() { + echo $* + exit 1 +} + +dir=$1 +cd $(make -V SRCTOP)/stand +obj=$(make -V .OBJDIR) +t=$obj/userboot/test/test +u=$obj/userboot/userboot/userboot.so + +[ -n "$dir" ] || die "No directory specified" +[ -d "$dir" ] || die "Directory $dir doesn't exist" +[ -f "$dir/boot/lua/loader.lua" ] || die "No boot/lua/loader.lua found" +[ -f "$dir/boot/kernel/kernel" ] || die "No kernel to load" +[ -x "$t" ] || die "no userboot test jig found ($t)" +[ -x "$u" ] || die "no userboot.so ($u) found" + +$t -h $dir -b $u