Skip to content

C API: .needs_cmds and SAFE_RUN_CMD()

Xiao Yang ltp 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 6 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 6 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [LTP] [PATCH 0/6] C API: .needs_cmds and SAFE_RUN_CMD()
Quoted 2 lines · Petr Vorel

+ There is a double check (first in
.needs_cmds, then in SAFE_RUN_CMD()), maybe that's not needed.

Hi Petr,

Why do you need the duplicate .needs_cmds flag?(it introduces the double check as you said)

Usually, all tests run commands by tst_run_cmd()/SAFE_RUN_CMD() and they can report TCONF

by passing TST_RUN_CMD_CHECK_CMD so it is fair to be a part of tst_run_cmd()/SAFE_RUN_CMD().

Thanks,

Xiao Yang