Merge ci/macos-build: macOS CI (arm64 + x86_64) + CUDA stub for CPU-only builds

This commit is contained in:
cnmcdee committed 2026-12-04 07:31:43 -05:00
commit c6e06a0d48
7 files changed
+256 -39

No files matched your search

+135
View File
@@ -0,0 +1,135 @@
# macOS build (CPU-only) — lzply has never been built on a Mac.
#
# Apple Silicon (arm64) is the standard runner now; Intel still has a
# standard runner (macos-15-intel) until ~Aug 2027, so both are built.
# Pinned to macos-15, not macos-latest: -latest is a moving target
# (migrating 15 -> 26) and the OS generation is part of the build
# contract for a release binary.
#
# No CUDA on Mac (no NVIDIA GPU on modern Macs) and no FUSE
# (lzply_mount is Linux-only), so this builds the core tools only.
# GNU coreutils (gnubin on PATH) supplies the GNU stat/dd/timeout the
# shell suites need. Homebrew's lzlib formula provides liblz + lzlib.h
# (the lzip formula is only the CLI tool, used by the test cross-check).
#
# The mount tests in the shell suites skip cleanly (no /dev/fuse, no
# lzply_mount binary). lzply_util.c's /proc mount resolution compiles
# on macOS and degrades gracefully (finds no mounts) — a known
# limitation, not a failure: stat/heal/check/refresh still work on
# plain archive paths.
#
# Diagnosability: run #3 failed at the chained "C unit tests" step
# with no retrievable logs, so each C test is now its own step, every
# test writes its output to a log file that is also printed to the
# step log, and all logs are uploaded as artifacts on failure.
name: macOS build
on:
push:
branches: [main, ci/macos-build]
pull_request:
workflow_dispatch:
jobs:
build:
name: macOS ${{ matrix.arch }} (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
include:
- os: macos-15
arch: arm64
- os: macos-15-intel
arch: x86_64
runs-on: ${{ matrix.os }}
steps:
- name: Check out
uses: actions/checkout@v5
- name: Install dependencies (lzlib + lzip CLI + GNU coreutils)
run: brew install lzip lzlib coreutils
- name: Build core tools (CPU-only, no FUSE mount)
run: |
exec > >(tee build.log) 2>&1
export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"
make -j"$(sysctl -n hw.ncpu)" CC=cc \
CFLAGS="-O2 -Wall -Wextra -I$(brew --prefix lzlib)/include" \
LDLIBS="-L$(brew --prefix lzlib)/lib -llz" \
lzply lz_rs lzply_deep_repair lzply_stat lzply_heal \
lzply_check lzply_refresh lzply_hyper \
bch_test rs_test crc16_test chase_bench_cpu
file lzply
- name: Pre-flight (test binaries and linked libraries)
run: |
ls -la bch_test rs_test crc16_test
file bch_test rs_test crc16_test
otool -L ./bch_test ./rs_test ./crc16_test
ls -la "$(brew --prefix lzlib)/lib/"
- name: C unit test (bch)
run: |
./bch_test > bch_test.log 2>&1 || rc=$?
cat bch_test.log
exit ${rc:-0}
- name: C unit test (rs)
run: |
./rs_test > rs_test.log 2>&1 || rc=$?
cat rs_test.log
exit ${rc:-0}
- name: C unit test (crc16)
run: |
./crc16_test > crc16_test.log 2>&1 || rc=$?
cat crc16_test.log
exit ${rc:-0}
- name: Build test data
run: |
export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"
make testdata
- name: "Shell suites (mount tests skip: no FUSE on macOS)"
run: |
export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"
./tests/run_rs_tests.sh ./lz_rs
./tests/run_tests.sh ./lzply
./tests/run_deep_repair_tests.sh ./lzply_deep_repair ./lzply ./lz_rs
./tests/run_hyper_tests.sh ./lzply_hyper
- name: Smoke test (round-trip)
run: |
for i in $(seq 1 100); do echo "hello macOS $i"; done > /tmp/smoke.txt
./lzply -c /tmp/smoke.txt /tmp/smoke.lzply
./lzply -t /tmp/smoke.lzply
mkdir -p /tmp/smoke-out && ./lzply -d /tmp/smoke.lzply /tmp/smoke-out
cmp /tmp/smoke.txt /tmp/smoke-out/smoke.txt
- name: Upload test logs on failure
if: failure()
uses: actions/upload-artifact@v5
with:
name: test-logs-macos-${{ matrix.arch }}
path: |
build.log
bch_test.log
rs_test.log
crc16_test.log
if-no-files-found: warn
- name: Upload binaries
uses: actions/upload-artifact@v5
with:
name: lzply-macos-${{ matrix.arch }}
path: |
lzply
lz_rs
lzply_deep_repair
lzply_stat
lzply_heal
lzply_check
lzply_refresh
lzply_hyper
if-no-files-found: error
+53 -33
View File
@@ -13,13 +13,20 @@ PREFIX = /usr/local
# chase_cuda.o -- CUDA Chase-1 scan for deep repair (t=8 only);
# linked into lzply and lzply_deep_repair, with a
# CPU fallback via weak references.
# Without nvcc, bch_cuda_stub.o is linked instead, so the CUDA entry
# points always resolve -- see the stub comment below. The stub is
# required on macOS: ld64 does not resolve __attribute__((weak))
# declarations to NULL the way GNU ld does, so a CPU-only build
# failed at link time with undefined _bch_cuda_available/_encode/
# _decode symbols. The stub is never built alongside bch_cuda.o, so
# the symbols are defined exactly once.
# These definitions MUST stay above every rule that references
# $(CUDA_OBJ): make expands prerequisites when the rule is read, so
# a definition below the liblzply.a rule would silently leave
# bch_cuda.o out of the archive. NOTE: bch_cuda.o is still listed
# explicitly on each tool link line below, because the weak
# references from bch.o do not make the linker pull it out of the
# archive on their own.
# archive on their own. The stub is listed the same way.
NVCC ?= $(shell command -v nvcc 2>/dev/null)
ifeq ($(NVCC),)
NVCC := $(wildcard /usr/local/cuda/bin/nvcc)
@@ -37,6 +44,19 @@ ifneq ($(wildcard $(NVCC)),)
CHASE_CUDA_OBJ = chase_cuda.o
endif
# CPU-only stub: when nvcc is absent, bch_cuda_stub.o defines the
# three CUDA entry points (available() = 0, encode = 0, decode = -2),
# so bch.c's references always resolve. This is required on macOS:
# ld64 does not resolve __attribute__((weak)) declarations to NULL
# the way GNU ld does, so a CPU-only build failed at link time with
# undefined _bch_cuda_available/_encode/_decode symbols. The stub
# is never built alongside bch_cuda.o, so the symbols are defined
# exactly once.
CUDA_STUB_OBJ =
ifeq ($(NVCC),)
CUDA_STUB_OBJ = bch_cuda_stub.o
endif
all: lzply lzply_mount lzply_stat lzply_heal lzply_check lzply_refresh lzply_hyper lz_rs lzply_deep_repair
# Shared core: the v5 archive format, the per-entry pipeline
@@ -44,7 +64,7 @@ all: lzply lzply_mount lzply_stat lzply_heal lzply_check lzply_refresh lzply_hyp
# command-line tool (lzply), the FUSE filesystem (lzply_mount),
# the statistics tool (lzply_stat) and the heal tool (lzply_heal)
# all link it.
liblzply.a: lzply_lib.o bch.o sha256.o $(CUDA_OBJ)
liblzply.a: lzply_lib.o bch.o sha256.o $(CUDA_OBJ) $(CUDA_STUB_OBJ)
ar rcs $@ $^
lzply_lib.o: lzply_lib.c lzply_lib.h bch.h bch_polys.h sha256.h
@@ -56,6 +76,9 @@ sha256.o: sha256.c sha256.h
bch.o: bch.c bch.h bch_polys.h
$(CC) $(CFLAGS) -c -o $@ bch.c
bch_cuda_stub.o: bch_cuda_stub.c bch_cuda.h bch.h
$(CC) $(CFLAGS) -c -o $@ bch_cuda_stub.c
# CUDA BCH remainder rules (variables are defined at the top).
ifneq ($(NVCC),)
bch_cuda.o: bch_cuda.cu bch_cuda.h bch.h bch_polys.h
@@ -76,18 +99,18 @@ else
bch_bench.o: bch_bench.c bch.h
$(CC) $(CFLAGS) -c -o $@ bch_bench.c
bch_bench: bch_bench.o bch.o
$(CC) $(CFLAGS) -o $@ bch_bench.o bch.o
bch_bench: bch_bench.o bch.o $(CUDA_STUB_OBJ)
$(CC) $(CFLAGS) -o $@ bch_bench.o bch.o $(CUDA_STUB_OBJ)
endif
lzply.o: lzply.c lzply_lib.h bch.h bch_polys.h deep_repair.h repair_cmd.h
$(CC) $(CFLAGS) -c -o $@ lzply.c
lzply: lzply.o deep_repair.o repair_cmd.o liblzrs.a liblzply.a $(CUDA_OBJ) $(CHASE_CUDA_OBJ)
lzply: lzply.o deep_repair.o repair_cmd.o liblzrs.a liblzply.a $(CUDA_OBJ) $(CHASE_CUDA_OBJ) $(CUDA_STUB_OBJ)
ifeq ($(CHASE_CUDA_OBJ),)
$(CC) $(CFLAGS) -o $@ lzply.o deep_repair.o repair_cmd.o liblzrs.a $(CUDA_OBJ) liblzply.a $(LDLIBS) $(CUDA_LIBS)
$(CC) $(CFLAGS) -o $@ lzply.o deep_repair.o repair_cmd.o liblzrs.a $(CUDA_OBJ) $(CUDA_STUB_OBJ) liblzply.a $(LDLIBS) $(CUDA_LIBS)
else
$(NVCC) -arch=$(CUDA_ARCH) -o $@ lzply.o deep_repair.o repair_cmd.o liblzrs.a $(CUDA_OBJ) liblzply.a $(CHASE_CUDA_OBJ) $(LDLIBS) $(CUDA_LIBS)
$(NVCC) -arch=$(CUDA_ARCH) -o $@ lzply.o deep_repair.o repair_cmd.o liblzrs.a $(CUDA_OBJ) $(CUDA_STUB_OBJ) liblzply.a $(CHASE_CUDA_OBJ) $(LDLIBS) $(CUDA_LIBS)
endif
# FUSE filesystem. Needs libfuse3-dev; no pkg-config on the server, so
@@ -98,8 +121,8 @@ FUSE_LIBS = -lfuse3
lzply_mount.o: lzply_mount.c lzply_lib.h bch.h bch_polys.h
$(CC) $(CFLAGS) $(FUSE_CFLAGS) -c -o $@ lzply_mount.c
lzply_mount: lzply_mount.o liblzply.a $(CUDA_OBJ)
$(CC) $(CFLAGS) $(FUSE_CFLAGS) -o $@ lzply_mount.o $(CUDA_OBJ) liblzply.a $(LDLIBS) $(FUSE_LIBS) $(CUDA_LIBS)
lzply_mount: lzply_mount.o liblzply.a $(CUDA_OBJ) $(CUDA_STUB_OBJ)
$(CC) $(CFLAGS) $(FUSE_CFLAGS) -o $@ lzply_mount.o $(CUDA_OBJ) $(CUDA_STUB_OBJ) liblzply.a $(LDLIBS) $(FUSE_LIBS) $(CUDA_LIBS)
# Shared helpers for lzply_stat and lzply_heal (mount resolution via
# /proc, human-size formatting). No FUSE needed.
@@ -109,14 +132,14 @@ lzply_util.o: lzply_util.c lzply_lib.h lzply_util.h
lzply_stat.o: lzply_stat.c lzply_lib.h lzply_util.h
$(CC) $(CFLAGS) -c -o $@ lzply_stat.c
lzply_stat: lzply_stat.o lzply_util.o liblzply.a $(CUDA_OBJ)
$(CC) $(CFLAGS) -o $@ lzply_stat.o lzply_util.o $(CUDA_OBJ) liblzply.a $(LDLIBS) $(CUDA_LIBS)
lzply_stat: lzply_stat.o lzply_util.o liblzply.a $(CUDA_OBJ) $(CUDA_STUB_OBJ)
$(CC) $(CFLAGS) -o $@ lzply_stat.o lzply_util.o $(CUDA_OBJ) $(CUDA_STUB_OBJ) liblzply.a $(LDLIBS) $(CUDA_LIBS)
lzply_heal.o: lzply_heal.c lzply_lib.h lzply_util.h
$(CC) $(CFLAGS) -c -o $@ lzply_heal.c
lzply_heal: lzply_heal.o lzply_util.o liblzply.a $(CUDA_OBJ)
$(CC) $(CFLAGS) -o $@ lzply_heal.o lzply_util.o $(CUDA_OBJ) liblzply.a $(LDLIBS) $(CUDA_LIBS)
lzply_heal: lzply_heal.o lzply_util.o liblzply.a $(CUDA_OBJ) $(CUDA_STUB_OBJ)
$(CC) $(CFLAGS) -o $@ lzply_heal.o lzply_util.o $(CUDA_OBJ) $(CUDA_STUB_OBJ) liblzply.a $(LDLIBS) $(CUDA_LIBS)
# Bit error rate detector. Read-only: decodes each BCH entry's stored
# bytes in memory and counts the corrected bit errors. Links the same
@@ -124,8 +147,8 @@ lzply_heal: lzply_heal.o lzply_util.o liblzply.a $(CUDA_OBJ)
lzply_check.o: lzply_check.c lzply_lib.h lzply_util.h
$(CC) $(CFLAGS) -c -o $@ lzply_check.c
lzply_check: lzply_check.o lzply_util.o liblzply.a $(CUDA_OBJ)
$(CC) $(CFLAGS) -o $@ lzply_check.o lzply_util.o $(CUDA_OBJ) liblzply.a $(LDLIBS) -lm $(CUDA_LIBS)
lzply_check: lzply_check.o lzply_util.o liblzply.a $(CUDA_OBJ) $(CUDA_STUB_OBJ)
$(CC) $(CFLAGS) -o $@ lzply_check.o lzply_util.o $(CUDA_OBJ) $(CUDA_STUB_OBJ) liblzply.a $(LDLIBS) -lm $(CUDA_LIBS)
# In-place platter refresher. Reads a file (or every regular file
# under a directory / mount point) and rewrites it over itself, with
@@ -134,8 +157,8 @@ lzply_check: lzply_check.o lzply_util.o liblzply.a $(CUDA_OBJ)
lzply_refresh.o: lzply_refresh.c lzply_lib.h lzply_util.h
$(CC) $(CFLAGS) -c -o $@ lzply_refresh.c
lzply_refresh: lzply_refresh.o lzply_util.o liblzply.a $(CUDA_OBJ)
$(CC) $(CFLAGS) -o $@ lzply_refresh.o lzply_util.o $(CUDA_OBJ) liblzply.a $(LDLIBS) $(CUDA_LIBS)
lzply_refresh: lzply_refresh.o lzply_util.o liblzply.a $(CUDA_OBJ) $(CUDA_STUB_OBJ)
$(CC) $(CFLAGS) -o $@ lzply_refresh.o lzply_util.o $(CUDA_OBJ) $(CUDA_STUB_OBJ) liblzply.a $(LDLIBS) $(CUDA_LIBS)
# Striped volume (bit-plane, 8 data stripes + 1-3 XOR/GF parity stripes
# + BCH). No compression, so it links only bch.o + sha256.o — no
@@ -143,19 +166,19 @@ lzply_refresh: lzply_refresh.o lzply_util.o liblzply.a $(CUDA_OBJ)
lzply_hyper.o: lzply_hyper.c bch.h bch_polys.h sha256.h
$(CC) $(CFLAGS) -c -o $@ lzply_hyper.c
lzply_hyper: lzply_hyper.o bch.o sha256.o
$(CC) $(CFLAGS) -o $@ lzply_hyper.o bch.o sha256.o
lzply_hyper: lzply_hyper.o bch.o sha256.o $(CUDA_STUB_OBJ)
$(CC) $(CFLAGS) -o $@ lzply_hyper.o bch.o sha256.o $(CUDA_STUB_OBJ)
bch_test: bch.c bch_test.c bch.h bch_polys.h
$(CC) $(CFLAGS) -o $@ bch.c bch_test.c
bch_test: bch.c bch_test.c bch_cuda_stub.c bch.h bch_polys.h bch_cuda.h
$(CC) $(CFLAGS) -o $@ bch.c bch_test.c bch_cuda_stub.c
# CUDA Chase-1 bench (experiments/cuda-chase): GPU port of the
# deep-repair Chase-1 scan (t=8 only). Needs CUDA 13.x; NVCC is
# /usr/local/cuda/bin/nvcc on hot_house (not on PATH by default).
# NVCC / NVCCFLAGS are defined at the top of this file.
chase_bench_cpu: chase_bench.c bch.c bch.h bch_polys.h
$(CC) $(CFLAGS) -o $@ chase_bench.c bch.c
chase_bench_cpu: chase_bench.c bch.c bch_cuda_stub.c bch.h bch_polys.h bch_cuda.h
$(CC) $(CFLAGS) -o $@ chase_bench.c bch.c bch_cuda_stub.c
chase_bench.o: chase_bench.c bch.h chase_cuda.h
$(CC) $(CFLAGS) -DHAVE_CUDA -c -o $@ chase_bench.c
@@ -181,16 +204,16 @@ liblzrs.a: lzrs_lib.o rs.o
lz_rs.o: lz_rs.c lzrs_lib.h lzply_lib.h bch.h bch_polys.h
$(CC) $(CFLAGS) -c -o $@ lz_rs.c
lz_rs: lz_rs.o liblzrs.a liblzply.a $(CUDA_OBJ)
$(CC) $(CFLAGS) -o $@ lz_rs.o liblzrs.a $(CUDA_OBJ) liblzply.a $(LDLIBS) $(CUDA_LIBS)
lz_rs: lz_rs.o liblzrs.a liblzply.a $(CUDA_OBJ) $(CUDA_STUB_OBJ)
$(CC) $(CFLAGS) -o $@ lz_rs.o liblzrs.a $(CUDA_OBJ) $(CUDA_STUB_OBJ) liblzply.a $(LDLIBS) $(CUDA_LIBS)
rs_test: rs.c rs_test.c rs.h
$(CC) $(CFLAGS) -o $@ rs.c rs_test.c
# CRC-16/CCITT-FALSE unit test (vectors + cross-checks). Links the
# shared core for crc16_of.
crc16_test: crc16_test.c liblzply.a
$(CC) $(CFLAGS) -o $@ crc16_test.c liblzply.a $(LDLIBS)
crc16_test: crc16_test.c liblzply.a $(CUDA_STUB_OBJ)
$(CC) $(CFLAGS) -o $@ crc16_test.c liblzply.a $(CUDA_STUB_OBJ) $(LDLIBS)
# Deep repair: Chase / list decoding past t (bch.c) + the escalating
# ladder (deep_repair.c) + the lzply_deep_repair CLI. Links both
@@ -201,14 +224,11 @@ deep_repair.o: deep_repair.c deep_repair.h lzply_lib.h lzrs_lib.h bch.h rs.h sha
lzply_deep_repair.o: lzply_deep_repair.c deep_repair.h lzply_lib.h lzrs_lib.h bch.h repair_cmd.h
$(CC) $(CFLAGS) -c -o $@ lzply_deep_repair.c
repair_cmd.o: repair_cmd.c repair_cmd.h deep_repair.h lzply_lib.h lzrs_lib.h bch.h
$(CC) $(CFLAGS) -c -o $@ repair_cmd.c
lzply_deep_repair: lzply_deep_repair.o repair_cmd.o deep_repair.o liblzrs.a liblzply.a $(CUDA_OBJ) $(CHASE_CUDA_OBJ)
lzply_deep_repair: lzply_deep_repair.o repair_cmd.o deep_repair.o liblzrs.a liblzply.a $(CUDA_OBJ) $(CHASE_CUDA_OBJ) $(CUDA_STUB_OBJ)
ifeq ($(CHASE_CUDA_OBJ),)
$(CC) $(CFLAGS) -o $@ lzply_deep_repair.o repair_cmd.o deep_repair.o liblzrs.a $(CUDA_OBJ) liblzply.a $(LDLIBS) $(CUDA_LIBS)
$(CC) $(CFLAGS) -o $@ lzply_deep_repair.o repair_cmd.o deep_repair.o liblzrs.a $(CUDA_OBJ) $(CUDA_STUB_OBJ) liblzply.a $(LDLIBS) $(CUDA_LIBS)
else
$(NVCC) -arch=$(CUDA_ARCH) -o $@ lzply_deep_repair.o repair_cmd.o deep_repair.o liblzrs.a $(CUDA_OBJ) liblzply.a $(CHASE_CUDA_OBJ) $(LDLIBS) $(CUDA_LIBS)
$(NVCC) -arch=$(CUDA_ARCH) -o $@ lzply_deep_repair.o repair_cmd.o deep_repair.o liblzrs.a $(CUDA_OBJ) $(CUDA_STUB_OBJ) liblzply.a $(CHASE_CUDA_OBJ) $(LDLIBS) $(CUDA_LIBS)
endif
# bch_polys.h is generated by gen_bch_polys.py from the rssearch data
+7 -2
View File
@@ -43,8 +43,13 @@
#include "bch.h"
/* CUDA fast path (bch_cuda.cu, linked only when built with nvcc).
* Weak symbols: a CPU-only build leaves them NULL and always takes
* the CPU path below. bch_cuda_encode returns the stored length or 0
* Without nvcc the Makefile links bch_cuda_stub.c, which defines
* these three functions to report "no GPU", so a CPU-only build
* always takes the CPU path below. The declarations are also marked
* weak, so an out-of-tree consumer that links bch.o without either
* object still resolves them to NULL on linkers that support that
* (GNU ld does; macOS ld64 does not -- the stub is what the build
* relies on). bch_cuda_encode returns the stored length or 0
* on failure; bch_cuda_decode returns 0, -1 (uncorrectable) or -2
* (internal error). Any CUDA failure falls through to the CPU path,
* which re-verifies, so results are identical with or without a GPU. */
+6 -2
View File
@@ -21,8 +21,12 @@
* All functions fall back gracefully: bch_cuda_encode returns 0 and
* bch_cuda_decode returns -2 on any CUDA problem, and bch.c treats
* those as "use the CPU path". bch_cuda_available() is 0 when no
* CUDA device is present. The symbols are referenced weakly from
* bch.c, so a CPU-only build (no bch_cuda.o linked) works unchanged.
* CUDA device is present. A CPU-only build links bch_cuda_stub.c,
* which defines these three functions to report "no GPU", so the
* references always resolve. (bch.c also declares them
* __attribute__((weak)) as a fallback for out-of-tree consumers;
* the build itself does not rely on weak-symbol resolution, which
* macOS ld64 does not provide for declarations.)
*/
#ifndef LZPLY_BCH_CUDA_H
#define LZPLY_BCH_CUDA_H
+53
View File
@@ -0,0 +1,53 @@
/* bch_cuda_stub.c - CPU-only fallback for the CUDA BCH entry points.
*
* Defines the three symbols bch.c references (bch_cuda_available,
* bch_cuda_encode, bch_cuda_decode) for builds without nvcc, so a
* CPU-only link always resolves. The stub reports "no GPU": the
* caller in bch.c then takes the CPU path, exactly as it does when
* a CUDA build is present but no device is found.
*
* This exists because the weak-symbol fallback it replaces does not
* work on macOS: bch.c declares these functions
* __attribute__((weak)), expecting them to resolve to NULL when no
* CUDA object is linked. GNU ld does that; macOS ld64 does not --
* a weak declaration is a weak definition, not a weak import, so
* the link fails with undefined _bch_cuda_available/_encode/_decode
* symbols. Defining the symbols outright removes all reliance on
* linker-specific weak-symbol behaviour, on every platform.
*
* The stub is built only when nvcc is absent (see the Makefile:
* CUDA_STUB_OBJ is empty whenever CUDA_OBJ is set), so the symbols
* are defined exactly once in every build.
*/
#include <stddef.h>
#include <stdint.h>
#include "bch.h"
#include "bch_cuda.h"
int bch_cuda_available(void)
{
return 0;
}
size_t bch_cuda_encode(const uint8_t *data, size_t len,
const bch_poly_t *p, uint8_t *out)
{
(void)data;
(void)len;
(void)p;
(void)out;
return 0;
}
int bch_cuda_decode(const uint8_t *in, size_t len, size_t orig_len,
const bch_poly_t *p, uint8_t *out, int *corrected)
{
(void)in;
(void)len;
(void)orig_len;
(void)p;
(void)out;
(void)corrected;
return -2;
}
+1 -1
View File
@@ -294,7 +294,7 @@ run_cell() {
: > "$WORK/matrix-results.txt"
: > "$WORK/matrix-notes.txt"
echo "Corruption matrix (hot_newyork, $(date -u +%F %T UTC))" >> "$WORK/matrix-results.txt"
echo "Corruption matrix (hot_newyork, $(date -u "+%F %T UTC"))" >> "$WORK/matrix-results.txt"
echo "Tool: lzply_deep_repair -l 3; t=8 (-e 4) unless noted; scattered = corrupt_bits over the whole blob, burst = corrupt_run" >> "$WORK/matrix-results.txt"
# r512 -e 4: single block, m=13, nbits 4200. data offset 16+80+8=104, blob end = size-2.
+1 -1
View File
@@ -120,7 +120,7 @@ mkcfg "$T/badpoly" 1 00ff 4
mkvol "$T/rotest" 1 >/dev/null 2>&1
echo "ro test content" > "$T/rotest/f.txt"
"$HYPER" -c "$T/rotest/cfg.txt" write "$T/rotest/f.txt" f.txt >/dev/null 2>&1
sed -i 's|/vol/s0.bin:rw:|/vol/s0.bin:ro:|' "$T/rotest/cfg.txt"
sed 's|/vol/s0.bin:rw:|/vol/s0.bin:ro:|' "$T/rotest/cfg.txt" > "$T/rotest/cfg.txt.tmp" && mv "$T/rotest/cfg.txt.tmp" "$T/rotest/cfg.txt"
"$HYPER" -c "$T/rotest/cfg.txt" write "$T/rotest/f.txt" f2.txt >/dev/null 2>&1 && \
bad "config: write with an ro stripe rejected" || ok "config: write with an ro stripe rejected"
"$HYPER" -c "$T/rotest/cfg.txt" read f.txt "$T/rotest/f.out" >/dev/null 2>&1 && \