Commit Graph

371 Commits

Author SHA1 Message Date
njoly
198de556b0 Add testcase from PR/44255, that exercize parsedate(3) with sample
strings taken from the manpage.
2010-12-20 16:23:01 +00:00
pooka
afe2ac389d Add an isolated test case for PR lib/44248. 2010-12-17 19:12:30 +00:00
joerg
31b95753a0 Simplify 2010-12-12 18:21:21 +00:00
joerg
1b0b455148 Link t_fpu against libm if the compiler doesn't want to inline sin/cos. 2010-12-08 23:50:14 +00:00
joerg
994bc56774 Kill file that should be pulled in from a different directory.
Fixes regression test for i386.
2010-12-07 00:54:44 +00:00
pooka
335d54d634 Adjust PR format in xfail message so that html test results gain a
link to http://gnats.netbsd.org/44189
2010-12-06 17:30:07 +00:00
joerg
65b45bb0d8 Actually add the check_stack_alignment implementation for x86. 2010-12-03 20:51:21 +00:00
njoly
71281c77f5 Add testcase for PR/44189: strtod(3) wrong results with "-0x". 2010-12-03 13:11:50 +00:00
pooka
fe64a82d7b comment why vax is left out of all the fun 2010-12-01 07:12:03 +00:00
joerg
236a44094d Test alignment of constructor / destructor calls as well as the stack
of new threads. Currently implement for i386 and AMD64.
2010-11-30 18:38:53 +00:00
pgoyette
67b7416103 Revert previous. The atf default timeout has been reverted, and the 90sec
timer I imposed here is still sometimes "not quite long enough" for the
tests to complete in an amd64 qemu/anita environment.
2010-11-29 18:21:15 +00:00
mrg
9dd1efa373 vax doesn't have ieee fp, so, don't try to test ieee fp on vax. 2010-11-22 08:47:58 +00:00
njoly
c8fe673676 Add testcase for PR/44113: printf(3) should ignore zero padding for
nan/inf.
2010-11-19 18:18:53 +00:00
tron
40d1f42309 Put my name in the author section. 2010-11-17 08:55:27 +00:00
tron
55e8419d17 Split threaded environment test for the other environment tests as
suggested by Nicolas Joly in private e-mail. Linking a binary with
"libpthread" effects the beaviour of "libc" and we really want to
test both cases.
2010-11-16 14:03:47 +00:00
tron
91e8290e88 Add a new regression test "t_threaded" which tests using getenv_r(3),
putenv(3), setenv(3) and unsetenv(3) concurrently.
2010-11-14 19:19:24 +00:00
tron
18217b5088 Update tests for *env(3):
- Introduce randomness into "t_setenv" to avoid freeing environment
  variables exactly in the order they have been allocated.
  Also call unsetenv(3) twice to make sure it behaves well if the
  environment variable doesn't exist.
- "t_getenv" is no longer a known failure after getenv(3) and getenv_r(3)
  have been fixed.
2010-11-14 18:15:08 +00:00
tron
603058a76c Add a test for getenv(3) which fails at the moment because it doesn't
handle "=" in variable names properly.

I'll send out a diff for review soon which fixes this.
2010-11-13 21:08:36 +00:00
tron
926ab269df Improve testing of environment handling:
1.) Always check the return value of setenv(3) and unsetenv(3).
2.) Test that calling setenv(..., ..., 0) doesn't overwrite environment
    variables.
3.) Add a new test which mixes putenv(3) and setenv(3).
2010-11-13 18:52:55 +00:00
pgoyette
1c0f72e4dd The libevent tests are fairly lengthy - each test case actually contains
about 20 or so mini-cases.  Increase the timeout for these tests to let
them run to completion.
2010-11-11 22:18:53 +00:00
pooka
dbfa9a01cc Now that copyinstr() correctly returns error, trim the semaphore
name to fit into SEM_MAX_NAMELEN.
2010-11-10 11:14:12 +00:00
pooka
92603a1ff0 This test is cursed.
Yesterday I thought I committed the increased timeout and when the
test was still failing for the autotests n hours later I noticed
I had actually failed to commit it.  I did manage to commit something
in the evening, but the autotests were still failing this morning,
so I noticed I increased the timeout of the wrong test.  I wonder
what will go wrong this time...

(and p.s.: 10240 is probably slow because it's O(n^2) with a constant
of quite a few)
2010-11-09 11:48:35 +00:00
pooka
537f9e3a0b Increase timeout from 30 to 300 since this test runs for a long time.
XXX1: should 2x10240 loops really be *that* slow?
XXX2: is 10240 a sensible number to begin with?
2010-11-08 23:28:41 +00:00
njoly
e7d0fdd058 Do not fail but skip tests if POSIX semaphores are not supported. 2010-11-08 13:05:49 +00:00
jmmv
decf2b5e0f Adjusts tests after import of atf-0.12:
- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
  unprivileged-user:_atf setting.  This probably deserves a fix somehow
  but I'm not sure at this point.
2010-11-07 17:51:16 +00:00
christos
b32d0df211 disable string again 2010-11-03 20:20:12 +00:00
christos
0f10aa9dce add Makefile.inc everywhere so that we can set WARNS=4 by default. Amazing
how many bugs this found :-)
2010-11-03 16:10:19 +00:00
christos
d3d3da9ee3 add a clearenv test. 2010-11-03 16:09:43 +00:00
njoly
5d63576039 Make putenv(3) fails with EINVAL for a null pointer, or for a string
that either miss or start with a `=' character.

Adjust man page and testcase accordingly.
2010-10-25 20:35:36 +00:00
njoly
4c968434a3 Make setenv(3) follow the standard, by rejecting invalid strings. It
now fails with EINVAL errno when variable is NULL, empty or contains
an `=' character; or value is NULL.

Adjust the man page accordingly, and exercize them in the existing
environment testcase.
2010-10-16 11:23:41 +00:00
pooka
936f8998cf Use actual buffer size instead of sizeof(char *). Makes the test
work on non-64bit platforms.
2010-10-13 11:19:28 +00:00
pooka
6dec45da47 fix -DDEBUG 2010-10-13 10:31:00 +00:00
christos
6188013961 use "RZ()" instead of ATF_CHECK(), since ATF_CHECK does not deal with errno.
This is repulsive, specially the part about hard-coding the h_macros.h file
in the c code.
2010-10-11 15:48:57 +00:00
christos
99101ab637 don't use err(), from pooka.
CV: ----------------------------------------------------------------------
2010-10-11 15:16:01 +00:00
christos
37a7ff776d Add tests for putenv(3) 2010-10-01 20:12:20 +00:00
tnozaki
93b7363c93 add fmemopen(3) derrived from POSIX:2008.
libc minor bump.
2010-09-24 09:21:53 +00:00
christos
1db2d29e54 unit test for environment. Grr, someone should make fixing the sets easier
otherwise people are not going to want to write unit-tests.
2010-09-23 17:38:08 +00:00
christos
5472a32d66 glue glob tests 2010-09-09 22:25:38 +00:00
christos
758507e1aa Add tests for GLOB_STAR 2010-09-06 14:41:21 +00:00
jmmv
b283757fe6 Convert the libdes tests to atf. 2010-08-25 16:46:36 +00:00
joerg
4dfb749204 Rename h_initfini3 dso now that it is a simple module. 2010-08-04 14:59:39 +00:00
joerg
21847f857f Simplify. 2010-08-04 13:56:10 +00:00
joerg
b6fbda43e7 TESTSBASE is provided by bsd.own.mk now. 2010-08-04 13:52:23 +00:00
hans
846cca4cda Revert to 1.1 and fix the casts by using uintptr_t. Ok jruoho. 2010-07-29 12:56:16 +00:00
jruoho
f560676c53 One more cast. 2010-07-29 12:17:31 +00:00
jruoho
07456be22e Fix build failure on AMD64, noted by njoly@. 2010-07-29 12:03:10 +00:00
jruoho
b226f3d0e3 Add a simple test for pthread_join(3). 2010-07-28 21:29:15 +00:00
joerg
cee90d4c4c Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
2010-07-28 13:51:38 +00:00
jmmv
8a0380e301 before_start_one_thread is not racy only in amd64; my confusion. Mark it
as an xfail everywhere and, while doing so, make the test longer so that
we trigger the failure all the time -- of course, being a race this may
still happen but the chances should be pretty low.
2010-07-21 17:23:08 +00:00
jmmv
28cce38f11 Split the before_start test in two: one that does not use threads and one
that does.  The former works all the time but the latter gets consistently
stuck on amd64.  Mark the latter as an expected timeout (should be a "race
condition" test, but atf does not have such a thing yet[1]).

This clears the test failures, at least, under anita running NetBSD/i386.

From pooka@: this could well be because calling sem_post(3) from a signal
handler can't possibly do the right thing with the pthread implementation.
However, according to signal(7), sem_post(3) is signal-async safe...

While here, program alarms using a timeout shorter than 1 second to speed
up the execution of the tests.

1: Good thing is I finally understand what a "race condition" test looks
like, I believe.
2010-07-19 10:31:46 +00:00
pooka
510b2ec795 Reduce sleep time for practically the same effect. Until atf can
do parallel test execution, tests which spend 99.9999% of their
execution sleeping are not nice.
2010-07-18 22:30:55 +00:00
jmmv
cb5d4b0864 Convert the libobjc tests to atf. While doing this, make the tests actually
check that things work.
2010-07-18 12:41:51 +00:00
jmmv
bbd81cb35e Convert the csu tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
2010-07-17 19:25:26 +00:00
njoly
ffa14f5342 Add missing pthread_mutex_init call in mutex3 testcase. 2010-07-16 18:16:43 +00:00
jmmv
ac555471ca Convert the libpthread tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.

I think that this, together with the previous conversion of librt, obsoletes
the tests in the semaphore/ directory.  Will investigate later.
2010-07-16 15:42:53 +00:00
jmmv
c505c44298 Convert the libposix, libprop, librt, libskey and libutil tests to ATF.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
2010-07-16 13:56:31 +00:00
jmmv
9d0b4b5bb8 Get rid of static Atffiles and let bsd.test.mk generate them on the fly. 2010-07-13 21:13:21 +00:00
jmmv
7562f3f929 Replace custom xfail settings with the new expected failure support in
atf 0.10.
2010-07-03 08:18:30 +00:00
pooka
de8c66c7a5 * remove pasto
* set short timeout for the blockwait test
2010-06-17 09:37:50 +00:00
pooka
a17a919421 Set xfail for tests which have a PR for them. 2010-06-16 15:39:41 +00:00
pooka
7bf6b262ee Function which does not return needs to return a value. 2010-06-12 22:59:59 +00:00
pooka
693b5f6213 quote PR kern/43452 in descr 2010-06-10 22:20:38 +00:00
pooka
b2077c0c11 Add tests for semaphores. Note: the "unlink" one fails because our
implementation is broken.  I'll file a PR shortly.
2010-06-10 22:03:43 +00:00
martin
5d2d1246bd remove "string" directory for now, it isn't installed 2010-02-28 11:06:59 +00:00
martin
163086bd7a Disable population count test for now, please re-enable once
PR toolchain/42885 is fixed
2010-02-26 09:35:08 +00:00
joerg
1ca41e3237 Add a regression test for the SHA2 family that also checks for unaligned
accesses.
2010-01-24 21:12:17 +00:00
plunky
b2965573f9 add ATF tests for libevent 2009-11-02 10:15:45 +00:00
drochner
55f6a48c74 flag a 64-bit integer constant as "ULL" -- this is not clean but the
code around it assumes it anyway
fixes build on 32-bit
2009-07-21 21:45:33 +00:00
joerg
974b291a6c Add popcount(3) and the long and long long version. Name is inspired by
gnulib, the implementation goes back to the AMD Software Optimizer
guide. A number of platforms will want to replace the C version with
assembler code using native instructions.
2009-07-21 13:18:43 +00:00
joerg
7afbfeabf4 Use __RCSID. 2009-07-20 18:24:01 +00:00
joerg
d6e219476b Add a fast, platform independent hash function to libc.
The algorithm used is the Jenkins hash.  The name (mi_vector_hash)
reflects the nature of the hash function.
Add glue for libc ATF tests and include a test case to make sure that
(mis)alignment and endianess are handled correctly.

Bump libc minor to 169.
2009-07-20 17:03:36 +00:00