Home
last modified time | relevance | path

Searched full:truncate (Results 1 – 25 of 1586) sorted by relevance

12345678910>>...64

/third_party/toybox/tests/
Dtruncate.test8 testing "0" "truncate -s 0 freep $SIZE" "0\n" "" ""
9 testing "12345" "truncate -s 12345 freep $SIZE" "12345\n" "" ""
10 testing "1m" "truncate -s 1m freep $SIZE" "1048576\n" "" ""
13 testing "is sparse" "truncate -s 1g freep && [ $(stat -c %b freep) -le 8 ] &&
16 testing "+" "truncate -s 1k freep && truncate -s +1k freep $SIZE" \
18 testing "-" "truncate -s 4k freep && truncate -s -1k freep $SIZE" \
21 "truncate -s 5k freep && truncate -s \<4k freep $SIZE" "4096\n" "" ""
23 "truncate -s 4k freep && truncate -s \<6k freep $SIZE" "4096\n" "" ""
25 "truncate -s 3k freep && truncate -s \>4k freep $SIZE" "4096\n" "" ""
27 "truncate -s 4k freep && truncate -s \>2k freep $SIZE" "4096\n" "" ""
[all …]
/third_party/mindspore/mindspore-src/source/tests/ut/python/dataset/
Dtest_truncate.py16 Testing Truncate Python API
26 Feature: Truncate op
27 Description: Test Truncate op using 1D str as the input
30 truncate = text.Truncate(3)
32 result1 = truncate(input1)
39 Feature: Truncate op
40 Description: Test Truncate op using 2D int as the input
43 truncate = text.Truncate(3)
45 result1 = truncate(input1)
52 Feature:Truncate Op
[all …]
/third_party/rust/rust/src/tools/clippy/clippy_lints/src/methods/
Dopen_options.rs33 Truncate, enumerator
68 "truncate" => { in get_open_options()
69 options.push((OpenOption::Truncate, argument_option)); in get_open_options()
86 …let (mut create, mut append, mut truncate, mut read, mut write) = (false, false, false, false, fal… in check_open_options()
120 (OpenOption::Truncate, arg) => { in check_open_options()
121 if truncate { in check_open_options()
126 "the method `truncate` is called more than once", in check_open_options()
129 truncate = true; in check_open_options()
162 if read && truncate && read_arg && truncate_arg && !(write && write_arg) { in check_open_options()
167 "file opened with `truncate` and `read`", in check_open_options()
[all …]
/third_party/rust/rust/src/tools/miri/src/helpers/
Dconvert.rs9 /// let lo = x.truncate::<u16>();
12 pub(crate) trait Truncate: Sized { interface
13 fn truncate<To>(self) -> To in truncate() method
21 impl Truncate for u16 {}
22 impl Truncate for u32 {}
23 impl Truncate for u64 {}
24 impl Truncate for u128 {}
/third_party/ltp/testcases/kernel/syscalls/truncate/
Dtruncate03.c13 * - truncate(2) returns -1 and sets errno to EACCES if search/write
16 * - truncate(2) returns -1 and sets errno to ENOTDIR if the component of
18 * - truncate(2) returns -1 and sets errno to EFAULT if pathname points
20 * - truncate(2) returns -1 and sets errno to ENAMETOOLONG if the component
23 * - truncate(2) returns -1 and sets errno to ENOENT if the named file
25 * - truncate(2) returns -1 and sets errno to EISDIR if the named file
27 * - truncate(2) returns -1 and sets errno to EFBIG if the argument length
29 * - truncate(2) returns -1 and sets errno to ELOOP if too many symbolic
120 TST_EXP_FAIL(truncate(tc->pathname, tc->length), tc->exp_errno); in verify_truncate()
Dtruncate02.c12 * - truncate(2) truncates a file to a specified length successfully.
15 * - truncate(2) doesn't change offset.
53 TEST(truncate(TESTFILE, tc->trunc_len)); in verify_truncate()
55 tst_res(TFAIL | TTERRNO, "truncate(%s, %ld) failed", in verify_truncate()
62 "truncate(%s, %ld) returned invalid value %ld", in verify_truncate()
75 tst_res(TFAIL, "truncate(%s, %ld) changes offset", in verify_truncate()
89 tst_res(TPASS, "truncate(%s, %ld) succeeded", in verify_truncate()
/third_party/rust/rust/src/tools/clippy/tests/ui/
Dcast.stderr39 error: casting `f32` to `i32` may truncate the value
48 error: casting `f32` to `u32` may truncate the value
64 error: casting `f64` to `f32` may truncate the value
72 error: casting `i32` to `i8` may truncate the value
84 error: casting `i32` to `u8` may truncate the value
96 error: casting `f64` to `isize` may truncate the value
104 error: casting `f64` to `usize` may truncate the value
118 error: casting `u32` to `u16` may truncate the value
130 error: casting `f32` to `u32` may truncate the value
144 error: casting `i32` to `i8` may truncate the value
[all …]
Dopen_options.stderr1 error: file opened with `truncate` and `read`
4 LL | OpenOptions::new().read(true).truncate(true).open("foo.txt");
9 error: file opened with `append` and `truncate`
12 LL | OpenOptions::new().append(true).truncate(true).open("foo.txt");
39 error: the method `truncate` is called more than once
42 LL | OpenOptions::new().truncate(true).truncate(false).open("foo.txt");
Dopen_options.rs6 OpenOptions::new().read(true).truncate(true).open("foo.txt"); in main()
7 OpenOptions::new().append(true).truncate(true).open("foo.txt"); in main()
13 OpenOptions::new().truncate(true).truncate(false).open("foo.txt"); in main()
Dcast_size.stderr1 error: casting `isize` to `i8` may truncate the value
40 error: casting `isize` to `i32` may truncate the value on targets with 64-bit wide pointers
52 error: casting `isize` to `u32` may truncate the value on targets with 64-bit wide pointers
64 error: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
76 error: casting `usize` to `i32` may truncate the value on targets with 64-bit wide pointers
96 error: casting `i64` to `isize` may truncate the value on targets with 32-bit wide pointers
108 error: casting `i64` to `usize` may truncate the value on targets with 32-bit wide pointers
120 error: casting `u64` to `isize` may truncate the value on targets with 32-bit wide pointers
138 error: casting `u64` to `usize` may truncate the value on targets with 32-bit wide pointers
Dcast_size_32bit.stderr1 error: casting `isize` to `i8` may truncate the value
40 error: casting `isize` to `i32` may truncate the value on targets with 64-bit wide pointers
52 error: casting `isize` to `u32` may truncate the value on targets with 64-bit wide pointers
64 error: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
76 error: casting `usize` to `i32` may truncate the value on targets with 64-bit wide pointers
96 error: casting `i64` to `isize` may truncate the value on targets with 32-bit wide pointers
108 error: casting `i64` to `usize` may truncate the value on targets with 32-bit wide pointers
120 error: casting `u64` to `isize` may truncate the value on targets with 32-bit wide pointers
138 error: casting `u64` to `usize` may truncate the value on targets with 32-bit wide pointers
/third_party/musl/libc-test/src/functionalext/supplement/unistd/
Dtruncate.c31 * @tc.desc : truncate a file to a specified length
45 int result = truncate(path_n, 0); in truncate_0100()
55 * @tc.desc : truncate a file to a specified length
71 int result = truncate(path, vlen); in truncate_0200()
99 * @tc.desc : truncate a file to a negative length
106 int result = truncate(path, nlen); in truncate_0300()
120 * @tc.desc : truncate a directory
125 int result = truncate("/", 0); in truncate_0400()
/third_party/littlefs/scripts/
Dreadmdir.py307 def _dump_tags(self, tags, f=sys.stdout, truncate=True): argument
310 if truncate:
318 if truncate:
332 def dump_tags(self, f=sys.stdout, truncate=True): argument
333 self._dump_tags(self.tags, f=f, truncate=truncate)
335 def dump_log(self, f=sys.stdout, truncate=True): argument
336 self._dump_tags(self.log, f=f, truncate=truncate)
338 def dump_all(self, f=sys.stdout, truncate=True): argument
339 self._dump_tags(self.all_, f=f, truncate=truncate)
372 mdir.dump_all(truncate=not args.no_truncate)
[all …]
/third_party/toybox/toys/other/
Dtruncate.c1 /* truncate.c - set file length, extending sparsely if necessary
5 USE_TRUNCATE(NEWTOY(truncate, "<1s:|c", TOYFLAG_USR|TOYFLAG_BIN))
7 config TRUNCATE
8 bool "truncate"
11 usage: truncate [-c] -s SIZE file...
/third_party/mindspore/mindspore-src/source/mindspore/ccsrc/minddata/dataset/text/kernels/
Dtruncate_op.cc29 "Truncate: the input tensor should be of dimension 1 or 2."); in Compute()
32 … "Truncate: Truncate: the input tensor should be in type of [bool, int, float, double, string]."); in Compute()
33 return Truncate(input, output, max_seq_len_); in Compute()
40 "Truncate: the input tensor should be of dimension 1 or 2."); in OutputShape()
/third_party/parse5/test/data/location-info/github-parse5/
Ddata.html598 …ass="js-navigation-open select-menu-item-text js-select-button-text css-truncate-target" title="ma…
621 …ass="js-navigation-open select-menu-item-text js-select-button-text css-truncate-target" title="v0…
625 …ass="js-navigation-open select-menu-item-text js-select-button-text css-truncate-target" title="0.…
674 <span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/tree/master/lib" class="js…
677 <span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/commit/33972193530003cbaf2…
679 <td class="age"><span class="css-truncate css-truncate-target"><time class="js-relative-date" datet…
687 <span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/tree/master/test" class="j…
690 <span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/commit/33972193530003cbaf2…
692 <td class="age"><span class="css-truncate css-truncate-target"><time class="js-relative-date" datet…
700 <span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/blob/master/.gitignore" cl…
[all …]
/third_party/NuttX/fs/vfs/
Dfs_truncate.c59 * truncate operations may be relevant to device drivers but only in file_truncate()
60 * the mountpoint operations vtable contains a truncate method. in file_truncate()
64 if (!vnode || !vnode->vop || !vnode->vop->Truncate) in file_truncate()
70 /* Does the file system support the truncate method? It should if it is in file_truncate()
74 ret = vnode->vop->Truncate(vnode, length); in file_truncate()
103 * With ftruncate(), the file must be open for writing; for truncate(),
156 /* Perform the truncate operation using the file descriptor as an index */ in ftruncate()
162 int truncate(const char *path, off_t length) in truncate() function
Dfs_truncate64.c77 * truncate operations may be relevant to device drivers but only in file_truncate64()
78 * the mountpoint operations vtable contains a truncate method. in file_truncate64()
88 /* Does the file system support the truncate method? It should if it is in file_truncate64()
120 * With ftruncate(), the file must be open for writing; for truncate(),
172 /* Perform the truncate operation using the file descriptor as an index */ in ftruncate64()
/third_party/grpc/src/ruby/pb/test/
Dserver.rb42 # DebugIsTruncated extends the default Logger to truncate debug messages
45 super(truncate(s, 1024))
50 # 'Once upon a time in a world far far away'.truncate(27)
53 # Pass a string or regexp <tt>:separator</tt> to truncate +text+ at a natural break:
55 # 'Once upon a time in a world far far away'.truncate(27, separator: ' ')
58 # 'Once upon a time in a world far far away'.truncate(27, separator: /\s/)
64 …# 'And they found that many people were sleeping better.'.truncate(25, omission: '... (continued…
66 def truncate(s, truncate_at, options = {}) method in DebugIsTruncated
/third_party/ltp/testcases/kernel/io/ltp-aiodio/
Ddio_truncate.c11 * This test is mixing direct I/O and truncate operations checking if they can
18 * - Parent start to fill and truncate 'file' many times with zero char when
20 * - Parent start to fill and truncate a junk file many times with non-zero char
22 * If no issues occur on direct IO/truncate operations and the file always
102 tst_brk(TBROK, "Invalid number of truncate/append '%s'", str_numwrites); in setup()
178 {"c:", &str_numwrites, "Number of append & truncate (default 100)"},
/third_party/rust/rust/library/std/src/sys/hermit/
Dfs.rs36 truncate: bool, field
201 truncate: false, in new()
218 pub fn truncate(&mut self, truncate: bool) { in truncate() method
219 self.truncate = truncate; in truncate()
245 if self.truncate || self.create || self.create_new { in get_creation_mode()
253 if self.truncate && !self.create_new { in get_creation_mode()
262 Ok(match (self.create, self.truncate, self.create_new) { in get_creation_mode()
304 pub fn truncate(&self, _size: u64) -> io::Result<()> { in truncate() method
/third_party/littlefs/tests/
Dtest_truncate.toml1 # simple truncate
52 # truncate and read
111 # write, truncate, and read
167 # truncate and write
196 /* truncate */
228 # truncate write under powerloss
276 /* truncate */
330 // warm shrinking truncate
335 // warm expanding truncate
340 // mid-file shrinking truncate
[all …]
/third_party/python/Lib/test/
Dtest_largefile.py118 if not hasattr(f, 'truncate'):
119 raise unittest.SkipTest("open().truncate() not available "
124 # Cut it back via seek + truncate with no argument.
127 f.truncate()
131 # Ensure that truncate(smaller than true size) shrinks
135 f.truncate(newsize)
139 # XXX truncate(larger than true size) is ill-defined
142 f.truncate(1)
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Support/
DScaledNumber.cpp284 // Find where to truncate. in toString()
285 size_t Truncate = in toString() local
288 // Check if there's anything to truncate. in toString()
289 if (Truncate >= Str.size()) in toString()
292 bool Carry = doesRoundUp(Str[Truncate]); in toString()
294 return stripTrailingZeros(Str.substr(0, Truncate)); in toString()
297 for (std::string::reverse_iterator I(Str.begin() + Truncate), E = Str.rend(); in toString()
312 return stripTrailingZeros(std::string(Carry, '1') + Str.substr(0, Truncate)); in toString()
/third_party/musl/src/unistd/
Dtruncate.c4 int truncate(const char *path, off_t length) in truncate() function
9 weak_alias(truncate, truncate64);

12345678910>>...64