Lines Matching +full:odd +full:- +full:numbered
4 # SPDX-License-Identifier: BSD-2-Clause
35 # 5. for each odd-numbered page in the file, do msync(MS_INVALIDATE),
36 # but keep even-numbered pages intact
50 [ `id -u` -ne 0 ] && echo "Must be root!" && exit 1
56 mycc -o sendfile21 -Wall -Wextra -O0 -g sendfile21.c || exit 1
57 rm -f sendfile21.c
60 set -e
61 mount | grep "on $mntpoint " | grep -q /dev/md && umount -f $mntpoint
62 [ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart
63 mdconfig -a -t swap -s 1g -u $mdstart
64 newfs $newfs_flags -n md$mdstart > /dev/null
71 (cd $odir/../testcases/swap; ./swap -t 5m -i 20 -l 100 > /dev/null) &
75 while [ $((` date +%s` - start)) -lt 180 ]; do
76 rm -f output
81 cmp -s input output || break
82 [ `stat -f '%z' input` -ne ` stat -f '%z' output` ] && break
85 while pgrep -q swap; do
88 cmp -s input output || { echo "Loop #$n"; ls -l; s=1; }
90 [ -f sendfile21.core -a $s -eq 0 ] &&
91 { ls -l sendfile21.core; mv sendfile21.core $dir; s=1; }
95 mount | grep -q "on $mntpoint " || break
97 [ $i -eq 6 ] &&
98 { echo FATAL; fstat -mf $mntpoint; exit 1; }
100 mdconfig -d -u $mdstart
101 rm -rf $dir/sendfile21
135 if ((error = socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) == -1)
138 if ((from = open(from_name, O_RDONLY)) == -1)
141 if ((error = fstat(from, &st)) == -1)
145 if (pid == -1)
154 if (fsync(from) == -1)
163 == -1)
167 if (munmap(cp, st.st_size) == -1)
172 error = sendfile(from, sv[0], pos, st.st_size - pos,
174 if (error == -1)
196 -1)
202 if (n == -1)
229 if (pid == -1)
231 if (waitpid(pid, &status, 0) == -1)