Пример #1
0
def get_target():
    mount_point = get_mountpoint()
    if mount_point != None:
        top_dir = tpa.append_path([mount_point])[0]
        target = str(top_dir) + "/" + str(file)
    else:
        target = None
    return target
Пример #2
0
def get_target_paths():
    mount_path = []
    mount_points = rs_plfs_config_query.get_mountpoints()
    if len(mount_points) > 0:
        for mnt in mount_points:
            top_dir = tpa.append_path([mnt])[0]
            target = str(top_dir) + "/" + str(file)
            mount_path.append(target)
    else:
        mount_path = None
    return mount_path
Пример #3
0
        # Get all mount points
        mount_points = pcq.get_mountpoints()
        if len(mount_points) <= 0:
            raise plfsMntError("unable to get mount point.\n")

        # overall_stat informs  the user that at least one test has failed over
        # multiple mounts.
        overall_stat = "PASSED"

        # Loop through all mount points
        for mount_point in mount_points:
            # Test status. This will be printed out at the end and will be used to
            # determine if the test passed when check_results.py is called.
            test_stat = "PASSED"
            # Check for rs_mnt_append_path in experiment_management
            top_dir = tpa.append_path([mount_point])[0]
            # Define two targets
            file1 = str(curr_dir) + "/truncate_o_control"
            file2 = str(top_dir) + "/" + os.getenv("MY_MPI_HOST") + ".truncate_o_test"

            # variable to keep track of if we need to issue the unmount command.
            need_to_umount = True

            # Mount the plfs mount point
            print(" ")
            print("Mounting " + str(mount_point))
            # Flush the output so that the output in the file is somewhat
            # consistent in time.
            sys.stdout.flush()
            sys.stderr.flush()
            p = subprocess.Popen(