1// This file contains various failure test cases related to the structure of 2// a bytecode file. 3 4//===--------------------------------------------------------------------===// 5// Version 6//===--------------------------------------------------------------------===// 7 8// RUN: not mlir-opt %S/invalid-structure-version.mlirbc 2>&1 | FileCheck %s --check-prefix=VERSION 9// VERSION: bytecode version 127 is newer than the current version {{[0-9]+}} 10 11//===--------------------------------------------------------------------===// 12// Producer 13//===--------------------------------------------------------------------===// 14 15// RUN: not mlir-opt %S/invalid-structure-producer.mlirbc 2>&1 | FileCheck %s --check-prefix=PRODUCER 16// PRODUCER: malformed null-terminated string, no null character found 17 18//===--------------------------------------------------------------------===// 19// Section 20//===--------------------------------------------------------------------===// 21 22//===--------------------------------------------------------------------===// 23// Missing 24 25// RUN: not mlir-opt %S/invalid-structure-section-missing.mlirbc 2>&1 | FileCheck %s --check-prefix=SECTION_MISSING 26// SECTION_MISSING: missing data for top-level section: String (0) 27 28//===--------------------------------------------------------------------===// 29// ID 30 31// RUN: not mlir-opt %S/invalid-structure-section-id-unknown.mlirbc 2>&1 | FileCheck %s --check-prefix=SECTION_ID_UNKNOWN 32// SECTION_ID_UNKNOWN: invalid section ID: 127 33 34//===--------------------------------------------------------------------===// 35// Length 36 37// RUN: not mlir-opt %S/invalid-structure-section-length.mlirbc 2>&1 | FileCheck %s --check-prefix=SECTION_LENGTH 38// SECTION_LENGTH: attempting to parse a byte at the end of the bytecode 39 40//===--------------------------------------------------------------------===// 41// Duplicate 42 43// RUN: not mlir-opt %S/invalid-structure-section-duplicate.mlirbc 2>&1 | FileCheck %s --check-prefix=SECTION_DUPLICATE 44// SECTION_DUPLICATE: duplicate top-level section: String (0) 45