Skip to content

Commit

Permalink
calls: Fix unittest error in fchmod()
Browse files Browse the repository at this point in the history
  • Loading branch information
XuShaohua committed Aug 2, 2024
1 parent 50658af commit ee7f65b
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/calls/fchmod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
/// };
/// assert!(fd.is_ok());
/// let fd = fd.unwrap();
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::fchmod(fd, 0o640) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::unlinkat(nc::AT_FDCWD, filename, 0) };
/// assert!(ret.is_ok());
/// ```
Expand Down
4 changes: 2 additions & 2 deletions src/platform/linux-aarch64/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1359,10 +1359,10 @@ pub unsafe fn fchdir(fd: i32) -> Result<(), Errno> {
/// };
/// assert!(fd.is_ok());
/// let fd = fd.unwrap();
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::fchmod(fd, 0o640) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::unlinkat(nc::AT_FDCWD, filename, 0) };
/// assert!(ret.is_ok());
/// ```
Expand Down
4 changes: 2 additions & 2 deletions src/platform/linux-arm/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1555,10 +1555,10 @@ pub unsafe fn fchdir(fd: i32) -> Result<(), Errno> {
/// };
/// assert!(fd.is_ok());
/// let fd = fd.unwrap();
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::fchmod(fd, 0o640) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::unlinkat(nc::AT_FDCWD, filename, 0) };
/// assert!(ret.is_ok());
/// ```
Expand Down
4 changes: 2 additions & 2 deletions src/platform/linux-loongarch64/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1191,10 +1191,10 @@ pub unsafe fn fchdir(fd: i32) -> Result<(), Errno> {
/// };
/// assert!(fd.is_ok());
/// let fd = fd.unwrap();
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::fchmod(fd, 0o640) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::unlinkat(nc::AT_FDCWD, filename, 0) };
/// assert!(ret.is_ok());
/// ```
Expand Down
4 changes: 2 additions & 2 deletions src/platform/linux-mips/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1615,10 +1615,10 @@ pub unsafe fn fchdir(fd: i32) -> Result<(), Errno> {
/// };
/// assert!(fd.is_ok());
/// let fd = fd.unwrap();
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::fchmod(fd, 0o640) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::unlinkat(nc::AT_FDCWD, filename, 0) };
/// assert!(ret.is_ok());
/// ```
Expand Down
4 changes: 2 additions & 2 deletions src/platform/linux-mips64/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1599,10 +1599,10 @@ pub unsafe fn fchdir(fd: i32) -> Result<(), Errno> {
/// };
/// assert!(fd.is_ok());
/// let fd = fd.unwrap();
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::fchmod(fd, 0o640) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::unlinkat(nc::AT_FDCWD, filename, 0) };
/// assert!(ret.is_ok());
/// ```
Expand Down
4 changes: 2 additions & 2 deletions src/platform/linux-ppc64/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1608,10 +1608,10 @@ pub unsafe fn fchdir(fd: i32) -> Result<(), Errno> {
/// };
/// assert!(fd.is_ok());
/// let fd = fd.unwrap();
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::fchmod(fd, 0o640) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::unlinkat(nc::AT_FDCWD, filename, 0) };
/// assert!(ret.is_ok());
/// ```
Expand Down
4 changes: 2 additions & 2 deletions src/platform/linux-riscv64/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1359,10 +1359,10 @@ pub unsafe fn fchdir(fd: i32) -> Result<(), Errno> {
/// };
/// assert!(fd.is_ok());
/// let fd = fd.unwrap();
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::fchmod(fd, 0o640) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::unlinkat(nc::AT_FDCWD, filename, 0) };
/// assert!(ret.is_ok());
/// ```
Expand Down
4 changes: 2 additions & 2 deletions src/platform/linux-s390x/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1504,10 +1504,10 @@ pub unsafe fn fchdir(fd: i32) -> Result<(), Errno> {
/// };
/// assert!(fd.is_ok());
/// let fd = fd.unwrap();
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::fchmod(fd, 0o640) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::unlinkat(nc::AT_FDCWD, filename, 0) };
/// assert!(ret.is_ok());
/// ```
Expand Down
4 changes: 2 additions & 2 deletions src/platform/linux-x86/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1538,10 +1538,10 @@ pub unsafe fn fchdir(fd: i32) -> Result<(), Errno> {
/// };
/// assert!(fd.is_ok());
/// let fd = fd.unwrap();
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::fchmod(fd, 0o640) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::unlinkat(nc::AT_FDCWD, filename, 0) };
/// assert!(ret.is_ok());
/// ```
Expand Down
4 changes: 2 additions & 2 deletions src/platform/linux-x86_64/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1598,10 +1598,10 @@ pub unsafe fn fchdir(fd: i32) -> Result<(), Errno> {
/// };
/// assert!(fd.is_ok());
/// let fd = fd.unwrap();
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::fchmod(fd, 0o640) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::close(fd) };
/// assert!(ret.is_ok());
/// let ret = unsafe { nc::unlinkat(nc::AT_FDCWD, filename, 0) };
/// assert!(ret.is_ok());
/// ```
Expand Down

0 comments on commit ee7f65b

Please sign in to comment.