Skip to content

Commit d13a1fe

Browse files
committed
Don't read passwd in test
1 parent 867d8a8 commit d13a1fe

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

tests/unit/out/refcount/user_defined_same_as_libc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub fn main() {
1919
fn main_0() -> i32 {
2020
let fp: Value<Ptr<::std::fs::File>> = Rc::new(RefCell::new(
2121
({
22-
let _path: Ptr<u8> = Ptr::from_string_literal("/etc/passwd");
22+
let _path: Ptr<u8> = Ptr::from_string_literal("/tmp/irrelevant-file");
2323
let _mode: Ptr<u8> = Ptr::from_string_literal("r");
2424
fopen_0(_path, _mode)
2525
}),

tests/unit/out/unsafe/user_defined_same_as_libc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub fn main() {
1818
}
1919
unsafe fn main_0() -> i32 {
2020
let mut fp: *mut ::std::fs::File = (unsafe {
21-
let _path: *const u8 = (b"/etc/passwd\0".as_ptr().cast_mut()).cast_const();
21+
let _path: *const u8 = (b"/tmp/irrelevant-file\0".as_ptr().cast_mut()).cast_const();
2222
let _mode: *const u8 = (b"r\0".as_ptr().cast_mut()).cast_const();
2323
fopen_0(_path, _mode)
2424
});

tests/unit/user_defined_same_as_libc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ FILE *fopen(const char *path, const char *mode) {
88
}
99

1010
int main() {
11-
FILE *fp = fopen("/etc/passwd", "r");
11+
FILE *fp = fopen("/tmp/irrelevant-file", "r");
1212
assert(fp == NULL);
1313
return 0;
1414
}

0 commit comments

Comments
 (0)