[Ocfs2-test-devel] [PATCH 44/59] flock-test: make two nodes to do the test

Eric Ren zren at suse.com
Tue Sep 22 22:33:23 PDT 2015


Reviewed-by: Eric Ren <zren at suse.com>

Thanks,
Eric Ren

On Mon, Sep 14, 2015 at 10:44:30AM +0800, Junxiao Bi wrote: 
> Flock test needs two nodes, get the first two nodes from nodes list
> to do the test.
> 
> Signed-off-by: Junxiao Bi <junxiao.bi at oracle.com>
> ---
>  programs/flock_tests/run_flock_unit_test.py |   11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/programs/flock_tests/run_flock_unit_test.py b/programs/flock_tests/run_flock_unit_test.py
> index 5f13255..9fde207 100644
> --- a/programs/flock_tests/run_flock_unit_test.py
> +++ b/programs/flock_tests/run_flock_unit_test.py
> @@ -38,7 +38,7 @@ uname = os.uname()
>  lhostname = str(socket.gethostname())
>  logfile = config.LOGFILE
>  interface = 'eth0'
> -procs = 1
> +procs = 2
>  cmd = config.BINDIR+'/flock_unit_test'
>  #
>  Usage = """
> @@ -126,13 +126,12 @@ if __name__=='__main__':
>  		logfile = options.logfile
>  
>  	if options.nodelist:
> -		nodelist = options.nodelist.split(',')
> -		nodelen = len(nodelist)
> -		procs = nodelen
> +		tmplist = options.nodelist.split(',')
> +		nodelen = len(tmplist)
>  		if nodelen == 1:
> -			nodelist = nodelist.append(options.nodelist)
> +			options.nodelist = tmplist[0] + "," + tmplist[0]
>  		else:
> -			nodelist = options.nodelist.split(',')
> +			options.nodelist = tmplist[0] + "," + tmplist[1]
>  	else:
>  		if not options.cleanup:
>  			parser.error('Invalid node list.')
> -- 
> 1.7.9.5
> 
> 
> _______________________________________________
> Ocfs2-test-devel mailing list
> Ocfs2-test-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-test-devel
> 



More information about the Ocfs2-test-devel mailing list