Home | History | Annotate | Download | only in acl
      1 '''
      2 	Access Control Lists stressing script
      3 	To lauch on the first client
      4 	Aurelien Charbon - Bull SA
      5 '''
      6 
      7 from random_gen import *
      8 from optparse import OptionParser
      9 import commands
     10 import os
     11 import random
     12 
     13 alphabet='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789_-()'
     14 t_alphabet=len(alphabet)
     15 
     16 test = RandomGen()
     17 
     18 parser = OptionParser()
     19 parser.set_defaults(nbfiles=5,nbusers=5,nbgroups=5,nloop=100 )
     20 parser.add_option("-n","--nloop", dest="nloop",type="int", help="number of loop to do in the test")
     21 parser.add_option("-p", "--path", dest="path",help="path on which the test is executed")
     22 parser.add_option("-f", "--nbfiles", dest="nbfiles",type="int",help="nb of files to do the test (default=5)")
     23 parser.add_option("-u", "--nbusers", dest="nbusers",type="int",help="nb of users (default=5)")
     24 parser.add_option("-g", "--nbgrp", dest="nbgroups",type="int",help="nb of groups (default=5)")
     25 (options, args) = parser.parse_args()
     26 
     27 test.createFile(options.path,options.nbfiles)
     28 test.getNUserList(options.nbusers)
     29 test.getNGroupList(options.nbgroups)
     30 for i in range (options.nloop):
     31 	test.randomOp(options.path)
     32