Ejemplo n.º 1
0
def subsystem_namespace_mapping_test(trtype, traddr, subsystem_cnt,
                                     volume_cnt):
    nvmf = nvmf_common.Nvmf("[ Subsystem-Namespace Mapping ", True,
                            spdk_rpc_path)

    bringup_argument = {
        'log_path': args.log_path,
        'ibof_root': ibof_root,
        'transport': trtype,
        'target_ip': traddr,
        'subsystem_cnt': subsystem_cnt,
        'volume_cnt': volume_cnt,
        'stdout_type': stdout_type
    }

    common_test_lib.bringup_multiple_volume(**bringup_argument)

    map = nvmf.get_subsystem_ns_map()
    ret = nvmf.check_subsystem_ns_mapping(map, "subsystem1", "bdev3")
    success = (ret == True)
    ret = nvmf.check_subsystem_ns_mapping(map, "subsystem3", "bdev3")
    success &= (ret == False)

    common_test_lib.terminate_ibofos(ibof_root, stdout_type)
    common_test_lib.print_result("[ Subsystem-Namespace Mapping Test ]",
                                 success)
    return success
Ejemplo n.º 2
0
def stop_during_io(read_or_write):
    global bringup_argument
    for sleep_time in range(5, 10):
        test_name = "STOP During IO" + str(sleep_time)
        common_test_lib.print_start(test_name)
        common_test_lib.bringup_multiple_volume(**bringup_argument)

        process = execute_fio_pipe(readwrite=read_or_write, offset=0, verify="0")
        time.sleep(sleep_time)

        
        pos_util.pci_detach(nvme_device_0)
        print("Device Detached!!!!!")
        time.sleep(sleep_time * 0.1)

        pos_util.pci_detach(nvme_device_1)
        print("Other Device Detached!!!!!")

        ret = process.wait()

        clear_env()

        #fio can failed by floating point 0 issue. it is natural. 
        #if there is no hang issue, just pass.
        common_test_lib.print_result(test_name, True)
Ejemplo n.º 3
0
def unmount_volume_during_io(read_or_write):

    for sleep_time in range(5,10):
        test_name = "Unmount During IO" + str(sleep_time)
        common_test_lib.print_start(test_name)
        common_test_lib.bringup_multiple_volume(**bringup_argument)
        verify_flag = "1"
        if("read" in read_or_write):
            verify_flag = "0"
        process = execute_fio_pipe(readwrite=read_or_write, offset=0, verify=verify_flag)

        time.sleep(7 + sleep_time)

        print("Volume Unmounted!!!!!")
        subprocess.call(ibof_cli + " volume unmount --name vol1 --array POSArray", shell="True")

        ret = process.wait()

        clear_env()
        common_test_lib.print_result(test_name, True)
Ejemplo n.º 4
0
def detaching_device_during_io(read_or_write):

    for sleep_time in range(5,10):
        test_name = "Detaching During IO" + str(sleep_time)
        common_test_lib.print_start(test_name)
        common_test_lib.bringup_multiple_volume(**bringup_argument)
        verify_flag = "1"
        if("read" in read_or_write):
            verify_flag = "0"
        process = execute_fio_pipe(readwrite=read_or_write, offset=0, verify=verify_flag)

        time.sleep(7 + sleep_time)

        pos_util.pci_detach(nvme_device_0)

        print("Device Detached!!!!!")

        ret = process.wait()

        clear_env()
        common_test_lib.print_result(test_name, ret == 0)