[LTP] [PATCH 3/6] fs: rewrite stream02 test using new API

Cyril Hrubis chrubis@suse.cz
Mon Mar 2 13:01:43 CET 2026


Hi!
> +	for (size_t i = 0; i < ARRAY_SIZE(modes); i++) {
> +		stream = SAFE_FOPEN(FILENAME, modes[i]);

This will TBROK instead of TFAIL if the open fails.

Maybe we need:

#define TST_EXP_PASS_PTR_NULL(SCALL, ...) \
	TST_EXP_PASS_PTR_(SCALL, #SCALL, NULL, ##__VA_ARGS__)

So that we can use that as:

	TST_EXP_PASS_PTR_NULL(fopen(FILENAME, modes[i]);

	if (TST_PASS)
		SAFE_FCLOSE(TST_RET_PTR);

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list