Hi, all,

When I test toybox with toybox/tests/*.test scripts,
I got many false FAILs from it. So, I tried to fix useradd.test file.
What I fixed are as below.

1. I added the checking routine at the head of file whether it is run by
root.
useradd.test should be PASSed only by root user.

2. I Separated 'userdel' from 'testing' syntax.
in existing code,

*testing "adduser user_name (text)" "useradd toyTestUser $arg ||*
*   grep '^toyTestUser:' /etc/passwd $arg && test -d /home/toyTestUser &&*
*   userdel toyTestUser $arg && rm -rf /home/toyTestUser && echo 'yes'" \*
*  "yes\n" "" "$pass" *

*userdel toyTestUser $arg && rm -rf /home/toyTestUser* is not related with
useradd directly. But if userdel or rm occur error, this test case is
FAILed. So I moved this part out of testing syntax.

Could you share your opinion about this patch?


Yeongdeok

Attachment: 0001-Separate-userdel-from-testing-syntax.patch
Description: Binary data

_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to