Bug 10 - cpuset_delete() return value treated incorrectly everywhere
: cpuset_delete() return value treated incorrectly everywhere
Status: RESOLVED FIXED
Product: TORQUE
pbs_mom
: 2.3.x
: Other Linux
: P5 minor
Assigned To: Glen
:
:
:
  Show dependency treegraph
 
Reported: 2009-07-06 18:10 MDT by Chris Samuel
Modified: 2009-07-22 00:40 MDT (History)
1 user (show)

See Also:


Attachments
Patch to change cpuset_delete() to just return the return code from rmdir() (1.32 KB, patch)
2009-07-06 18:10 MDT, Chris Samuel
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description Chris Samuel 2009-07-06 18:10:29 MDT
Created an attachment (id=2) [details]
Patch to change cpuset_delete() to just return the return code from rmdir()

Currently all calls to cpuset_delete() treat the return value as if it is the
return from rmdir(), when it is actually comparing that with 0 and thus
inverting the return code.

The symptom of this are lots of bogus messages about not being able to delete
unused cpusets which are actually successfully being removed (fortunately
that's the only effect)!

The fix is trivial, just make cpuset_delete() return the value from rmdir()
itself - no other changes are necessary.

NOTE: This is different to how things are done in trunk, there there are lots
of comparisons to 0 for its return value, so problems may still lurk there!
Comment 1 Glen 2009-07-17 22:02:14 MDT
this patch has been applied.

Is it OK to resolve, or should we check trunk to see what is going on there?
Comment 2 Chris Samuel 2009-07-17 23:08:53 MDT
I think trunk could do with some attention for this.  I'm on leave for the next
week so may or may not get a chance to look at it.
Comment 3 Chris Samuel 2009-07-22 00:40:34 MDT
Just had a look at trunk, it's far more sane, nothing needs doing there.

I'll resolve this as fixed now, thanks Glen!