[Fix] Judge the phase-checker device-assert test by its FAIL line, not the exit code (#34017)

This commit is contained in:
Liangsheng Yin
2026-08-07 16:19:05 -07:00
committed by GitHub
parent 86f373daff
commit c59d2b4329
3 changed files with 14 additions and 12 deletions
@@ -57,7 +57,6 @@ class TestQwen3NextLazyExtraBufferLargePage(
class TestQwen3NextLazyExtraBufferAllocFail(KLDivergenceMixin, DefaultServerBase): class TestQwen3NextLazyExtraBufferAllocFail(KLDivergenceMixin, DefaultServerBase):
model = QWEN3_NEXT_MODEL model = QWEN3_NEXT_MODEL
cache_chunk_size = 64 cache_chunk_size = 64
gsm8k_accuracy_thres = 0.93
kl_div_thres = 0.002 kl_div_thres = 0.002
other_args = _make_args(page_size=1, track_interval=2) other_args = _make_args(page_size=1, track_interval=2)
@@ -79,7 +78,6 @@ class TestQwen3NextLazyExtraBufferLargePageAllocFail(
): ):
model = QWEN3_NEXT_MODEL model = QWEN3_NEXT_MODEL
cache_chunk_size = 64 cache_chunk_size = 64
gsm8k_accuracy_thres = 0.93
kl_div_thres = 0.002 kl_div_thres = 0.002
other_args = _make_args(page_size=2, track_interval=2) other_args = _make_args(page_size=2, track_interval=2)
+8 -7
View File
@@ -166,19 +166,20 @@ class TestUpdateAssertEnabled(CustomTestCase):
text=True, text=True,
timeout=180, timeout=180,
) )
# Accept both exit-0 (RuntimeError caught) and SIGABRT (-6, the kernel's # The FAIL line is the evidence that the kernel-side check fired. How the
# device_assert killed the process directly before sync could raise). # process then dies is not: the CUDA coredump handler may abort it, and sync
# Either way, the kernel-side check fired — which is what we're verifying. # otherwise raises cudaErrorAssert or a generic cudaErrorLaunchFailure
# The presence of the SimplePhaseChecker FAIL line in stdout confirms it. # depending on whether generation ran. Only exit 1 means it never fired.
self.assertIn( self.assertIn(
"SimplePhaseChecker FAIL", "SimplePhaseChecker FAIL",
result.stdout, result.stdout,
f"returncode {result.returncode}; "
f"stdout: {result.stdout}\nstderr: {result.stderr}", f"stdout: {result.stdout}\nstderr: {result.stderr}",
) )
self.assertIn( self.assertNotEqual(
result.returncode, result.returncode,
(0, -6), 1,
f"unexpected returncode {result.returncode}; " "the mismatch did not fire device_assert; "
f"stdout: {result.stdout}\nstderr: {result.stderr}", f"stdout: {result.stdout}\nstderr: {result.stderr}",
) )
@@ -9,12 +9,16 @@ import unittest
import openai import openai
from sglang.test.ci.ci_register import register_cuda_ci from sglang.test.ci.ci_register import register_cuda_ci
from sglang.test.vlm_utils import * from sglang.test.test_utils import (
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
DEFAULT_URL_FOR_TEST,
popen_launch_server,
)
from sglang.test.vlm_utils import ( from sglang.test.vlm_utils import (
IMAGE_MAN_IRONING_URL,
AudioOpenAITestMixin, AudioOpenAITestMixin,
CustomTestCase, CustomTestCase,
ImageOpenAITestMixin, ImageOpenAITestMixin,
OmniOpenAITestMixin,
TestOpenAIMLLMServerBase, TestOpenAIMLLMServerBase,
VideoOpenAITestMixin, VideoOpenAITestMixin,
terminate_and_kill_process_tree, terminate_and_kill_process_tree,
@@ -231,7 +235,6 @@ del (
ImageOpenAITestMixin, ImageOpenAITestMixin,
VideoOpenAITestMixin, VideoOpenAITestMixin,
AudioOpenAITestMixin, AudioOpenAITestMixin,
OmniOpenAITestMixin,
) )