[LU-8942] bad test in sanityn test_80b Created: 15/Dec/16  Updated: 05/May/22  Resolved: 05/May/22

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

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: James Nunez (Inactive)
Resolution: Duplicate Votes: 0
Labels: test, test_script_improvements

Issue Links:
Related
is related to LU-8845 sanityn test_80b: test failed to resp... Resolved
is related to LU-15358 Fix shellcheck errors Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

In sanityn test_80b() the condition rc != 0 || rc != 16 is true for all values of rc:

         	while true; do
                        mdt_idx=$((RANDOM % MDSCOUNT))
			$LFS migrate -m $mdt_idx $migrate_dir1 2&>/dev/null ||
                                rc=$?
			[ $rc -ne 0 -o $rc -ne 16 ] || break
                done

Some grepping turned up three more tests:

lustre-release$ git grep --line-number -E '\$[^ ]+ -ne 0 -o \$[^ ]+ -ne '
lustre/tests/sanityn.sh:3448:                   [ $rc -ne 0 -o $rc -ne 16 ] || break
lustre/tests/sanityn.sh:3483:           [ $rc1 -ne 0 -o $rc1 -ne 1 ] || {
lustre/tests/sanityn.sh:3497:                   [ $rc1 -ne 0 -o $rc1 -ne 1 ] || {
lustre/tests/sanityn.sh:3509:                   [ $rc1 -ne 0 -o $rc1 -ne 1 ] || {


 Comments   
Comment by James Nunez (Inactive) [ 07/Mar/22 ]

A patch for this bad check is at https://review.whamcloud.com/46706 submitted under LU-15358.

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