2005-04-21 16:53:53 +02:00
|
|
|
# Makefile for the tests.
|
|
|
|
|
|
|
|
CC = exec cc
|
2009-12-09 20:01:38 +01:00
|
|
|
GCC = /usr/gnu/bin/gcc
|
2005-04-21 16:53:53 +02:00
|
|
|
CFLAGS= -O -D_MINIX -D_POSIX_SOURCE
|
2009-12-09 20:01:38 +01:00
|
|
|
CFLAGS-GCC= $(CFLAGS) -Wall
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
OBJ= test1 test2 test3 test4 test5 test6 test7 test8 test9 \
|
|
|
|
test10 test12 test13 test14 test15 test16 test17 test18 test19 \
|
|
|
|
test21 test22 test23 test25 test26 test27 test28 test29 \
|
2008-10-01 17:09:33 +02:00
|
|
|
test30 test31 test32 test34 test35 test36 test37 test38 \
|
Merge of David's ptrace branch. Summary:
o Support for ptrace T_ATTACH/T_DETACH and T_SYSCALL
o PM signal handling logic should now work properly, even with debuggers
being present
o Asynchronous PM/VFS protocol, full IPC support for senda(), and
AMF_NOREPLY senda() flag
DETAILS
Process stop and delay call handling of PM:
o Added sys_runctl() kernel call with sys_stop() and sys_resume()
aliases, for PM to stop and resume a process
o Added exception for sending/syscall-traced processes to sys_runctl(),
and matching SIGKREADY pseudo-signal to PM
o Fixed PM signal logic to deal with requests from a process after
stopping it (so-called "delay calls"), using the SIGKREADY facility
o Fixed various PM panics due to race conditions with delay calls versus
VFS calls
o Removed special PRIO_STOP priority value
o Added SYS_LOCK RTS kernel flag, to stop an individual process from
running while modifying its process structure
Signal and debugger handling in PM:
o Fixed debugger signals being dropped if a second signal arrives when
the debugger has not retrieved the first one
o Fixed debugger signals being sent to the debugger more than once
o Fixed debugger signals unpausing process in VFS; removed PM_UNPAUSE_TR
protocol message
o Detached debugger signals from general signal logic and from being
blocked on VFS calls, meaning that even VFS can now be traced
o Fixed debugger being unable to receive more than one pending signal in
one process stop
o Fixed signal delivery being delayed needlessly when multiple signals
are pending
o Fixed wait test for tracer, which was returning for children that were
not waited for
o Removed second parallel pending call from PM to VFS for any process
o Fixed process becoming runnable between exec() and debugger trap
o Added support for notifying the debugger before the parent when a
debugged child exits
o Fixed debugger death causing child to remain stopped forever
o Fixed consistently incorrect use of _NSIG
Extensions to ptrace():
o Added T_ATTACH and T_DETACH ptrace request, to attach and detach a
debugger to and from a process
o Added T_SYSCALL ptrace request, to trace system calls
o Added T_SETOPT ptrace request, to set trace options
o Added TO_TRACEFORK trace option, to attach automatically to children
of a traced process
o Added TO_ALTEXEC trace option, to send SIGSTOP instead of SIGTRAP upon
a successful exec() of the tracee
o Extended T_GETUSER ptrace support to allow retrieving a process's priv
structure
o Removed T_STOP ptrace request again, as it does not help implementing
debuggers properly
o Added MINIX3-specific ptrace test (test42)
o Added proper manual page for ptrace(2)
Asynchronous PM/VFS interface:
o Fixed asynchronous messages not being checked when receive() is called
with an endpoint other than ANY
o Added AMF_NOREPLY senda() flag, preventing such messages from
satisfying the receive part of a sendrec()
o Added asynsend3() that takes optional flags; asynsend() is now a
#define passing in 0 as third parameter
o Made PM/VFS protocol asynchronous; reintroduced tell_fs()
o Made PM_BASE request/reply number range unique
o Hacked in a horrible temporary workaround into RS to deal with newly
revealed RS-PM-VFS race condition triangle until VFS is asynchronous
System signal handling:
o Fixed shutdown logic of device drivers; removed old SIGKSTOP signal
o Removed is-superuser check from PM's do_procstat() (aka getsigset())
o Added sigset macros to allow system processes to deal with the full
signal set, rather than just the POSIX subset
Miscellaneous PM fixes:
o Split do_getset into do_get and do_set, merging common code and making
structure clearer
o Fixed setpriority() being able to put to sleep processes using an
invalid parameter, or revive zombie processes
o Made find_proc() global; removed obsolete proc_from_pid()
o Cleanup here and there
Also included:
o Fixed false-positive boot order kernel warning
o Removed last traces of old NOTIFY_FROM code
THINGS OF POSSIBLE INTEREST
o It should now be possible to run PM at any priority, even lower than
user processes
o No assumptions are made about communication speed between PM and VFS,
although communication must be FIFO
o A debugger will now receive incoming debuggee signals at kill time
only; the process may not yet be fully stopped
o A first step has been made towards making the SYSTEM task preemptible
2009-09-30 11:57:22 +02:00
|
|
|
test39 t10a t11a t11b test40 t40a t40b t40c t40d t40e t40f test41 \
|
2009-12-09 20:01:38 +01:00
|
|
|
test42 test44 test45
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
BIGOBJ= test20 test24
|
2009-12-04 19:58:57 +01:00
|
|
|
ROOTOBJ= test11 test33 test43
|
2009-12-09 20:01:38 +01:00
|
|
|
GCCOBJ= test45-gcc
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2009-12-09 20:01:38 +01:00
|
|
|
all: $(OBJ) $(BIGOBJ) $(GCCOBJ) $(ROOTOBJ)
|
2005-09-12 13:53:22 +02:00
|
|
|
chmod 755 *.sh run
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
$(OBJ):
|
|
|
|
$(CC) $(CFLAGS) -o $@ $@.c
|
|
|
|
|
|
|
|
$(BIGOBJ):
|
|
|
|
$(CC) $(CFLAGS) -o $@ $@.c
|
|
|
|
|
2009-12-09 20:01:38 +01:00
|
|
|
$(GCCOBJ):
|
|
|
|
[ ! -x $(GCC) ] || $(GCC) $(CFLAGS-GCC) -o $@ $<
|
|
|
|
|
2005-04-21 16:53:53 +02:00
|
|
|
$(ROOTOBJ):
|
|
|
|
$(CC) $(CFLAGS) $@.c
|
2006-10-25 15:35:03 +02:00
|
|
|
@install -c -o root -m 4755 a.out $@
|
2005-06-07 13:52:35 +02:00
|
|
|
@rm a.out
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
clean:
|
2005-08-05 21:19:18 +02:00
|
|
|
cd select && make clean
|
2009-12-09 20:01:38 +01:00
|
|
|
-rm -rf *.o *.s *.bak test? test?? test??-gcc t10a t11a t11b \
|
2009-12-09 08:59:08 +01:00
|
|
|
t40a t40b t40c t40d t40e t40f t43 DIR*
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
test1: test1.c
|
|
|
|
test2: test2.c
|
|
|
|
test3: test3.c
|
|
|
|
test4: test4.c
|
|
|
|
test5: test5.c
|
|
|
|
test6: test6.c
|
|
|
|
test7: test7.c
|
|
|
|
test8: test8.c
|
|
|
|
test9: test9.c
|
|
|
|
test10: test10.c
|
|
|
|
t10a: t10a.c
|
|
|
|
test11: test11.c
|
|
|
|
t11a: t11a.c
|
|
|
|
t11b: t11b.c
|
|
|
|
test12: test12.c
|
|
|
|
test13: test13.c
|
|
|
|
test14: test14.c
|
|
|
|
test15: test15.c
|
|
|
|
test16: test16.c
|
|
|
|
test17: test17.c
|
|
|
|
test18: test18.c
|
|
|
|
test19: test19.c
|
|
|
|
test20: test20.c
|
|
|
|
test21: test21.c
|
|
|
|
test22: test22.c
|
|
|
|
test23: test23.c
|
|
|
|
test24: test24.c
|
|
|
|
test25: test25.c
|
|
|
|
test26: test26.c
|
|
|
|
test27: test27.c
|
|
|
|
test28: test28.c
|
|
|
|
test29: test29.c
|
|
|
|
test30: test30.c
|
|
|
|
test31: test31.c
|
|
|
|
test32: test32.c
|
|
|
|
test33: test33.c
|
|
|
|
test34: test34.c
|
|
|
|
test35: test35.c
|
|
|
|
test36: test36.c
|
|
|
|
test37: test37.c
|
|
|
|
test38: test38.c
|
2008-10-01 17:09:33 +02:00
|
|
|
test39: test39.c
|
2009-07-14 11:43:33 +02:00
|
|
|
test40: test40.c
|
|
|
|
t40a: t40a.c
|
|
|
|
t40b: t40b.c
|
|
|
|
t40c: t40c.c
|
|
|
|
t40d: t40d.c
|
|
|
|
t40e: t40e.c
|
|
|
|
t40f: t40f.c
|
2009-08-15 23:37:26 +02:00
|
|
|
test41: test41.c
|
Merge of David's ptrace branch. Summary:
o Support for ptrace T_ATTACH/T_DETACH and T_SYSCALL
o PM signal handling logic should now work properly, even with debuggers
being present
o Asynchronous PM/VFS protocol, full IPC support for senda(), and
AMF_NOREPLY senda() flag
DETAILS
Process stop and delay call handling of PM:
o Added sys_runctl() kernel call with sys_stop() and sys_resume()
aliases, for PM to stop and resume a process
o Added exception for sending/syscall-traced processes to sys_runctl(),
and matching SIGKREADY pseudo-signal to PM
o Fixed PM signal logic to deal with requests from a process after
stopping it (so-called "delay calls"), using the SIGKREADY facility
o Fixed various PM panics due to race conditions with delay calls versus
VFS calls
o Removed special PRIO_STOP priority value
o Added SYS_LOCK RTS kernel flag, to stop an individual process from
running while modifying its process structure
Signal and debugger handling in PM:
o Fixed debugger signals being dropped if a second signal arrives when
the debugger has not retrieved the first one
o Fixed debugger signals being sent to the debugger more than once
o Fixed debugger signals unpausing process in VFS; removed PM_UNPAUSE_TR
protocol message
o Detached debugger signals from general signal logic and from being
blocked on VFS calls, meaning that even VFS can now be traced
o Fixed debugger being unable to receive more than one pending signal in
one process stop
o Fixed signal delivery being delayed needlessly when multiple signals
are pending
o Fixed wait test for tracer, which was returning for children that were
not waited for
o Removed second parallel pending call from PM to VFS for any process
o Fixed process becoming runnable between exec() and debugger trap
o Added support for notifying the debugger before the parent when a
debugged child exits
o Fixed debugger death causing child to remain stopped forever
o Fixed consistently incorrect use of _NSIG
Extensions to ptrace():
o Added T_ATTACH and T_DETACH ptrace request, to attach and detach a
debugger to and from a process
o Added T_SYSCALL ptrace request, to trace system calls
o Added T_SETOPT ptrace request, to set trace options
o Added TO_TRACEFORK trace option, to attach automatically to children
of a traced process
o Added TO_ALTEXEC trace option, to send SIGSTOP instead of SIGTRAP upon
a successful exec() of the tracee
o Extended T_GETUSER ptrace support to allow retrieving a process's priv
structure
o Removed T_STOP ptrace request again, as it does not help implementing
debuggers properly
o Added MINIX3-specific ptrace test (test42)
o Added proper manual page for ptrace(2)
Asynchronous PM/VFS interface:
o Fixed asynchronous messages not being checked when receive() is called
with an endpoint other than ANY
o Added AMF_NOREPLY senda() flag, preventing such messages from
satisfying the receive part of a sendrec()
o Added asynsend3() that takes optional flags; asynsend() is now a
#define passing in 0 as third parameter
o Made PM/VFS protocol asynchronous; reintroduced tell_fs()
o Made PM_BASE request/reply number range unique
o Hacked in a horrible temporary workaround into RS to deal with newly
revealed RS-PM-VFS race condition triangle until VFS is asynchronous
System signal handling:
o Fixed shutdown logic of device drivers; removed old SIGKSTOP signal
o Removed is-superuser check from PM's do_procstat() (aka getsigset())
o Added sigset macros to allow system processes to deal with the full
signal set, rather than just the POSIX subset
Miscellaneous PM fixes:
o Split do_getset into do_get and do_set, merging common code and making
structure clearer
o Fixed setpriority() being able to put to sleep processes using an
invalid parameter, or revive zombie processes
o Made find_proc() global; removed obsolete proc_from_pid()
o Cleanup here and there
Also included:
o Fixed false-positive boot order kernel warning
o Removed last traces of old NOTIFY_FROM code
THINGS OF POSSIBLE INTEREST
o It should now be possible to run PM at any priority, even lower than
user processes
o No assumptions are made about communication speed between PM and VFS,
although communication must be FIFO
o A debugger will now receive incoming debuggee signals at kill time
only; the process may not yet be fully stopped
o A first step has been made towards making the SYSTEM task preemptible
2009-09-30 11:57:22 +02:00
|
|
|
test42: test42.c
|
2009-12-04 08:52:22 +01:00
|
|
|
test43: test43.c
|
2009-12-08 14:35:52 +01:00
|
|
|
test44: test44.c
|
2009-12-09 20:01:38 +01:00
|
|
|
test45: test45.c test45.h
|
|
|
|
test45-gcc: test45.c test45.h
|
|
|
|
|