return error message if the mount point is not writable#9
Open
makeittotop wants to merge 1 commit intominio:masterfrom
Open
return error message if the mount point is not writable#9makeittotop wants to merge 1 commit intominio:masterfrom
makeittotop wants to merge 1 commit intominio:masterfrom
Conversation
Member
This is not actually correct, what we need to show is the error per drive in the table. |
Contributor
Author
|
Ah, I see what you mean. I can work on that.
…On Fri, Oct 6, 2023 at 8:17 PM Harshavardhana ***@***.***> wrote:
Hi @harshavardhana <https://github.com/harshavardhana> Please let me know
if this PR can be approved and merged?
Currently dperf fails silently if the directory at a given mount path is
not writable. For example -
$ touch /tmp/foo1/.tmpFile
touch: cannot touch '/tmp/foo1/.tmpFile': Permission denied
$ dperf /tmp/foo1
┌───────────┬────────────┐
│ TotalREAD │ TotalWRITE │
│ 0 B/s │ 0 B/s │
└───────────┴────────────┘
$ echo $?
0
The cmd should instead return an error code and a meaningful error message
to stderr as it does in case a directory at the mount path doesn't exists.
$ stat /tmp/foo
stat: cannot statx '/tmp/foo/': No such file or directory
$ dperf /tmp/foo
$ echo $?
1
With the proposed changes -
$ dperf /tmp/foo1
ERROR directory at path '/tmp/foo1' is not writable
$ echo $?
1
$ dperf /tmp/foo1 --verbose
ERROR directory at path '/tmp/foo1' is not writable
$ echo $?
1
This is not actually correct, what we need to show is the error per drive
in the table.
—
Reply to this email directly, view it on GitHub
<#9 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABFYC7K4ZGBHIWPMI3WPDT3X6DCS5AVCNFSM6AAAAAA5U3Q4ACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJRGU4DCMRWHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @harshavardhana Please let me know if this PR can be approved and merged?
Currently
dperffails silently if the directory at a given mount path is not writable. For example -The cmd should instead return an error code and a meaningful error message to stderr as it does in case a directory at the mount path doesn't exists.
With the proposed changes -