<commit_before>#
# Copyright (c) 2014, 2015 by Delphix. All rights reserved.
#

import re
import sys

#
# This script parses the stdout of zfstest, which has this format:
#
# Test: /path/to/testa (run as root) [00:00] [PASS]
# Test: /path/to/testb (run as jkennedy) [00:00] [PASS]
# Test: /path/to/testc (run as root) [00:00] [FAIL]
# [...many more results...]
#
# Results Summary
# FAIL       4
# PASS     450
#
# Running Time:   01:15:33
# Percent passed: 99.1%
# Log directory:  /var/tmp/test_results/20130720T050603
#

summary = {
    'total': float(0),
    'passed': float(0),
    'logfile': "Could not determine logfile location."
}

#
# These tests are known to fail, thus we use this list to prevent these
# failures from failing the job as a whole; only unexpected failures
# bubble up to cause this script to exit with a non-zero exit status.
#
known = {
    'acl/nontrivial/zfs_acl_chmod_inherit_003_pos': 'FAIL',
    'casenorm/insensitive_formd_delete': 'FAIL',
    'casenorm/insensitive_none_delete': 'FAIL',
    'casenorm/mixed_formd_delete': 'FAIL',
    'casenorm/mixed_formd_lookup': 'FAIL',
    'casenorm/sensitive_formd_delete': 'FAIL',
    'cli_root/zfs_mount/zfs_mount_009_neg': 'FAIL',
    'cli_root/zfs_mount/zfs_mount_all_001_pos': 'FAIL',
    'cli_root/zfs_property/zfs_written_property_001_pos': 'FAIL',
    'cli_root/zfs_snapshot/zfs_snapshot_009_pos': 'FAIL',
    'cli_root/zpool_get/zpool_get_002_pos': 'FAIL',
    'grow_replicas/grow_replicas_001_pos': 'FAIL',
    'inheritance/inherit_001_pos': 'FAIL',
    'mdb/mdb_001_pos': 'FAIL',
    'refreserv/refreserv_004_pos': 'FAIL',
    'rootpool/rootpool_002_neg': 'FAIL',
    'redundancy/redundancy_001_pos': 'FAIL',
    'redundancy/redundancy_002_pos': 'FAIL',
    'redundancy/redundancy_003_pos': 'FAIL',
    'rsend/rsend_008_pos': 'FAIL',
    'rsend/rsend_009_pos': 'FAIL',
    'slog/slog_013_pos': 'FAIL',
    'slog/slog_014_pos': 'FAIL',
    'zvol/zvol_misc/zvol_misc_002_pos': 'FAIL',
    'zvol/zvol_swap/zvol_swap_004_pos': 'FAIL'<commit_msg>zfs_mount tests fixed by 4521<commit_after>#
# Copyright (c) 2014, 2015 by Delphix. All rights reserved.
#

import re
import sys

#
# This script parses the stdout of zfstest, which has this format:
#
# Test: /path/to/testa (run as root) [00:00] [PASS]
# Test: /path/to/testb (run as jkennedy) [00:00] [PASS]
# Test: /path/to/testc (run as root) [00:00] [FAIL]
# [...many more results...]
#
# Results Summary
# FAIL       4
# PASS     450
#
# Running Time:   01:15:33
# Percent passed: 99.1%
# Log directory:  /var/tmp/test_results/20130720T050603
#

summary = {
    'total': float(0),
    'passed': float(0),
    'logfile': "Could not determine logfile location."
}

#
# These tests are known to fail, thus we use this list to prevent these
# failures from failing the job as a whole; only unexpected failures
# bubble up to cause this script to exit with a non-zero exit status.
#
known = {
    'acl/nontrivial/zfs_acl_chmod_inherit_003_pos': 'FAIL',
    'casenorm/insensitive_formd_delete': 'FAIL',
    'casenorm/insensitive_none_delete': 'FAIL',
    'casenorm/mixed_formd_delete': 'FAIL',
    'casenorm/mixed_formd_lookup': 'FAIL',
    'casenorm/sensitive_formd_delete': 'FAIL',
    'cli_root/zfs_property/zfs_written_property_001_pos': 'FAIL',
    'cli_root/zfs_snapshot/zfs_snapshot_009_pos': 'FAIL',
    'cli_root/zpool_get/zpool_get_002_pos': 'FAIL',
    'grow_replicas/grow_replicas_001_pos': 'FAIL',
    'inheritance/inherit_001_pos': 'FAIL',
    'mdb/mdb_001_pos': 'FAIL',
    'refreserv/refreserv_004_pos': 'FAIL',
    'rootpool/rootpool_002_neg': 'FAIL',
    'redundancy/redundancy_001_pos': 'FAIL',
    'redundancy/redundancy_002_pos': 'FAIL',
    'redundancy/redundancy_003_pos': 'FAIL',
    'rsend/rsend_008_pos': 'FAIL',
    'rsend/rsend_009_pos': 'FAIL',
    'slog/slog_013_pos': 'FAIL',
    'slog/slog_014_pos': 'FAIL',
    'zvol/zvol_misc/zvol_misc_002_pos': 'FAIL',
    'zvol/zvol_swap/zvol_swap_004_pos': 'FAIL'
{'fraction_non_alphanumeric': 0.14502273875694796, 'fraction_numerical': 0.05457301667508843, 'mean_word_length': 4.314093959731544, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3634223', 'n_tokens_mistral': 1694, 'n_tokens_neox': 1536, 'n_words': 327}