Analyze a failed test using the pre-generated knowledge base. Must call init_kb() first to load the knowledge base. Returns a hash ref with analysis results, or undef if test not found.
Features: - Matches output patterns (from both test output and full log) with per-pattern classification - Applies platform-specific factors (s390x, ppc64le, aarch64) from test context - Priority resolution: tool_version_mismatch overrides kernel_bug when patterns match
Arguments: test - test name (e.g. "xfs/001") fstype - filesystem type output - test output content (for pattern and context matching) fullog - .full log content (for tool version mismatch detection)
Download a knowledge base YAML file from URL. Uses Mojo::UserAgent with caching to avoid re-downloading. Returns parsed YAML data structure, or undef on failure.
Load knowledge bases from URLs specified by XFSTESTS_AI_KB and XFSTESTS_QE_KB variables. Downloads via HTTP (following the LTP::WhiteList pattern), parses YAML, then merges QE-maintained KB on top (higher priority). QE entries override scalar fields and prepend to list fields. Returns true if at least one knowledge base was loaded successfully.
Merge QE knowledge base into the main cache. For each test entry: - Scalar fields (description, subsystem, bug_probability, classification): QE value overrides AI value - List fields (common_causes, investigation_steps, output_patterns): QE entries are prepended (shown first = higher priority) - platform_factors: merged per-architecture, QE overrides AI per-arch
Match test output against known patterns from the knowledge base. Returns list of matched pattern hashes with bug_probability and classification.
Apply per-pattern bug_probability and classification overrides. Priority: tool_version_mismatch > test_bug > config_problem > kernel_bug. If multiple patterns match, the highest-priority classification wins.
Parse test output header to extract platform context (arch, kernel, mount options, mkfs options). xfstests output typically starts with lines like: PLATFORM -- Linux/x86_64 hostname 6.x.y-default #1 SMP ... MOUNT_OPTIONS -- rw,relatime,attr2,inode64,... MKFS_OPTIONS -- -f /dev/vdb1
Apply platform-specific adjustments from knowledge base. Merges extra_causes, extra_steps, and overrides bug_probability if defined.
Format knowledge base analysis result into readable text for record_info.
Arguments: kb_result - hash ref from analyze_by_knowledgebase