Commit graph

231 commits

Author SHA1 Message Date
Lionel Sambuc
5180c3cfb9 Installing posix tests in /usr/tests/minix-posix
The goal is to enable anyone to simply run our current test suite.

Change-Id: I27d8856cb82a4be2baa5dc5273526383b7f4fc2c
2013-03-13 10:43:16 +01:00
Thomas Veerman
24ac5ce3f9 test56: unlink proper test file
Change-Id: I215f0d00b8e077930c4e93d192553eaf0d2a353f
2013-03-08 15:45:53 +00:00
Thomas Veerman
76ddef10da UDS: terminate canonical path string
When you provided a string with junk after the terminating nul to a
UNIX domain socket and used bind(2), the canonical path function would
not properly terminate the new string. This caused VFS to return
ENAMETOOLONG on an otherwise valid path name.

Test case is added to test56.

Change-Id: I883b6be23d9e4ea13c3cee28cbb3726343df037f
2013-03-08 15:42:32 +00:00
Thomas Veerman
1ba514e19c UDS: check connection state better
Select(2)ing on UNIX domain sockets was not working properly because
connection state wasn't properly checked/propagated. So selecting for
a read descriptor and closing the write descriptor on the other end
didn't cause select to return. Similarly, read(2) kept blocking while
it should return an error when the other end closed the socket.

Change-Id: I3f5bb52af1a6b03313d508bf915fc838357ba450
2013-03-07 10:49:21 +00:00
Thomas Veerman
2e723784ff test68: test pipe2 functionality
Change-Id: Idb15ec83983d0b052232c9533f89d637229d19df
2013-02-28 10:08:54 +00:00
Thomas Veerman
9c99b3b3b9 test67: test opening files and sockets with O_CLOEXEC
Change-Id: If71e61f830c6d3b5154368e189baa4f70bd73850
2013-02-28 10:08:54 +00:00
Lionel Sambuc
8e4736f2df Removing obsolete _MINIX define
Change-Id: Id33ac7e973d1c0e249b690fe44a597474fac6076
2013-02-26 09:44:20 +00:00
Thomas Veerman
e104b46005 test set: use clear 2013-02-21 10:29:09 +00:00
Ben Gras
7a07b58aa8 test66: float smoke test, floating point fixes (arm)
Change-Id: Idd209ab6f341fbfb6b2dca77290ff440695bc2c1
2013-02-20 12:29:37 +00:00
Ben Gras
4ac7206c6f t40c term[] count fix
. term[] did not have the promised number of entries

Change-Id: I06a45ca0d948a6876bf1bffd0ec4706c88b7a3b0
2013-02-09 18:51:56 +01:00
Ben Gras
702d90b6fe test41: relax maximum timer tick rate
. on ARM (hz=1000) does not give code a chance to stop the timer

Change-Id: Id626bfed088400c3c3962ddfc5e8fbe23dd2a797
2013-02-06 17:40:04 +01:00
Ben Gras
298b41b523 libexec: detect short files
if an exec() fails partway through reading in the sections, the target
process is already gone and a defunct process remains. sanity checking
the binary beforehand helps that.

test10 mutilates binaries and exec()s them on purpose; making an exec()
fail cleanly in such cases seems like acceptable behaviour.

fixes test10 on ARM.

Change-Id: I1ed9bb200ce469d4d349073cadccad5503b2fcb0
2013-02-04 12:04:35 +01:00
Ben Gras
042ecb4231 tests: print error locations verbosely
So we don't have to figure out which line generated this error by
searching for the subtest/error code combination.

Change-Id: Icca0a776fd19f0f3d250ddb76916f5f932dd9b5e
2013-01-25 11:54:24 +00:00
Kees Jongenburger
5e3b51ba96 test:update tests to fix compiler warnings.
Change-Id: Id2c757f61fe5e8b52dffadfeb129024625c76f48
2013-01-08 10:39:53 +01:00
Lionel Sambuc
2dc480bd58 Shell tests now complain more loudly.
Adding the bomb function which takes as a parameter a string
to be printed, print it, cleans up and exits with an error
code. It also means they will exit after the first error, unlike
previous behaviour.

Change-Id: Id0ffdf3938da43586c9dae7c566ee130533c5577
2012-12-11 16:59:54 +01:00
Kees Jongenburger
f44fb1784b Make test3 fail on the first error.
test3 performs tests for null pointers but after that still continues
and uses them.  This results in segfault's. Fixing this issue by failing
on the first error.
2012-12-11 10:13:15 +01:00
Kees Jongenburger
d8e600db17 Allow tests to fail on the first encountered error.
Pre increment errct in test to be able to fail on the first error.
2012-12-11 10:13:15 +01:00
Thomas Veerman
11184894e2 testsh?.sh: fix sort(1) invocations
Newly imported sort(1) works slightly differently. In fact, the old
sort(1) had a bug and the tests invoked sort(1) the wrong way.
2012-12-07 15:44:28 +00:00
Thomas Veerman
c65ac3136e test65: simply skip if ntfs binaries are not present 2012-11-27 10:19:26 +00:00
Thomas Veerman
d67db9b39c Add NTFS test to test suite 2012-11-26 15:20:18 +00:00
Ben Gras
15e5aba748 tests: link dynamically again 2012-11-16 20:20:55 +01:00
Lionel Sambuc
d19d7d58aa Toolchain upgrade and portability improvements.
upgrade to NetBSD CVS release from 2012/10/17 12:00:00 UTC

Makefiles updates to imporve portability

Made sure to be consistent in the usage of braces/parenthesis at
least on a per file basis. For variables, it is recommended to
continue to use braces.
2012-11-15 16:07:29 +01:00
Ben Gras
b1da7fafd0 vm: fix a null dereference on out-of-memory
. also make other out-of-memory conditions less fatal
	. add a test case for a user program using all the memory
	  it can
	. remove some diagnostic prints for situations that are normal
	  when running out of memory so running the test isn't noisy
2012-11-09 18:36:51 +01:00
Ben Gras
196021cd82 drop safemap code 2012-10-30 13:55:42 +01:00
Thomas Veerman
f1b9e8249b testsh2.sh: change output to new cksum util 2012-10-30 13:08:45 +00:00
David van Moolenbroek
2e26c872c4 blocktest: make fewer assumptions about driver
In particular, allow partial results to be returned in some cases,
and do not require that the driver fail on word-unaligned access.
2012-10-15 11:50:59 +00:00
David van Moolenbroek
52cf951fdc tests: fix IPC test set fix
Partial rollback of git-df39752.
2012-10-11 20:38:41 +02:00
Ben Gras
39393e7046 minor fixes for safecopy & safemap tests 2012-10-10 19:12:42 +02:00
Thomas Veerman
6cb94cc91b tests: don't chmod 777 everything upon cleanup
rm -rf works just fine no matter what mode bits are set (modulo
file ownership and current user id). Test 43 creates a symlink
to / and the chmod operation would change file permissions outside
of the test directory.
2012-09-19 16:20:41 +00:00
David van Moolenbroek
df3975243b tests: fix IPC test set
- use one single library instead of loose library files
- we don't have ftime() anymore
- shmat(non-NULL) is currently broken, fix shmt test set to bypass this
- some other small issues
2012-09-10 19:20:03 +02:00
David van Moolenbroek
c9f644bd68 blocktest: switch from rand() to lrand48()
Apparently, with NetBSD's libc, the exclusive OR of the lower eight
bits of 4096 consecutive rand() values is zero, breaking some tests.
2012-09-10 11:35:04 +02:00
Arne Welzel
4fbdf1946d blocktest: fix segfault on vectored read 2012-09-10 11:32:38 +02:00
David van Moolenbroek
66ef912042 tests: fix DS tests' README too 2012-09-08 16:42:32 +02:00
David van Moolenbroek
2fbc9b274b blocktest: make script more newbie-friendly 2012-09-07 14:25:46 +00:00
David van Moolenbroek
087ace4459 tests: fix DS tests 2012-09-03 12:20:16 +00:00
Arun Thomas
fd43d93ce5 ARM support for system libraries 2012-08-28 13:49:27 -04:00
Arun Thomas
6723dcfab7 Replace MACHINE/CHIP macros with compiler macros 2012-08-06 17:49:22 +02:00
Ben Gras
6a6b7b5769 ld.so: be more mmap()-behaviour-independent
. if the layout of virtual address regions as returned
	  by mmap() without a location hint changes, ld.so could
	  trip itself up (under minix). this change allocates
	  the full size it needs for every object that's loaded
	  so that if that succeeds, it's sure there's virtual address
	  space for the whole thing no matter what other bits happen
	  to be there already.

	. this fix exposed a bug in the test; at atexit() execution
	  time the loaded object is unmapped, so that part of the
	  test is removed.
2012-06-25 14:13:07 +02:00
Ben Gras
2bfeeed885 drop segment from safecopy invocations
. all invocations were S or D, so can safely be dropped
	  to prepare for the segmentless world
	. still assign D to the SCP_SEG field in the message
	  to make previous kernels usable
2012-06-16 16:22:51 +00:00
David van Moolenbroek
f004a0a980 test43: fix dangling-symlink case 2012-05-02 17:39:58 +02:00
David van Moolenbroek
26f817243b VFS: reimplement truncate mtime/ctime fix
POSIX mandates that a file's modification and change time be left
untouched upon truncate/ftruncate iff the file size does not change.
However, an open(O_TRUNC) call must always update the modification and
change time of the file, even if it was already zero-sized. VFS uses
the file systems' truncate call to implement O_TRUNC. This patch
replaces git-255ae85, which did not take into account the open case.
The size check is now moved into VFS, so that individual file systems
need not check for this case anymore.
2012-04-20 11:35:59 +02:00
David van Moolenbroek
1e78879f1e run test fix, take two 2012-04-20 11:34:56 +02:00
Ben Gras
ed21b54203 run test fix 2012-04-18 15:59:37 +02:00
Ben Gras
5086f1b2a1 test scripts fixes 2012-04-16 16:04:44 +02:00
Ben Gras
0c8e5ecc2e tests: link them dynamically by default
. so that functionality is tested
	. add test63 that actually tests dlopen(), dlsym(),
	  etc. functionality; only built if clang supports it
	. also test10 test to copy more of the executable
2012-04-16 05:21:21 +02:00
Ben Gras
b02992f0c1 test: convert to bsdish Makefile
. smaller, simpler, less duplication, exceptions still
	  encodeable
	. fix for test10: too small a buffer to copy executables
2012-04-12 03:03:17 +02:00
Ben Gras
1c7885f932 fix gcc test62 2012-04-12 02:55:04 +02:00
Ben Gras
204ae72525 retire _ANSI and <minix/ansi.h> 2012-03-25 21:58:27 +02:00
Ben Gras
f22864c24e get rid of __LONG_LONG_SUPPORTED
. also drop minix-specific code in libarchive
	  that was needed for not supporting 64 bit ints
2012-03-25 21:58:26 +02:00
Ben Gras
db242ed39d retire _CONST, _VOLATILE, _SIZET, _ARGS, _VOID 2012-03-25 21:58:20 +02:00