From: chrubis@suse.cz
To: "gux.fnst@cn.fujitsu.com" <gux.fnst@cn.fujitsu.com>
Cc: "ltp-list@lists.sourceforge.net" <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH v4 2/2] openat/openat02.c: add a new case to test flags
Date: Wed, 14 May 2014 17:40:12 +0200 [thread overview]
Message-ID: <20140514154011.GA9266@rei> (raw)
In-Reply-To: <1397202849-5956-2-git-send-email-gux.fnst@cn.fujitsu.com>
Hi!
Pushed with folling chnages (mostly the same as for the open12
testcase), thanks.
diff --git a/testcases/kernel/syscalls/openat/openat02.c b/testcases/kernel/syscalls/openat/openat02.c
index 68e0879..edf71d7 100644
--- a/testcases/kernel/syscalls/openat/openat02.c
+++ b/testcases/kernel/syscalls/openat/openat02.c
@@ -173,7 +173,7 @@ void testfunc_cloexec(void)
if (pid == 0) {
if (execlp(TEST_APP, TEST_APP, buf, NULL))
- exit(1);
+ exit(2);
}
SAFE_CLOSE(cleanup, TEST_RETURN);
@@ -183,13 +183,14 @@ void testfunc_cloexec(void)
if (WIFEXITED(status)) {
switch ((int8_t)WEXITSTATUS(status)) {
- case -1:
+ case 0:
tst_resm(TPASS, "test O_CLOEXEC for openat success");
- break;
+ break;
case 1:
- tst_brkm(TBROK, cleanup, "execlp() failed");
- default:
tst_resm(TFAIL, "test O_CLOEXEC for openat failed");
+ break;
+ default:
+ tst_brkm(TBROK, cleanup, "execlp() failed");
}
} else {
tst_brkm(TBROK, cleanup,
@@ -236,7 +237,7 @@ void testfunc_noatime(void)
return;
}
- ret = tst_path_has_mnt_flags(cleanup, TEST_FILE, flags);
+ ret = tst_path_has_mnt_flags(cleanup, NULL, flags);
if (ret > 0) {
tst_resm(TCONF, "test O_NOATIME flag for openat needs "
"filesystems which are mounted without "
@@ -246,7 +247,7 @@ void testfunc_noatime(void)
SAFE_STAT(cleanup, TEST_FILE, &file_stat);
- sleep(2);
+ sleep(1);
TEST(openat(AT_FDCWD, TEST_FILE, O_NOATIME | O_RDONLY, 0777));
diff --git a/testcases/kernel/syscalls/openat/openat02_child.c b/testcases/kernel/syscalls/openat/openat02_child.c
index d2af36b..34c4b42 100644
--- a/testcases/kernel/syscalls/openat/openat02_child.c
+++ b/testcases/kernel/syscalls/openat/openat02_child.c
@@ -37,5 +37,5 @@ int main(int argc, char **argv)
fd = atoi(argv[1]);
ret = write(fd, STR, sizeof(STR) - 1);
- exit(ret);
+ return ret != -1;
}
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2014-05-14 15:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 12:00 [LTP] [PATCH v2 1/2] lib/tst_path_has_mnt_flags.c: create a function tst_path_has_mnt_flags() gux.fnst
2014-04-03 12:00 ` [LTP] [PATCH v2 2/2] openat/openat02.c: add a new case to test flags gux.fnst
2014-04-04 10:01 ` [LTP] [PATCH v2 1/2] lib/tst_path_has_mnt_flags.c: create a function tst_path_has_mnt_flags() Jan Stancek
2014-04-09 2:26 ` gux.fnst
2014-04-09 3:46 ` [LTP] [PATCH v3] " gux.fnst
2014-04-09 10:34 ` Jan Stancek
2014-04-09 12:52 ` chrubis
2014-04-11 6:22 ` gux.fnst
2014-04-11 7:54 ` [LTP] [PATCH v4 1/2] " gux.fnst
2014-04-11 7:54 ` [LTP] [PATCH v4 2/2] openat/openat02.c: add a new case to test flags gux.fnst
2014-05-14 15:40 ` chrubis [this message]
2014-05-06 17:26 ` [LTP] [PATCH v4 1/2] lib/tst_path_has_mnt_flags.c: create a function tst_path_has_mnt_flags() chrubis
2014-05-08 9:50 ` [LTP] [PATCH v5 " Xing Gu
2014-05-08 9:50 ` [LTP] [PATCH v5 2/2] openat/openat02.c: add a new case to test flags Xing Gu
2014-05-14 13:15 ` [LTP] [PATCH v5 1/2] lib/tst_path_has_mnt_flags.c: create a function tst_path_has_mnt_flags() chrubis
2014-05-14 13:35 ` chrubis
2014-05-14 13:46 ` chrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140514154011.GA9266@rei \
--to=chrubis@suse.cz \
--cc=gux.fnst@cn.fujitsu.com \
--cc=ltp-list@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.