[oe-commits] [openembedded-core] 17/66: run-ptest: use error handling for useradd and userdel

git at git.openembedded.org git at git.openembedded.org
Tue May 21 23:32:40 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch thud
in repository openembedded-core.

commit ca415c4250e32e9430a13b9edf7b308637ce597f
Author: Aditya Tayade <Aditya.Tayade at kpit.com>
AuthorDate: Mon Mar 25 15:27:11 2019 +0000

    run-ptest: use error handling for useradd and userdel
    
    Error handling in shell scripts is too easy to forget and
    get wrong. It is possible to check every external command
    for return values but it is better to use a generic setting
    which halts execution of the script on any failures.
    
    Upstream-Status: Pending
    Signed-off-by: Aditya Tayade <Aditya.Tayade at kpit.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta/recipes-core/glib-2.0/glib-2.0/run-ptest | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
index 5b85e8f..8f082d3 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
+++ b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
@@ -1,5 +1,6 @@
 #! /bin/sh
 
+set -eux
 useradd glib2-test
 su glib2-test -c gnome-desktop-testing-runner glib
 userdel glib2-test

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list