-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
smbserver: remove a temporary file before exit #10990
Conversation
It seems that this causes the tests to hang on Windows. Maybe that has to do with Windows' inability to delete an open file. I'll try another approach. |
Each execution of test 1451 would leave a file in /tmp before. Since Windows can't delete a file while it's open, all the temporary file names are stored and deleted on exit. Closes #10990
d14d569
to
59d5c02
Compare
The solution necessary to cleanly shut down the SMB server was pretty involved, but it should do the trick. It might be able to be made cleaner if there were a relevant impacket method to override, but I'm pretty sure something like this would be needed anyway to cleanly shut down the server. |
tests/smbserver.py
Outdated
# wait for thread to finish | ||
self.join() | ||
|
||
def _sighandler(self, signum, frame): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vulture-100: unused variable 'frame'
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
tests/smbserver.py
Outdated
# wait for thread to finish | ||
self.join() | ||
|
||
def _sighandler(self, signum, frame): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vulture-100: unused variable 'signum'
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Each execution of test 1451 would leave a file in /tmp before. Since Windows can't delete a file while it's open, all the temporary file names are stored and deleted on exit. Closes #10990
59d5c02
to
df54467
Compare
Each execution of test 1451 would leave a file in /tmp before. Since Windows can't delete a file while it's open, all the temporary file names are stored and deleted on exit. Closes curl#10990
Each execution of test 1451 would leave a file in /tmp before.
Closes #10990
It's not completely clear to me the purpose of this file, but the test succeeds fine with the path gone.