Module Name:    src
Committed By:   martin
Date:           Tue Jan  9 15:16:02 UTC 2018

Modified Files:
        src/tests/modules: t_klua_pr_52864.sh

Log Message:
Skip the test on non-modular kernels


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/modules/t_klua_pr_52864.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/modules/t_klua_pr_52864.sh
diff -u src/tests/modules/t_klua_pr_52864.sh:1.1 src/tests/modules/t_klua_pr_52864.sh:1.2
--- src/tests/modules/t_klua_pr_52864.sh:1.1	Mon Jan  8 14:17:15 2018
+++ src/tests/modules/t_klua_pr_52864.sh	Tue Jan  9 15:16:02 2018
@@ -1,5 +1,5 @@
 #! /usr/bin/atf-sh
-# $NetBSD: t_klua_pr_52864.sh,v 1.1 2018/01/08 14:17:15 martin Exp $
+# $NetBSD: t_klua_pr_52864.sh,v 1.2 2018/01/09 15:16:02 martin Exp $
 #
 # Copyright (c) 2018 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -38,9 +38,13 @@ luastate_head() {
 }
 
 luastate_body() {
+	err=$( modstat -e 2>&1 )
+	if [ $? -gt 0 ]; then
+		atf_skip "${err##modstat:}"
+	fi
 	sysctl -q kern.lua.verbose
 	if [ $? -eq 1 ]; then
-	atf_check -s eq:0 modload lua
+		atf_check -s eq:0 modload lua
 	fi
 	atf_check -s eq:0 luactl -q create atfluastate
 	atf_check -s eq:0 -o ignore luactl

Reply via email to