1f08c3bdfSopenharmony_ci#!/usr/bin/env python3 2f08c3bdfSopenharmony_ci''' 3f08c3bdfSopenharmony_ci Access Control Lists stressing script 4f08c3bdfSopenharmony_ci To lauch on the first client 5f08c3bdfSopenharmony_ci Aurelien Charbon - Bull SA 6f08c3bdfSopenharmony_ci''' 7f08c3bdfSopenharmony_ci 8f08c3bdfSopenharmony_cifrom random_gen import * 9f08c3bdfSopenharmony_cifrom optparse import OptionParser 10f08c3bdfSopenharmony_ciimport subprocess 11f08c3bdfSopenharmony_ciimport os 12f08c3bdfSopenharmony_ciimport random 13f08c3bdfSopenharmony_ci 14f08c3bdfSopenharmony_cialphabet='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789_-()' 15f08c3bdfSopenharmony_cit_alphabet=len(alphabet) 16f08c3bdfSopenharmony_ci 17f08c3bdfSopenharmony_citest = RandomGen() 18f08c3bdfSopenharmony_ci 19f08c3bdfSopenharmony_ciparser = OptionParser() 20f08c3bdfSopenharmony_ciparser.set_defaults(nbfiles=5,nbusers=5,nbgroups=5,nloop=100 ) 21f08c3bdfSopenharmony_ciparser.add_option("-n","--nloop", dest="nloop",type="int", help="number of loop to do in the test") 22f08c3bdfSopenharmony_ciparser.add_option("-p", "--path", dest="path",help="path on which the test is executed") 23f08c3bdfSopenharmony_ciparser.add_option("-f", "--nbfiles", dest="nbfiles",type="int",help="nb of files to do the test (default=5)") 24f08c3bdfSopenharmony_ciparser.add_option("-u", "--nbusers", dest="nbusers",type="int",help="nb of users (default=5)") 25f08c3bdfSopenharmony_ciparser.add_option("-g", "--nbgrp", dest="nbgroups",type="int",help="nb of groups (default=5)") 26f08c3bdfSopenharmony_ci(options, args) = parser.parse_args() 27f08c3bdfSopenharmony_ci 28f08c3bdfSopenharmony_citest.createFile(options.path,options.nbfiles) 29f08c3bdfSopenharmony_citest.getNUserList(options.nbusers) 30f08c3bdfSopenharmony_citest.getNGroupList(options.nbgroups) 31f08c3bdfSopenharmony_cifor i in range (options.nloop): 32f08c3bdfSopenharmony_ci test.randomOp(options.path) 33