Commit Graph

2718 Commits

Author SHA1 Message Date
christos
b6bcbcb52f more tests from kamil 2016-10-31 23:51:20 +00:00
christos
73f2b871c9 fix typos 2016-10-31 16:23:03 +00:00
christos
179c7d3b31 Merge and fix the timed mutex tests to use absolute time.
NB: the new tests are broken?
2016-10-31 16:21:23 +00:00
ozaki-r
cd4a5f447b Add tests for ping6 options
- -S <sourceaddr>
- -I <interface>
- -g <gateway>
2016-10-31 10:38:25 +00:00
dholland
5358d0befc Add another case related to the ones from PR 49278: [A-\\]. 2016-10-31 05:08:53 +00:00
kamil
53e134ea9e Add new test t_timedmutex
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>.
2016-10-30 16:17:16 +00:00
knakahara
4aa36fb22d fix rarely rump.ping6 failures by "UDP connect". and fix typo. 2016-10-27 09:59:17 +00:00
knakahara
56b9040c4f Fix error when wait_for_session_established() is called without argument.
From Shoichi YAMAGUCHI<s-yamaguchi@IIJ>, Thanks.
2016-10-26 03:55:56 +00:00
knakahara
38602079e1 Add new test cases(PAP and CHAP) for IPv6 PPPoE.
From Shoichi YAMAGUCHI<s-yamaguchi@IIJ>, Thanks.
2016-10-26 03:27:24 +00:00
abhinav
6cddff1a99 Add tests for uniq(1) based on the example test cases provided in the POSIX man page.
Ok christos
2016-10-22 14:13:39 +00:00
ozaki-r
51460776c2 Make test names self-descriptive 2016-10-20 09:51:15 +00:00
ozaki-r
9f81ad9409 Make sure to run cleanup
Should fix "tests: did not complete" failures.
2016-10-19 00:19:13 +00:00
ozaki-r
54d2407a67 Make test names self-descriptive 2016-10-18 04:10:24 +00:00
nat
333b297cf7 pad(4) must be open before corresponding audio device is opened.
OK christos@
2016-10-15 07:08:06 +00:00
spz
cff8db61e4 periphereal updates and generated files for the new openssl.
Expect at least one more commit until the tree builds again.
2016-10-14 16:09:43 +00:00
christos
b3566b595a Disable aslr too since we are playing address space range tricks. 2016-10-14 16:02:35 +00:00
martin
b38d15f64d Bump timeouts so they work on a 32bit sparc (poor Krups) 2016-10-13 09:25:37 +00:00
gson
2493fe037e Incrase timeout for the benefit of the walk_list_user test case which
sometimes times out under qemu under Linux, where the timing is more
accurate than under qemu under NetBSD where the the 60 second timeout
typically takes more than 60 seconds to trigger.
2016-10-08 13:23:53 +00:00
christos
6425002192 revert, fixing the real cause. 2016-10-06 20:14:11 +00:00
christos
40082debfe Add more indirect library dependencies 2016-10-06 19:52:36 +00:00
kre
de2c45dc26 PR bin/51532 - kill the test http server before terminating 2016-10-06 02:44:48 +00:00
ozaki-r
48cafa77c5 Add tests for sysctl net.inet.ip.mtudisc
From suzu-ken@IIJ
2016-10-04 04:15:25 +00:00
ozaki-r
85424d4772 Add tests for sysctl net.inet6.ip6.auto_linklocal
From suzu-ken@IIJ
2016-10-04 03:43:15 +00:00
ozaki-r
b6cf257731 Add tests for sysctl net.inet6.ip6.dad_count
From suzu-ken@IIJ
2016-10-04 03:41:33 +00:00
kre
fb4c39416a 80 column violation fixes, hopefully minor readability improvements.
No intended functional change.
2016-10-03 17:59:27 +00:00
kre
5c162fef83 This test works fine on real hardware, but due to PR kern/43997 (qemu
timing problems) fails when run under qemu.   Attempt to compensate
for that (by skipping the problematic test case) when running in qemu.

This should be reverted when the PR gets fixed (either in qemu or in
the NetBSD kernel).
2016-10-02 15:27:32 +00:00
kre
0e8fe63eab More adaptation to changed ifconfig output format. 2016-10-02 04:46:07 +00:00
kre
076ee4f8af More adaptation to new ifconfig output format - prefix length is now
appended to the address, rather than a second parameter, so needs to be
deleted if just the bare address is what we want (which it is here).
2016-10-02 04:29:25 +00:00
kre
1b0c0c88db Don't expect ping to complain about sending to a local address
assigned to an interface that's down - instead it just attempts
to send, and the interface never responds (as it would if it were
a remote address).
2016-10-01 22:15:04 +00:00
kre
dc63df36ca Compensate for the new world order of ifconfig output format,
and the new default netmask for point to point links.
2016-10-01 20:18:06 +00:00
roy
d1f35c1abb Adjust tests to new output. Wait for DaD to finish before pinging. 2016-10-01 15:35:22 +00:00
christos
2b55b3112e remove mpool_getf 2016-09-24 21:18:09 +00:00
christos
5703b437ba Add more of the torture tests from the mit kerberos tree. 2016-09-24 20:12:33 +00:00
christos
886ab6d08e print what went wrong. 2016-09-20 17:19:28 +00:00
ozaki-r
d94096e467 Ignore case in duplicated 2016-09-16 00:50:43 +00:00
ozaki-r
a59969fd67 Ignore case in deprecated 2016-09-16 00:44:14 +00:00
ozaki-r
2393c05ab0 Adjust for new ifconfig output
And use -o match to provide informative error messages.
2016-09-16 00:14:33 +00:00
christos
5642b8b65f Ignore case in deprecated/anycast 2016-09-14 16:18:31 +00:00
christos
12f0b47e19 adjust for new ifconfig output. 2016-09-14 16:00:10 +00:00
ozaki-r
cdc78b3fe9 Fill old_len which is required by sysctlbyname 2016-09-14 03:19:11 +00:00
knakahara
8db6a4e495 Disable rechallenge for chap test case.
NetBSD's PPPoE client doesn't support chap rechallenge yet.

From Shoichi YAMAGUCHI<s-yamaguchi@IIJ>, Thanks.
2016-09-14 01:48:08 +00:00
christos
a893ddcd72 add a chap test; need to investigate what's wrong with it... 2016-09-12 14:47:24 +00:00
christos
7366e78839 need bsd.init.mk 2016-09-10 11:04:24 +00:00
christos
781b35a2d5 PR/51461: Mateusz Poszwa: Processes hang when attempting to read from an empty file on psshfs mount, add unit test:
When a process attempts to read from an empty file originating from
psshfs mount, it waits indefinitely. Until the hanged process is
interrupted, the mounted filesystem appears to work as expected,
except for the directory containing the empty file. Processes trying
to list that directory also hang, and cause misbehaviour of the
containing directory.  It is possible to create a chain of hanged
processes trying to read directories up to the mount point. At the
same time, psshfs generates some network traffic (around 5KB/s, in
my case). Interrupting the first hanged process causes emission of
an error message by all other hanged processes, and psshfs ceases
to generate network traffic. Subsequent trials to list any affected
directory or if one of the affected directories is the mount point
to unmount the filesystem, fail with the same error.
2016-09-05 08:53:57 +00:00
ozaki-r
6217615c26 Add some tests
We need more realistic tests.
2016-09-05 04:35:46 +00:00
ozaki-r
9457c93fed Remove a unexpectedly committed file 2016-09-05 04:17:13 +00:00
ozaki-r
13445aedf0 Add very basic tests for tun devices 2016-09-05 02:26:48 +00:00
maya
c31c23a665 Add failing test for casinh 2016-08-31 14:05:09 +00:00
kre
7760e6f963 PR kern/49033
POSIX allows for the atime (or technically, any of the times) to be
updated as a side effect of searching a directory (allows, not requires).
The NetBSD UDF implementation apparently works that way, treating a
directory search as a read of the directory, and hence updating the
access time.   Compensate for that in the test (rather than just
expecting failure) by verifying that the atime after the directory
search is within a small margin of the atime before the search
(currently, "small" is 1 second).   We could fetch the time before
the mkdir and both stat() calls, do all of that, fetch the time after,
subtract, and require the after stat() atime to be bounded by the atime
set by the original mkdir and returned in the first stat() and that time
+ the difference in elapsed time - that would be more accurate, but is
a lot more work for little real benefit.

Should anyone be interested in doing that extra work, remember to use
monotonic time (clock_gettime(CLOCK_MOMNOTONIC, ...)) not the time of day
clock for measuring the elapsed time.

Along with this, remove the "if (udf) failure expected" and the
if (udf && we haven't failed yet) fail("random failure failed to happen")
stuff...  (the "random" would have been that sometimes the mkdir and
two lookups (stat() calls) would all occur within the same clock tick,
meaning that the atimes would all be the same.  Other times the clock
would tick somewhere between the mkdir() and the 2nd stat().)
2016-08-29 02:31:46 +00:00
christos
eb8cf8dd65 house-cleaning 2016-08-28 15:59:15 +00:00