| /freebsd/tools/test/stress2/misc/ |
| H A D | rename_exchange.sh | 31 char file1[1024], file2[1024]; 34 snprintf(file2, sizeof(file2), "%s/%s", dir, f2); 37 if (stat(file2, &s2) < 0) 38 err(1, "stat(%s)", file2); 42 if (renameat2(AT_FDCWD, file1, AT_FDCWD, file2, RENAME_EXCHANGE) == -1) 43 err(1, "%s: rename2(%s, %s)", __func__, file1, file2); 50 if (renameat2(AT_FDCWD, file2, AT_FDCWD, file1, RENAME_EXCHANGE) == -1) 51 err(1, "%s: rename2(%s, %s)", __func__, file2, file1); 80 char file1[1024], file2[1024]; 83 snprintf(file2, sizeof(file2), "%s/NotThere", dir); [all …]
|
| H A D | msdos17.sh | 45 static char file1[80], file2[80]; 58 if (rename(file1, file2) == -1) 59 err(1, "rename(%s, %s)", file1, file2); 76 if (rename(file2, file1) == -1) 77 err(1, "rename(%s, %s)", file2, file1); 78 if (stat(file2, &sb) == 0) 79 err(1, "stat(%s)", file2); 102 snprintf(file2, sizeof(file2), "%s/b.%06d", cwd, getpid()); 120 unlink(file2);
|
| H A D | cluster.sh | 157 char file2[MAXPATHLEN + 1]; 160 snprintf(file2, sizeof(file2), "%s/f.%s.%06d.old", path, uid, idx); 166 if (rename(file, file2) == -1) 168 warn("rename(%s, %s)", file, file2); 196 char file2[MAXPATHLEN + 1]; 198 snprintf(file2, sizeof(file2), "%s/f.%s.%06d.old", path, uid, idx); 200 if (access(file2, R_OK) == 0) 204 if (unlink(file2) == -1) 206 warn("unlink(%s)", file2);
|
| H A D | kevent5.sh | 68 static char *file1, *file2; 105 if ((fd = open(file2, O_RDONLY, 0)) == -1) 106 err(1, "open(%s)(2)", file2); 142 file2 = argv[2]; 149 if ((fd = open(file2, O_CREAT | O_TRUNC | O_RDWR, 0660)) == 151 err(1, "open(%s)", file2); 170 if (unlink(file2) == -1) 171 err(1, "unlink(%s). %s:%d\n", file2, __FILE__,
|
| H A D | rename8.sh | 81 static char *always, *file1, *file2; 130 asprintf(&file2, "%s/file2", av[1]); 148 create_file(file2); 149 if (stat(file2, &sb2) < 0) 150 err(1, "stat(%s)", file2); 151 if (rename(file2, file1) < 0) 152 err(1, "rename(%s, %s)", file2, file1); 169 unlink(file2);
|
| /freebsd/tools/regression/zfs/zpool/add/ |
| H A D | files.t | 59 expect_ok ${ZPOOL} create ${name0} ${file0} ${file1} ${file2} 70 echo " ${file2} ONLINE 0 0 0" 80 expect_ok ${ZPOOL} add ${name0} mirror ${file2} ${file3} 92 echo " ${file2} ONLINE 0 0 0" 100 expect_ok ${ZPOOL} create ${name0} raidz1 ${file0} ${file1} ${file2} 112 echo " ${file2} ONLINE 0 0 0" 123 expect_ok ${ZPOOL} create ${name0} raidz2 ${file0} ${file1} ${file2} ${file3} 135 echo " ${file2} ONLINE 0 0 0" 149 expect_ok ${ZPOOL} add ${name0} spare ${file2} ${file3} 161 echo " ${file2} AVAIL" [all …]
|
| H A D | option-f_size_mismatch.t | 54 expect_fl ${ZPOOL} add ${name0} mirror ${file7} ${file2} 72 expect_ok ${ZPOOL} add -f ${name0} mirror ${file7} ${file2} 85 echo " ${file2} ONLINE 0 0 0" 134 expect_ok ${ZPOOL} create ${name0} raidz1 ${file0} ${file1} ${file2} 146 echo " ${file2} ONLINE 0 0 0" 153 expect_ok ${ZPOOL} create ${name0} raidz1 ${file0} ${file1} ${file2} 165 echo " ${file2} ONLINE 0 0 0" 221 expect_ok ${ZPOOL} create ${name0} raidz2 ${file0} ${file1} ${file2} ${file3} 233 echo " ${file2} ONLINE 0 0 0" 241 expect_ok ${ZPOOL} create ${name0} raidz2 ${file0} ${file1} ${file2} ${file3} [all …]
|
| /freebsd/contrib/netbsd-tests/bin/cp/ |
| H A D | t_cp.sh | 42 echo "I'm a file, 2" > file2 62 rm -f file2 65 atf_check -s eq:0 -o empty -e empty cp file file2 66 cp_compare file_to_file_simple file file2 67 if [ `stat -f "%Lp" file2` != "755" ]; then 72 chmod 777 file2 73 cp_compare file_to_file_simple file file2 74 if [ `stat -f "%Lp" file2` != "777" ]; then 109 atf_check -s eq:0 -o empty -e empty cp file2 link 110 cp_compare file_to_link file file2 [all …]
|
| /freebsd/tools/regression/zfs/zpool/create/ |
| H A D | files.t | 29 expect_ok ${ZPOOL} create ${name0} ${file0} ${file1} ${file2} ${file3} ${file4} 41 echo " ${file2} ONLINE 0 0 0" 71 expect_ok ${ZPOOL} create ${name0} raidz1 ${file0} ${file1} ${file2} 84 echo " ${file2} ONLINE 0 0 0" 92 expect_ok ${ZPOOL} create ${name0} raidz2 ${file0} ${file1} ${file2} ${file3} 105 echo " ${file2} ONLINE 0 0 0" 114 expect_ok ${ZPOOL} create ${name0} mirror ${file0} ${file1} spare ${file2} ${file3} 128 echo " ${file2} AVAIL " 137 expect_ok ${ZPOOL} create ${name0} mirror ${file0} ${file1} log ${file2} ${file3} 151 echo " ${file2} ONLINE 0 0 0" [all …]
|
| /freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/ |
| H A D | block_cloning_fideduperange_sparse.ksh | 41 log_must file_write -o create -f /$TESTPOOL/file2 -b 1000 -c 1 -d 0 43 log_must truncate -s 65536 /$TESTPOOL/file2 50 log_must have_same_content /$TESTPOOL/file1 /$TESTPOOL/file2 51 log_must clonefile -d /$TESTPOOL/file1 /$TESTPOOL/file2 0 0 $blksz 53 log_must have_same_content /$TESTPOOL/file1 /$TESTPOOL/file2 56 log_must dd if=/dev/urandom of=/$TESTPOOL/file2 bs=1 count=16 seek=2000 \ 60 typeset digest=$(xxh128digest /$TESTPOOL/file2) 61 log_mustnot clonefile -d /$TESTPOOL/file1 /$TESTPOOL/file2 0 0 $blksz
|
| H A D | block_cloning_fideduperange_mtime.ksh | 37 log_must dd if=/$TESTPOOL/file1 of=/$TESTPOOL/file2 bs=128K count=4 40 typeset mtime0=$(stat_mtime /$TESTPOOL/file2) 41 typeset ctime0=$(stat_ctime /$TESTPOOL/file2) 49 log_must clonefile -d /$TESTPOOL/file1 /$TESTPOOL/file2 0 0 524288 52 typeset blocks=$(get_same_blocks $TESTPOOL file1 $TESTPOOL file2) 55 typeset mtime1=$(stat_mtime /$TESTPOOL/file2) 56 typeset ctime1=$(stat_ctime /$TESTPOOL/file2)
|
| H A D | block_cloning_copyfilerange_partial.ksh | 39 log_must dd if=/$TESTPOOL/file1 of=/$TESTPOOL/file2 bs=128K count=4 42 log_must have_same_content /$TESTPOOL/file1 /$TESTPOOL/file2 44 typeset blocks=$(get_same_blocks $TESTPOOL file1 $TESTPOOL file2) 47 log_must clonefile -f /$TESTPOOL/file1 /$TESTPOOL/file2 131072 131072 262144 50 log_must have_same_content /$TESTPOOL/file1 /$TESTPOOL/file2 52 typeset blocks=$(get_same_blocks $TESTPOOL file1 $TESTPOOL file2)
|
| H A D | block_cloning_fideduperange.ksh | 38 log_must dd if=/$TESTPOOL/file1 of=/$TESTPOOL/file2 bs=128K count=4 42 log_must have_same_content /$TESTPOOL/file1 /$TESTPOOL/file2 43 typeset blocks=$(get_same_blocks $TESTPOOL file1 $TESTPOOL file2) 47 log_must clonefile -d /$TESTPOOL/file1 /$TESTPOOL/file2 0 0 524288 50 log_must have_same_content /$TESTPOOL/file1 /$TESTPOOL/file2 51 blocks=$(get_same_blocks $TESTPOOL file1 $TESTPOOL file2)
|
| H A D | block_cloning_ficlonerange_partial.ksh | 39 log_must dd if=/$TESTPOOL/file1 of=/$TESTPOOL/file2 bs=128K count=4 42 log_must have_same_content /$TESTPOOL/file1 /$TESTPOOL/file2 44 typeset blocks=$(get_same_blocks $TESTPOOL file1 $TESTPOOL file2) 47 log_must clonefile -r /$TESTPOOL/file1 /$TESTPOOL/file2 131072 131072 262144 50 log_must have_same_content /$TESTPOOL/file1 /$TESTPOOL/file2 52 typeset blocks=$(get_same_blocks $TESTPOOL file1 $TESTPOOL file2)
|
| H A D | block_cloning_copyfilerange_clone_partial.ksh | 44 log_must dd if=/$TESTPOOL/file1 of=/$TESTPOOL/file2 bs=128K count=4 47 log_must have_same_content /$TESTPOOL/file1 /$TESTPOOL/file2 49 typeset blocks=$(get_same_blocks $TESTPOOL file1 $TESTPOOL file2) 52 log_must clonefile -F /$TESTPOOL/file1 /$TESTPOOL/file2 131072 131072 262144 55 log_must have_same_content /$TESTPOOL/file1 /$TESTPOOL/file2 57 typeset blocks=$(get_same_blocks $TESTPOOL file1 $TESTPOOL file2)
|
| H A D | block_cloning_fideduperange_tail.ksh | 42 log_must dd if=/$TESTPOOL/file1 of=/$TESTPOOL/file2 bs=128K count=2 43 log_must dd if=/dev/urandom of=/$TESTPOOL/file2 bs=4K count=31 seek=33 \ 52 log_must clonefile -d /$TESTPOOL/file1 /$TESTPOOL/file2 0 0 135168 55 typeset blocks=$(get_same_blocks $TESTPOOL file1 $TESTPOOL file2) 59 log_must cmp -n 135168 /$TESTPOOL/file1 /$TESTPOOL/file2 60 log_mustnot cmp -s /$TESTPOOL/file1 /$TESTPOOL/file2
|
| H A D | block_cloning_fideduperange_compress.ksh | 44 log_must file_write -o create -f /$TESTPOOL/file2 -b 131072 -c 4 -d 1 50 typeset b2=$(stat_blocks /$TESTPOOL/file2) 54 log_must have_same_content /$TESTPOOL/file1 /$TESTPOOL/file2 58 log_must clonefile -d /$TESTPOOL/file1 /$TESTPOOL/file2 0 0 524288 61 log_must have_same_content /$TESTPOOL/file1 /$TESTPOOL/file2 62 typeset blocks=$(get_same_blocks $TESTPOOL file1 $TESTPOOL file2)
|
| /freebsd/usr.bin/cmp/ |
| H A D | cmp.c | 102 const char *file1, *file2; in main() local 174 if (strcmp(file2 = argv[1], "-") == 0) { in main() 180 file2 = "stdin"; in main() 181 } else if ((fd2 = open(file2, oflag, 0)) < 0 && errno != EMLINK) { in main() 183 err(ERR_EXIT, "%s", file2); in main() 203 ret = c_link(file1, skip1, file2, skip2, limit); in main() 206 errx(ERR_EXIT, "%s: Not a symbolic link", file2); in main() 231 err(ERR_EXIT, "%s", file2); in main() 244 ret = c_special(fd1, file1, skip1, fd2, file2, skip2, limit); in main() 249 file1, file2); in main() [all …]
|
| H A D | special.c | 44 int fd2, const char *file2, off_t skip2, off_t limit) in c_special() argument 54 err(ERR_EXIT, "caph_limit_stream(%s)", file2); in c_special() 62 err(ERR_EXIT, "%s", file2); in c_special() 77 file1, file2, (size_t)byte, (size_t)line); in c_special() 100 diffmsg(file1, file2, byte, line, ch1, ch2); in c_special() 111 err(ERR_EXIT, "%s", file2); in c_special() 119 eofmsg(file2); in c_special()
|
| H A D | regular.c | 55 int fd2, const char *file2, off_t skip2, off_t len2, off_t limit) in c_regular() argument 71 eofmsg(file2); in c_regular() 89 return (c_special(fd1, file1, skip1, fd2, file2, skip2, limit)); in c_regular() 94 return (c_special(fd1, file1, skip1, fd2, file2, skip2, limit)); in c_regular() 100 err(1, "unable to limit rights for %s", file2); in c_regular() 120 file1, file2, (size_t)byte, (size_t)line); in c_regular() 137 diffmsg(file1, file2, byte, line, ch, *p2); in c_regular() 155 err(ERR_EXIT, "remmap %s", file2); in c_regular() 167 eofmsg(len1 > len2 ? file2 : file1); in c_regular()
|
| /freebsd/usr.bin/compress/tests/ |
| H A D | compress_test.sh | 153 cp expectfile2 file2 154 atf_check compress file1 file2 156 atf_check -s exit:1 cmp -s file2.Z expectfile2 157 atf_check -s exit:1 cmp -s file1.Z file2.Z 158 atf_check uncompress file1.Z file2.Z 160 atf_check cmp file2 expectfile2 174 cp expectfile2 file2 175 atf_check compress file1 file2 177 atf_check -s exit:1 cmp -s file2.Z expectfile2 178 atf_check -s exit:1 cmp -s file1.Z file2.Z
|
| /freebsd/share/examples/tests/tests/atf/ |
| H A D | cp_test.sh | 75 atf_check -s exit:0 -o empty -e empty cp file1 file2 77 verify_copy file1 file2 107 echo 'File 2' >file2 108 chmod 400 file2 109 atf_check cp -f file1 file2 110 verify_copy file1 file2
|
| /freebsd/tools/test/stress2/testcases/rename/ |
| H A D | rename.c | 94 char file2[128]; in test_rename() local 107 sprintf(file2,"p%05d.%05d.togo", pid, i); in test_rename() 108 if (rename(file1, file2) == -1) in test_rename() 109 err(1, "rename(%s, %s). %s:%d", file1, file2, in test_rename() 114 sprintf(file2,"p%05d.%05d.togo", pid, i); in test_rename() 115 if (rename(file2, file1) == -1) in test_rename() 116 err(1, "rename(%s, %s). %s:%d", file2, file1, in test_rename()
|
| /freebsd/tools/test/stress2/testcases/dirrename/ |
| H A D | dirrename.c | 96 char file2[128]; in test_rename() local 117 sprintf(file2,"p%05d.%05d.togo", pid, i); in test_rename() 118 if (rename(file1, file2) == -1) in test_rename() 119 err(1, "rename(%s, %s). %s:%d", file1, file2, in test_rename() 124 sprintf(file2,"p%05d.%05d.togo", pid, i); in test_rename() 125 if (rename(file2, file1) == -1) in test_rename() 126 err(1, "rename(%s, %s). %s:%d", file2, file1, in test_rename()
|
| /freebsd/bin/ln/ |
| H A D | ln.c | 176 const char *file1, *file2; in samedirent() local 187 file2 = strrchr(path2, '/'); in samedirent() 188 if (file2 != NULL) in samedirent() 189 file2++; in samedirent() 191 file2 = path2; in samedirent() 192 if (strcmp(file1, file2) != 0) in samedirent() 194 if (file1 - path1 >= PATH_MAX || file2 - path2 >= PATH_MAX) in samedirent() 204 if (file2 == path2) in samedirent() 207 memcpy(pathbuf, path2, file2 - path2); in samedirent() 208 pathbuf[file2 - path2] = '\0'; in samedirent()
|