Hello, Tao.

On Tue, 08 Sep 2026 18:01:41 +0800, Tao Cui wrote:

> +             TH_LOG("open %s: %s", path, strerror(errno));

TH_LOG is not available through test_progs.h. A syntax check of the posted
runner fails here. Please use the test_progs logging facilities.

> +#include "iocost_model.skel.h"

The selftest kernel config also needs CONFIG_BLK_CGROUP_IOCOST and
CONFIG_BLK_CGROUP_IOCOST_BPF so vmlinux.h contains iocost_model_ops. The
runtime skip cannot avoid that build dependency.

> +                     err = fprintf(fp, "%s", buf) <= 0;
> +                     fclose(fp);

fprintf() can succeed while the buffered write is rejected at fclose(),
whose result is ignored. Check the actual write result and expected errno.
Please also check the flush and restoration errors in switch_to_bpf().

Thanks.

-- 
tejun

Reply via email to