For example if you do
$mkdir -p /tmp/dir1/dir2
Then:
$ls /tmp/di <TAB> auto completes to
$ls /tmp/dir1/
Hitting <TAB> again auto completes to
$ls /tmp/dir1/dir2
Whereas it should auto complete to
$ls /tmp/dir1/dir2/
Essentially, in cases like above where you have to hit <TAB> twice to get
to the match and there is only one match (because only one file/sub-directory) then
auto complete doesn't work correctly. It doesn't append a trailing slash (in case
of directory) or a space (in case of a file) to the match name.
I have tested file name completion in sh(1) and symbol completion in gdb after
this change.
in6_selectsrc returned a pointer to in6_addr that wan't guaranteed to be
safe by pserialize (or psref), which was racy. Let callers pass a pointer
to in6_addr and in6_selectsrc copy a result to it inside pserialize
critical sections.
Add missing __restrict keyword to the first pointer parameter.
It was already used for the second argument, should not be a functional
change and generated code should be the same.
This new form is now aligned with POSIX.
This test is a clone on t_mutex with additional two tests for timed-mutex
specific block.
All simple-mutex (not with the timed property according to the C11 wording)
specific tests are covered by pthread_mutex_timedlock(3) with parameter
ts_lengthy of sufficiently large tv_sec value (right now UINT16_MAX). If,
a test will hang, it won't wait UINT16_MAX seconds, but will be terminated
within the default timeout for ATF tests (right now 300 [sec] in my
NetBSD/amd64 setup).
This test was inspired by a classic selflock test failure of
pthread_mutex_timedlock(3) of the following form:
#include <assert.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <time.h>
int main(int argc, char **argv)
{
pthread_mutex_t mtx;
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 1000;
printf("ts{.tv_sec = %d, .tv_nsec=%ld}\n", ts.tv_sec, ts.tv_nsec);
fflush(stdout);
printf("mtx_init\n");
assert(pthread_mutex_init(&mtx, NULL) == 0);
printf("mtx_lock\n");
assert(pthread_mutex_lock(&mtx) == 0);
printf("mtx_timedlock\n");
assert(pthread_mutex_timedlock(&mtx, &ts) == ETIMEDOUT);
printf("mtx_unlock\n");
assert(pthread_mutex_unlock(&mtx) == 0);
printf("mtx_destroy\n");
assert(pthread_mutex_destroy(&mtx) == 0);
return 0;
}
Current NetBSD implementation wrongly hangs on this test.
The issue was detected during development of the C11 portable threads.
My local tests in chroot presents that the are further issues:
t_timedmutex (21/25): 10 test cases
mutex1: [0.001142s] Failed: /usr/src/tests/lib/libpthread/t_timedmutex.c:75: *param != 20
mutex2: [0.261499s] Passed.
mutex3: [0.261496s] Passed.
mutex4: [0.001204s] Failed: /usr/src/tests/lib/libpthread/t_timedmutex.c:265: pthread_mutex_timedlock(&mutex, &ts_lengthy): Connection timed out
mutex5: [0.001235s] Failed: /usr/src/tests/lib/libpthread/t_timedmutex.c:337: pthread_mutex_timedlock(&mutex5, &ts_lengthy): Connection timed out
mutex6: [21.218497s] Failed: /usr/src/tests/lib/libpthread/t_timedmutex.c:512: start != 1
mutexattr1: [0.001328s] Passed.
mutexattr2: [0.001175s] Passed.
timedmutex1: [301.119397s] Failed: Test case timed out after 300 seconds
timedmutex2: [301.123081s] Failed: Test case timed out after 300 seconds
[623.990659s]
I'm also receiveing the same failure in the mutex6 test in t_mutex, so
there might be a false positives due to local chroot(8) issues.
Commit approved by <christos>.
succeed; change wapbl_register_deallocation() to return EAGAIN
rather than panic when code hits the limit
callers changed to either loop calling ffs_truncate() using new
utility ufs_truncate_retry() if their semantics requires it, or
just ignore the failure; remove ufs_wapbl_truncate()
this fixes possible user-triggerable panic during truncate, and
resolves WAPBL performance issue with truncates of large files
PR kern/47146 and kern/49175