Skip to content

Commit 7f8b40e

Browse files
committed
Merge tag 'linux-kselftest-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull Kselftest fixes from Shuah Khan: - Two fixes to regressions introduced in kselftest Makefile test run output refactoring work (Kees Cook) - Adding Atom support to syscall_arg_fault test (Tong Bo) * tag 'linux-kselftest-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/timers: Add missing fflush(stdout) calls selftests: Remove forced unbuffering for test running selftests/x86: Support Atom for syscall_arg_fault test
2 parents e7bd3e2 + fe48319 commit 7f8b40e

File tree

12 files changed

+21
-13
lines changed

12 files changed

+21
-13
lines changed

tools/testing/selftests/kselftest/runner.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,6 @@ tap_prefix()
2424
fi
2525
}
2626

27-
# If stdbuf is unavailable, we must fall back to line-at-a-time piping.
28-
tap_unbuffer()
29-
{
30-
if ! which stdbuf >/dev/null ; then
31-
"$@"
32-
else
33-
stdbuf -i0 -o0 -e0 "$@"
34-
fi
35-
}
36-
3727
run_one()
3828
{
3929
DIR="$1"
@@ -54,7 +44,7 @@ run_one()
5444
echo "not ok $test_num $TEST_HDR_MSG"
5545
else
5646
cd `dirname $TEST` > /dev/null
57-
(((((tap_unbuffer ./$BASENAME_TEST 2>&1; echo $? >&3) |
47+
(((((./$BASENAME_TEST 2>&1; echo $? >&3) |
5848
tap_prefix >&4) 3>&1) |
5949
(read xs; exit $xs)) 4>>"$logfile" &&
6050
echo "ok $test_num $TEST_HDR_MSG") ||

tools/testing/selftests/timers/adjtick.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ int check_tick_adj(long tickval)
136136

137137
eppm = get_ppm_drift();
138138
printf("%lld usec, %lld ppm", systick + (systick * eppm / MILLION), eppm);
139+
fflush(stdout);
139140

140141
tx1.modes = 0;
141142
adjtimex(&tx1);

tools/testing/selftests/timers/leapcrash.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ int main(void)
101101
}
102102
clear_time_state();
103103
printf(".");
104+
fflush(stdout);
104105
}
105106
printf("[OK]\n");
106107
return ksft_exit_pass();

tools/testing/selftests/timers/mqueue-lat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ int main(int argc, char **argv)
102102
int ret;
103103

104104
printf("Mqueue latency : ");
105+
fflush(stdout);
105106

106107
ret = mqueue_lat_test();
107108
if (ret < 0) {

tools/testing/selftests/timers/nanosleep.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ int main(int argc, char **argv)
142142
continue;
143143

144144
printf("Nanosleep %-31s ", clockstring(clockid));
145+
fflush(stdout);
145146

146147
length = 10;
147148
while (length <= (NSEC_PER_SEC * 10)) {

tools/testing/selftests/timers/nsleep-lat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ int main(int argc, char **argv)
155155
continue;
156156

157157
printf("nsleep latency %-26s ", clockstring(clockid));
158+
fflush(stdout);
158159

159160
length = 10;
160161
while (length <= (NSEC_PER_SEC * 10)) {

tools/testing/selftests/timers/raw_skew.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ int main(int argv, char **argc)
112112
printf("WARNING: ADJ_OFFSET in progress, this will cause inaccurate results\n");
113113

114114
printf("Estimating clock drift: ");
115+
fflush(stdout);
115116
sleep(120);
116117

117118
get_monotonic_and_raw(&mon, &raw);

tools/testing/selftests/timers/set-tai.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ int main(int argc, char **argv)
5555
printf("tai offset started at %i\n", ret);
5656

5757
printf("Checking tai offsets can be properly set: ");
58+
fflush(stdout);
5859
for (i = 1; i <= 60; i++) {
5960
ret = set_tai(i);
6061
ret = get_tai();

tools/testing/selftests/timers/set-tz.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ int main(int argc, char **argv)
6565
printf("tz_minuteswest started at %i, dst at %i\n", min, dst);
6666

6767
printf("Checking tz_minuteswest can be properly set: ");
68+
fflush(stdout);
6869
for (i = -15*60; i < 15*60; i += 30) {
6970
ret = set_tz(i, dst);
7071
ret = get_tz_min();
@@ -76,6 +77,7 @@ int main(int argc, char **argv)
7677
printf("[OK]\n");
7778

7879
printf("Checking invalid tz_minuteswest values are caught: ");
80+
fflush(stdout);
7981

8082
if (!set_tz(-15*60-1, dst)) {
8183
printf("[FAILED] %i didn't return failure!\n", -15*60-1);

tools/testing/selftests/timers/threadtest.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ int main(int argc, char **argv)
163163
strftime(buf, 255, "%a, %d %b %Y %T %z", localtime(&start));
164164
printf("%s\n", buf);
165165
printf("Testing consistency with %i threads for %ld seconds: ", thread_count, runtime);
166+
fflush(stdout);
166167

167168
/* spawn */
168169
for (i = 0; i < thread_count; i++)

0 commit comments

Comments
 (0)