Thanks for the feedback, Eric and Richard. In this version, I've expunged the redundant cats and included the Makefile.am.
esx-arm \
esx4.1 \
hyperv \
+ illumos-lx \
kvm \
kvm-explicit-cpu \
ldoms \
tests/esx-arm/Makefile
tests/esx4.1/Makefile
tests/hyperv/Makefile
+ tests/illumos-lx/Makefile
tests/kvm/Makefile
tests/kvm-explicit-cpu/Makefile
tests/ldoms/Makefile
--- /dev/null
+# Makefile for virt-what
+# Copyright (C) 2022 Steve Mokris
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+CLEANFILES = *~
+
+TESTS = test.sh
+
+EXTRA_DIST = \
+ test.sh \
+ proc/1/environ \
+ proc/version
--- /dev/null
+Linux version 3.16.0 (gcc version 7.5.0) BrandZ virtual linux
--- /dev/null
+# Test for illumos-lx
+# Copyright (C) 2022 Steve Mokris
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
+expected="illumos-lx"
+
+if [ "$output" != "$expected" ]; then
+ echo "$0: test failed because output did not match expected"
+ echo "Expected output was:"
+ echo "----------------------------------------"
+ echo "$expected"
+ echo "----------------------------------------"
+ echo "But the actual output of the program was:"
+ echo "----------------------------------------"
+ echo "$output"
+ echo "----------------------------------------"
+ exit 1
+fi
echo lxc
fi
+if [ -e "${root}/proc/1/environ" ] &&
+ tr '\0' '\n' < "${root}/proc/1/environ" | grep -q '^container=zone$' &&
+ [ -e "${root}/proc/version" ] &&
+ grep -q 'BrandZ virtual linux' < "${root}/proc/version"; then
+ echo illumos-lx
+fi
+
# Check for Linux-VServer
if test -e "${root}/proc/self/status" \
&& cat "${root}/proc/self/status" | grep -q "VxID: [0-9]*"; then
Status: contributed by Thomas Huth
+=item B<illumos-lx>
+
+The guest is running on Illumos with a Linux syscall emulation layer.
+
+Status: contributed by Steve Mokris
+
=item B<ldoms>
The guest appears to be running on an Linux SPARC system with