inplace_race_test.sh (217134) | inplace_race_test.sh (263227) |
---|---|
1#!/bin/sh 2 3#- 4# Copyright (c) 2011 Jilles Tjoelker 5# All rights reserved. 6# 7# Redistribution and use in source and binary forms, with or without 8# modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26# SUCH DAMAGE. 27# | 1#!/bin/sh 2 3#- 4# Copyright (c) 2011 Jilles Tjoelker 5# All rights reserved. 6# 7# Redistribution and use in source and binary forms, with or without 8# modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26# SUCH DAMAGE. 27# |
28# $FreeBSD: head/tools/regression/usr.bin/sed/inplace_race.t 217134 2011-01-08 00:06:22Z jilles $ | 28# $FreeBSD: head/usr.bin/sed/tests/inplace_race_test.sh 263227 2014-03-16 08:04:06Z jmmv $ |
29 30: "${SED=sed}" 31 32# This test really needs an SMP system. On an UP system, it will 33# usually pass even if the race condition exists. 34if command -v cpuset >/dev/null; then 35 case `cpuset -g -p $$` in 36 *,*) ;; 37 *) 38 echo '1..0 # Skipped: not an SMP system' 39 exit 0 ;; 40 esac 41fi 42 43echo "1..1" 44 | 29 30: "${SED=sed}" 31 32# This test really needs an SMP system. On an UP system, it will 33# usually pass even if the race condition exists. 34if command -v cpuset >/dev/null; then 35 case `cpuset -g -p $$` in 36 *,*) ;; 37 *) 38 echo '1..0 # Skipped: not an SMP system' 39 exit 0 ;; 40 esac 41fi 42 43echo "1..1" 44 |
45T=$(mktemp -d "${TMPDIR:-/tmp}/sed-test.XXXXXX") 46trap 'cd /; rm -rf "$T"' 0 47cd "$T" 48 | |
49data=abababab 50data=$data$data$data$data 51data=$data$data$data$data 52data=$data$data$data$data 53data=$data$data$data$data 54data="BEGIN 55$data 56END" --- 27 unchanged lines hidden --- | 45data=abababab 46data=$data$data$data$data 47data=$data$data$data$data 48data=$data$data$data$data 49data=$data$data$data$data 50data="BEGIN 51$data 52END" --- 27 unchanged lines hidden --- |