[LTP] lib: Introduce tst_path.h to consolidate system paths

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Mon May 4 16:08:19 CEST 2026


Hi Li,

On Mon, 4 May 2026, Li Wang wrote:
> lib: Introduce tst_path.h to consolidate system paths

> +#define PROC_SYS_USER	"/proc/sys/user/"

userns08.c includes tst_test.h (line 24), which now includes tst_path.h
added by this same patch, so PROC_SYS_USER is already visible. This local
definition causes a -Wmacro-redefined warning. Remove it.

> +#endif /* TST_PATH_H */

The guard symbol is TST_PATH__, so the comment should read
/* TST_PATH__ */ to match.

> +	SAFE_FILE_SCANF(PROC_SYS_KERNEL	"pid_max", "%d\n", &inval_pgid);

A few replacement sites (pidns05.c, userns06_capcheck.c, waitid10.c,
userns01.c) have a tab between the macro and the string literal instead
of a single space like the rest of the patch.

---
Note:

Our agent completed the review of the patch. The full review can be
found at: https://github.com/linux-test-project/ltp-agent/actions/runs/25323298192

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer


More information about the ltp mailing list