Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+21 -13
+1 -11
tools/testing/selftests/kselftest/runner.sh
··· 24 24 fi 25 25 } 26 26 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 - 37 27 run_one() 38 28 { 39 29 DIR="$1" ··· 44 54 echo "not ok $test_num $TEST_HDR_MSG" 45 55 else 46 56 cd `dirname $TEST` > /dev/null 47 - (((((tap_unbuffer ./$BASENAME_TEST 2>&1; echo $? >&3) | 57 + (((((./$BASENAME_TEST 2>&1; echo $? >&3) | 48 58 tap_prefix >&4) 3>&1) | 49 59 (read xs; exit $xs)) 4>>"$logfile" && 50 60 echo "ok $test_num $TEST_HDR_MSG") ||
+1
tools/testing/selftests/timers/adjtick.c
··· 136 136 137 137 eppm = get_ppm_drift(); 138 138 printf("%lld usec, %lld ppm", systick + (systick * eppm / MILLION), eppm); 139 + fflush(stdout); 139 140 140 141 tx1.modes = 0; 141 142 adjtimex(&tx1);
+1
tools/testing/selftests/timers/leapcrash.c
··· 101 101 } 102 102 clear_time_state(); 103 103 printf("."); 104 + fflush(stdout); 104 105 } 105 106 printf("[OK]\n"); 106 107 return ksft_exit_pass();
+1
tools/testing/selftests/timers/mqueue-lat.c
··· 102 102 int ret; 103 103 104 104 printf("Mqueue latency : "); 105 + fflush(stdout); 105 106 106 107 ret = mqueue_lat_test(); 107 108 if (ret < 0) {
+1
tools/testing/selftests/timers/nanosleep.c
··· 142 142 continue; 143 143 144 144 printf("Nanosleep %-31s ", clockstring(clockid)); 145 + fflush(stdout); 145 146 146 147 length = 10; 147 148 while (length <= (NSEC_PER_SEC * 10)) {
+1
tools/testing/selftests/timers/nsleep-lat.c
··· 155 155 continue; 156 156 157 157 printf("nsleep latency %-26s ", clockstring(clockid)); 158 + fflush(stdout); 158 159 159 160 length = 10; 160 161 while (length <= (NSEC_PER_SEC * 10)) {
+1
tools/testing/selftests/timers/raw_skew.c
··· 112 112 printf("WARNING: ADJ_OFFSET in progress, this will cause inaccurate results\n"); 113 113 114 114 printf("Estimating clock drift: "); 115 + fflush(stdout); 115 116 sleep(120); 116 117 117 118 get_monotonic_and_raw(&mon, &raw);
+1
tools/testing/selftests/timers/set-tai.c
··· 55 55 printf("tai offset started at %i\n", ret); 56 56 57 57 printf("Checking tai offsets can be properly set: "); 58 + fflush(stdout); 58 59 for (i = 1; i <= 60; i++) { 59 60 ret = set_tai(i); 60 61 ret = get_tai();
+2
tools/testing/selftests/timers/set-tz.c
··· 65 65 printf("tz_minuteswest started at %i, dst at %i\n", min, dst); 66 66 67 67 printf("Checking tz_minuteswest can be properly set: "); 68 + fflush(stdout); 68 69 for (i = -15*60; i < 15*60; i += 30) { 69 70 ret = set_tz(i, dst); 70 71 ret = get_tz_min(); ··· 77 76 printf("[OK]\n"); 78 77 79 78 printf("Checking invalid tz_minuteswest values are caught: "); 79 + fflush(stdout); 80 80 81 81 if (!set_tz(-15*60-1, dst)) { 82 82 printf("[FAILED] %i didn't return failure!\n", -15*60-1);
+1
tools/testing/selftests/timers/threadtest.c
··· 163 163 strftime(buf, 255, "%a, %d %b %Y %T %z", localtime(&start)); 164 164 printf("%s\n", buf); 165 165 printf("Testing consistency with %i threads for %ld seconds: ", thread_count, runtime); 166 + fflush(stdout); 166 167 167 168 /* spawn */ 168 169 for (i = 0; i < thread_count; i++)
+2
tools/testing/selftests/timers/valid-adjtimex.c
··· 123 123 /* Set the leap second insert flag */ 124 124 125 125 printf("Testing ADJ_FREQ... "); 126 + fflush(stdout); 126 127 for (i = 0; i < NUM_FREQ_VALID; i++) { 127 128 tx.modes = ADJ_FREQUENCY; 128 129 tx.freq = valid_freq[i]; ··· 251 250 int validate_set_offset(void) 252 251 { 253 252 printf("Testing ADJ_SETOFFSET... "); 253 + fflush(stdout); 254 254 255 255 /* Test valid values */ 256 256 if (set_offset(NSEC_PER_SEC - 1, 1))
+8 -2
tools/testing/selftests/x86/syscall_arg_fault.c
··· 43 43 44 44 static volatile sig_atomic_t n_errs; 45 45 46 - static void sigsegv(int sig, siginfo_t *info, void *ctx_void) 46 + static void sigsegv_or_sigbus(int sig, siginfo_t *info, void *ctx_void) 47 47 { 48 48 ucontext_t *ctx = (ucontext_t*)ctx_void; 49 49 ··· 73 73 if (sigaltstack(&stack, NULL) != 0) 74 74 err(1, "sigaltstack"); 75 75 76 - sethandler(SIGSEGV, sigsegv, SA_ONSTACK); 76 + sethandler(SIGSEGV, sigsegv_or_sigbus, SA_ONSTACK); 77 + /* 78 + * The actual exception can vary. On Atom CPUs, we get #SS 79 + * instead of #PF when the vDSO fails to access the stack when 80 + * ESP is too close to 2^32, and #SS causes SIGBUS. 81 + */ 82 + sethandler(SIGBUS, sigsegv_or_sigbus, SA_ONSTACK); 77 83 sethandler(SIGILL, sigill, SA_ONSTACK); 78 84 79 85 /*