* [LTP] settimeofday01:TFAIL in Kernel 4.2.0
@ 2015-09-13 14:27 Takeshi Misawa
2015-09-15 8:51 ` Cyril Hrubis
0 siblings, 1 reply; 4+ messages in thread
From: Takeshi Misawa @ 2015-09-13 14:27 UTC (permalink / raw)
To: ltp-list
This is a my first mail to LTP mailing list.
I'm testing Linux Kernel 4.2.0 by LTP. I saw a following Error.
-----
settimeofday01 1 TFAIL : settimeofday01.c:98: Error Setting Time,
errno=22
settimeofday01 2 TFAIL : settimeofday01.c:120: Test condition 1 failed
settimeofday01 3 TPASS : Test condition 2 successful
-----
In commit of Linux Kernel:
e1d7ba8735551ed79c7a0463a042353574b96da3 "time: Always make sure
wall_to_monotonic isn't positive"
add a new check to do_settimeofday64().
This commit said:
"As a result one can't set the CLOCK_REALTIME time prior to (1970 +
system uptime)."
In settimeofday01 test case, parameter of first settimeofday() is
100s100μs. A lot of cases, TEST_RETURN is -1.
I'd better to modify settimeofday01 test case.
To meet that requirement, I made following changes.(I have less
confidence that it is correct...)
-----
diff --git a/testcases/kernel/syscalls/settimeofday/settimeofday01.c
b/testcases/kernel/syscalls/settimeofday
index b598800..a6894fb 100644
--- a/testcases/kernel/syscalls/settimeofday/settimeofday01.c
+++ b/testcases/kernel/syscalls/settimeofday/settimeofday01.c
@@ -88,9 +88,10 @@ int main(int argc, char **argv)
int condition_number = 1;
/* reset tst_count in case we are looping */
tst_count = 0;
-
- tp.tv_sec = VAL_SEC;
- tp.tv_usec = VAL_MSEC;
+
+ gettimeofday(&tp, NULL);
+ tp.tv_sec += VAL_SEC;
+ tp.tv_usec += VAL_MSEC;
TEST(settimeofday(&tp, NULL));
if (TEST_RETURN == -1) {
----
Result:
settimeofday01 1 TPASS : Test condition 1 successful
settimeofday01 2 TPASS : Test condition 2 successful
Thanks.
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [LTP] settimeofday01:TFAIL in Kernel 4.2.0
2015-09-13 14:27 [LTP] settimeofday01:TFAIL in Kernel 4.2.0 Takeshi Misawa
@ 2015-09-15 8:51 ` Cyril Hrubis
2015-09-19 7:57 ` Takeshi Misawa
0 siblings, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2015-09-15 8:51 UTC (permalink / raw)
To: ltp
Hi!
> This is a my first mail to LTP mailing list.
>
> I'm testing Linux Kernel 4.2.0 by LTP. I saw a following Error.
> -----
> settimeofday01 1 TFAIL : settimeofday01.c:98: Error Setting Time,
> errno=22
> settimeofday01 2 TFAIL : settimeofday01.c:120: Test condition 1 failed
> settimeofday01 3 TPASS : Test condition 2 successful
> -----
>
> In commit of Linux Kernel:
> e1d7ba8735551ed79c7a0463a042353574b96da3 "time: Always make sure
> wall_to_monotonic isn't positive"
> add a new check to do_settimeofday64().
>
> This commit said:
> "As a result one can't set the CLOCK_REALTIME time prior to (1970 +
> system uptime)."
>
> In settimeofday01 test case, parameter of first settimeofday() is
> 100s100??s. A lot of cases, TEST_RETURN is -1.
>
> I'd better to modify settimeofday01 test case.
>
> To meet that requirement, I made following changes.(I have less
> confidence that it is correct...)
The patch looks good but does not apply since the the whitespaces are
corrupted. Can you please resend correct one with a better changelog and
Signed-off-by line? (set you name and email in git, then use git commit
-s and git format-patch -1 and send the result)
Also the mailing list has moved to ltp@lists.linux.it, please use that
one from now on.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] settimeofday01:TFAIL in Kernel 4.2.0
2015-09-15 8:51 ` Cyril Hrubis
@ 2015-09-19 7:57 ` Takeshi Misawa
2015-09-24 14:26 ` Cyril Hrubis
0 siblings, 1 reply; 4+ messages in thread
From: Takeshi Misawa @ 2015-09-19 7:57 UTC (permalink / raw)
To: ltp
> Hi!
>> This is a my first mail to LTP mailing list.
>>
>> I'm testing Linux Kernel 4.2.0 by LTP. I saw a following Error.
>> -----
>> settimeofday01 1 TFAIL : settimeofday01.c:98: Error Setting Time,
>> errno=22
>> settimeofday01 2 TFAIL : settimeofday01.c:120: Test condition 1 failed
>> settimeofday01 3 TPASS : Test condition 2 successful
>> -----
>>
>> In commit of Linux Kernel:
>> e1d7ba8735551ed79c7a0463a042353574b96da3 "time: Always make sure
>> wall_to_monotonic isn't positive"
>> add a new check to do_settimeofday64().
>>
>> This commit said:
>> "As a result one can't set the CLOCK_REALTIME time prior to (1970 +
>> system uptime)."
>>
>> In settimeofday01 test case, parameter of first settimeofday() is
>> 100s100??s. A lot of cases, TEST_RETURN is -1.
>>
>> I'd better to modify settimeofday01 test case.
>>
>> To meet that requirement, I made following changes.(I have less
>> confidence that it is correct...)
>
> The patch looks good but does not apply since the the whitespaces are
> corrupted. Can you please resend correct one with a better changelog and
> Signed-off-by line? (set you name and email in git, then use git commit
> -s and git format-patch -1 and send the result)
>
> Also the mailing list has moved to ltp@lists.linux.it, please use that
> one from now on.
>
Thank you for reply and kindly advice.
I resent a patch. (Sorry for my late reply.)
Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: settimeofday01-fix-settimeofday-argument-4.2.patch
Type: text/x-patch
Size: 1371 bytes
Desc: not available
URL: <http://lists.linux.it/pipermail/ltp/attachments/20150919/a0536233/attachment.bin>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] settimeofday01:TFAIL in Kernel 4.2.0
2015-09-19 7:57 ` Takeshi Misawa
@ 2015-09-24 14:26 ` Cyril Hrubis
0 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2015-09-24 14:26 UTC (permalink / raw)
To: ltp
Hi!
> Thank you for reply and kindly advice.
>
> I resent a patch. (Sorry for my late reply.)
Pushed with minor changes to the commit message, thanks.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-09-24 14:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-13 14:27 [LTP] settimeofday01:TFAIL in Kernel 4.2.0 Takeshi Misawa
2015-09-15 8:51 ` Cyril Hrubis
2015-09-19 7:57 ` Takeshi Misawa
2015-09-24 14:26 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox