From owner-svn-src-stable-12@freebsd.org Sun Jun 21 16:06:02 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B19B353F7C; Sun, 21 Jun 2020 16:06:02 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qcpf0s5Gz4Bq8; Sun, 21 Jun 2020 16:06:02 +0000 (UTC) (envelope-from jilles@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 182E41FD2C; Sun, 21 Jun 2020 16:06:02 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05LG61qD051213; Sun, 21 Jun 2020 16:06:01 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05LG61u6051211; Sun, 21 Jun 2020 16:06:01 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <202006211606.05LG61u6051211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 21 Jun 2020 16:06:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362467 - stable/12/bin/sh/tests/execution X-SVN-Group: stable-12 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: stable/12/bin/sh/tests/execution X-SVN-Commit-Revision: 362467 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 16:06:02 -0000 Author: jilles Date: Sun Jun 21 16:06:01 2020 New Revision: 362467 URL: https://svnweb.freebsd.org/changeset/base/362467 Log: MFC r362182: sh/tests: Add tests for SIGINT in non-jobc background commands If job control is not enabled, background commands shall ignore SIGINT and SIGQUIT, and it shall be possible to override that ignore in the same shell. Added: stable/12/bin/sh/tests/execution/bg11.0 - copied unchanged from r362182, head/bin/sh/tests/execution/bg11.0 stable/12/bin/sh/tests/execution/bg12.0 - copied unchanged from r362182, head/bin/sh/tests/execution/bg12.0 Modified: stable/12/bin/sh/tests/execution/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/sh/tests/execution/Makefile ============================================================================== --- stable/12/bin/sh/tests/execution/Makefile Sun Jun 21 13:34:08 2020 (r362466) +++ stable/12/bin/sh/tests/execution/Makefile Sun Jun 21 16:06:01 2020 (r362467) @@ -17,6 +17,8 @@ ${PACKAGE}FILES+= bg7.0 ${PACKAGE}FILES+= bg8.0 ${PACKAGE}FILES+= bg9.0 ${PACKAGE}FILES+= bg10.0 bg10.0.stdout +${PACKAGE}FILES+= bg11.0 +${PACKAGE}FILES+= bg12.0 ${PACKAGE}FILES+= fork1.0 ${PACKAGE}FILES+= fork2.0 ${PACKAGE}FILES+= fork3.0 Copied: stable/12/bin/sh/tests/execution/bg11.0 (from r362182, head/bin/sh/tests/execution/bg11.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/bg11.0 Sun Jun 21 16:06:01 2020 (r362467, copy of r362182, head/bin/sh/tests/execution/bg11.0) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +T=`mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXXXX` +trap 'rm -rf $T' 0 +cd $T || exit 3 +mkfifo fifo1 +# Use a trap, not the default action, since the shell may catch SIGINT and +# therefore its processing may be delayed. +{ trap 'exit 5' TERM; read dummy fifo1 +kill -INT "$!" +kill -TERM "$!" +exec 3>&- +wait "$!" +r=$? +[ "$r" = 5 ] Copied: stable/12/bin/sh/tests/execution/bg12.0 (from r362182, head/bin/sh/tests/execution/bg12.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/bg12.0 Sun Jun 21 16:06:01 2020 (r362467, copy of r362182, head/bin/sh/tests/execution/bg12.0) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +T=`mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXXXX` +trap 'rm -rf $T' 0 +cd $T || exit 3 +mkfifo fifo1 +{ trap - INT; : >fifo1; sleep 5; exit 4; } & +: