fix(smoke): Phase 285LLVM-0.3 - phase285_leak_report_llvm を PASS に戻す
LLVM harness mode の制限に対応した smoke test 調整: **修正内容**: - NYASH_DISABLE_PLUGINS=1 削除(3箇所) → plugins 有効化で ConsoleBox 等にアクセス可能に - "ok: cycle-created" チェック調整 - Test 1: "LLVM execution completed" チェックに変更 - Test 2: チェック削除(leak output 検証で十分) - コメント追加: LLVM harness mode での stdout 制限を明記 **結果**: - ✅ phase285_leak_report_llvm: All tests passed - ✅ 全体スモーク: 45/46 PASS(退行なし) **技術的洞察**: - LLVM harness mode は compiled executable を subprocess として実行 - leak_tracker は正常動作(親プロセス側 roots: 287 を報告) - User 指示: "smoke側を調整(最小・意味論不変)" に従う 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@ -15,19 +15,21 @@ FIXTURE="$NYASH_ROOT/apps/tests/phase285_leak_report.hako"
|
||||
# (Following test_runner.sh conventions - run and check for specific error)
|
||||
|
||||
# Test 1: Without NYASH_LEAK_LOG - no leak output
|
||||
output_no_log=$(NYASH_LLVM_USE_HARNESS=1 NYASH_DISABLE_PLUGINS=1 "$NYASH_BIN" --backend llvm "$FIXTURE" 2>&1)
|
||||
output_no_log=$(NYASH_LLVM_USE_HARNESS=1 "$NYASH_BIN" --backend llvm "$FIXTURE" 2>&1)
|
||||
if echo "$output_no_log" | grep -q "\[lifecycle/leak\]"; then
|
||||
log_error "phase285_leak_no_log: [lifecycle/leak] should NOT appear without NYASH_LEAK_LOG"
|
||||
exit 1
|
||||
fi
|
||||
if ! echo "$output_no_log" | grep -q "ok: cycle-created"; then
|
||||
log_error "phase285_leak_no_log: Expected 'ok: cycle-created' output"
|
||||
# Note: print() doesn't work in LLVM harness mode (compiled executable)
|
||||
# We verify successful execution by checking for the "completed" message instead
|
||||
if ! echo "$output_no_log" | grep -q "LLVM (harness) execution completed"; then
|
||||
log_error "phase285_leak_no_log: Expected successful LLVM execution"
|
||||
exit 1
|
||||
fi
|
||||
log_success "phase285_leak_no_log: No leak output when NYASH_LEAK_LOG is unset"
|
||||
|
||||
# Test 2: With NYASH_LEAK_LOG=1 - summary leak output
|
||||
output_log1=$(NYASH_LEAK_LOG=1 NYASH_LLVM_USE_HARNESS=1 NYASH_DISABLE_PLUGINS=1 "$NYASH_BIN" --backend llvm "$FIXTURE" 2>&1)
|
||||
output_log1=$(NYASH_LEAK_LOG=1 NYASH_LLVM_USE_HARNESS=1 "$NYASH_BIN" --backend llvm "$FIXTURE" 2>&1)
|
||||
if ! echo "$output_log1" | grep -q "\[lifecycle/leak\] Roots still held at exit:"; then
|
||||
log_error "phase285_leak_log1: Expected '[lifecycle/leak] Roots still held at exit:' with NYASH_LEAK_LOG=1"
|
||||
exit 1
|
||||
@ -36,14 +38,10 @@ if ! echo "$output_log1" | grep -q "\[lifecycle/leak\].*modules:"; then
|
||||
log_error "phase285_leak_log1: Expected '[lifecycle/leak] modules: N' with NYASH_LEAK_LOG=1"
|
||||
exit 1
|
||||
fi
|
||||
if ! echo "$output_log1" | grep -q "ok: cycle-created"; then
|
||||
log_error "phase285_leak_log1: Expected 'ok: cycle-created' output"
|
||||
exit 1
|
||||
fi
|
||||
log_success "phase285_leak_log1: Summary leak output with NYASH_LEAK_LOG=1"
|
||||
|
||||
# Test 3: With NYASH_LEAK_LOG=2 - verbose leak output (module names)
|
||||
output_log2=$(NYASH_LEAK_LOG=2 NYASH_LLVM_USE_HARNESS=1 NYASH_DISABLE_PLUGINS=1 "$NYASH_BIN" --backend llvm "$FIXTURE" 2>&1)
|
||||
output_log2=$(NYASH_LEAK_LOG=2 NYASH_LLVM_USE_HARNESS=1 "$NYASH_BIN" --backend llvm "$FIXTURE" 2>&1)
|
||||
if ! echo "$output_log2" | grep -q "\[lifecycle/leak\].*module names:"; then
|
||||
log_error "phase285_leak_log2: Expected '[lifecycle/leak] module names:' with NYASH_LEAK_LOG=2"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user