[LU-336] Function module_loaded in test-framework.sh returns false positives Created: 17/May/11  Updated: 06/Jun/11  Resolved: 06/Jun/11

Status: Closed
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.1.0
Fix Version/s: Lustre 2.1.0

Type: Bug Priority: Minor
Reporter: Prakash Surya (Inactive) Assignee: Jian Yu
Resolution: Fixed Votes: 0
Labels: None
Environment:

RHEL6 based


Severity: 3
Rank (Obsolete): 5004

 Description   

The function module_loaded can easily produce false positives based on it's lenient way of grep'ing the output of lsmod.

Tightening up the regex can improve upon this.

For example, if checking to see if the 'ost' module is loaded.. It will report true if another module is already loaded and has 'ost' anywhere in its name (i.e. vhost_net).

Function's match criteria could mort strict to avoid this kind of problem:

module_loaded() {
        lsmod | grep ^$1 # Or perhaps even '^\b$1\b'
}

I will submit a patch to gerrit soon.



 Comments   
Comment by Prakash Surya (Inactive) [ 17/May/11 ]

Patch submitted: http://review.whamcloud.com/#change,558

Comment by Peter Jones [ 18/May/11 ]

Yu Jian

I think that you might be a more appropriate second inspector than Brian Murrell for this patch

Regards

Peter

Comment by Prakash Surya (Inactive) [ 03/Jun/11 ]

Patch has been merged. Issue resolved.

Comment by Build Master (Inactive) [ 03/Jun/11 ]

Integrated in lustre-master » x86_64,client,el6,inkernel #150
LU-336 Tighten matching criteria in module_loaded

Oleg Drokin : ca227f930e41c7598c6cf5b563d65fb6605e306f
Files :

  • lustre/tests/test-framework.sh
Comment by Build Master (Inactive) [ 03/Jun/11 ]

Integrated in lustre-master » x86_64,client,sles11,inkernel #150
LU-336 Tighten matching criteria in module_loaded

Oleg Drokin : ca227f930e41c7598c6cf5b563d65fb6605e306f
Files :

  • lustre/tests/test-framework.sh
Comment by Build Master (Inactive) [ 03/Jun/11 ]

Integrated in lustre-master » i686,client,el5,inkernel #150
LU-336 Tighten matching criteria in module_loaded

Oleg Drokin : ca227f930e41c7598c6cf5b563d65fb6605e306f
Files :

  • lustre/tests/test-framework.sh
Comment by Build Master (Inactive) [ 03/Jun/11 ]

Integrated in lustre-master » i686,client,el5,ofa #150
LU-336 Tighten matching criteria in module_loaded

Oleg Drokin : ca227f930e41c7598c6cf5b563d65fb6605e306f
Files :

  • lustre/tests/test-framework.sh
Comment by Build Master (Inactive) [ 03/Jun/11 ]

Integrated in lustre-master » x86_64,client,ubuntu1004,inkernel #150
LU-336 Tighten matching criteria in module_loaded

Oleg Drokin : ca227f930e41c7598c6cf5b563d65fb6605e306f
Files :

  • lustre/tests/test-framework.sh
Comment by Build Master (Inactive) [ 03/Jun/11 ]

Integrated in lustre-master » i686,client,el6,inkernel #150
LU-336 Tighten matching criteria in module_loaded

Oleg Drokin : ca227f930e41c7598c6cf5b563d65fb6605e306f
Files :

  • lustre/tests/test-framework.sh
Comment by Build Master (Inactive) [ 03/Jun/11 ]

Integrated in lustre-master » x86_64,server,el6,inkernel #150
LU-336 Tighten matching criteria in module_loaded

Oleg Drokin : ca227f930e41c7598c6cf5b563d65fb6605e306f
Files :

  • lustre/tests/test-framework.sh
Comment by Build Master (Inactive) [ 03/Jun/11 ]

Integrated in lustre-master » x86_64,client,ubuntu1004,ofa #150
LU-336 Tighten matching criteria in module_loaded

Oleg Drokin : ca227f930e41c7598c6cf5b563d65fb6605e306f
Files :

  • lustre/tests/test-framework.sh
Comment by Build Master (Inactive) [ 03/Jun/11 ]

Integrated in lustre-master » i686,server,el5,inkernel #150
LU-336 Tighten matching criteria in module_loaded

Oleg Drokin : ca227f930e41c7598c6cf5b563d65fb6605e306f
Files :

  • lustre/tests/test-framework.sh
Comment by Build Master (Inactive) [ 03/Jun/11 ]

Integrated in lustre-master » i686,server,el5,ofa #150
LU-336 Tighten matching criteria in module_loaded

Oleg Drokin : ca227f930e41c7598c6cf5b563d65fb6605e306f
Files :

  • lustre/tests/test-framework.sh
Comment by Build Master (Inactive) [ 03/Jun/11 ]

Integrated in lustre-master » x86_64,client,el5,inkernel #150
LU-336 Tighten matching criteria in module_loaded

Oleg Drokin : ca227f930e41c7598c6cf5b563d65fb6605e306f
Files :

  • lustre/tests/test-framework.sh
Comment by Build Master (Inactive) [ 03/Jun/11 ]

Integrated in lustre-master » i686,server,el6,inkernel #150
LU-336 Tighten matching criteria in module_loaded

Oleg Drokin : ca227f930e41c7598c6cf5b563d65fb6605e306f
Files :

  • lustre/tests/test-framework.sh
Comment by Build Master (Inactive) [ 03/Jun/11 ]

Integrated in lustre-master » x86_64,server,el5,inkernel #150
LU-336 Tighten matching criteria in module_loaded

Oleg Drokin : ca227f930e41c7598c6cf5b563d65fb6605e306f
Files :

  • lustre/tests/test-framework.sh
Comment by Build Master (Inactive) [ 03/Jun/11 ]

Integrated in lustre-master » x86_64,client,el5,ofa #150
LU-336 Tighten matching criteria in module_loaded

Oleg Drokin : ca227f930e41c7598c6cf5b563d65fb6605e306f
Files :

  • lustre/tests/test-framework.sh
Comment by Build Master (Inactive) [ 03/Jun/11 ]

Integrated in lustre-master » x86_64,server,el5,ofa #150
LU-336 Tighten matching criteria in module_loaded

Oleg Drokin : ca227f930e41c7598c6cf5b563d65fb6605e306f
Files :

  • lustre/tests/test-framework.sh
Comment by Jian Yu [ 06/Jun/11 ]

Patch has been merged. Issue resolved.

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