Home
last modified time | relevance | path

Searched refs:open (Results 1 – 25 of 6571) sorted by relevance

12345678910>>...263

/external/python/pyfakefs/pyfakefs/tests/
Dfake_open_test.py49 self.assert_raises_os_error(errno.ENOENT, self.open, file_path, 'w')
56 self.open = fake_filesystem.FakeFileOpen(self.filesystem,
58 with self.open(file_path, 'w'):
64 with self.open(file_path, 'w'):
70 self.open = fake_filesystem.FakeFileOpen(self.filesystem,
74 with self.open(file_path, 'w'):
86 with self.open(file_path, 'w') as f:
88 with self.open(file_path) as f:
95 with self.open(file_path, 'wb') as f:
99 with self.open(file_path, encoding='utf-8') as f:
[all …]
/external/llvm-project/clang-tools-extra/test/clang-tidy/checkers/
Dandroid-cloexec-open.cpp15 extern "C" int open(const char *fn, int flags, ...);
20 open("filename", O_RDWR); in a()
23 TEMP_FAILURE_RETRY(open("filename", O_RDWR)); in a()
26 open("filename", O_RDWR | O_EXCL); in a()
29 TEMP_FAILURE_RETRY(open("filename", O_RDWR | O_EXCL)); in a()
65 open("filename", 3); in f()
68 TEMP_FAILURE_RETRY(open("filename", 3)); in f()
85 open("filename", flag); in f()
87 TEMP_FAILURE_RETRY(open("filename", flag)); in f()
100 int open(const char *pathname, int flags, ...);
[all …]
/external/llvm-project/clang/test/Analysis/
Dunix-api.cpp11 int open(const char *, int, ...);
17 int open(const char *a, int b, int c, int d);
22 fd = open(path, O_RDONLY); // no-warning in unix_open()
30 …fd = open(path, O_RDONLY, mode, NULL); // expected-warning{{Call to 'open' with more than 3 argume… in unix_open_misuse()
37 MyNameSpace::open("Hi", 2, 3, 4); // no-warning in namespaced_open()
41 open("Hi", 2, 3, 4); // no-warning in namespaced_open()
45 …fd = ::open(path, O_RDONLY, mode, NULL); // expected-warning{{Call to 'open' with more than 3 argu… in namespaced_open()
52 static int open(const char *a, int b, int c, int d);
54 int open(int a, int, int c, int d);
58 MyClass::open("Hi", 2, 3, 4); // no-warning in class_qualified_open()
[all …]
Dunix-api.c11 int open(const char *, int, ...);
17 fd = open(path, O_RDONLY); // no-warning in open_1()
25 …fd = open(path, O_RDONLY, mode, NULL); // expected-warning{{Call to 'open' with more than 3 argume… in open_2()
40 …fd = open(path, O_RDONLY, NULL); // expected-warning{{The 3rd argument to 'open' is not an integer… in open_3()
55 fd = open(path, O_RDONLY, ""); // expected-warning{{The 3rd argument to 'open' is not an integer}} in open_4()
65 fd = open(path, O_RDONLY, st); // expected-warning{{The 3rd argument to 'open' is not an integer}} in open_5()
75 fd = open(path, O_RDONLY, st.val); // no-warning in open_6()
82 …fd = open(path, O_RDONLY, &open); // expected-warning{{The 3rd argument to 'open' is not an intege… in open_7()
89 …fd = open(path, O_RDONLY, 0.0f); // expected-warning{{The 3rd argument to 'open' is not an integer… in open_8()
/external/okhttp/okhttp-urlconnection/src/test/java/com/squareup/okhttp/
DUrlConnectionCacheTest.java182 HttpURLConnection conn = client.open(url); in assertCached()
223 HttpURLConnection urlConnection = client.open(server.getUrl("/")); in testResponseCaching()
233 urlConnection = client.open(server.getUrl("/")); // cached! in testResponseCaching()
254 HttpsURLConnection c1 = (HttpsURLConnection) client.open(server.getUrl("/")); in secureResponseCaching()
266 HttpsURLConnection c2 = (HttpsURLConnection) client.open(server.getUrl("/")); // cached! in secureResponseCaching()
292 HttpURLConnection connection = client.open(server.getUrl("/")); in responseCachingAndRedirects()
295 connection = client.open(server.getUrl("/")); // cached! in responseCachingAndRedirects()
309 assertEquals("ABC", readAscii(client.open(server.getUrl("/foo")))); in redirectToCachedResult()
314 assertEquals("ABC", readAscii(client.open(server.getUrl("/bar")))); in redirectToCachedResult()
320 assertEquals("DEF", readAscii(client.open(server.getUrl("/baz")))); in redirectToCachedResult()
[all …]
/external/python/cpython3/Lib/test/
Dtest_dbm_dumb.py36 with contextlib.closing(dumbdbm.open(_fname, 'c')) as f:
46 f = dumbdbm.open(_fname, 'c', 0o637)
64 f = dumbdbm.open(_fname)
72 with contextlib.closing(dumbdbm.open(_fname, 'w')) as f:
81 with contextlib.closing(dumbdbm.open(_fname, 'r')) as f:
98 with contextlib.closing(dumbdbm.open(_fname)) as f:
102 with contextlib.closing(dumbdbm.open(_fname)) as f:
108 with contextlib.closing(dumbdbm.open(_fname)) as f:
111 with contextlib.closing(dumbdbm.open(_fname)) as f:
116 with contextlib.closing(dumbdbm.open(_fname, 'r')) as f:
[all …]
Dmake_ssl_certs.py120 with open(req_file, 'w') as f:
149 with open(cert_file, 'r') as f:
151 with open(key_file, 'r') as f:
165 with open(os.path.join('cadir','index.txt'),'a+') as f:
167 with open(os.path.join('cadir','crl.txt'),'a+') as f:
169 with open(os.path.join('cadir','index.txt.attr'),'w+') as f:
204 with open('ssl_cert.pem', 'w') as f:
206 with open('ssl_key.pem', 'w') as f:
212 with open('keycert.pem', 'w') as f:
216 with open('keycert.passwd.pem', 'a+') as f:
[all …]
Dtest_file.py18 self.f = self.open(TESTFN, 'wb')
46 self.f = self.open(TESTFN, 'rb')
54 self.f = self.open(TESTFN, 'r')
63 self.f = self.open(TESTFN, 'rb')
133 open = io.open variable in CAutoFileTests
136 open = staticmethod(pyio.open) variable in PyAutoFileTests
146 self.open(TESTFN, 'wb').close()
149 f = self.open(TESTFN, mode)
160 f = self.open(TESTFN, bad_mode)
174 f = self.open(TESTFN, 'wb', s)
[all …]
Dtest_dbm_gnu.py30 self.g = gdbm.open(filename, 'c')
57 self.assertRaises(gdbm.error, gdbm.open, filename, 'r')
59 self.g = gdbm.open(filename, 'c')
63 self.assertRaises(gdbm.error, lambda: gdbm.open(filename, 'rx').close())
71 self.g = gdbm.open(filename, mode)
78 self.g = gdbm.open(filename, mode + flag)
82 self.g = gdbm.open(filename, 'c')
103 with gdbm.open(filename, 'c') as db:
106 with gdbm.open(filename, 'r') as db:
115 with gdbm.open(filename, 'c') as db:
[all …]
/external/python/cpython2/Lib/test/
Dtest_tarfile.py46 self.tar = tarfile.open(self.tarname, mode=self.mode, encoding="iso8859-1")
64 fobj1 = open(os.path.join(TEMPDIR, "ustar/regtype"), "rU")
65 with open(os.path.join(TEMPDIR, "ustar/regtype"), "rU") as fobj1:
81 with open(os.path.join(TEMPDIR, "ustar/regtype"), "rU") as fobj1:
90 with open(os.path.join(TEMPDIR, "ustar/regtype"), "rb") as fobj:
166 self.tar = tarfile.open(self.tarname, mode=self.mode)
243 with tarfile.open(tmpname, self.mode.replace("r", "w")):
246 tar = tarfile.open(tmpname, self.mode)
259 with open(tmpname, "wb"):
261 self.assertRaises(tarfile.ReadError, tarfile.open, tmpname, self.mode)
[all …]
Dmake_ssl_certs.py100 with open(req_file, 'w') as f:
121 with open(cert_file, 'r') as f:
123 with open(key_file, 'r') as f:
137 with open(os.path.join('cadir','index.txt'),'a+') as f:
139 with open(os.path.join('cadir','crl.txt'),'a+') as f:
141 with open(os.path.join('cadir','index.txt.attr'),'w+') as f:
164 with open('ssl_cert.pem', 'w') as f:
166 with open('ssl_key.pem', 'w') as f:
172 with open('keycert.pem', 'w') as f:
176 with open('keycert.passwd.pem', 'a+') as f:
[all …]
Dtest_file.py23 self.f = self.open(TESTFN, 'wb')
51 self.f = self.open(TESTFN, 'rb')
59 self.f = self.open(TESTFN, 'r')
68 self.f = self.open(TESTFN, 'rb')
139 open = io.open variable in CAutoFileTests
142 open = staticmethod(pyio.open) variable in PyAutoFileTests
152 self.open(TESTFN, 'wb').close()
155 f = self.open(TESTFN, mode)
166 f = self.open(TESTFN, bad_mode)
183 f = self.open(TESTFN, 'wb', s)
[all …]
Dtest_dumbdbm.py34 f = dumbdbm.open(_fname, 'c')
46 f = dumbdbm.open(_fname, 'c', 0637)
64 f = dumbdbm.open(_fname)
72 f = dumbdbm.open(_fname, 'w')
79 f = dumbdbm.open(_fname, 'r')
85 f = dumbdbm.open(_fname)
91 f = dumbdbm.open(_fname)
95 f = dumbdbm.open(_fname)
102 f = dumbdbm.open(_fname)
108 data = open(_fname + '.dir').read()
[all …]
/external/clang/test/Analysis/
Dunix-api.c11 int open(const char *, int, ...);
16 fd = open(path, O_RDONLY); // no-warning in open_1()
24 …fd = open(path, O_RDONLY, mode, NULL); // expected-warning{{Call to 'open' with more than three ar… in open_2()
31 fd = open(path, O_RDONLY, NULL); // expected-warning{{Third argument to 'open' is not an integer}} in open_3()
38 fd = open(path, O_RDONLY, ""); // expected-warning{{Third argument to 'open' is not an integer}} in open_4()
48 fd = open(path, O_RDONLY, st); // expected-warning{{Third argument to 'open' is not an integer}} in open_5()
58 fd = open(path, O_RDONLY, st.val); // no-warning in open_6()
65 …fd = open(path, O_RDONLY, &open); // expected-warning{{Third argument to 'open' is not an integer}} in open_7()
72 fd = open(path, O_RDONLY, 0.0f); // expected-warning{{Third argument to 'open' is not an integer}} in open_8()
/external/ltp/testcases/kernel/security/tomoyo/
Dtomoyo_new_test.c50 result = open("/etc/fstab", O_RDONLY); in test_read_etc_fstab()
55 result = open("/dev/null", O_WRONLY); in test_write_dev_null()
141 int fd = open("/dev/null", O_RDWR); in test_ioctl_dev_null()
200 result = open("/tmp/testfile0", O_RDONLY, 0600); in test_file_open_0()
205 result = open("/tmp/testfile1", O_CREAT | O_RDONLY, 0600); in test_file_open_1()
210 result = open("/tmp/testfile2", O_TRUNC | O_RDONLY, 0600); in test_file_open_2()
215 result = open("/tmp/testfile3", O_TRUNC | O_CREAT | O_RDONLY, 0600); in test_file_open_3()
220 result = open("/tmp/testfile4", O_APPEND | O_RDONLY, 0600); in test_file_open_4()
225 result = open("/tmp/testfile5", O_APPEND | O_CREAT | O_RDONLY, 0600); in test_file_open_5()
230 result = open("/tmp/testfile6", O_APPEND | O_TRUNC | O_RDONLY, 0600); in test_file_open_6()
[all …]
Dtomoyo_rewrite_test.c71 close(open(REWRITE_PATH, O_WRONLY | O_APPEND | O_CREAT, 0600)); in stage_rewrite_test()
77 fd = open(REWRITE_PATH, O_RDONLY); in stage_rewrite_test()
82 fd = open(REWRITE_PATH, O_WRONLY | O_APPEND); in stage_rewrite_test()
88 fd = open(REWRITE_PATH, O_WRONLY); in stage_rewrite_test()
93 fd = open(REWRITE_PATH, O_WRONLY | O_TRUNC); in stage_rewrite_test()
98 fd = open(REWRITE_PATH, O_WRONLY | O_TRUNC | O_APPEND); in stage_rewrite_test()
105 fd = open(REWRITE_PATH, O_WRONLY | O_APPEND); in stage_rewrite_test()
122 fd = open(REWRITE_PATH, O_RDONLY); in stage_rewrite_test()
127 fd = open(REWRITE_PATH, O_WRONLY | O_APPEND); in stage_rewrite_test()
132 fd = open(REWRITE_PATH, O_WRONLY); in stage_rewrite_test()
[all …]
/external/bcc/tools/
Dfuncslower_example.txt6 failed. For example, trace the open() function in libc when it is slower than
9 # ./funcslower c:open -u 1
12 less 27074 33.77 3 c:open
13 less 27074 9.96 ffffffffffffffff c:open
14 less 27074 5.92 ffffffffffffffff c:open
15 less 27074 15.88 ffffffffffffffff c:open
16 less 27074 8.89 3 c:open
17 less 27074 15.89 3 c:open
18 sh 27075 20.97 4 c:open
19 bash 27075 20.14 4 c:open
[all …]
/external/chromium-trace/catapult/common/py_utils/py_utils/
Dlock_unittest.py21 with open(file_name, 'a') as f:
33 with open(read_file, 'r') as f:
36 with open(write_file, 'a') as f2:
42 with open(target_file, 'r') as f:
45 with open(status_file, 'w') as f2:
48 with open(status_file, 'w') as f2:
75 with open(self.temp_file_path, 'r') as f:
85 with open(self.temp_file_path, 'w') as f:
87 with open(self.temp_file_path, 'r') as f:
104 with open(temp_write_file, 'r') as f:
[all …]
/external/llvm-project/lld/test/ELF/
Derror-limit.test4 DEFAULT: cannot open 01
5 DEFAULT: cannot open 20
7 DEFAULT-NOT: cannot open 21
14 LIMIT5: cannot open 01
15 LIMIT5: cannot open 05
17 LIMIT5-NOT: cannot open 06
22 UNLIMITED: cannot open 01
23 UNLIMITED: cannot open 20
24 UNLIMITED: cannot open 21
25 UNLIMITED: cannot open 22
/external/llvm-project/lld/test/COFF/
Derror-limit.test4 DEFAULT: could not open '01'
5 DEFAULT: could not open '20'
7 DEFAULT-NOT: could not open '21'
12 LIMIT5: could not open '01'
13 LIMIT5: could not open '05'
15 LIMIT5-NOT: could not open '06'
20 UNLIMITED: could not open '01'
21 UNLIMITED: could not open '20'
22 UNLIMITED: could not open '21'
23 UNLIMITED: could not open '22'
/external/llvm-project/lldb/test/API/python_api/file_handle/
DTestFileHandle.py125 with open(self.out_filename, 'w') as f:
134 with open(self.out_filename, 'r') as f:
141 with open(self.out_filename, 'w') as f:
144 with open(self.out_filename, 'r') as f:
150 with open(self.out_filename, 'w') as f:
156 with open(self.out_filename, 'r') as f:
165 with open(self.out_filename, 'w') as f:
168 with open(self.out_filename, 'r') as f:
175 with open(self.out_filename, 'w') as f:
178 with open(self.out_filename, 'r') as f:
[all …]
/external/parameter-framework/upstream/test/functional-tests-legacy/PfwTestCase/Domains/
DtDomain_creation_deletion.py94 f_Domains_Backup = open("f_Domains_Backup", "w")
97 f_Domains_Backup = open("f_Domains_Backup", "r")
120 f_Domains = open("f_Domains", "w")
124 f_Domains = open("f_Domains", "r")
133 f_Domains = open("f_Domains", "r")
134 f_Domains_Backup = open("f_Domains_Backup", "r")
172 f_Domains_Backup = open("f_Domains_Backup", "w")
175 f_Domains_Backup = open("f_Domains_Backup", "r")
198 f_Domains = open("f_Domains", "w")
202 f_Domains = open("f_Domains", "r")
[all …]
/external/parameter-framework/upstream/test/functional-tests-legacy/PfwTestCase/Functions/
DtFunction_Sync.py136 init_filesystem_01 = open(self.filesystem_01).read()[:-1]
137 init_filesystem_02 = open(self.filesystem_02).read()[:-1]
138 init_filesystem_03 = open(self.filesystem_03).read()[:-1]
158 …assert open(self.filesystem_01).read()[:-1] != init_filesystem_01, log.F("FILESYSTEM : parameter %…
160 …assert open(self.filesystem_02).read()[:-1] != init_filesystem_02, log.F("FILESYSTEM : parameter %…
162 …assert open(self.filesystem_03).read()[:-1] != init_filesystem_03, log.F("FILESYSTEM : parameter %…
176 …assert open(self.filesystem_01).read()[:-1] != init_filesystem_01, log.F("FILESYSTEM : parameter %…
178 …assert open(self.filesystem_02).read()[:-1] != init_filesystem_02, log.F("FILESYSTEM : parameter %…
180 …assert open(self.filesystem_03).read()[:-1] != init_filesystem_03, log.F("FILESYSTEM : parameter %…
211 init_filesystem_01 = open(self.filesystem_01).read()[:-1]
[all …]
/external/fonttools/Tests/ufoLib/
DUFOConversion_test.py5 from io import open
71 with open(metainfoPath1, "rb") as f:
73 with open(metainfoPath2, "rb") as f:
76 with open(fontinfoPath1, "rb") as f:
79 with open(kerningPath1, "rb") as f:
81 with open(kerningPath2, "rb") as f:
84 with open(groupsPath1, "rb") as f:
86 with open(groupsPath2, "rb") as f:
89 with open(libPath1, "rb") as f:
91 with open(libPath2, "rb") as f:
[all …]
/external/toolchain-utils/heatmaps/
Dheatmap_generator_test.py75 with open(fname, 'w') as f:
81 with open('out.txt') as f:
89 with open(fname, 'w') as f:
97 with open('out.txt') as f:
107 with open(fname, 'w') as f:
116 with open('out.txt') as f:
125 with open(fname, 'w') as f:
135 with open('out.txt') as f:
145 with open(fname, 'w') as f:
155 with open(fname, 'w') as f:
[all …]

12345678910>>...263