From 94fe4b034d73daeb3999d56490078ed7bd904abc Mon Sep 17 00:00:00 2001 From: Johnnie Birch <45402135+jlb6740@users.noreply.github.com> Date: Wed, 5 Jun 2019 14:21:15 -0700 Subject: [PATCH] Implement unlinkat - Update should_panic for more precise check Updae should_panic attribute for more precise check. Also remove some dead code and note the pull request ID. --- CHANGELOG.md | 2 +- test/test_unistd.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29cc13de33..63175a7cfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,7 +77,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Add `sched_yield` ([#1050](https://github.com/nix-rust/nix/pull/1050)) - Add `unlinkat` - ([#TBD](https://github.com/nix-rust/nix/pull/TBD)) + ([#TBD](https://github.com/nix-rust/nix/pull/1058)) ### Changed - `PollFd` event flags renamed to `PollFlags` ([#1024](https://github.com/nix-rust/nix/pull/1024/)) diff --git a/test/test_unistd.rs b/test/test_unistd.rs index 3d9aa31113..333d80956e 100644 --- a/test/test_unistd.rs +++ b/test/test_unistd.rs @@ -602,7 +602,7 @@ fn test_symlinkat() { #[test] -#[should_panic] +#[should_panic (expected="`Err` value: Sys(EISDIR)")] fn test_unlinkat_dir_noremovedir() { let tempdir = tempfile::tempdir().unwrap(); let dirname = "foo_dir"; @@ -616,7 +616,6 @@ fn test_unlinkat_dir_noremovedir() { // Attempt unlink dir at relative path without proper flag unlinkat(Some(dirfd), dirname, UnlinkatFlags::NoRemoveDir).unwrap(); - assert!(dirpath.exists()); } #[test]