prot_hsymlinks: Fix failure on read-only machine
PATCH v2 1/1 prot_hsymlinks: Fix failure on read-only machine
Return 32 if /etc/passwd is read-only.
Fixes #88
--- testcases/kernel/security/prot_hsymlinks/prot_hsymlinks.c | 5 +++++ 1 file changed, 5 insertions(+)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-prot_hsymlinks-Fix-failure-on-read-only-machine.patch
Type: text/x-patch
Size: 604 bytes
Desc: not available
URL: <http://lists.linux.it/pipermail/ltp/attachments/20170409/f21d355b/attachment.bin>
PATCH 1/1 setpriority01: Fix failure on read-only machine
Return 32 if /etc/passwd is read-only.
Fixes: #137
See also: #88
--- testcases/kernel/syscalls/setpriority/setpriority01.c | 5 +++++ 1 file changed, 5 insertions(+)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-setpriority01-Fix-failure-on-read-only-machine.patch
Type: text/x-patch
Size: 600 bytes
Desc: not available
URL: <http://lists.linux.it/pipermail/ltp/attachments/20170409/2e4ae532/attachment.bin>
Alexey Kodanev
AppliedPATCH 1/1 setpriority01: Fix failure on read-only machine
Hi,
Quoted 3 lines · On 09.04.2017 11:38, [email protected] wrote:
Return 32 if
/etc/passwdis read-only.
Fixes: #137
See also: #88
Applied both patches, thanks! Modified the last one a little bit:
added __GNU_SOURCE foreaccess() and renamed tst_brkm() to tst_brk() as the test converted to newer LTP API.
Thanks,
Alexey
Hoang Nguyen
AppliedPATCH 1/1 setpriority01: Fix failure on read-only machine
Hi Alexey,
Thanks a lot for helping to merge patches.
Best regards,
Hoang
On Tue, Apr 11, 2017 at 16:46, Alexey Kodanev<[email protected]> wrote: Hi,
Quoted 3 lines · On 09.04.2017 11:38, [email protected] wrote:
Return 32 if
/etc/passwdis read-only.
Fixes: #137
See also: #88
Applied both patches, thanks! Modified the last one a little bit:
added __GNU_SOURCE foreaccess() and renamed tst_brkm() to tst_brk() as the test converted to newer LTP API.
Thanks,
Alexey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20170412/275cc14e/attachment-0001.html>
Hoang Nguyen
AppliedPATCH 1/1 setpriority01: Fix failure on read-only machine
In reply to Alexey KodanevHi Alexey
I've realized that tst_brk did not exist immediately and it makes the return value become 36, while we need 32. cleanup() does not need to run in this case.
root@mx6q:~# ./setpriority01
tst_test.c:847: INFO: Timeout per run is 0h 05m 00s
setpriority01.c:120: CONF: /etc/passwd is not accessible
userdel: user 'ltp_setpriority01' does not exist
setpriority01.c:133: WARN: 'userdel -r ltp_setpriority01' failed: ENOENT
Summary:
passed 0
failed 0
skipped 0
warnings 1
root@mx6q:~# echo $?
36
Could you please to check it again?
Thanks and regards,
Hoang
On Tue, Apr 11, 2017 at 16:46, Alexey Kodanev<[email protected]> wrote: Hi,
Quoted 3 lines · On 09.04.2017 11:38, [email protected] wrote:
Return 32 if
/etc/passwdis read-only.
Fixes: #137
See also: #88
Applied both patches, thanks! Modified the last one a little bit:
added __GNU_SOURCE foreaccess() and renamed tst_brkm() to tst_brk() as the test converted to newer LTP API.
Thanks,
Alexey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20170505/739f273c/attachment.html>
PATCH 1/1 setpriority01: check in cleanup that user was created
---
Could you try this patch?
.../kernel/syscalls/setpriority/setpriority01.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
testcases/kernel/syscalls/setpriority/setpriority01.c +5 -1
@@ -31,7 +31,7 @@#include "tst_test.h" static const char *username ="ltp_setpriority01" ; -static int pid, uid; +static int pid, uid, user_added; static struct tcase { int which;
@@ -120,6 +120,7 @@ static void setup(void)tst_brk (TCONF ,"/etc/passwd is not accessible" );tst_run_cmd (cmd_useradd,NULL ,NULL ,0 ); + user_added =1 ; ltpuser =SAFE_GETPWNAM (username); uid = ltpuser->pw_uid;
@@ -127,6 +128,9 @@ static void setup(void)static void cleanup (void ) { +if (!user_added) +return ; +const char *const cmd_userdel[] = {"userdel" ,"-r" , username,NULL };if (tst_run_cmd (cmd_userdel,NULL ,NULL ,1 ))
Signature · 1 line
1.7.1
PATCH 1/1 setpriority01: check in cleanup that user was created
Hi Alexey,
Sorry I tried on a remote machine yesterday and forget to get $? value, but I guess it already worked. Could you help to push it? I'll ping you if I found any issues on Monday. Many thanks,
Hoang
root@mx6q:~# ./setpriority01
tst_test.c:847: INFO: Timeout per run is 0h 05m 00s
setpriority01.c:120: CONF: /etc/passwd is not accessible
Summary:
passed 0
failed 0
skipped 0
warnings 0
Sent from Yahoo Mail on Android
On Fri, May 5, 2017 at 17:38, Alexey Kodanev<[email protected]> wrote: Signed-off-by: Alexey Kodanev <[email protected]>
---
Could you try this patch?
.../kernel/syscalls/setpriority/setpriority01.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
testcases/kernel/syscalls/setpriority/setpriority01.c +5 -1
@@ -31,7 +31,7 @@#include "tst_test.h" static const char *username ="ltp_setpriority01" ; -static int pid, uid; +static int pid, uid, user_added; static struct tcase { int which;
@@ -120,6 +120,7 @@ static void setup(void) tst_brk(TCONF, "/etc/passwd is not accessible"); tst_run_cmd(cmd_useradd, NULL, NULL, 0); + user_added = 1; ltpuser = SAFE_GETPWNAM(username); uid = ltpuser->pw_uid;
@@ -127,6 +128,9 @@ static void setup(void)static void cleanup (void ) { + if (!user_added) + return; + const char *const cmd_userdel[] = {"userdel", "-r", username, NULL}; if (tst_run_cmd(cmd_userdel, NULL, NULL, 1))
Signature · 6 lines
1.7.1 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20170506/e52a28e6/attachment-0001.html>
PATCH 1/1 setpriority01: check in cleanup that user was created
Hi again,
The return value is already 32 as expected. I think we can push the patch. Thanks and regards,
Hoang.
On Sat, May 6, 2017 at 10:14, Hoang Nguyen<[email protected]> wrote: Hi Alexey,
Sorry I tried on a remote machine yesterday and forget to get $? value, but I guess it already worked. Could you help to push it? I'll ping you if I found any issues on Monday. Many thanks,
Hoang
root@mx6q:~# ./setpriority01
tst_test.c:847: INFO: Timeout per run is 0h 05m 00s
setpriority01.c:120: CONF: /etc/passwd is not accessible
Summary:
passed 0
failed 0
skipped 0
warnings 0
Sent from Yahoo Mail on Android
On Fri, May 5, 2017 at 17:38, Alexey Kodanev<[email protected]> wrote: Signed-off-by: Alexey Kodanev <[email protected]>
---
Could you try this patch?
.../kernel/syscalls/setpriority/setpriority01.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
testcases/kernel/syscalls/setpriority/setpriority01.c +5 -1
@@ -31,7 +31,7 @@#include "tst_test.h" static const char *username ="ltp_setpriority01" ; -static int pid, uid; +static int pid, uid, user_added; static struct tcase { int which;
@@ -120,6 +120,7 @@ static void setup(void) tst_brk(TCONF, "/etc/passwd is not accessible"); tst_run_cmd(cmd_useradd, NULL, NULL, 0); + user_added = 1; ltpuser = SAFE_GETPWNAM(username); uid = ltpuser->pw_uid;
@@ -127,6 +128,9 @@ static void setup(void)static void cleanup (void ) { + if (!user_added) + return; + const char *const cmd_userdel[] = {"userdel", "-r", username, NULL}; if (tst_run_cmd(cmd_userdel, NULL, NULL, 1))
Signature · 7 lines
1.7.1 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20170508/5991f366/attachment.html>
Alexey Kodanev
AppliedPATCH 1/1 setpriority01: check in cleanup that user was created
Hi,
Quoted 3 lines · Hoang Nguyen
Hi again,
The return value is already 32 as expected. I think we can push the patch.
Thanks, applied.
Best regards,
Alexey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20170511/dc9b68af/attachment.html>