Exemplo n.º 1
0
def run_test():
    test_name = "Watchdog run test"
    common_test_lib.print_start(test_name)
    common_test_lib.clear_env()
    execute_watchdog(deamon=0)
    executed = wait_ibofos_execution()
    common_test_lib.terminate_ibofos(ibof_root, subprocess.DEVNULL)
    common_test_lib.clear_env()
    common_test_lib.print_result(test_name, executed)
    return executed
Exemplo n.º 2
0
def log_path_test():
    test_name = "Log path test"
    common_test_lib.print_start(test_name)
    common_test_lib.clear_env()
    log_file_name = "watchdog_test.log"
    execute_watchdog(deamon=1, log_path=log_file_name)
    wait_deamonize()
    found = find_log_file(log_file_name)
    common_test_lib.terminate_ibofos(ibof_root, subprocess.DEVNULL)
    common_test_lib.clear_env()
    success = (found == True)
    common_test_lib.print_result(test_name, success)
    return success
Exemplo n.º 3
0
        stdout_type = subprocess.STDOUT
    else:
        stdout_type = subprocess.DEVNULL

    bringup_argument = {
        'log_path': args.log_path,
        'ibof_root': pos_root,
        'transport': args.transport,
        'target_ip': args.fabric_ip,
        'volume_size': volume_size,
        'stdout_type': stdout_type
    }
    print(args)
    return bringup_argument


if __name__ == "__main__":
    parse_arguments()
    bringup_argument = get_argument()
    common_test_lib.clear_env()
    success = write_test()
    success &= write_out_range_fail_test()
    success &= verify_test()
    success &= read_test()
    success &= read_out_range_fail_test()

    if (success):
        exit(0)
    else:
        exit(-1)
Exemplo n.º 4
0
def clear_env():    
    pos_util.pci_rescan()
    common_test_lib.clear_env()
    subprocess.call("rm /dev/shm/* -rf", shell="True")