{"record":{"id":"41d7ba95dd793c1e","repo":"rust-lang/rust","slug":"invalid-input-data-path-path-nif-test-data-ha","errorCode":null,"errorMessage":"Invalid input data path: '{path}'\\nIf test data has not been generated for this test yet, consider using the `--bless` option.","messagePattern":"Invalid input data path: '(.+?)'\\\\nIf test data has not been generated for this test yet, consider using the `--bless` option\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"critical","filePath":"src/etc/lldb_batchmode/common.py","lineNumber":468,"sourceCode":"    A map of type names to types. Contains all types present in the test's variables, including the\n    types of fields and child objects.\n    \"\"\"\n\n    # If we ever decide that it makes sense to check the same variable twice at the same breakpoint\n    # this will need to be converted to a list\n    breakpoints: list[dict[str, Variable]] = field(default_factory=list)\n    \"\"\"Each element corresponds to one stopping point in the test. The element itself is a\n    dictionary mapping variable names to their respective test data.\"\"\"\n\n    @staticmethod\n    def initialize() -> \"TargetData\":\n        result = TargetData()\n        path = os.environ[\"LLDB_BATCHMODE_INPUT_DATA_PATH\"]\n        if not os.path.isfile(path):\n            if BLESS:\n                return result\n            else:\n                raise Exception(\n                    f\"Invalid input data path: '{path}'\\nIf test data has not been \\\ngenerated for this test yet, consider using the `--bless` option.\"\n                )\n\n        if BLESS:\n            return result\n\n        with open(path, \"r\") as f:\n            try:\n                result = from_dict(TargetData, json.load(f))\n            except json.decoder.JSONDecodeError:\n                print(\"Warning: Malformed input data, reverting to default\")\n\n        return result\n\n    def save_blessing(self, metadata: BlessMetadata):\n        \"\"\"Writes the entirety of `self` to the env var `LLDB_BATCHMODE_INPUT_DATA_PATH`, which is\n        set by `compiletest` before running `lldb_batchmode. Used to finalize changes made by one or","sourceCodeStart":450,"sourceCodeEnd":486,"githubUrl":"https://github.com/rust-lang/rust/blob/7088e4b63a9516ebfbfe2ab2d999cf01a528ac14/src/etc/lldb_batchmode/common.py#L450-L486","documentation":"Raised by lldb_batchmode's TargetData.initialize when the env var LLDB_BATCHMODE_INPUT_DATA_PATH points at a path that is not a regular file, in non-bless mode. The harness needs pre-generated reference JSON to compare LLDB output against; without it the test cannot run. The message itself suggests re-running with --bless to generate the data.","triggerScenarios":"Running a debuginfo (lldb) test via compiletest without having blessed it first: the path is unset, points at a stale/missing location, or the file was deleted. The os.path.isfile(path) check at line 464 returns False and BLESS is False, so the exception fires.","commonSituations":"Fresh checkout without blessed lldb test data; the test's output directory was cleaned; the env var was overridden by a wrapper script to an incorrect path.","solutions":["Run the test with the --bless (update-references / bless) flag so TargetData.initialize returns empty and from_lldb writes reference data.","Verify LLDB_BATCHMODE_INPUT_DATA_PATH is set by compiletest and points at a real, readable JSON file.","Re-run compiletest normally after blessing to confirm the path now resolves."],"exampleFix":"# before (no blessed data, test fails to start)\ncompiletest --suite debuginfo-lldb\n# after\ncompiletest --suite debuginfo-lldb --bless\n","handlingStrategy":"validation","validationCode":"import os\npath = os.environ.get(\"LLDB_BATCHMODE_INPUT_DATA_PATH\")\nif not path or not os.path.isfile(path):\n    raise SystemExit(\n        \"LLDB_BATCHMODE_INPUT_DATA_PATH missing or invalid; \"\n        \"run with --bless to generate reference data first\"\n    )\n","typeGuard":null,"tryCatchPattern":"try:\n    data = TargetData.initialize()\nexcept Exception as e:\n    if \"Invalid input data path\" in str(e):\n        print(\"Re-run the suite with --bless to generate LLDB reference data\")\n        raise SystemExit(2)\n    raise\n","preventionTips":["Bless new lldb debuginfo tests once on a machine with a working LLDB before committing.","Do not delete the generated JSON under the test output dir; it is the golden reference."],"tags":["lldb","debuginfo","testing","rust","blessing"],"backgroundTag":null,"analyzedSha":"7088e4b63a9516ebfbfe2ab2d999cf01a528ac14","analyzedAt":"2026-08-10T14:17:03.603Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}