예제 #1
0
def TestRaidSpeed(testdir=None):
    print "Testing RaidSpeed\n"
    if not testdir:
        testdir = "/testdir"
    diskspace = MyDiskAPI.isDirMounted(testdir)
    if diskspace == 0:
        print "\"/testspeed\" not mounted, you should mount your disk/raid to /testspeed dir manually."
    elif diskspace <0:
        print "ERROR:someting wrong Encountered. check your Operation system."
    elif diskspace < 51606140:
        print "your test device is not large enough. it should be more then 50G for test."
    else:
        runReadWrite(testdir)
    print ""
예제 #2
0
def TestRaidSpeed(testdir=None):
    print "Testing RaidSpeed\n"
    if not testdir:
        testdir = "/testdir"
    diskspace = MyDiskAPI.isDirMounted(testdir)
    if diskspace == 0:
        print "\"/testspeed\" not mounted, you should mount your disk/raid to /testspeed dir manually."
    elif diskspace < 0:
        print "ERROR:someting wrong Encountered. check your Operation system."
    elif diskspace < 51606140:
        print "your test device is not large enough. it should be more then 50G for test."
    else:
        runReadWrite(testdir)
    print ""
예제 #3
0
def TestUdevBug():
    res = 0
    disklist = MyDiskAPI.getDiskList()
    print "Testing udevadm bug\n\nTest Complate :    ",
    for i in range(1000):
        print "\b\b\b\b%2d%%"%(i/10),
        #time.sleep(0.01)
        sys.stdout.flush()
        for device in disklist:
            rv = MyAPI.runCommand("udevadm info -a -p /sys/block/%s " % device , output=True, root=True)
            if not rv["Status"]==0:
                res=res+1
    print "\b\b\b\bDone"
    print "pass the test with result:%d\n"%res
    print ""
    return 0
예제 #4
0
def TestUdevBug():
    res = 0
    disklist = MyDiskAPI.getDiskList()
    print "Testing udevadm bug\n\nTest Complate :    ",
    for i in range(1000):
        print "\b\b\b\b%2d%%" % (i / 10),
        #time.sleep(0.01)
        sys.stdout.flush()
        for device in disklist:
            rv = MyAPI.runCommand("udevadm info -a -p /sys/block/%s " % device,
                                  output=True,
                                  root=True)
            if not rv["Status"] == 0:
                res = res + 1
    print "\b\b\b\bDone"
    print "pass the test with result:%d\n" % res
    print ""
    return 0