def METHOD_NAME(umask):
    checkoutdir = os.path.join(str(tmpdir), "checkout-{}".format(umask))
    old_umask = os.umask(umask)
    try:
        test_values = []
        result = cli.run(project=project, args=["build", element_name])
        result.assert_success()
        result = cli.run(project=project, args=["artifact", "checkout", element_name, "--directory", checkoutdir])
        result.assert_success()
        with open(os.path.join(checkoutdir, "ls-l"), "r", encoding="utf-8") as f:
            for line in f.readlines():
                test_values.append(line.split()[0] + " " + line.split()[-1])
            return test_values
    finally:
        os.umask(old_umask)
        cli.remove_artifact_from_cache(project, element_name)