Use SIGSETSIZE from ltp_signal.h to get the size to pass to rt_sigwaitinfo in sigwait...
[ltp-debian.git] / tools / make-file.sh
blob1f1f9d0ed225ec70d0a4a856f55c6a6a27f4b337
1 #!/bin/sh
3 # Copyright (c) International Business Machines Corp., 2001
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
13 # the GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this pronram; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # FILE: generate.sh
22 # PURPOSE: Creates dat for use in network file transfer tests.
24 # AUTHOR: Randy Hron (rwhron@earthlink.net)
26 ############################################################################
28 file=$1
29 size=$2
31 if [ -z "$1" ] || [ -z "$2" ] ; then
32 echo "usage: ${0##*/} <file> <size in bytes>"
33 exit 1
36 [ -e "$file" ] && exit 0
38 if ! perl -e "print 'A' x $size" > "$file" 2> /dev/null ; then
39 if ! awk 'BEGIN { cnt='$size'; while (cnt--) printf "A" }' > "$file" 2> /dev/null ; then
40 ( while ((size--)) ; do echo -n A ; done ) > "$file"
44 chmod 666 $file