CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
72 lines
3.6 KiB
Plaintext
72 lines
3.6 KiB
Plaintext
## Test reading a valid z/OS archive.
|
|
# RUN: %python %p/Inputs/generate_zos_archive.py --output %t.valid.a \
|
|
# RUN: --symtab "foo.txt:0" --symtab "bar:0" --member foo.txt:abcd
|
|
# RUN: llvm-ar t %t.valid.a | FileCheck %s --check-prefix=LIST
|
|
# RUN: llvm-nm --print-armap %t.valid.a | FileCheck %s --check-prefix=SYMS
|
|
# RUN: llvm-ar p %t.valid.a foo.txt | FileCheck %s --check-prefix=CONTENT
|
|
|
|
# LIST: foo.txt
|
|
# SYMS: Archive map
|
|
# SYMS-NEXT: foo.txt in foo.txt
|
|
# SYMS-NEXT: bar in foo.txt
|
|
# CONTENT: abcd
|
|
|
|
## Test malformed terminator on member header.
|
|
# RUN: %python %p/Inputs/generate_zos_archive.py --output %t.bad_term.a \
|
|
# RUN: --member foo.txt --bad-terminator
|
|
# RUN: not llvm-ar t %t.bad_term.a 2>&1 | FileCheck %s --check-prefix=ERR-TERM
|
|
# ERR-TERM: terminator characters in archive member
|
|
|
|
## Test empty UID field on member header.
|
|
## We know that the member header starts at offset 8 because no
|
|
## symbol table name is generated.
|
|
# RUN: %python %p/Inputs/generate_zos_archive.py --output %t.empty_uid.a \
|
|
# RUN: --member foo.txt --empty-uid
|
|
# RUN: not llvm-ar t %t.empty_uid.a 2>&1 | FileCheck %s --check-prefix=ERR-UID
|
|
# ERR-UID: UID field is empty or contains only spaces in archive member header at offset 8
|
|
|
|
## Test leading space in member name.
|
|
# RUN: %python %p/Inputs/generate_zos_archive.py --output %t.empty_name.a \
|
|
# RUN: --member foo.txt --empty-name
|
|
# RUN: not llvm-ar t %t.empty_name.a 2>&1 | FileCheck %s --check-prefix=ERR-NAME
|
|
# ERR-NAME: name contains a leading space for archive member header
|
|
|
|
## Test truncated z/OS symbol table.
|
|
# RUN: %python %p/Inputs/generate_zos_archive.py --output %t.trunc_sym.a \
|
|
# RUN: --symtab-truncated
|
|
# RUN: not llvm-ar t %t.trunc_sym.a 2>&1 | FileCheck %s --check-prefix=ERR-TRUNC
|
|
# ERR-TRUNC: z/OS archive symbol table is too small to read the symbol count, symbol table size is 2
|
|
## Test z/OS symbol table where count exceeds buffer.
|
|
# RUN: %python %p/Inputs/generate_zos_archive.py --output %t.bad_count.a \
|
|
# RUN: --symtab-bad-count
|
|
# RUN: not llvm-ar t %t.bad_count.a 2>&1 | FileCheck %s --check-prefix=ERR-COUNT
|
|
# ERR-COUNT: z/OS archive symbol table names offset {{[0-9]+}} exceeds symbol table size 4
|
|
|
|
## Test malformed __.SYMDEF header.
|
|
# RUN: %python %p/Inputs/generate_zos_archive.py --output %t.bad_sym_hdr.a \
|
|
# RUN: --member foo.txt --symtab foo.txt:0 --malform-symtab-hdr empty-mode
|
|
# RUN: not llvm-ar t %t.bad_sym_hdr.a 2>&1 | FileCheck %s --check-prefix=ERR-SYM-HDR
|
|
# ERR-SYM-HDR: AccessMode field is empty or contains only spaces
|
|
|
|
## Test empty LastModified field.
|
|
# RUN: %python %p/Inputs/generate_zos_archive.py --output %t.empty_modtime.a \
|
|
# RUN: --member foo.txt --empty-modtime
|
|
# RUN: not llvm-ar t %t.empty_modtime.a 2>&1 | FileCheck %s --check-prefix=ERR-MODTIME
|
|
# ERR-MODTIME: LastModified field is empty or contains only spaces in archive member header at offset 8
|
|
|
|
## Test empty GID field.
|
|
# RUN: %python %p/Inputs/generate_zos_archive.py --output %t.empty_gid.a \
|
|
# RUN: --member foo.txt --empty-gid
|
|
# RUN: not llvm-ar t %t.empty_gid.a 2>&1 | FileCheck %s --check-prefix=ERR-GID
|
|
# ERR-GID: GID field is empty or contains only spaces in archive member header at offset 8
|
|
|
|
## Test that a truncated archive with incomplete member header is rejected.
|
|
## The z/OS magic is 8 bytes and a member header requires 60 bytes.
|
|
## Writing only 3 bytes after the magic is not enough for a valid header.
|
|
## Test that a truncated archive with incomplete member header is rejected.
|
|
# RUN: %python %p/Inputs/generate_zos_archive.py --output %t.full.a \
|
|
# RUN: --member foo.txt
|
|
# RUN: head -c 28 %t.full.a > %t.badhdr.a
|
|
# RUN: not llvm-ar t %t.badhdr.a 2>&1 | FileCheck %s --check-prefix=ERR-CHILD
|
|
# ERR-CHILD: truncated or malformed archive
|