Commit Graph

1284 Commits

Author SHA1 Message Date
dholland 5e5fae2d0d If pthread_create fails, report the error instead of discarding it. 2016-11-21 06:17:20 +00:00
kamil 0689e7f73f Add threads5 in tests/lib/libpthread_dbg/t_threads
Asserts that td_thr_getname() handles shorter buffer parameter and the
result is properly truncated.

Currently this test fails due to bug in pthread_dbg.

Sponsored by <The NetBSD Foundation>
2016-11-20 18:02:46 +00:00
kamil 34d01260b7 Add threads4 in tests/lib/libpthread_dbg/t_threads.c
This test asserts that for each td_thr_iter() call td_thr_getname() is
valid.

Sponsored by <The NetBSD Foundation>.
2016-11-20 17:42:56 +00:00
kamil c7b8b4ee8e Add threads2 and threads3 in tests/lib/libpthread_dbg/t_threads.c
threads2:
Asserts that td_thr_iter() call is executed for each thread once

threads3:
Asserts that for each td_thr_iter() call td_thr_info() is valid

These tests pass correctly.

Sponsored by <The NetBSD Foundation>
2016-11-20 16:13:03 +00:00
kamil e8b564dc88 Remove atf_tx_expect_fail from lib/libpthread_dbg/ tests
The following PR are now resolved and are reported to be properly fixed:
PR lib/51635 td_thr_iter in <pthread_dbg.h> seems broken
PR lib/51633 tests/lib/libpthread_dbg/t_dummy unreliable

Sponsored by <The NetBSD Foundation>
2016-11-19 15:13:46 +00:00
kamil 535c2378f3 Fix basic_proc_read in pthread_dbg functions
Source and destination were swapped. The source of this confusion was that
running these tests under gdb(1) will generate false positives as it will
initialize pthread__dbg to PID of the debugger. This means that it is
currently not possible to debug pthread_dbg code under a full-stack
debugger using NetBSD debugging library for threads.

This should address:
PR lib/51633 tests/lib/libpthread_dbg/t_dummy unreliable
PR lib/51635: td_thr_iter in <pthread_dbg.h> seems broken

After applying the fix I'm able to run all pthread_dbg tests without
indeterminism. The indeterminism was caused by overwritting source of data
with trash.

Sponsored by <The NetBSD Foundation>
2016-11-19 02:30:54 +00:00
kamil 0a225098cc Add new test file lib/libpthread_dbg/t_threads
This test contains threads1 test that:
    Asserts that td_thr_iter() call without extra logic works

This tests fails and is linked with gnats:
PR lib/51635: td_thr_iter in <pthread_dbg.h> seems broken

Sponsored by <The NetBSD Foundation>
2016-11-18 22:50:19 +00:00
kamil 452c3956fa Mark dummy2 and dummy3 in lib/libpthread_dbg/t_dummy with expected fail
The dummy2 test reports failures on i386 releng machines.

The same with dummy3, but it's also reproducible sometimes on my amd64
setup. It's not always broken, neither always functional - once a while it
reports failure. So far I have not reproduced failure in dummy2.

PR lib/51633 tests/lib/libpthread_dbg/t_dummy unreliable

Sponsored by <The NetBSD Foundation>
2016-11-17 17:30:22 +00:00
kamil a364537544 Add dummy3 in lib/libpthread_dbg/t_dummy
This test verifies that it's not possible to attach twice to the same
process with td_open() -- it asserts failure with status TD_ERR_INUSE.

This test does nothing besides initializing and deinitializing pthread_dbg
debugging instance.

Refactor code to be more reusable.

Set proper description of dummy2.

Sponsored by <The NetBSD Foundation>.
2016-11-17 04:13:52 +00:00
kamil f8d64fb128 Add new test dummy2 in lib/libpthread_dbg/t_dummy
This tests implements:
 - .proc_read with memcpy(3)
 - .proc_write with memcpy(3)
 - .proc_lookup with dlopen(3) and dlsym(3) combination

td_open() is verified to return with success (TD_ERR_OK), followed by a
call to td_close().

This test does nothing else than initializing and deinitializing td_proc_t
structure, with appropriately implemented functions.

Sponsored by <The NetBSD Foundation>
2016-11-17 03:37:23 +00:00
kamil 8fce8aab12 Add new test-suite t_dummy for libpthread_dbg
At the moment this test does nothing except reports failure from td_open()
for overloaded (implemented) dummy1_proc_lookup() (.proc_lookup from
td_proc_callbacks_t) of the following form:

static int
dummy1_proc_lookup(void *arg, const char *sym, caddr_t *addr)
{
        return TD_ERR_ERR;
}

This file and directory with tests is placeholder for new ones, without
further need to alter mtree and distribution sets.

The libpthread_dbg interface and library is used by gdb(1) to handle
threads in applications.

Sponsored by <The NetBSD Foundation>
2016-11-16 21:36:22 +00:00
pho fd86259521 Major rework of fuse_opt_parse(3) so that it supports all the functionality of the original function 2016-11-16 16:11:42 +00:00
martin 9e327c59d6 Evil hack to make register_t known and fix the build - XXX not sure this
is the proper fix.
2016-11-15 10:05:22 +00:00
pho b146e1b741 Rename test functions 2016-11-15 00:37:18 +00:00
pho ed2b984681 lib 2016-11-15 00:32:42 +00:00
pho 111da591d5 Implement missing fuse_opt_add_opt(3) and fuse_opt_add_opt_escaped(3) 2016-11-14 17:19:29 +00:00
pho 7768b99586 Add some tests for librefuse 2016-11-14 16:10:31 +00:00
njoly 2904b2098c New clock_nanosleep(2) testcase. 2016-11-11 15:30:44 +00:00
kamil fac432862c Add new tests in t_wait_noproc and t_wait_noproc to test more options types
Add new tests:
 - waitpid_options
 - waitid_options
 - wait3_options
 - wait4_options
 - wait6_options

These tests are included in t_wait_noproc and t_wait_noproc_wnohang.

waitpid_options, wait3_options, wait4_options test combinations of options
of: bit for WALLSIG, WALTSIG, __WALL, __WCLONE and later a full combination
mask of WNOWAIT, WEXITED, WUNTRACED, WSTOPPED, WTRAPPED and WCONTINUED.

waitid and wait6 test full combination mask of WNOWAIT, WEXITED, WUNTRACED,
WSTOPPED, WTRAPPED and WCONTINUED -- excluded empty value and singular
WNOWAIT.

For compatibility reasons alter waitid and wait6 to test against options
WEXITED | WTRAPPED, as it's equivalent to waitpid, wait3, wait4.

The intention for these tests it to catch any possible issues with slighty
changed behavior of wait(2)-like functions in terms of valid options
values.

All tests pass successfully.

Sponsored by <The NetBSD Foundation>
2016-11-09 17:50:19 +00:00
kre 120ea00cee PR standards/51600
These tests are no longer expected to fail when called with WNOHANG
(which is actually the t_wait_noproc_wnohang test but the sources are here.)
2016-11-09 12:44:29 +00:00
kamil 258bb686f9 Switch ATF_REQUIRE() to more appropriate ATF_REQUIRE_ERRNO()
Simplify the code of t_wait_noproc

Sponsored by <The NetBSD Foundation>
2016-11-08 15:21:34 +00:00
kamil 96ab24d97f Enable the wait3 test in t_wait_noproc_wnohang (through t_wait_noproc)
This test has set expected failure like other functions in the wait(2)
family and is linked with PR standards/51606.

The PR is labeled as:
    wait4() (and friends) with WNOHANG and no children does not error

Originally, this test was accidently disabled in the WNOHANG checks. This
was noted by Robert Elz.

Sponsored by <The NetBSD Foundation>.
2016-11-07 02:23:43 +00:00
kamil 2945e8c443 Add new tests: tests/lib/libc/sys/t_wait_noproc and t_wait_noproc_wnohang
The t_wait_noproc test checks whether wait(2)-family of functions return
error and set ECHILD for lack of childs.

The t_wait_noproc_wnohang adds to options (except wait(2), wait3(2)) new
parameter WNOHANG and verifies that error is still signaled and errno set
to ECHILD.

Currently t_wait_noproc_wnohang reports failures, these have been marked as
expected and referenced to PR standards/51606.

The problem report is authored by Robert Elz, and the initial regression
has been notified by Nicolas Joly.

Remove redundant test in tests/lib/libc/sys/t_wait for wait6(2) with no
WNOHANG specified.

Sponsored by <The NetBSD Foundation>.
2016-11-06 15:03:30 +00:00
kamil ed8b0a45b2 All tests in t_wait now pass
Christos Zoulas committed fixes to src/sys/sys/wait.h r.1.32.

Closes PR standards/51603

Sponsored by <The NetBSD Foundation>
2016-11-06 02:28:57 +00:00
kamil 04949b4194 Add new test wait6_stopgo_loop in t_wait
This test verifies that it is possible to emit multiple times SIGSTOP and
SIGCONT for a child.

Add checks that status does not return more than one valid state from the
following list: STOPPED, CONTINUED, EXITED and SIGNALED. This check fails
for WIFCONTINUED()==true as it currently and wrongly returns true for
WIFSTOPPED().

This verification is added to wait6_stopgo_loop and wait6_stop_and_go and
marked as expected failure and linked with PR standards/51603.

Remove trailing whitespace.

Sponsored by <The NetBSD Foundation>
2016-11-05 21:49:28 +00:00
kamil f26cf4cb48 Prefer modern simple past tense and past participle of catch
The "catched" form is obsolete and nonstandard, prefer "caught".
2016-11-03 22:08:30 +00:00
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
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
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
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
maya c31c23a665 Add failing test for casinh 2016-08-31 14:05:09 +00:00
christos 7e1ddeefad skip if we are not running rpcbind. 2016-08-27 14:36:22 +00:00
christos 237ae380ee do the long double tests if we have long double. 2016-08-27 10:07:05 +00:00
christos 6af98352e6 forgot to protect an ilogbl 2016-08-26 08:01:55 +00:00
darcy 36a840f64a Replace MKMAN with NOMAN as suggested by christos@. Allows
userland to build when building man pages.
2016-08-26 01:31:43 +00:00
maya 2b773534df Add a failing case for t_ldexp
ldexp(2.0, INT_MAX) should be HUGE_VAL, not 0
2016-08-25 00:32:31 +00:00
maya d63d11005c don't skip the entire test iteration if exp2=SKIP, only the second
application of the function

this doesn't introduce new failures on amd64
2016-08-25 00:26:01 +00:00
christos 68ba093a6e fix test; clearing the exception does not return the old exception bitmask. 2016-08-24 10:04:53 +00:00
christos b0fbbd46fc fix long double 2016-08-24 09:13:44 +00:00
christos 73ff5dffc3 portability fixes 2016-08-23 10:03:44 +00:00
maya 16cf37a656 Mistakes were made, compare correct values now. 2016-08-22 10:36:20 +00:00
maya 7e38ec308c add failing test for PR lib/51427
ilogb(INFINITY)=-INT_MAX, it should be INT_MAX

while here, test raised exceptions, other values.

XXX some platforms don't have exceptions
2016-08-22 08:49:33 +00:00
jakllsch d7cdc3c29e t_usbhid/check_hid_get_data has been failing since it existed, mark as such 2016-08-17 12:10:42 +00:00
christos db9b3c4eff order netinet6 properly. 2016-08-13 11:22:11 +00:00
kre 408b946945 Correct use of incorrect errno - should have no real practical effect. 2016-08-11 21:34:11 +00:00
kre 82205f76b1 One more -lrumpdev 2016-08-11 21:29:44 +00:00
kre b95a77e39c Extra libs for rump. 2016-08-10 21:10:18 +00:00
kre 28a5575028 This test should be testing how the kernel should behave, not how
it actually (used to) behave when it was incorrect...   Aside from
a possible EPERM (which is not tested) the only error possible from
mlock() is ENOMEM.   POSIX also allows EINVAL if the address is not
page aligned and the implementation does not round down to the previous
page boundary, but NetBSD does.

The kernel was recently fixed to return the correct errors for mlock()
so now we really need the test to be checking them, and not expecting
the incorrect errno values that the kernel used to return.

Same for munlock() - there ENOMEM is the only possible error, again,
EINVAL cannot happen as the kernel rounds to page boundaries.
For munlock() the kernel has not yet been corrected (that is coming
real soon...) and one of the munlock() tests will currently fail
(as of the time this commit is made, hopefully not for much longer)
as it should - it is indicating a kernel bug.

Note that NetBSD mlock(2) talks about EINVAL for cases where the length
parameter is negative ... but that is a size_t - good luck having that
ever occur (the man page will soon be corrected as well.)
2016-08-09 12:02:44 +00:00
scole d68880c4ee PR port-ia64/51261
Fix for ia64
2016-08-05 15:02:29 +00:00
scole ea5cb0d634 PR port-ia64/51261
Make this compile for ia64
2016-08-05 15:01:39 +00:00
christos c10c4abe0f Realtime signal support from GSoC 2016, Charles Cui. 2016-08-04 06:43:43 +00:00
christos 59c5c6b5ef we require root for sched_fifo, and more verbose messages. 2016-07-31 13:01:29 +00:00
njoly d3e4dbe2f3 New getsockname(2) testcase for UNIX domain sockets. 2016-07-30 11:03:54 +00:00
christos 4d8445a4a7 Not designed for PIE 2016-07-18 12:17:39 +00:00
njoly 9c5f636bf3 Add testcase that ensure that stack hard limit is never smaller than
soft limit.
2016-07-13 09:53:16 +00:00
christos 82732dd294 fix uninitialized var. 2016-07-06 14:42:53 +00:00
christos 7cf7644fc7 GSoC 2016 Charles Cui: Implement thread priority protection based on work
by Andy Doran. Also document the get/set pshared thread calls as not
implemented, and add a skeleton implementation that is disabled.
XXX: document _sched_protect(2).
2016-07-03 14:24:58 +00:00
christos ac52a1e696 Add an hmac test. 2016-07-02 14:52:09 +00:00
kre bd9b00916f Remove tests of "dawn" and "sunset" in preparation for removing
them from parsedate() itself sometime soon.
2016-06-22 15:01:38 +00:00
joerg 12f813b23d Link static test program with LDSTATIC to deal with PIE. 2016-06-18 12:12:09 +00:00
pgoyette 9458f2be2e Fix testing of returned entptr, and fix three affected tests.
From kamil@ via PR lib/49632
2016-06-01 01:12:02 +00:00
christos 5cca8a9eaf Fix mprotect for the helper. 2016-05-28 14:38:29 +00:00
christos ec3db6b7b6 Skip the mprotect_exec test if PaX MPROTECT restrictions are enabled. 2016-05-28 14:34:49 +00:00
hannken 6fc7edbd65 Disable PAX mprotect to make just-in-time-compile tests work again.
Ok: Christos Zoulas
2016-05-24 10:16:34 +00:00
kre 25d58d24b2 Make the 9 months ago test, when reverting from late November to the
end of Feburary just a little less bogus (stupid cut & paste error).
2016-05-05 02:12:21 +00:00
gson 85c4af6b99 Reduce the step size, exposing another bug. 2016-05-04 18:36:46 +00:00
kre e4edd6e6c4 PR bin/50574 - make the tests conform to what parsedate() actually
does, so they should no longer fail.   This needs parsedate.y 1.28
in order to work properly.

OK christos@
2016-05-03 18:18:15 +00:00
kre 97c9ae31d2 Whitespace. No changes. OK christos@ 2016-05-03 18:10:38 +00:00
gson 73fec7e59e In the "relative" test case, run the tests multiple times relative to
various dates over a span of a few decades, instead of just once
relative to the current date.  This makes the test fail consistently
instead of sometimes failing and sometimes not depending on when
it is run.  Makes PR lib/50574 consistently reproducible.
2016-05-01 16:39:47 +00:00
christos 5befeffc11 - Adjust to the correct wait6 semantics (returns pid)
- Avoid race in setrlimit(2)
2016-04-27 21:14:24 +00:00
christos e533605fa6 Use WIFCONTINUED. 2016-04-06 03:52:27 +00:00
christos bd76bbe652 Fix ATF_REQUIRE(false) 2016-04-06 00:52:45 +00:00
christos 8283334aac Add wait6(2) tests. 2016-04-06 00:45:53 +00:00
joerg d0d56fdcd8 Replace LDADD with LDSTATIC. 2016-04-04 09:52:02 +00:00
martin 820268b0ef Fix masking for the fpsetmask_basic test, pointed out by Timo Buhrmester 2016-03-12 11:55:14 +00:00
joerg 1c9e147d7d libc fallback is known to not produce nice alias entries. Avoid spurious
failures when testing in an empty chroot by requiring the services db.
2016-03-08 08:34:17 +00:00
joerg dda31211fa When building the atomic op test on SPARC64 with Clang, skip the
sub-32bit tests for now. Clang currently doesn't synthesize a CAS
replacement nor does it create a libcall.
2016-02-27 18:50:39 +00:00
gson e9eb083c3b Add some tests of hypot() and hypotf() 2016-01-24 20:26:47 +00:00
christos bdf1a7c5d1 t_lwp_create needs kernel types. 2016-01-24 15:11:08 +00:00
christos ffeb8dbf4e Define _KERNTYPES for things that need it. 2016-01-23 21:22:45 +00:00
jakllsch f9e98a931a Don't crash when the device's HID Report Descriptor Pops from an empty stack. 2016-01-07 16:10:49 +00:00
jakllsch 4887406fba Add tests for HID Parser Pop-on-empty-stack bug. 2016-01-07 15:58:23 +00:00
jakllsch 43fe984867 Move libusbhid tests' Report Descriptors and Report Data to seperate file,
so future tests of the kernel HID functions can use them too.
2016-01-04 22:07:16 +00:00
jakllsch cf34dae03a reorganize constant test data 2016-01-03 15:26:39 +00:00
jakllsch 25812d50a0 Move MY*_ATF_CHECK_EQ debugging helper macros to before all functions. 2016-01-03 15:16:10 +00:00
jakllsch aaf9a4516d Teach hid_parse_usage_in_page() how to understand hex literals, in
addition to the usual table lookup.
2016-01-02 01:24:44 +00:00
jakllsch f5863ab3d2 Fix round-trip of hid_usage_in_page(hid_parse_usage_in_page()) when
the usage is a catch-all format string.

This should allow usbhidctl(1) to understand an item argument of
"Button:Button_65535".
2016-01-02 01:04:15 +00:00
jakllsch f8f5861113 Rework unsigned range test cases.
If the USB HID 1.11 spec is interperted to the letter, there's no such
thing as a unsigned Logical/Physical Minimum/Maximum.  When the (signed)
Minimum is greater than the (signed) Maximum, it's a possibility that
the device is attempting to present unsigned report data.
2016-01-01 23:46:04 +00:00
jakllsch c8b0c3452c Fix hid_get_data() for negative or 32-bit report data. 2016-01-01 22:59:12 +00:00
jakllsch bc1f6fc421 value debugging for the Logical/Physical range checks 2016-01-01 22:47:34 +00:00
jakllsch 3a26fec827 tests for libusbhid (many of which fail) 2016-01-01 21:38:53 +00:00
dholland bb7bd59051 Fix REL_CHECK error output; it had "expected" and "obtained" swapped.
While here, improve the general legibility of the printout. Not
actually relevant to PR 50574, but anyone looking at that should be
aware of this change.
2015-12-31 10:56:13 +00:00
dholland 6970e57cc6 When evaluated on a Sunday, "next Sunday" means 7 days in the future,
not 14. When evaluated on a Monday, it apparently means 13 days in the
future. There's not exactly a spec for parsedate.y, so conform to the
implementation.

PR 50574.

XXX: to me at least this is an odd notion of "next Sunday", but whatever...
2015-12-31 10:18:00 +00:00
dholland 9775679d6b Fix the "Tuesday midnight" test to match what parsedate.y does; in
particular it doesn't add a week if evaluating that on Wednesday.

Whether that's right is an open question, but there's not exactly a
spec for parsedate.y and there's no point having the test fail one
day in seven.

PR 50574.
2015-12-31 10:10:15 +00:00
pgoyette 8125537222 Since we're expecting to autoload modules here, make sure that the
kernel (or rump-server) has autoload enabled.

This should finish fixing PR bin/49153

XXX The test still does not run successfully, due to another bug that
XXX was recently introduced.  This second bug is being worked on.
2015-12-29 07:17:19 +00:00
christos c31efcafe9 add __TEST_FENV 2015-12-22 14:27:51 +00:00
christos 7303bfa77d Add __TEST_FENV 2015-12-22 14:25:58 +00:00
christos b113b9aa9c put have fenv stuff elsewhere. 2015-12-22 14:20:59 +00:00
christos 25e32ca777 Put have fenv elsewhere. 2015-12-22 14:18:35 +00:00
martin 5e88931036 Sync list of fenv enabled architectures again (PR 48633), this time for mips
addition.
2015-12-22 08:26:16 +00:00
martin b66d985812 While PR 48633 is not properly fixed, keep the additional lists of
fenv-enabled architectures in sync.
2015-12-21 12:11:23 +00:00
christos 8861b14877 Kill one more REL_DEBUG, from kre 2015-12-08 12:41:28 +00:00
christos da8d5d2ae7 there is no REL_DEBUG 2015-12-07 20:57:39 +00:00
christos 432cd4b9b7 new tests from kre 2015-12-07 20:52:46 +00:00
christos 7b88a1a0ea fix double negation 2015-11-27 13:59:40 +00:00
christos 2bfc5fd1e4 Add more exhaustive db tests that include higher bucket sizes 2015-11-18 18:35:35 +00:00
christos e700dcfbcd CID 1338516: Handle svc_run() returning. 2015-11-10 18:13:01 +00:00
christos 871846c79a Disable debugging. 2015-11-08 19:40:06 +00:00
christos 5c8014d159 Add more rpc tests. XXX: Need rpcbind running. 2015-11-08 19:38:04 +00:00
nros 2e84975f5e Fix code style errors pointed out by christos during the review of the
aligned_alloc test that also applies to the posix_memalign test.
Fix code style errors that I forgot to fix in the aligned_alloc test.
2015-11-07 17:35:31 +00:00
nros b16a5c9dec Add the C11 function aligned_alloc to libc. 2015-11-07 16:21:42 +00:00
christos b2d56358fc make this compile for tests. 2015-11-06 15:30:47 +00:00
christos 6e1ae27534 Add a test for the raw transports which are currently busted. 2015-11-06 15:23:23 +00:00
christos 4e4836ff83 merge more the tests 2015-10-31 02:25:11 +00:00
christos 3112bb3e23 Account for J, fix %Z 2015-10-31 02:13:41 +00:00
christos a45df95937 tests for %Z 2015-10-30 18:25:49 +00:00
ginsbach 862d86e79e ISO 8601 and RFC 3339 specify that an offset can be up to 23:59 and
not 12:00 east/west.  Just proves that one shouldn't use other
implementations as a canonical reference.  Thanks to all who pointed
this out.
2015-10-30 03:18:10 +00:00
ginsbach 2699ccd14e Additional tests for timezone offsets. 2015-10-30 01:51:15 +00:00
christos 05ea9f0e38 Add tests for %z 2015-10-29 17:48:20 +00:00
christos 200d779b75 make error more informative. 2015-09-12 15:21:33 +00:00
martin 4c5334afe3 Add two test cases that should cover PR 50228. 2015-09-11 09:25:52 +00:00
dholland 814554f5b1 Clear the XFAIL from PR 45391. 2015-09-08 05:24:27 +00:00
martin c36c18165c Mark the ssh test as expected failure pointing to PR lib/50174 2015-08-26 09:19:20 +00:00
matt 8827b899dc Build t_fpgetmask/t_fpgetround for aarch64 since they are now in libc 2015-07-08 01:09:25 +00:00
christos ca074ef647 strptime now sets tm_yday 2015-07-04 13:36:25 +00:00
pooka aba7ab9c93 Check that PTHREAD_RWLOCK_INITIALIZER works. 2015-06-26 11:07:20 +00:00
christos df32205700 - don't create a db file.
- add more tests.
2015-06-22 22:35:51 +00:00
christos 88fc59697b Add new failing test. 2015-06-22 19:06:05 +00:00
matt b9e582e94c Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined. 2015-06-22 00:05:23 +00:00
joerg 810e0f52bb Don't pass uninitialized variables by value. 2015-06-06 13:14:06 +00:00
christos 87847627ce Add a VIS_NOLOCALE test 2015-05-23 14:02:11 +00:00
christos 35d355f3ea - new test for strtoi
- namespace protection for strto{i,u}
- separate manpages for strto{i,u} from the ones for strto{u,}l
From: Kamil Rytarowski
2015-05-01 14:17:56 +00:00
ginsbach 7b940a5b54 Add hour tests as a standalone test case. 2015-04-28 16:06:09 +00:00
ginsbach 0b61b786a1 Make century and year conversion tests a standalone test case rather than
part of the "common" test case.
2015-04-22 13:15:30 +00:00
ginsbach fb89bad2cc Make seconds conversion tests a standalone test case rather than
part of the "common" test case.
2015-04-21 17:39:50 +00:00
ginsbach a5f68193b1 Add more detail to test descriptions. 2015-04-17 15:13:47 +00:00
ginsbach 679713aac4 Split inet_addr(3) tests from t_inet_network into stand-alone t_inet_addr,
so that t_inet_network only contains tests for inet_network(3).
2015-04-09 16:47:56 +00:00
rtr cefecbaa6b fix typo bindinging -> binding 2015-04-05 23:28:10 +00:00
rtr f0da3f110d add another test program for connect(2) that checks that connect fails
with EAFNOSUPPORT (similar to the bind test) if the domain of the socket
does not match the address family of the supplied address.

test currently fails as it should
2015-04-05 23:17:41 +00:00
rtr a954fb5823 - ATF_REQUIRE(EINVAL == errno);
+       ATF_REQUIRE(EAFNOSUPPORT == errno);

as per http://pubs.opengroup.org/onlinepubs/009695399/functions/bind.html

while here remove some unnecessary initialization of port and addr members
and replace with a comment explaining why.
2015-04-05 23:15:54 +00:00
martin 4839e0f0d8 New test program for bind(2), with a single (currently eroneously failing)
test case from Tyler Retzlaff.
2015-04-05 06:36:52 +00:00
matt 1380094dbb add return_one_start 2015-03-29 00:38:36 +00:00
matt 6084fd3ca0 Update for new RISCV ABI 2015-03-28 07:07:54 +00:00
isaki 6abe86a4fd Reduce the number of loops.
It avoids timeout on slow machines, and I think that 100,000
times loop also satisfies the evaluation.
PR lib/49664 (no comments)
2015-03-07 09:59:15 +00:00
martin 0c9e453b20 Make sure to use the values calculated in the loop that is supposed to crash
the client process - so the compiler does not optimize it all away.
Also improve diagnostic in case of common bug: SIGSEGV instead of SIGBUS.
2015-02-28 13:57:08 +00:00
christos 19331afb8e add truncate causing signal test 2015-02-27 16:09:19 +00:00
martin 94d18b32c6 Double the timeout for sentev_basic to 600 seconds to make it work on
slower machines.
2015-02-27 08:55:35 +00:00
martin 237b5a2e3f bsize_ffactor takes *very* long to complete on some slower machines (maybe
we should investigate?).
Bump timeout up to 1800 seconds (my hppa machine takes ~1100).
2015-02-26 13:00:26 +00:00
isaki b8d13981be m68k (except sun2) never issue SIGBUS on unaligned accesses.
PR lib/49653.  Thanks martin@.
2015-02-17 09:47:08 +00:00
alnsn 6d5b9045a5 Add two more libbpfjit_jmp_jeq_x_noinit_XX tests. 2015-02-14 22:40:18 +00:00
alnsn 4bf0e499d1 Replace accidentally committed test with libbpfjit_jmp_jeq_x_noinit_ax test. 2015-02-14 20:39:09 +00:00
alnsn 3228cf99a8 Improve libbpfjit_jmp_jeq_x test. 2015-02-14 20:29:36 +00:00
isaki 76ca8ec888 uint64_t -> uint32_t. 32bit is sufficient in this case
and it improved the performance approx 7% on my 68030.
see also PR lib/49664.
2015-02-14 08:46:02 +00:00
martin 55ba2da403 Fix strange editor mishap and start block comment on its own line. 2015-02-13 16:56:57 +00:00
alnsn bc33ca73a3 Add libbpfjit_jmp_ja_overflow test. 2015-02-11 23:33:16 +00:00
alnsn 9dc6430c3c Add libbpfjit_jmp_ja_invalid test. 2015-02-11 23:17:16 +00:00
alnsn b43344f3ff Add libbpfjit_ret_k and libbpfjit_bad_ret_k tests. 2015-02-11 23:00:41 +00:00
martin d21477da21 Remove expected failure and references to port-alpha/46301, now that
it is fixed.
2015-02-09 19:39:48 +00:00
isaki 083cb7865f Skip kqueue_unsupported_fd test if /dev/drvctl is not configured
in the kernel.  PR bin/49644.

XXX Ideally, it's better to modify to use more generic device file.
2015-02-05 13:55:37 +00:00
christos e7149865f6 PR/49617: Kirk Russell: posix_fallocate() should be returning an error on
failure, without setting errno.
2015-01-31 23:06:57 +00:00
nakayama 11b2083df7 The test requires symbols, so put STRIPFLAG= explicitly to avoid
stripping them if STRIPFLAG?=-s is defined in /etc/mk.conf.
2015-01-31 20:55:43 +00:00
snj 72e6061c7e Remove stale comment about ARM fenv support. 2015-01-20 20:43:10 +00:00
christos 03f0cf7814 add proper include files. 2015-01-04 20:19:46 +00:00
gson 263eee9471 Mark the lib/libm/t_fmod test as an expected failure under QEMU,
with a reference to PR misc/44767.
2015-01-03 14:23:53 +00:00
gson 59b4f8a08b Need stdlib.h for EXIT_FAILURE 2015-01-03 14:21:05 +00:00
martin 719bfa7d23 Skip rounding mode tests on ARM FPUs that do not allow configuration of them. 2014-12-29 19:51:53 +00:00
martin ffed0c5e5a Include <ieeefp.h> even for the <fenv.h> case since we use fpsetmask()
to detect ARM Cortex NEON fpus.
2014-12-29 18:36:27 +00:00
martin ea1bc3e21f Move the list of <fenv.h> supporting architectures to the makefile and
sync it with other copies.
2014-12-27 18:03:41 +00:00
martin 619d31d686 Enable fenv for arm 2014-12-27 18:00:13 +00:00
martin 5fe2180eb8 Enable fenv.h on arm again 2014-12-27 17:55:05 +00:00
martin dce8d6f504 fenv(3) support for hppa 2014-12-27 16:54:02 +00:00
martin ca6af3dc0f Disabel fenv tests for arm, the implementation is incomplete. 2014-12-22 11:21:08 +00:00
martin dbdfb3d301 Add a test program for basic fenv.h rounding mode/exception mask testing. 2014-12-21 15:37:03 +00:00
alnsn a234612ab2 Add BPF_MOD tests. Plus one tiny change. 2014-11-20 11:08:29 +00:00
alnsn b61069b6e9 Add BPF_XOR tests. 2014-11-19 22:56:35 +00:00
martin dd702302a1 Skip the SIGFPE test on arm when the FPU does not provide exception handling. 2014-11-19 10:09:45 +00:00
martin 7a3fd5de1d Use machdep.unaligned_sigbus to skip the unaligned access test on arm
as well.
2014-11-19 10:03:51 +00:00
martin a471233800 Skip the tests on ARM if the NEON fpu does not support exceptions (Cortex). 2014-11-18 08:58:08 +00:00
justin 97c0a6f647 PR misc/49356 remove unnecessary references to atf-c/config.h
The function included via this header is not used and is removed in
later versions of atf, so let us avoid it.
2014-11-04 00:20:19 +00:00
justin 4a3dd59305 PR misc/49342 fix issue where time can tick during tests
Note there are still potential issues as the clock being tested is not
monotonic but it should now not fail unless time is being adjusted.
2014-10-31 12:22:38 +00:00
justin 7cbb46f7c6 Add negative offset checks to fseeko
These were not strictly needed before, as lseek would error on negative
arguments, but having added open_memstream we have a virtual file pointer
that assumes that it gets sane values, so we get an assertion triggered
on a negative value. Best to check in one place rather than at all the
relevant points.
2014-10-19 11:17:43 +00:00
snj f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
joerg 651137ad06 Explicitly link C++ test case with CXX. 2014-10-18 02:22:35 +00:00
justin a99ba75e46 PR standards/49279 add tests for open_memstream, ported from OpenBSD 2014-10-15 21:55:34 +00:00
martin a9cf99fd0c Fix include order, so the makefile actually does something again. 2014-10-13 11:07:38 +00:00
martin d7121a34a3 Do not try the C++ 2011 test with gcc < 4.8 2014-10-13 09:57:35 +00:00
christos caa27f65e4 You need double the number of backslashes in a pattern, since \\ -> '\' in
the string which means escape. Now the tests don't fail.
2014-10-12 22:33:41 +00:00
justin 384bcc25f3 Add expect fail for PR lib/49278 2014-10-12 19:08:08 +00:00
justin 2c782285f6 Add some fnmatch test cases from other C library test suites 2014-10-12 18:59:35 +00:00
martin 495b705095 If we don't have 64 bit atomic ops, also do not test "long long" and intmax_t
(and friends).
2014-10-12 12:26:41 +00:00
martin 0a9621aa77 Disable the <atomic> C++11 test for now, we are not ready for it. 2014-10-12 08:02:35 +00:00
martin 2d4c5dc1d5 If not __HAVE_ATOMIC64_OPS, do not force the test for 64bit types. 2014-10-11 17:46:58 +00:00
martin 069f2c5d29 Add a link time test to catch missing symbols in libc, as pointed
out in PR toolchain/49074.
2014-10-11 14:52:15 +00:00
apb bc007038f7 Avoid literal <CR> in sed regular expression.
Instead, use printf(1) to save the regexp in a shell variable,
taking advantage of the fact that printf understands "\r".

This should fix a complaint from subversion, reported in PR 49249.
2014-10-09 06:52:37 +00:00
apb 4206688740 2013-07-09 was in British Summer TIme, so use tzoff=-60, not 0. 2014-10-08 17:23:03 +00:00
apb 5b0c63042a When tests fail, print all args, notjust the date string. 2014-10-08 17:21:40 +00:00
apb 4e0616873f Add tests for PR lib/47916. Some of these fail. 2014-10-08 13:26:47 +00:00
apb cad616778a Adapt to a recent change in parsedate().
"9/10/69" still refers to 2069, and "9/10/70" still refers to 1970,
but "69-09-10" and "70-09-10" now refer to the years 69 and 70.
2014-10-07 22:33:52 +00:00
apb cf077958e6 Add comments for some non-obvious cases.
Also add a test with year=70, which is documented to be treated as 1970.
2014-10-07 19:26:31 +00:00
apb fc447ec4e5 Add local parsecheck() function and use it for several tests.
Instead of just checking that parsedate(3) does not return an error,
also pass the result through localtime_r(3) or gmtime_r(3) and check the
year/month/day/hour/minute/second fields in the resulting struct tm.
2014-10-07 19:20:28 +00:00
gson 660533ae91 In the exp2_values test case, provide separate expected return values
for the float case, reflecting the actual exp2f() argument value after
rounding to float precision.  Fixes PR lib/49256.  Thanks to Makoto
Kamada and Tetsuya Isaki for the analysis.
2014-10-07 16:53:44 +00:00
matt 6cf6fe02a9 New files for Userland support of UCB RISC-V (both 32-bit and 64-bit) 2014-09-19 17:36:24 +00:00
christos 3cfc969d61 add null and empty tests. 2014-09-08 19:01:03 +00:00
matt 27620987b8 New files for OR1K support 2014-09-03 19:34:25 +00:00
matt b0b2ad2060 The nop instruction on or1k is l.nop 2014-09-03 19:24:12 +00:00
gson 35cbd4f0ac The cond_timedwait_race test case is no longer expected to fail; it
has been consistently passing since CVS date 2014.01.31.19.22.00.
See also PR lib/44756.
2014-09-03 16:23:24 +00:00
gson 3583bc35d3 The 4 second timeout of the invafd test case is not always enough when
running under qemu; increase it to 10 seconds.
2014-08-27 13:32:16 +00:00
bouyer 18d9435662 Go back to the initial context (as tests/lib/libc/sys/t_swapcontext.c does)
after checking pthread_self() didn't change. Otherwise the process exits
outside of atf context.
Should fix "Test case exited normally but failed to create the results file: Results file is empty" reports from atf-run.
2014-08-25 16:31:15 +00:00
pooka 48fac693b7 Update hardcoded fd expectations now that rump kernels open 0/1/2.
(since we exec, it's convenient to just assume the values of first 4 fds)
2014-08-13 00:03:00 +00:00
martin e204327425 Do not set HAVE_FENV for arm as long as it misses feenableexcept(). 2014-08-10 12:01:57 +00:00
martin 41f262a02f Use the same condition for HAVE_FENV 2014-08-10 11:30:51 +00:00
matt 547b3a3b01 Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only.  While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.
2014-08-10 05:56:36 +00:00
matt beb9c6d1b5 Preliminary files for AARCH64 (64-bit ARM) support.
Enough for a distribution build.
2014-08-10 05:47:35 +00:00
christos 6030f04a15 amend the new destroy function to take function pointers. 2014-07-20 20:17:21 +00:00
christos 0579ed8b30 Add new minherit test. 2014-07-18 12:34:52 +00:00
gson 858def4e9a space after comma 2014-07-15 14:56:34 +00:00
alnsn 5977f956e5 Add a link to ../../net/bpfjit/t_extmem.c. 2014-07-14 19:11:15 +00:00
alnsn 2b2f4a0ebe Add bpfjit_cop_copx and bpfjit_copx_cop tests. 2014-07-13 21:35:33 +00:00
alnsn f58748437d Rename bpfjit tests to libbpfjit. 2014-07-08 21:13:01 +00:00
alnsn 658efa8662 Rename bpfjit tests to libbpfjit, don't test zero buflen and a couple of
cosmetic changes.
2014-07-08 21:07:52 +00:00
alnsn a6c4b35211 Add t_extmem test. 2014-06-25 19:13:27 +00:00
alnsn 966c8b069a Add external memory tests. 2014-06-25 19:13:03 +00:00
alnsn 5b6fcae7f9 Fix copyright. These tests are based on tests created in 2013 on github.com.
https://github.com/alnsn/bpfjit , files test/test_cop{,x}.c.
2014-06-25 18:16:40 +00:00
alnsn 6c8422a022 Add t_cop test. 2014-06-25 18:04:44 +00:00
alnsn 5990d54c7c Add BPF_COP and BPF_COPX tests. 2014-06-25 18:04:05 +00:00
alnsn 19fed70d36 Implement copfuncs and external memory in bpfjit. 2014-06-24 10:53:30 +00:00
shm 509eb314f7 Add bm(3) tests 2014-06-23 10:53:20 +00:00
alnsn ce28ef1f5a libarch on sparc isn't -l${MACHINE_CPU}. Don't link to it. 2014-06-17 19:26:18 +00:00
alnsn 29499f54b7 Link with -l${MACHINE_CPU}. 2014-06-17 06:36:01 +00:00
joerg 13b8fa7d71 Add modfl(3). From FreeBSD. 2014-06-16 12:54:42 +00:00
apb c38e7a8bc8 Update fmtcheck(3) test now that pointers and longs are differentiated. 2014-06-14 08:19:02 +00:00
he f693807fd8 Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser.  Fixes build for sun2.
2014-06-10 04:28:39 +00:00
shm fc03103b46 PR/48517 testcase provided by Felix Deichmann 2014-06-06 06:59:21 +00:00
alnsn de2c6dc51a Update copyright year. 2014-05-23 11:48:26 +00:00
alnsn 02f87fcd70 Test Array Bounds Check Elimination (ABC) and test bpf programs from bpf(4). 2014-05-23 11:47:59 +00:00
martin 3313ae3d61 Re-enable alpha IEEE compiler options 2014-05-18 10:47:03 +00:00
yamt d1d388317b include string.h for memset 2014-05-06 00:41:26 +00:00
martin fb80a335f8 Comment out the ieee fp flags for alpha for now - something (tm) is not
working right, see PR port-alpha/48782.
2014-05-05 18:08:32 +00:00
joerg 9695f56051 Check for mounted /proc. 2014-05-01 03:46:11 +00:00
uebayasi 413d532bcc Minimal execve(2) ATF test. 2014-04-29 06:29:02 +00:00
martin 511cd1dbe5 Tune COPTS for alpha 2014-04-28 08:46:35 +00:00
martin e3f3b44e5b When unlinking a directory as unprivileged user allow both EPERM and EACCESS
failures.
2014-04-21 18:05:17 +00:00
martin e3e7e2d06e When a hard link to a directory fails, accept both EPERM and EACCESS as
valid error codes.
2014-04-21 14:39:36 +00:00
joerg 728ced6ed6 Bail out if backtrace(3) failed. 2014-04-13 20:58:26 +00:00