Ticket #2039 (closed defect: worksforme)

Opened 2 years ago

Last modified 23 months ago

rmdir slaveside command return 0 even if it fails

Reported by: in3xes Owned by:
Priority: minor Milestone: 0.8.5
Version: 0.8.4p1 Keywords:
Cc:

Description

 https://github.com/buildbot/buildbot/blob/master/slave/buildslave/commands/fs.py#L91

Ideally it should send whatever the command returns.

after digging little deeper, _abandonOnFailure is also not catching it. because of '-f' on argument in 'rm -rf' returns 0 if path of the file specified is invalid.

Change History

comment:1 Changed 2 years ago by dustin

Probably the right error-handling technique is to test for existence of the pathname after 'rm' returns, and set rc=1 if the pathname still exists.

comment:2 Changed 2 years ago by dustin

  • Type changed from undecided to defect
  • Milestone changed from undecided to 0.8.5

comment:3 Changed 23 months ago by dustin

Pradeep, will you have a chance to fix this?

comment:4 Changed 23 months ago by in3xes

This is report is kind of wrong too. I tried to fix this when I modified rmdir's behavior. I couldn't because there was nothing to fix.

I wrote - It returns 0 even if the path is invalid. I think in this case it is ok return 0, because there's nothing to delete. A fix like checking for the path exists or not wouldn't catch that either. Before reporting I thought it was not returning the correct value, but it was. I think we can close this.

comment:5 Changed 23 months ago by dustin

  • Status changed from new to closed
  • Resolution set to worksforme

That's easy - thanks for looking into it!

Note: See TracTickets for help on using tickets.