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

git at git.openembedded.org git at git.openembedded.org
Mon Mar 25 23:21:36 UTC 2019


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

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

commit 4868de2e67bd304e41ac2158ccfcb166cfe16242
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>
---
 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