Commit Graph

54 Commits

Author SHA1 Message Date
d796c73e89 qa: fix broken.runner 2017-08-15 00:53:04 +02:00
df8bc2ce43 qa: increase rlockt1 timeout 2017-08-14 18:46:23 +02:00
1b4b6d1574 qa: reenable newlib's tests 2017-08-13 12:33:18 +02:00
d573d0a39c qa: disable newlib's test 202-signals 2017-08-13 00:06:04 +02:00
99124f1578 qa: disable newlib's test 201-signals
For some reason it hangs on travis-ci.
2017-08-12 23:55:39 +02:00
e57ff30b63 qa: release cpu on newlib/201-signals and newlib/202-signals 2017-08-12 23:33:38 +02:00
93dfad6b0b kernel: print proc info on addbroken 2017-08-12 23:32:35 +02:00
1c4a04cd30 qa: various fix to tests 2017-08-11 03:18:32 +02:00
2a38ee6ab6 qa: fix typo in test 2017-06-06 19:53:45 +02:00
4f97f4a80b qa: disable broken tests 2017-06-05 22:11:36 +02:00
9f4472c3bb kernel: simplified fork_chain test 2017-06-05 19:25:08 +02:00
2269a4bbd0 kernel: minimal test that panic the mmu code 2017-06-03 23:23:42 +02:00
a64a7b0d0e qa: check that notes cannot eat wait messages 2017-05-30 01:00:03 +02:00
a8d42cecc9 newlib: use SIGINT to avoid abort 2017-05-29 23:45:00 +02:00
9dc9001469 newlib: test ignored signals (broken) 2017-05-29 01:53:37 +02:00
559e5429ed newlib: tests for sigchld 2017-05-29 01:42:08 +02:00
fe168aa55d newlib: introduce tests for SIGCHLD 2017-05-26 02:12:42 +02:00
5ca0ef085c newlib: fix test for SIGSTOP/SIGCONT 2017-05-26 00:39:47 +02:00
439326fa1f newlib: enabled more tests for signals (still broken) 2017-05-25 22:43:38 +02:00
f9c63742bb qa: simplify test that crash with -O2 2017-05-22 23:18:47 +02:00
1eb450510a qa: add test that crash with -O2 2017-05-21 23:16:41 +02:00
fa15f817c4 qa: avoid cast that preclude strict aliasing 2017-05-19 01:09:51 +02:00
960e8a0d4e qa/kern: more tests for awake 2017-05-17 00:52:16 +02:00
f9b2e9aba4 kernel: generalize awake
Awake can now interrupt several blocking syscalls (even
during note handling).

Among others, it can interrupt await, pread and pwrite.

It cannot interrupt several others for different reasons:

- awake cannot be interrupted by awake;
- syscalls like remove and create can be used for kernel comunication
  and it would be hard to know if the effect occurred in the
  receiving fs if they were interrupted;
- other syscalls do not need awake since they just provide access
  to kernel infos (eg seek or fd2path)

NOTE: awakes registered before a note cannot occur during the note
handling and will be deferred till the next call to noted.
2017-05-15 00:05:59 +02:00
d62ca1162f Merge branch 'libposix-new-signals' of https://bitbucket.org/tesio/jehanne into libposix-new-signals 2017-05-08 22:54:34 +02:00
48ea61ab9c newlib: more tests for signals 2017-05-08 00:36:04 +02:00
1263399c0b qa: check devproc start/stop ctl msg 2017-05-07 19:32:55 +02:00
ecd6dddf86 qa/kern: ensure awake in signal handlers is not affected by sleep 2017-05-04 19:55:55 +02:00
0b193807b6 qa: ensure awake works correctly in signal handlers
Jehanne's notes (like Plan9 ones) are not reentrant.
Thus an alarm can not be used to interrupt a syscall in a note handler.

Awake instead works properly also in a note handler.
2017-05-04 01:07:32 +02:00
bd8ced55f1 qa: fix CID 168327 and CID 168326 2017-05-04 00:22:50 +02:00
ec8d3427b7 qa: fix newlib test (CID 168329 and CID 168328) 2017-05-04 00:17:19 +02:00
3b35743a64 qa: nested_note checks that notes are enqueued in kernel 2017-05-03 02:23:26 +02:00
47573e2122 newlib: add 201-signals (broken as no default action occurs in newlib) 2017-05-02 01:15:10 +02:00
be7c067507 newlib: fix qa_exit_translator in qa tests 2017-05-02 00:18:52 +02:00
690a89d3ce newlib: add test for waitpid (to implement) 2017-05-01 12:03:49 +02:00
bd22e5154c qa: wait for child in newlib/200-signals 2017-04-30 16:55:13 +02:00
d0b9ae9cac newlib: first test for signals 2017-04-29 00:33:54 +02:00
28539041d0 newlib: one more test (fread) 2017-04-28 23:15:03 +02:00
2481b01515 qa: introduce runners and more tests for newlib
For each test, if a script exists with the same name of the test
plus the .runner suffix, the runner is run instead of the test.

As a first example qa/lib/newlib/testsuite/atexit is run by
qa/lib/newlib/testsuite/atexit.runner.

These .runner scripts allow more complex checks of the side effects
generated by the test.
2017-04-28 00:47:12 +02:00
5c8200b9da qa: simple infrastructure to test output expectations 2017-04-24 00:06:33 +02:00
7ab8fecd80 newlib: qa checks from RedHat tests suite 2017-04-23 23:50:20 +02:00
c2982db8a2 newlib: run first QA checks 2017-04-22 00:46:55 +02:00
e70feee4a3 libc: introduce "jehanne_" namespace
With this commit all functions declared in libc.h have been renamed
with the "jehanne_" prefix. This is done for several reason:

- it removes conflicts during symbol resolution when linking
  standard C libraries like newlib or musl
- it allows programs depending on a standard C library to directly
  link to a library depending on our non standard libc (eg libsec).

To ease transiction two files are provided:

- sys/include/lib9.h that can be included instead of <libc.h> to use
  the old names (via a simple set of macros)
- sys/src/lib/c/lib9.c that can be compiled with a program where the
  macro provided by lib9.h are too dumb (see for example rc or grep).

In the kernel port/lib.h has been modified accordingly and some of
the functions it directly provides has been renamed too (eg malloc
in qmalloc.c and print in devcons.c).
2017-04-19 23:48:21 +02:00
65cdad4317 libc: rewrite putenv and getenv.
These new implementations

- do several validity check on input parameters
- allow a bit larger variable names (127 bytes, aka sizeof(Proc.genbuf)-1)
- preserve nulls in the content (the original version used to replace
  '\0' with ' '). I can't see why they did, actually.
  See also http://marc.info/?l=9fans&m=148475801229908&w=2

Should also fix CID 155718
2017-01-19 00:58:43 +01:00
51d12f1f34 kernel: fix #0/brk/ qid (it's a special directory, not a special file) 2017-01-09 00:44:01 +01:00
01562d4ddb qa: rfork(RFNAMEG) on tests that are going to rfork(RFNOMNT) later 2017-01-06 23:04:04 +01:00
4676c65a3d kernel: move nsec to libc 2017-01-06 00:56:22 +01:00
882e33b091 qa: fix warnings 2017-01-06 00:54:42 +01:00
37541724d0 kernel: add #0/brk and move brk_() to libc 2016-12-31 00:43:02 +01:00
b862596737 kernel&all: create() syscall only sends Tcreate
In Plan9 the create syscall fallback on a open(OTRUNC) if the
path provided already exists. This is actually a common requirement
as most programs (editors, cat...) simply requires that a file is
there and is empty, and doesn't care overwriting existing contents
(note that this is particularily sensible with something like fossil).

In Jehanne the application is responsible of actually handle this
"file exists" error but libc provides ocreate() to mimic the Plan9
behaviour. Note that ocreate introduce a subtle race too: the path
is walked several times if the file exists, thus it could misbehave
on concurrent namespace changes. However I guess this is not going to
happen often enough to care now.

NOTE we will probably address this rare race too, with a more drammatic change
to syscalls: a new walk() syscall that will provide an unopen fd.
2016-12-24 21:25:20 +01:00