* [LTP] [PATCH v2] prot_hsymlinks: Fix failure on read-only machine
@ 2017-04-09 8:38 the_hoang0709
2017-04-09 8:38 ` [LTP] [PATCH] setpriority01: " the_hoang0709
0 siblings, 1 reply; 9+ messages in thread
From: the_hoang0709 @ 2017-04-09 8:38 UTC (permalink / raw)
To: ltp
Return 32 if /etc/passwd is read-only.
Fixes #88
Signed-off-by: Hoang Nguyen <the_hoang0709@yahoo.com>
---
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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [LTP] [PATCH] setpriority01: Fix failure on read-only machine
2017-04-09 8:38 [LTP] [PATCH v2] prot_hsymlinks: Fix failure on read-only machine the_hoang0709
@ 2017-04-09 8:38 ` the_hoang0709
2017-04-11 9:46 ` Alexey Kodanev
0 siblings, 1 reply; 9+ messages in thread
From: the_hoang0709 @ 2017-04-09 8:38 UTC (permalink / raw)
To: ltp
Return 32 if /etc/passwd is read-only.
Fixes: #137
See also: #88
Signed-off-by: Hoang Nguyen <the_hoang0709@yahoo.com>
---
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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [LTP] [PATCH] setpriority01: Fix failure on read-only machine
2017-04-09 8:38 ` [LTP] [PATCH] setpriority01: " the_hoang0709
@ 2017-04-11 9:46 ` Alexey Kodanev
2017-04-12 7:10 ` Hoang Nguyen
2017-05-05 3:11 ` Hoang Nguyen
0 siblings, 2 replies; 9+ messages in thread
From: Alexey Kodanev @ 2017-04-11 9:46 UTC (permalink / raw)
To: ltp
Hi,
On 09.04.2017 11:38, the_hoang0709@yahoo.com wrote:
> Return 32 if /etc/passwd is 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [LTP] [PATCH] setpriority01: Fix failure on read-only machine
2017-04-11 9:46 ` Alexey Kodanev
@ 2017-04-12 7:10 ` Hoang Nguyen
2017-05-05 3:11 ` Hoang Nguyen
1 sibling, 0 replies; 9+ messages in thread
From: Hoang Nguyen @ 2017-04-12 7:10 UTC (permalink / raw)
To: ltp
Hi Alexey,
Thanks a lot for helping to merge patches.
Best regards,
Hoang
On Tue, Apr 11, 2017 at 16:46, Alexey Kodanev<alexey.kodanev@oracle.com> wrote: Hi,
On 09.04.2017 11:38, the_hoang0709@yahoo.com wrote:
> Return 32 if /etc/passwd is 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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [LTP] [PATCH] setpriority01: Fix failure on read-only machine
2017-04-11 9:46 ` Alexey Kodanev
2017-04-12 7:10 ` Hoang Nguyen
@ 2017-05-05 3:11 ` Hoang Nguyen
2017-05-05 10:44 ` [LTP] [PATCH] setpriority01: check in cleanup that user was created Alexey Kodanev
1 sibling, 1 reply; 9+ messages in thread
From: Hoang Nguyen @ 2017-05-05 3:11 UTC (permalink / raw)
To: ltp
Hi 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<alexey.kodanev@oracle.com> wrote: Hi,
On 09.04.2017 11:38, the_hoang0709@yahoo.com wrote:
> Return 32 if /etc/passwd is 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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [LTP] [PATCH] setpriority01: check in cleanup that user was created
2017-05-05 3:11 ` Hoang Nguyen
@ 2017-05-05 10:44 ` Alexey Kodanev
2017-05-06 3:14 ` Hoang Nguyen
0 siblings, 1 reply; 9+ messages in thread
From: Alexey Kodanev @ 2017-05-05 10:44 UTC (permalink / raw)
To: ltp
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
Could you try this patch?
.../kernel/syscalls/setpriority/setpriority01.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/testcases/kernel/syscalls/setpriority/setpriority01.c b/testcases/kernel/syscalls/setpriority/setpriority01.c
index 70e8264..df02bce 100644
--- a/testcases/kernel/syscalls/setpriority/setpriority01.c
+++ b/testcases/kernel/syscalls/setpriority/setpriority01.c
@@ -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))
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH] setpriority01: check in cleanup that user was created
2017-05-05 10:44 ` [LTP] [PATCH] setpriority01: check in cleanup that user was created Alexey Kodanev
@ 2017-05-06 3:14 ` Hoang Nguyen
2017-05-08 2:44 ` Hoang Nguyen
0 siblings, 1 reply; 9+ messages in thread
From: Hoang Nguyen @ 2017-05-06 3:14 UTC (permalink / raw)
To: ltp
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<alexey.kodanev@oracle.com> wrote: Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
Could you try this patch?
.../kernel/syscalls/setpriority/setpriority01.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/testcases/kernel/syscalls/setpriority/setpriority01.c b/testcases/kernel/syscalls/setpriority/setpriority01.c
index 70e8264..df02bce 100644
--- a/testcases/kernel/syscalls/setpriority/setpriority01.c
+++ b/testcases/kernel/syscalls/setpriority/setpriority01.c
@@ -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))
--
1.7.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20170506/e52a28e6/attachment-0001.html>
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH] setpriority01: check in cleanup that user was created
2017-05-06 3:14 ` Hoang Nguyen
@ 2017-05-08 2:44 ` Hoang Nguyen
2017-05-11 10:43 ` Alexey Kodanev
0 siblings, 1 reply; 9+ messages in thread
From: Hoang Nguyen @ 2017-05-08 2:44 UTC (permalink / raw)
To: ltp
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<the_hoang0709@yahoo.com> 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<alexey.kodanev@oracle.com> wrote: Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
Could you try this patch?
.../kernel/syscalls/setpriority/setpriority01.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/testcases/kernel/syscalls/setpriority/setpriority01.c b/testcases/kernel/syscalls/setpriority/setpriority01.c
index 70e8264..df02bce 100644
--- a/testcases/kernel/syscalls/setpriority/setpriority01.c
+++ b/testcases/kernel/syscalls/setpriority/setpriority01.c
@@ -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))
--
1.7.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20170508/5991f366/attachment.html>
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH] setpriority01: check in cleanup that user was created
2017-05-08 2:44 ` Hoang Nguyen
@ 2017-05-11 10:43 ` Alexey Kodanev
0 siblings, 0 replies; 9+ messages in thread
From: Alexey Kodanev @ 2017-05-11 10:43 UTC (permalink / raw)
To: ltp
Hi,
On 05/08/2017 05:44 AM, Hoang Nguyen wrote:
> 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>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-05-11 10:43 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-09 8:38 [LTP] [PATCH v2] prot_hsymlinks: Fix failure on read-only machine the_hoang0709
2017-04-09 8:38 ` [LTP] [PATCH] setpriority01: " the_hoang0709
2017-04-11 9:46 ` Alexey Kodanev
2017-04-12 7:10 ` Hoang Nguyen
2017-05-05 3:11 ` Hoang Nguyen
2017-05-05 10:44 ` [LTP] [PATCH] setpriority01: check in cleanup that user was created Alexey Kodanev
2017-05-06 3:14 ` Hoang Nguyen
2017-05-08 2:44 ` Hoang Nguyen
2017-05-11 10:43 ` Alexey Kodanev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.