Lines Matching +full:sd +full:- +full:cd
4 # SPDX-License-Identifier: BSD-2-Clause
31 # https://people.freebsd.org/~pho/stress/log/sendfile15-4.txt
35 # - Create a malloc-backed md(4) device with a UFS filesystem. Configure
36 # a gnop provider with -q 100 -d 10, i.e., always delay reads by 10ms.
37 # - Write a small file (e.g., 4KB) to the filesystem.
38 # - In a loop, unmount the filesystem, mount it, and run the test program.
40 # - creates a PF_LOCAL socket pair <s1, s2>,
41 # - opens the input file,
42 # - sends the file over s1,
43 # - closes s1,
44 # - sleeps for a second before exiting (and closing s2)
56 [ `id -u` -ne 0 ] && echo "Must be root!" && exit 1
57 kldstat | grep -q geom_nop || { gnop load 2>/dev/null || exit 0 &&
65 cd $dir
67 mycc -o sendfile18 -Wall -Wextra -O0 -g sendfile18.c || exit 1
68 rm -f sendfile18.c
69 cd $odir
71 set -e
72 mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint
73 [ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart
75 mdconfig -a -t swap -s 2g -u $mdstart
80 gnop configure -q 100 -d 10 /dev/md$mdstart.nop
86 while [ $((`date +%s` - start)) -lt 5 ]; do
94 mdconfig -d -u $mdstart
110 int fd, sd[2];
112 if (socketpair(PF_LOCAL, SOCK_STREAM, 0, sd) != 0)
119 if (sendfile(fd, sd[0], 0, 4096, NULL, NULL, 0) != 0)
121 close(sd[0]);