[LU-9466] Calls to ‘error’ should have an error message Created: 08/May/17  Updated: 09/Feb/18  Resolved: 09/Feb/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.11.0

Type: Improvement Priority: Minor
Reporter: James Nunez (Inactive) Assignee: Saurabh Tandan (Inactive)
Resolution: Fixed Votes: 0
Labels: easy, test

Issue Links:
Related
is related to LU-7105 sanityn test_28 fails with 'error() w... Open
Rank (Obsolete): 9223372036854775807

 Description   

In the Lustre test suites, we call the error() routine when we want a test to stop execution and mark the tests as ‘FAIL’. If the call to error is called with a string, error message, that string is printed as the reason for the failure to give the user an indication of why the test failed.

When a test suite call fails and error is called without a message, the reason for the test failure is listed as

'error() without useful message, please fix' 

There are many cases where we call error() with no error message. This needs to be corrected.

The following tests have one or more call s to error() with no error message:
sanity tests 24e, f, g, h, I, j, k, l, m, p, u, 25a, b, 26a, b, 27a, d, n, r, 28, 30*, 31a, b, c, d, e, 32*, 34*, 35*, …
sanityn tests 1*, 2*, 5, 11, 13, 26a, 28, 51d

Here are few examples of the test suites and tests that need an error message:

 857 test_24e() {
…
 863         $CHECKSTAT -a $DIR/R5a/f || error
 864         $CHECKSTAT -t file $DIR/R5b/g || error
…
 868 test_24f() {
…
 873         $CHECKSTAT -a $DIR/R6a/f || error
 874         $CHECKSTAT -t file $DIR/R6b/g || error
…
 964 test_24p() {
…
 969         $CHECKSTAT -a $DIR/R12a || error
 970         $CHECKSTAT -t dir $DIR/R12b || error
…



 Comments   
Comment by Peter Jones [ 14/Dec/17 ]

Saurabh

Could you please look into this one

Thanks

Peter

Comment by Gerrit Updater [ 29/Jan/18 ]

Saurabh Tandan (saurabh.tandan@intel.com) uploaded a new patch: https://review.whamcloud.com/31078
Subject: LU-9466 tests: Error message for empty "error" calls
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 7c65e296a6ff24c2864fe914d54ab5c89d9474ee

Comment by Gerrit Updater [ 09/Feb/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/31078/
Subject: LU-9466 tests: Error message for empty "error" calls
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: db25bddf374954b5c835e3784c75fc88e1dc36d6

Comment by Peter Jones [ 09/Feb/18 ]

Landed for 2.11

Generated at Sat Feb 10 02:26:26 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.