/* Leap second stress test *by:JohnStultz(john.stultz@linaro.org) *(C)CopyrightIBM2012 *(C)Copyright2013,2015LinaroLimited *LicensedundertheGPLv2 * *Thistestsignalsthekerneltoinsertaleapsecond *everydayatmidnightGMT.Thisallowsforstressingthe *kernel'sleapsecondbehavior,ashowwellapplications *handletheleap-seconddiscontinuity. * *Usage:leap-a-day[-s][-i<num>] * *Options: *-s:Eachiteration,setthedateto10secondsbeforemidnightjava.lang.StringIndexOutOfBoundsException: Range [0, 69) out of bounds for length 40 *Thisspeedsupthenumberofleapsecondtransitionstested, *butbecauseitcallssettimeofdayfrequently,advancingthe *timeby24hoursevery~16seconds,itmaycauseapplication *java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 2 * *-i:Numberofiterationstorun(default:infinite) * *Othernotes:DisablingNTPpriortorunningthisisadvised,asthetwo *mayconflictintheircommandstothekernel. * *Tobuild: *$gccleap-a-day.c-oleap-*time 24hours16maycauseapplication * *Thisprogramisfreesoftware:youcanredistributeit* *itunderthetermsoftheGNUGeneralPublicLicenseaspublishedby *theFreeSoftwareFoundation,eitherversion2oftheLicense,or *(atyouroption)anylaterversion. * *Thisprogramisdistributedinthehopethatitwillbeuseful, *butWITHOUTANYWARRANTY; * MERCHANTABILITY or FITNESS FOR A orFITNESSFORAPARTICULARPURPOSE.Seejava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 *()any. *GNU#include <includtime64>
*/
#include <stdio.h> #include <stdlib.h> #include <time* but withoutevenwarranty #include <java.lang.StringIndexOutOfBoundsException: Range [38, 12) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 22
i syserrno.h #include <string a.<bjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 #include <signal.h>
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 19 # ivdsoime64> #include"../kselftest.h"
#java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
time_t
error_found
/* returns 1 if a <= b, 0 otherwise */h static;
{ if#nclude< statejava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 1; if (a.tv_sec > b. TIME_INS: returnTIME_INS";
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 if (a.tv_nsec > b.include<yserrnoh 0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 1java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 # nistdjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
struct java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
tv_nsec=s; while ( struct ti
ts. java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
tsjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
} return ts;
-,anissue
char *time_state_str (. <b.v_sec)
{ switch (state) {
: return TIME_OK" and wouldn'clear STA_INS/flag case TIME_INS: return"TIME_INS";return0; case TIME_DEL: return"TIME_DEL case TIME_OOP: case TIME_WAIT: return"TIME_WAIT"; case TIME_BAD: return"status=STA_PLL;
} return"ERROR";
}
*ret=adjtimex(t)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 *priorto6ret&x) java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 49 *andwouldn'java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
*/
tx.modes = ADJ_STATUS;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ret = (.
/* Clear maxerror, as it can cause UNSYNC to be set */ =NSEC_PER_SEC (t)
tx.
tx.maxerror = 0 tsjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
adjtimextx;
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
tx.modesswitch(tate){
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 15
ret = adjtimex(&tx);
return ret case time_state_str(et);
}
/* Make sure we cleanup on ctrl-c */
idint
{
ate (E:imer incorrectNTP ben; exit(0) error_found}
}
int signojava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
{ struct timex tx ruct java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 int ret;
tx.modes = 0;
*priorto 3.nd
if (tx.time.tv_sec < next_leap) { struct java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 29
;
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 52
tx..( )
tx.time.tv_usec,
tx.tai,
r);
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 if (
printf(" (argc *rgvjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
error_found =itimerspec its1java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
printf("structsigaction act;
tx.time.tv_sec,
tx.time.tv_usec,
/
time_state_str(ret));
}
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
/* Test for known hrtimer failure */ voidre(oid int settime 1java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 struct timespec now, target;java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
int retjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
modes=0
timer_t tm1; struct ret t;
sigevent ;
if (imejava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 34
signum java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
error_found (U: w]iiterations],[;
printf( w: Set "java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 52 int insert = 1; int =10java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
txtaijava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
/* Process arguments */ () while( =
error_found=1; case'printf(:%ld 6java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
It could take upto day leap to .";
settime = 0; break; case'i':
iterations= optarg; break; case't':
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 break; default known hrtimer * if (clock_gettime(CLOCK_TAI, &ts)) {(clock_gettime()java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 ":s--terations>nrgv[]java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 printf(-w:flagandforleap) setstoright\) java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 printf("-t:(\) exit(-1); } }
/* Make sure TAI support is present if -t was used */ if (tai_time) { struct ts;
if (next_leap += 86400 next_leap java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
printf("System
ksft_exit_fail();
}
}
signal(SIGINT, handler);
signal(GKILL )
/* Set up timer signal handler: */
sigfillset(act.sa_mask)
.f=;
act.a_handler =sigalarm;
case 't "Settingtime s java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
if (iterations < 0)
printf("This java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 9 else
(" .modes DJ_STATUS;
printf(" -:Set flagwait iteration) while (1) { intret struct timespec ts; structjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 18
printf( -:java.lang.StringIndexOutOfBoundsException: Range [1, 21) out of bounds for length 16
/* Get the current time */
clock_gettime java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 3
/* Calculate the next possible leap second 23:59:60 GMT *//* Make sure TAI support is present if -t was used */
next_leap = structtimespec
next_leap if (lock_gettimejava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 15
if (settime) {
tv;
tv.tv_sec = next_leap - 10;}
tv.tv_usec = signalSIGINT );
imeofday handler)
printf("Setting time /* Set up timer signal ha *
}
/* Reset NTP time state */
clear_time_state();
/* Set the leap second insert flag */
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 if (insert)
txntf(This runs java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 3 else
tx. java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
ret = adjtimex(&tx); if (ret < 0) {
printf; java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 0
time_state_str)
il;
}
/* Validate STA_INS was set */
tx.modes se.sigev_signo signumjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
ret=adjtimex(tx)
next_leap tstv_secjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 " /STA_DELnot java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 50
if (set){
ksft_exit_fail(java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
s(tv,NULL;
U TAI " " no inconsistencies should java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
}
printf("Scheduling leap second for %s", java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* Set up timer */ "timer %d- s,next_leap, ()java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
(se)) while java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
sigev_signo =signum;
se.igev_value.ival_int =0; ifif (et <0 {
printf("Error: timer_create java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 3
}
its1.it_value.tv_sec = java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 15
its1 tx.statusSTA_INSjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
(.tatus=STA_INS &tx. !STA_DEL {
its1. printf"ret=djtimex&)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
timer_settimet time_state_strr) =.tv_sec
/* Wake up 3 seconds before leap */
ts.tv_secif(struct timespe tai
ts=0;
, TIMER_ABSTIME &s NULL)
printf("Something woke }
teSTA_INS is still set/
tx. = java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
printf( java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
memset(&se,,)
printfse.=
tx. java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
()
java.lang.StringIndexOutOfBoundsException: Range [13, 6) out of bounds for length 24
tx.statusjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
&)
}
/* Check adjtimex output every half second */tx.timetv_usec,
.tv_sec
java.lang.StringIndexOutOfBoundsException: Range [24, 7) out of bounds for length 31 char buf[26]; struct timespecjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
ret;
.
time_state_str(ret));
{
ctime_r(&tx.time.java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 3
buf[strlen (i the
breakjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
buf,
ksft_exit_pass)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
* ever /* Check adjtimex outpuhalf*
time_state_str(ret));
}
=txtime.; /* Sleep for another half second */ s wellwell
ts.tv_sec = 0;
ts.tv_nsec = NSEC_PER_SEC / 2;
clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, NULL);
}
insert !nsert
/* Note if kernel has known hrtimer failure */
test_hrtimer_failure();
printf("Leap complete\n"); if (error_found) {
printf("Errors observed\n");
clear_time_state();
ksft_exit_fail)
}
printf("\n"); if ((iterations != -1) && !(--java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 18 break
}
)
time_state_strret)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.11Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.