stress-ng should better handle unknown options

Bug #1639936 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
Undecided
Sylvain Pineau

Bug Description

unning stress-ng sync-file stressor for 240 seconds....
stress-ng: unrecognized option '--sync-file'
Try 'stress-ng --help' for more information.
return_code is 1
*****************************************************************
** Error 1 reported on stressor sync-file!)
*****************************************************************

stress-ng returns output like above when a test case doesn't exist. This could happen where that feature works on one arch, but is not supported on another (e.g. x86_64 vs ppc64el)

So disk_stress_ng should do one of the following:

Maintain separate arch specific test lists and become arch aware to dynamically create test lists at runtime.

OR

Intercept these cases, pass a warning message to logs/output, and pass on these tests.

Changed in plainbox-provider-checkbox:
status: New → In Progress
assignee: nobody → Colin Ian King (colin-king)
Revision history for this message
Colin Ian King (colin-king) wrote :

I will look at adding a warning and a return code 4 (EXIT_NOT_IMPLEMENTED) to cater for this. I may take me a while to implement because it requires a re-working of most of the 160 or so tests.

How about a pr_info message "<stressor-name>: this stressor is not implemented on this system: <arch> <kernel-release>", e.g.

stress-sync-file: this stressor is not implemented on this system: ppc64el 4.8.0-26-generic

Revision history for this message
Jeff Lane  (bladernr) wrote :

That would be pretty cool, honestly, Colin, I didn't even think you'd see this. I mistyped the heading apparently, because I was actually referring to the disk_stress_ng wrapper script.

But now that you bring it up, an exit code other than 1 would be awesome and much easier to trap (and certainly less functional overhead on the user end than wrappers that make decisions based on discovered architecture)

Revision history for this message
Jeff Lane  (bladernr) wrote :

Also, much easier than my other idea of a regex match to catch expected messages in output.

Revision history for this message
Colin Ian King (colin-king) wrote :
Changed in plainbox-provider-checkbox:
status: In Progress → Fix Committed
Revision history for this message
Colin Ian King (colin-king) wrote :

stress-ng V0.07.02 now has been released with fixes to address this. Let me know if it needs further work to assist you with this issue.

Changed in plainbox-provider-checkbox:
milestone: none → 0.34.0
Revision history for this message
Colin Ian King (colin-king) wrote :

Since this is a plainbox / checkbox bug, can this be assigned to an owner of that project as I believe I have fulfilled the requirement for stress-ng on this side of the issue.

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Sure, thanks Colin

Changed in plainbox-provider-checkbox:
assignee: Colin Ian King (colin-king) → Sylvain Pineau (sylvain-pineau)
Changed in plainbox-provider-checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.