Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Oct 2018 02:04:01 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339701 - head/tools/boot
Message-ID:  <201810250204.w9P241Db063041@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Thu Oct 25 02:04:01 2018
New Revision: 339701
URL: https://svnweb.freebsd.org/changeset/base/339701

Log:
  Update lualoader test script a little bit
  
  Use userboot.so from the test directory if possible, fall back to .OBJDIR.
  This avoids a problem that we've had since userboot coexistence was added,
  where userboot.so alone no longer exists in the .OBJDIR but is instead just
  a link installed later.

Modified:
  head/tools/boot/lua-test.sh

Modified: head/tools/boot/lua-test.sh
==============================================================================
--- head/tools/boot/lua-test.sh	Thu Oct 25 01:20:32 2018	(r339700)
+++ head/tools/boot/lua-test.sh	Thu Oct 25 02:04:01 2018	(r339701)
@@ -13,13 +13,16 @@ scriptdir=$(dirname $(realpath $0))
 cd $(make -V SRCTOP)/stand
 obj=$(make -V .OBJDIR)
 t=$obj/userboot/test/test
-u=$obj/userboot/userboot/userboot.so
 
 [ -n "$dir" ] || dir=/tmp/loadertest
 [ -d "$dir" ] || ${scriptdir}/lua-img.sh ${dir}
+# We'll try userboot.so from the test directory before plucking it straight out
+# of .OBJDIR.
+u=$dir/boot/userboot.so
+[ -f "$u" ] || u=$obj/userboot/userboot_lua/userboot_lua.so
 [ -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"
+[ -f "$u" ] || die "no userboot.so ($u) found"
 
 $t -h $dir -b $u



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810250204.w9P241Db063041>