[LTP] [RFC PATCH 1/1] lib/test.sh: Fix 'unbound variable' error

Cyril Hrubis chrubis@suse.cz
Tue Jun 27 14:24:03 CEST 2017


Hi!
> Some distros have set nounset as default, which requires to fix testing
> optional variables.
> 
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> I don't want to disable check with 'set +o nounset' in each script, I think
> it's actually quite good to have it. It just requires taking care when using
> optional variables. But it might be better to set it at the top:
> TST_NO_CLEANUP="${TST_NO_CLEANUP:-}"
> LTP_IPC_PATH="${LTP_IPC_PATH:-}"

That sounds better to me, maybe with a short comment that we are trying
to avoid problems on nounset.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list