Home
last modified time | relevance | path

Searched refs:file (Results 1 – 25 of 201) sorted by relevance

123456789

/coreutils/tests/truncate/
Dtruncate-parameters.sh27 returns_ 1 truncate file || fail=1
30 returns_ 1 truncate --size=0 --reference=file file || fail=1
33 returns_ 1 truncate --io-blocks --reference=file file || fail=1
36 returns_ 1 truncate --size="invalid" file || fail=1
39 returns_ 1 truncate --size="> -1" file || fail=1
40 truncate --size=" >1" file || fail=1 #file now 1
41 truncate --size=" +1" file || fail=1 #file now 2
42 test $(stat --format %s file) = 2 || fail=1
45 truncate --size=" +1" -r file file || fail=1 #file now 3
46 test $(stat --format %s file) = 3 || fail=1
[all …]
Dtruncate-overflow.sh25 truncate -s-1 create-zero-len-file || fail=1
27 echo > non-empty-file
30 returns_ 1 truncate -s$OFF_T_OFLOW file || fail=1
33 returns_ 1 truncate -s+$OFF_T_MAX non-empty-file || fail=1
37 returns_ 1 truncate --io-blocks --size=$IO_BLOCK_OFLOW file || fail=1
/coreutils/tests/dd/
Dsparse.sh30 printf 'a\000\000b' > file.in
32 dd if=file.in bs=1 conv=sparse oflag=append > out
39 dd if=file.in bs=1 conv=sparse,notrunc of=out
43 dd if=file.in bs=1 conv=sparse | cat > file.out
44 cmp file.in file.out || fail=1
48 rm -f file.in
49 dd if=/dev/urandom of=file.in bs=1M count=3 iflag=fullblock || fail=1
50 dd if=/dev/zero of=file.in bs=1M count=1 seek=1 conv=notrunc || fail=1
61 if test $(kb_alloc file.in) -gt 3000; then
65 dd if=file.in of=file.out ibs=1M obs=2M conv=sparse || fail=1
[all …]
Dskip-seek-past-file.sh25 printf "1234" > file || framework_failure_
33 dd bs=1 skip=5 count=0 status=noxfer < file 2> err || fail=1
37 dd bs=3 skip=2 count=0 status=noxfer < file 2> err || fail=1
41 cat file | dd bs=1 skip=5 count=0 status=noxfer 2> err || fail=1
45 cat file | dd bs=3 skip=2 count=0 status=noxfer 2> err || fail=1
51 dd bs=1 skip=4 status=noxfer 2> err) < file || fail=1
57 dd bs=2 skip=2 status=noxfer 2> err) < file || fail=1
61 dd bs=1 seek=5 count=0 status=noxfer > file 2> err || fail=1
67 dd bs=1 skip=$OFF_T_OFLOW count=0 status=noxfer < file 2> err && fail=1
70 dd bs=1 skip=${OFF_T_OFLOW}x$OFF_T_OFLOW count=0 status=noxfer < file 2> err &&
[all …]
/coreutils/tests/test/
Dtest-N.sh31 touch file || framework_failure_
32 if ! stat_test_N file; then
33 returns_ 1 env test -N file || fail=1
37 touch -a -d '12:00 today -2 days' file || framework_failure_
38 if stat_test_N file; then
39 env test -N file || fail=1
43 touch -m -d '12:00 today -4 days' file || framework_failure_
44 if ! stat_test_N file; then
45 returns_ 1 env test -N file || fail=1
49 echo 'data' > file || framework_failure_
[all …]
/coreutils/tests/cp/
Dacl.sh30 touch a/file || framework_failure_
34 acl1=$(cd a && getfacl file) || skip=yes
35 setfacl -m user:bin:rw- a/file 2> /dev/null || skip=yes
40 cp a/file b/ || fail=1
41 acl2=$(cd b && getfacl file) || framework_failure_
45 acl1=$(cd a && getfacl file) || framework_failure_
48 cp -p a/file b/ || fail=1
49 acl2=$(cd b && getfacl file) || framework_failure_
53 echo > a/file || framework_failure_ # add some data
54 test -s a/file || framework_failure_
[all …]
Dbackup-1.sh23 file=F
24 file_backup="$file$suffix"
26 echo test > $file || framework_failure_
30 cp --force --backup=simple --suffix=$suffix $file $file || fail=1
31 cp -T --force --backup=simple --suffix=$suffix $file $file || fail=1
33 test -f $file || fail=1
35 compare $file $file_backup > /dev/null || fail=1
Ddebug.sh22 touch file || framework_failure_
23 cp --debug file file.cp >cp.out || fail=1
25 cp --debug --attributes-only file file.cp >cp.out || fail=1
28 touch file.cp || framework_failure_
29 cp --debug --update=none file file.cp >cp.out || fail=1
Dcapability.sh34 touch file || framework_failure_
35 chown $NON_ROOT_USERNAME file || framework_failure_
37 setcap 'cap_net_bind_service=ep' file ||
39 getcap file | grep cap_net_bind_service >/dev/null ||
42 cp --preserve=xattr file copy1 || fail=1
46 cp --preserve=all file copy2 || fail=1
48 for file in copy1 copy2; do
49 getcap $file | grep cap_net_bind_service >/dev/null || fail=1
Dsame-file.sh136 1 [cp: 'foo' and 'symlink' are the same file] (foo symlink -> foo)
137 1 -d [cp: 'foo' and 'symlink' are the same file] (foo symlink -> foo)
138 1 -f [cp: 'foo' and 'symlink' are the same file] (foo symlink -> foo)
139 1 -df [cp: 'foo' and 'symlink' are the same file] (foo symlink -> foo)
156 1 [cp: 'symlink' and 'foo' are the same file] (foo symlink -> foo)
157 1 -d [cp: 'symlink' and 'foo' are the same file] (foo symlink -> foo)
158 1 -f [cp: 'symlink' and 'foo' are the same file] (foo symlink -> foo)
159 1 -df [cp: 'symlink' and 'foo' are the same file] (foo symlink -> foo)
160 1 --rem [cp: 'symlink' and 'foo' are the same file] (foo symlink -> foo)
161 1 -b [cp: 'symlink' and 'foo' are the same file] (foo symlink -> foo)
[all …]
Dreflink-perm.sh24 > file
26 touch -d "$ts" file || framework_failure_
27 test time_check -nt file || skip_ "The system clock is wrong"
29 chmod a=rwx file || framework_failure_
31 cp --reflink=auto --preserve file copy || fail=1
36 test copy -nt file && fail=1
/coreutils/tests/split/
Dsuffix-auto-length.sh24 truncate -s12 file.in || framework_failure_
25 returns_ 1 split file.in -b1 --numeric=89 || fail=1
30 truncate -s91 file.in || framework_failure_
33 split file.in "$prefix" -b1 --numeric --additional-suffix="$add_suffix" \
44 truncate -s100 file.in || framework_failure_
45 split --numeric-suffixes=1 --number=r/100 file.in || fail=1
51 returns_ 1 split --numeric-suffixes=100 --number=r/100 file.in || fail=1
56 truncate -s0 file.in || framework_failure_
57 split --numeric-suffixes --number=110 file.in || fail=1
/coreutils/tests/misc/
Dmktemp.pl25 my ($file, $file_or_dir) = @_;
27 my (undef, undef, $mode, undef) = stat $file
28 or die "$ME: failed to stat $file: $!\n";
31 -d $file or die "$ME: $file isn't a directory\n";
32 -x $file or die "$ME: $file isn't owner-searchable\n";
35 -f $file or die "$ME: $file isn't a regular file\n";
38 -r $file or die "$ME: $file isn't owner-readable\n";
39 -w $file or die "$ME: $file isn't owner-writable\n";
41 or die "$ME: $file doesn't have required permissions\n";
44 and do { rmdir $file or die "$ME: failed to rmdir $file: $!\n" };
[all …]
Dsync.sh22 touch file || framework_failure_
25 returns_ 1 sync --data --file-system || fail=1
31 sync file || fail=1
35 chmod 0200 file || framework_failure_
36 sync file || fail=1
39 returns_ 1 sync file nofile || fail=1
/coreutils/tests/shred/
Dshred-remove.sh26 file=0123456789
27 touch $file || framework_failure_
28 chmod u-w $file || framework_failure_
33 returns_ 1 shred -u $file > /dev/null 2>&1 || fail=1
34 rm -f $file || framework_failure_
38 touch $file || framework_failure_
39 shred -n0 --remove"$mode" $file || fail=1
40 test -e $file && fail=1
44 touch $file || framework_failure_
45 returns_ 1 shred -n0 --remove=none $file 2>/dev/null || fail=1
[all …]
/coreutils/tests/od/
Dod-j.sh22 for file in ${srcdir=.}/tests/init.sh /proc/version /sys/kernel/profiling; do
23 test -r $file || continue
25 cp -f $file copy &&
28 od -An $file > exp || fail=1
29 od -An -j $bytes $file $file > out || fail=1
33 od -An -j 4096 $file $file > out1 2> err1; status=$?
/coreutils/src/
Dpathchk.c58 # define pathconf(file, flag) \ argument
161 no_leading_hyphen (char const *file) in no_leading_hyphen() argument
165 for (p = file; (p = strchr (p, '-')); p++) in no_leading_hyphen()
166 if (p == file || p[-1] == '/') in no_leading_hyphen()
169 quoteaf (file)); in no_leading_hyphen()
180 portable_chars_only (char const *file, size_t filelen) in portable_chars_only() argument
182 size_t validlen = strspn (file, in portable_chars_only()
187 char const *invalid = file + validlen; in portable_chars_only()
197 quoteaf_n (0, file)); in portable_chars_only()
248 validate_file_name (char *file, bool check_basic_portability, in validate_file_name() argument
[all …]
/coreutils/tests/mv/
Dinto-self-2.sh26 file="$other_partition_tmpdir/file"
30 echo whatever > $file || framework_failure_
31 ln -s $file $symlink || framework_failure_
34 mv $symlink $file > out 2>&1 && fail=1
37 mv $file $symlink || fail=1
41 -e "s,$file,YYY," \
46 XXX: 'ZZZ' and 'YYY' are the same file
Dinto-self.sh23 file=toself-file
25 rm -rf $dir $file || framework_failure_
27 touch $file || framework_failure_
31 mv $dir $file $dir > out 2>&1 && fail=1
46 test -f $file && fail=1
51 test -f $dir/$file || fail=1
/coreutils/tests/chmod/
Dequal-x.sh22 file=f
23 touch $file || framework_failure_
27 chmod a=r,$mode $file || fail=1
28 case "$(ls -l $file)" in
30 *) fail=1; echo "after 'chmod $mode $file':"; ls -l $file ;;
Dc-option.sh23 file=f
24 touch $file || framework_failure_
25 chmod 444 $file || framework_failure_
30 chmod u=rwx $file || fail=1
31 chmod -c g=rwx $file > out || fail=1
32 chmod -c g=rwx $file > empty || fail=1
/coreutils/tests/touch/
Dtrailing-slash.sh24 touch file || framework_failure_
25 ln -s file link1 || framework_failure_
32 returns_ 1 touch no-file/ || fail=1
33 returns_ 1 touch file/ || fail=1
42 touch -c no-file/ || fail=1
43 returns_ 1 touch -c file/ || fail=1
50 returns_ 1 test -f no-file || fail=1
57 touch -h -r link2/ file || fail=1
65 case $(stat --format=%y file) in
Dno-dereference.sh23 touch file || framework_failure_
24 ln -s file link || framework_failure_
29 returns_ 1 touch -h no-file 2> err || fail=1
31 touch -h -c no-file 2> err || fail=1
35 touch -h file || fail=1
38 touch -h -r dangling file || fail=1
65 case $(stat --format=%y file) in
70 touch -h - > file || fail=1
/coreutils/tests/install/
Dcreate-leading.sh26 file=file
27 echo foo > $file || framework_failure_
31 ginstall -D $file no-dir1/no-dir2/dest || fail=1
39 ginstall -D "$PWD/dir1/file1" $file -t "$PWD/no-dir2/" || fail=1
40 test -r no-dir2/$file && test -r no-dir2/file1 || fail=1
Dbasic-1.sh24 file=file
26 rm -rf $dir $file || framework_failure_
28 echo foo > $file || framework_failure_
30 ginstall $file $dir || fail=1
32 test -f $file || fail=1
34 test -f $dir/$file || fail=1
109 touch file || fail=1
110 ginstall -Dv file sub3/a/b/c/file >out 2>&1 || fail=1
121 ginstall -t sub4/a/b/c -Dv file >out 2>&1 || fail=1
132 ginstall -t sub4/file_exists -Dv file >out 2>&1 && fail=1
[all …]

123456789