linux-test-project / ltp

Linux Test Project (mailing list: https://lists.linux.it/listinfo/ltp)
https://linux-test-project.readthedocs.io/
GNU General Public License v2.0
2.28k stars 999 forks source link

Fix shell script syntax error #1012

Closed vigneshraman closed 1 year ago

vigneshraman commented 1 year ago

Fix the below error,

$ sh -n testcases/kernel/controllers/freezer/vfork_freeze.sh
   testcases/kernel/controllers/freezer/vfork_freeze.sh: 63: Syntax error: "(" unexpected

Signed-off-by: Vignesh Raman vignesh.raman@collabora.com

metan-ucw commented 1 year ago

Actually the only correct way how to declare functions in portable shell is:

foo()
{
        ...
}

See https://mywiki.wooledge.org/Bashism

vigneshraman commented 1 year ago

@metan-ucw, Thanks, fixed it.