test_smoke_model.py 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  1. from __future__ import annotations
  2. import json
  3. import runpy
  4. import subprocess
  5. import urllib.request
  6. from pathlib import Path
  7. from types import SimpleNamespace
  8. import pytest
  9. from deepseek_harness import RunResult
  10. ROOT = Path(__file__).resolve().parents[3]
  11. SMOKE = runpy.run_path(ROOT / "scripts" / "smoke-python-runtime.py")
  12. def live_result(**overrides: object) -> RunResult:
  13. values = {
  14. "session_id": "installed-wheel-live-api",
  15. "final_response": SMOKE["LIVE_API_SENTINEL"],
  16. "finish_reason": "completed",
  17. "events": [{"type": "tool/call", "data": {"name": "unrelated_tool"}}],
  18. "notifications": [],
  19. }
  20. values.update(overrides)
  21. return RunResult(**values)
  22. @pytest.fixture
  23. def live_smoke(monkeypatch: pytest.MonkeyPatch) -> SimpleNamespace:
  24. import deepseek_harness
  25. state = SimpleNamespace(
  26. prompts=[], session_ids=[], challenges=[], checked_logs=[], closed=False,
  27. create_bytes=SMOKE["LIVE_API_SENTINEL"].encode("utf-8"),
  28. create_result=live_result(), verify_result=live_result(), receipt_mode="copy",
  29. )
  30. globals_ = SMOKE["smoke_sdk_live"].__globals__
  31. token_hex = globals_["secrets"].token_hex
  32. def fresh_challenge(size: int) -> str:
  33. assert len(state.prompts) == 1
  34. value = token_hex(size)
  35. state.challenges.append(value)
  36. return value
  37. class ScriptedHarness:
  38. def __init__(self, **kwargs: object) -> None:
  39. state.root = Path(kwargs["cwd"])
  40. assert "toolChoice" not in kwargs
  41. def __enter__(self) -> ScriptedHarness:
  42. return self
  43. def __exit__(self, *args: object) -> None:
  44. state.closed = True
  45. def run(self, prompt: str, *, session_id: str) -> RunResult:
  46. state.prompts.append(prompt)
  47. state.session_ids.append(session_id)
  48. if len(state.prompts) == 1:
  49. state.marker = Path(prompt.splitlines()[-1])
  50. assert state.marker.parent == state.root
  51. if state.create_bytes is not None:
  52. state.marker.write_bytes(state.create_bytes)
  53. return state.create_result
  54. assert len(state.prompts) == 2
  55. assert len(state.challenges) == 1
  56. challenge = state.challenges[0]
  57. assert all(challenge not in sent for sent in state.prompts)
  58. assert str(state.marker) not in prompt
  59. assert "previous turn" in prompt and "changed externally" in prompt
  60. assert state.marker.read_bytes() == challenge.encode("ascii")
  61. receipt = Path(prompt.splitlines()[-1])
  62. assert receipt != state.marker and not receipt.exists()
  63. if state.receipt_mode == "copy":
  64. receipt.write_bytes(state.marker.read_bytes())
  65. elif state.receipt_mode == "stale":
  66. receipt.write_bytes(state.create_bytes)
  67. elif state.receipt_mode == "wrong":
  68. receipt.write_bytes(b"wrong")
  69. elif state.receipt_mode == "newline":
  70. receipt.write_bytes(state.marker.read_bytes() + b"\n")
  71. elif state.receipt_mode == "changed-source":
  72. receipt.write_bytes(state.marker.read_bytes())
  73. state.marker.write_bytes(b"changed")
  74. elif state.receipt_mode != "missing":
  75. raise AssertionError(state.receipt_mode)
  76. return state.verify_result
  77. monkeypatch.setenv("DEEPSEEK_API_KEY", "unit-test-key")
  78. monkeypatch.setenv("DEEPSEEK_BASE_URL", "https://api.invalid")
  79. monkeypatch.setattr(deepseek_harness, "DeepSeekHarness", ScriptedHarness)
  80. monkeypatch.setattr(globals_["secrets"], "token_hex", fresh_challenge)
  81. monkeypatch.setitem(globals_, "assert_zstd_session_log", state.checked_logs.append)
  82. return state
  83. def test_live_smoke_requires_fresh_external_content(live_smoke: SimpleNamespace) -> None:
  84. SMOKE["smoke_sdk_live"]()
  85. assert len(live_smoke.prompts) == 2
  86. assert live_smoke.session_ids == ["installed-wheel-live-api"] * 2
  87. assert len(live_smoke.checked_logs) == 1
  88. assert live_smoke.closed and not live_smoke.root.exists()
  89. @pytest.mark.parametrize("label", ["create", "verify"])
  90. @pytest.mark.parametrize(("overrides", "message"), [
  91. ({"finish_reason": "error"}, "turn ended with 'error'"),
  92. ({"finish_reason": "error", "events": [{
  93. "type": "turn/end", "data": {"turn": 1, "reason": {
  94. "kind": "error", "error": {"code": "AUTH", "status": 401},
  95. }},
  96. }]}, "turn ended with.*AUTH.*401"),
  97. ({"events": []}, "turn made no model-requested tool call"),
  98. ({"final_response": "PYTHON_SDK_LIVE_OK extra"}, "turn returned"),
  99. ])
  100. def test_live_smoke_rejects_invalid_turn_before_continuing(
  101. live_smoke: SimpleNamespace, label: str, overrides: dict[str, object], message: str,
  102. ) -> None:
  103. setattr(live_smoke, f"{label}_result", live_result(**overrides))
  104. with pytest.raises(AssertionError, match=f"{label} {message}"):
  105. SMOKE["smoke_sdk_live"]()
  106. assert len(live_smoke.prompts) == (1 if label == "create" else 2)
  107. assert not live_smoke.checked_logs
  108. assert live_smoke.closed
  109. if label == "create":
  110. assert not live_smoke.challenges
  111. @pytest.mark.parametrize("content", [None, b"wrong", b"PYTHON_SDK_LIVE_OK\n"])
  112. def test_live_smoke_rejects_bad_create_before_host_overwrite(
  113. live_smoke: SimpleNamespace, content: bytes | None,
  114. ) -> None:
  115. live_smoke.create_bytes = content
  116. with pytest.raises(AssertionError, match="create turn (did not create|wrote unexpected bytes)"):
  117. SMOKE["smoke_sdk_live"]()
  118. assert len(live_smoke.prompts) == 1
  119. assert not live_smoke.challenges and not live_smoke.checked_logs
  120. assert live_smoke.closed
  121. @pytest.mark.parametrize(("mode", "message"), [
  122. ("missing", "did not create receipt"),
  123. ("stale", "wrote unexpected bytes to receipt"),
  124. ("wrong", "wrote unexpected bytes to receipt"),
  125. ("newline", "wrote unexpected bytes to receipt"),
  126. ("changed-source", "changed source file"),
  127. ])
  128. def test_live_smoke_rejects_unrelated_tool_without_exact_receipt(
  129. live_smoke: SimpleNamespace, mode: str, message: str,
  130. ) -> None:
  131. live_smoke.receipt_mode = mode
  132. with pytest.raises(AssertionError, match=f"verify turn {message}"):
  133. SMOKE["smoke_sdk_live"]()
  134. assert len(live_smoke.prompts) == 2
  135. assert not live_smoke.checked_logs
  136. assert live_smoke.closed
  137. @pytest.mark.parametrize(
  138. ("prompt_name", "expected"),
  139. [
  140. ("SNAPSHOT_DIRECT_CHILD_PROMPT", "DIRECT_CHILD_OK"),
  141. ("SNAPSHOT_WORKFLOW_CHILD_PROMPT", "WORKFLOW_CHILD_OK"),
  142. ],
  143. )
  144. def test_child_prompt_precedes_runtime_context(prompt_name: str, expected: str) -> None:
  145. chunks = SMOKE["completion_chunks"]({
  146. "messages": [
  147. {"role": "user", "content": [
  148. {"type": "text", "text": SMOKE[prompt_name]},
  149. {"type": "text", "text": "Current runtime context"},
  150. ]},
  151. ],
  152. })
  153. assert any(
  154. chunk.get("delta", {}).get("text") == expected
  155. for chunk in chunks
  156. )
  157. def test_mcp_smoke_requests_the_discovered_tool() -> None:
  158. chunks = SMOKE["completion_chunks"]({
  159. "messages": [{"role": "user", "content": [{"type": "text", "text": SMOKE["MCP_PROMPT"]}]}],
  160. "tools": [{"name": "mcp__fixture__add", "input_schema": {"type": "object"}}],
  161. })
  162. calls = [
  163. chunk["content_block"]
  164. for chunk in chunks
  165. if chunk.get("type") == "content_block_start"
  166. ]
  167. assert calls == [{"type": "tool_use", "id": "mcp-add", "name": "mcp__fixture__add", "input": {}}]
  168. arguments = next(chunk["delta"]["partial_json"] for chunk in chunks if chunk.get("type") == "content_block_delta")
  169. assert json.loads(arguments) == {"a": 19, "b": 23}
  170. def test_mcp_smoke_accepts_the_external_server_result() -> None:
  171. chunks = SMOKE["completion_chunks"]({
  172. "messages": [
  173. {"role": "user", "content": [{"type": "text", "text": SMOKE["MCP_PROMPT"]}]},
  174. {
  175. "role": "assistant",
  176. "content": [{
  177. "type": "tool_use", "id": "mcp-add", "name": "mcp__fixture__add", "input": {},
  178. }],
  179. },
  180. {"role": "user", "content": [
  181. {"type": "tool_result", "tool_use_id": "mcp-add", "content": [{"type": "text", "text": "42"}]},
  182. ]},
  183. ],
  184. })
  185. assert any(
  186. chunk.get("delta", {}).get("text") == SMOKE["MCP_TEXT"]
  187. for chunk in chunks
  188. )
  189. def test_mock_model_serves_native_messages_events() -> None:
  190. with SMOKE["MockModel"]() as model:
  191. body = {"model": "smoke-model", "stream": True, "messages": [{
  192. "role": "user", "content": [{"type": "text", "text": "hello"}],
  193. }]}
  194. request = urllib.request.Request(
  195. model.url + "/v1/messages", data=json.dumps(body).encode(),
  196. headers={"content-type": "application/json"},
  197. )
  198. with urllib.request.urlopen(request) as response:
  199. stream = response.read().decode()
  200. frames = [frame.splitlines() for frame in stream.strip().split("\n\n")]
  201. events = [json.loads(frame[1].removeprefix("data: ")) for frame in frames]
  202. assert all(frame[0] == f"event: {event['type']}" for frame, event in zip(frames, events))
  203. assert events[0]["type"] == "message_start"
  204. assert events[-1] == {"type": "message_stop"}
  205. assert next(event["delta"]["text"] for event in events if event["type"] == "content_block_delta") == SMOKE["EXPECTED_TEXT"]
  206. def test_advanced_snapshot_normalizes_catalog_child_creation_time() -> None:
  207. value = {
  208. "type": "subagent/catalog",
  209. "data": {
  210. "childCreatedAt": 1788246207176,
  211. },
  212. }
  213. assert SMOKE["normalize_snapshot_value"](value, []) == {
  214. "type": "subagent/catalog",
  215. "data": {
  216. "childCreatedAt": 0,
  217. },
  218. }
  219. assert SMOKE["normalize_snapshot_value"](
  220. {"type": "fixture/event", "data": {"childCreatedAt": 1788246207176}},
  221. [],
  222. ) == {"type": "fixture/event", "data": {"childCreatedAt": 1788246207176}}
  223. def test_snapshot_comparison_preserves_opaque_generation_qualifiers() -> None:
  224. normalize = SMOKE["normalize_session_format_comparison"]
  225. expected = {
  226. "header": {"type": "session", "version": 0, "otherVersion": 7},
  227. "accepted": {
  228. "type": "session-log-deepseek/delivery-accepted",
  229. "data": {"sessionId": "s", "throughSeq": 4},
  230. },
  231. "source": {
  232. "kind": "session-reference",
  233. "references": [{"sessionId": "other", "capturedThroughSeq": 8}],
  234. },
  235. }
  236. actual = {
  237. "header": {"type": "session", "version": 1, "otherVersion": 7},
  238. "accepted": {
  239. "type": "session-log-deepseek/delivery-accepted",
  240. "data": {"sessionId": "s", "sessionFormatVersion": 1, "throughSeq": 4},
  241. },
  242. "source": {
  243. "kind": "session-reference",
  244. "references": [{
  245. "sessionId": "other",
  246. "capturedFormatVersion": 1,
  247. "capturedThroughSeq": 8,
  248. }],
  249. },
  250. }
  251. assert normalize(expected) != normalize(actual)
  252. assert normalize(expected)["header"] == normalize(actual)["header"]
  253. assert normalize(expected)["header"]["otherVersion"] == 7
  254. assert normalize(actual)["accepted"] == actual["accepted"]
  255. assert normalize(actual)["source"] == actual["source"]
  256. def test_snapshot_value_scrubs_system_nodes_without_erasing_header_fields() -> None:
  257. normalize = SMOKE["normalize_snapshot_value"]
  258. system = {
  259. "type": "system/message",
  260. "data": {"message": {"role": "system", "content": [{"type": "text", "text": "prompt"}]}},
  261. }
  262. header = {"type": "request/header", "data": {"header": {"system": "unexpected"}}}
  263. assert normalize(system, [])["data"]["message"]["content"] == [{"type": "text", "text": "{{system}}"}]
  264. assert normalize(header, []) == header
  265. empty = {"type": "system/message", "data": {"message": {"role": "system", "content": []}}}
  266. assert normalize(empty, []) == empty
  267. def test_snapshot_value_normalizes_embedded_assistant_stream_timing() -> None:
  268. normalize = SMOKE["normalize_snapshot_value"]
  269. event = {
  270. "type": "assistant/message",
  271. "seq": 4,
  272. "time": 100,
  273. "data": {
  274. "stream": [
  275. {"type": "chunk", "time": 101, "chunk": {"type": "finish"}},
  276. {"type": "text-chunks", "time0": 102, "dt": [1, 2], "texts": ["a", "b", "c"]},
  277. ],
  278. },
  279. }
  280. normalized = normalize(event, [])
  281. assert normalized["time"] == 0
  282. assert normalized["data"]["stream"] == [
  283. {"type": "chunk", "time": 0, "chunk": {"type": "finish"}},
  284. {"type": "text-chunks", "time0": 0, "dt": [0, 0], "texts": ["a", "b", "c"]},
  285. ]
  286. def test_snapshot_comparison_expands_embedded_assistant_streams() -> None:
  287. normalize = SMOKE["normalize_session_format_comparison"]
  288. expected = [
  289. {
  290. "type": "assistant/chunk",
  291. "seq": 4,
  292. "time": 0,
  293. "data": {"turn": 1, "step": 1, "chunk": {
  294. "type": "text-delta", "index": 0, "text": "done",
  295. }},
  296. },
  297. {
  298. "type": "assistant/message",
  299. "seq": 5,
  300. "time": 0,
  301. "data": {"turn": 1, "step": 1, "message": {"role": "assistant"}},
  302. "sourceEventSeqs": [4],
  303. "surfaceOp": "append",
  304. },
  305. ]
  306. actual = [{
  307. "type": "assistant/message",
  308. "seq": 4,
  309. "time": 0,
  310. "data": {
  311. "turn": 1,
  312. "step": 1,
  313. "message": {"role": "assistant"},
  314. "stream": [{
  315. "type": "text-chunks", "time0": 0, "index": 0, "dt": [], "texts": ["done"],
  316. }],
  317. },
  318. "surfaceOp": "append",
  319. }]
  320. assert normalize(actual, 2) == normalize(expected, 1)
  321. tool_result = {
  322. "type": "tool/result",
  323. "data": {"turn": 1, "step": 1},
  324. "sourceEventSeqs": [4],
  325. }
  326. assert normalize(tool_result, 1)["sourceEventSeqs"] == [4]
  327. assert normalize(tool_result, 2)["sourceEventSeqs"] == [4]
  328. def test_snapshot_stream_expands_reasoning_and_tool_call_records() -> None:
  329. expand = SMOKE["expand_snapshot_stream_member"]
  330. assert expand({
  331. "type": "reasoning-chunks", "time0": 0, "index": 1,
  332. "dt": [], "texts": ["think"],
  333. }) == [{"type": "reasoning-delta", "index": 1, "text": "think"}]
  334. assert expand({
  335. "type": "tool-call-chunks", "time0": 0, "index": 2,
  336. "id": "call-1", "name": "read", "dt": [1], "args": ["{", "}"],
  337. }) == [
  338. {"type": "tool-call-delta", "index": 2, "id": "call-1", "name": "read", "argumentsDelta": "{"},
  339. {"type": "tool-call-delta", "index": 2, "id": "call-1", "name": "read", "argumentsDelta": "}"},
  340. ]
  341. def test_snapshot_file_builder_order_is_checked_outside_update_mode(tmp_path: Path) -> None:
  342. compare = SMOKE["compare_snapshot_files"]
  343. with pytest.raises(AssertionError, match="snapshot builder produced"):
  344. compare({}, False, tmp_path, ("result.json",))
  345. def test_snapshot_comparison_expands_sdk_wrapped_attempts() -> None:
  346. normalize = SMOKE["normalize_session_format_comparison"]
  347. actual = [{
  348. "method": "session.event",
  349. "payload": {
  350. "sessionId": "s",
  351. "event": {
  352. "type": "assistant/attempt",
  353. "seq": 7,
  354. "time": 0,
  355. "data": {
  356. "turn": 1,
  357. "step": 1,
  358. "stream": [{"type": "chunk", "time": 0, "chunk": {"type": "finish"}}],
  359. },
  360. },
  361. },
  362. }]
  363. assert normalize(actual) == [{
  364. "method": "session.event",
  365. "payload": {
  366. "sessionId": "s",
  367. "event": {
  368. "type": "assistant/chunk",
  369. "data": {"turn": 1, "step": 1, "chunk": {"type": "finish"}},
  370. },
  371. },
  372. }]
  373. def test_snapshot_generation_names_select_highest_role_without_double_counting(
  374. tmp_path: Path,
  375. ) -> None:
  376. render = SMOKE["snapshot_session_filename"]
  377. select = SMOKE["selected_snapshot_session_files"]
  378. assert render(0, 0) == "session.jsonl"
  379. assert render(0, 2) == "session.v2.jsonl"
  380. assert render(3, 0) == "session.3.jsonl"
  381. assert render(3, 2) == "session.3.v2.jsonl"
  382. (tmp_path / "session.jsonl").write_text(
  383. '{"type":"session","version":0}\n', encoding="utf-8",
  384. )
  385. (tmp_path / "session.v1.jsonl").write_text(
  386. '{"type":"session","version":1}\n', encoding="utf-8",
  387. )
  388. (tmp_path / "session.1.jsonl").write_text(
  389. '{"type":"session","version":0}\n', encoding="utf-8",
  390. )
  391. assert {index: path.name for index, path in select(tmp_path).items()} == {
  392. 0: "session.v1.jsonl",
  393. 1: "session.1.jsonl",
  394. }
  395. def test_snapshot_comparison_accepts_v3_output_against_v2_without_rewriting(tmp_path: Path) -> None:
  396. predecessor = '{"type":"session","version":2}\n'
  397. successor = '{"type":"session","version":3}\n'
  398. old_path = tmp_path / "session.v2.jsonl"
  399. old_path.write_text(predecessor, encoding="utf-8")
  400. files = {"session.v3.jsonl": successor}
  401. SMOKE["compare_snapshot_files"](files, False, tmp_path, ("session.v2.jsonl",))
  402. assert old_path.read_text(encoding="utf-8") == predecessor
  403. assert not (tmp_path / "session.v3.jsonl").exists()
  404. SMOKE["compare_snapshot_files"](files, True, tmp_path, ("session.v2.jsonl",))
  405. assert old_path.read_text(encoding="utf-8") == predecessor
  406. assert (tmp_path / "session.v3.jsonl").read_text(encoding="utf-8") == successor
  407. assert SMOKE["selected_snapshot_session_files"](tmp_path) == {0: tmp_path / "session.v3.jsonl"}
  408. @pytest.mark.parametrize("filenames", [
  409. ("session.1.v2.jsonl", "session.v2.jsonl"),
  410. ("session.v2.jsonl",),
  411. ("session.v2.jsonl", "session.2.v2.jsonl"),
  412. ])
  413. def test_snapshot_builder_checks_role_order_and_count_across_generations(
  414. tmp_path: Path, filenames: tuple[str, ...],
  415. ) -> None:
  416. files = {"session.v3.jsonl": "", "session.1.v3.jsonl": ""}
  417. with pytest.raises(AssertionError, match="snapshot builder produced"):
  418. SMOKE["compare_snapshot_files"](files, False, tmp_path, filenames)
  419. def test_snapshot_generation_comparison_rejects_changed_payload(tmp_path: Path) -> None:
  420. (tmp_path / "session.v2.jsonl").write_text(
  421. '{"type":"session","version":2,"id":"expected"}\n', encoding="utf-8",
  422. )
  423. with pytest.raises(AssertionError, match="executable snapshot mismatch"):
  424. SMOKE["compare_snapshot_files"](
  425. {"session.v3.jsonl": '{"type":"session","version":3,"id":"changed"}\n'},
  426. False, tmp_path, ("session.v2.jsonl",),
  427. )
  428. @pytest.mark.parametrize("version", [2, 4])
  429. @pytest.mark.parametrize("update", [False, True])
  430. def test_snapshot_comparison_rejects_noncurrent_writer(
  431. tmp_path: Path, version: int, update: bool,
  432. ) -> None:
  433. golden = '{"type":"session","version":2}\n'
  434. (tmp_path / "session.v2.jsonl").write_text(golden, encoding="utf-8")
  435. content = json.dumps({"type": "session", "version": version}) + "\n"
  436. with pytest.raises(AssertionError, match="expected current Session format v3"):
  437. SMOKE["compare_snapshot_files"](
  438. {f"session.v{version}.jsonl": content}, update, tmp_path, ("session.v2.jsonl",),
  439. )
  440. assert (tmp_path / "session.v2.jsonl").read_text(encoding="utf-8") == golden
  441. assert not (tmp_path / "session.v4.jsonl").exists()
  442. @pytest.mark.parametrize("version", [2, 3, 4])
  443. def test_persisted_session_requires_current_writer(version: int) -> None:
  444. content = json.dumps({"type": "session", "version": version}) + "\n"
  445. path = Path(f"session.v{version}.jsonl")
  446. if version == 3:
  447. assert SMOKE["assert_persisted_session_version"](path, content) == version
  448. else:
  449. with pytest.raises(AssertionError, match="expected current Session format v3"):
  450. SMOKE["assert_persisted_session_version"](path, content)
  451. def test_snapshot_generation_filename_must_match_header(tmp_path: Path) -> None:
  452. (tmp_path / "session.v1.jsonl").write_text(
  453. '{"type":"session","version":0}\n', encoding="utf-8",
  454. )
  455. with pytest.raises(AssertionError, match="filename declares Session format v1"):
  456. SMOKE["selected_snapshot_session_files"](tmp_path)
  457. @pytest.mark.parametrize("returncode", [1, -1073741819, 3221225477])
  458. def test_profile_plugin_failure_reports_native_exit_status(monkeypatch: pytest.MonkeyPatch, returncode: int) -> None:
  459. def failed_install(*args: object, **kwargs: object) -> subprocess.CompletedProcess[str]:
  460. return subprocess.CompletedProcess(args=[], returncode=returncode, stdout="", stderr="")
  461. monkeypatch.setattr(subprocess, "run", failed_install)
  462. with pytest.raises(AssertionError) as error:
  463. SMOKE["smoke_sdk_profile_plugin"]("http://127.0.0.1:1")
  464. message = str(error.value)
  465. assert f"returncode={returncode}" in message
  466. assert f"0x{returncode & 0xffffffff:08x}" in message
  467. assert "stdout='' stderr=''" in message