tst.execfail.ENOENT.ksh revision 14ea49401f3c8c61422aefbda43809e275f60c6c
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# CDDL HEADER START
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# The contents of this file are subject to the terms of the
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# Common Development and Distribution License (the "License").
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# You may not use this file except in compliance with the License.
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# See the License for the specific language governing permissions
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# and limitations under the License.
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# When distributing Covered Code, include this CDDL HEADER in each
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# If applicable, add the following below this CDDL HEADER, with the
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# fields enclosed by brackets "[]" replaced with your own identifying
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# CDDL HEADER END
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# Use is subject to license terms.
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# ident "%Z%%M% %I% %E% SMI"
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# This script is identical to tst.execfail.ksh -- but it additionally checks
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# that errno is set to ENOENT in the case that an interpreter can't be
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# If this fails, the script will run indefinitely; it relies on the harness
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync# to time it out.
0d282f291fba8c5597b0cc338058a7976938975cvboxsync proc:::exec
0d282f291fba8c5597b0cc338058a7976938975cvboxsync /curpsinfo->pr_ppid == $child && args[0] == "$badexec"/
f847566a82fc74d59381a4a27553dbbf8c8061f4vboxsync self->exec = 1;
0d282f291fba8c5597b0cc338058a7976938975cvboxsync proc:::exec-failure
0d282f291fba8c5597b0cc338058a7976938975cvboxsync /self->exec && args[0] == ENOENT/
0d282f291fba8c5597b0cc338058a7976938975cvboxsync while true; do
fff1586cd63d9b86dc6e14cb958a146446a60042vboxsyncif [ $# != 1 ]; then
5964f60ed7fb52a3c4becbe83c9429f9b2f119c2vboxsync#!/this_is_a_bogus_interpreter