Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lofs: Fix directory remove #31

Merged
merged 5 commits into from Nov 29, 2015
Merged

lofs: Fix directory remove #31

merged 5 commits into from Nov 29, 2015

Conversation

djs55
Copy link
Member

@djs55 djs55 commented Nov 29, 2015

  • Add client helper for remove
  • Fix lofs implementation of remove for directories
  • Add test case for file remove
  • Add test case for directory remove
  • Make the lofs test cleanup more robust

@@ -314,6 +315,20 @@ module Make(Log: S.LOG)(FLOW: V1_LWT.FLOW) = struct
Lwt.return (Ok ())
)

let remove t path =
let open LowLevel in
let open LowLevel in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dupe

@dsheets dsheets mentioned this pull request Nov 29, 2015
Signed-off-by: David Scott <dave.scott@unikernel.com>
Signed-off-by: David Scott <dave.scott@unikernel.com>
Signed-off-by: David Scott <dave.scott@unikernel.com>
When we create directories with limited permissions, a `rm -rf` is not
enough to delete them; we must `chmod` them first.

This patch also removes the cleanup to before the test run, just in case
the test runner fails part way through and neglects cleanup.

Signed-off-by: David Scott <dave.scott@unikernel.com>
To remove a directory we need to use `rmdir` rather than `unlink`
(`unlink` will fail with `EPERM`)

Signed-off-by: David Scott <dave.scott@unikernel.com>
djs55 added a commit that referenced this pull request Nov 29, 2015
lofs: Fix directory remove
@djs55 djs55 merged commit a304a91 into mirage:master Nov 29, 2015
@djs55 djs55 deleted the remove branch November 29, 2015 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants