The following types are modified (old -> new):
* _BSD_USECONDS_T_ int -> unsigned int
* __socklen_t __int32_t -> __uint32_t
* blksize_t uint32_t -> int32_t
* rlim_t uint32_t -> uint64_t
On ARM:
* _BSD_CLOCK_T_ int -> unsigned int
On Intel:
* _BSD_CLOCK_T_ int -> unsigned long
bin/cat is also updated in order to fix warnings.
_BSD_TIMER_T_ has still to be aligned.
Change-Id: I2b4fda024125a19901120546c4e22e443ba5e9d7
The bug in the offset correction code for the 'shrink region from
below' case can easily case an assert(foundregion->offset == offset)
to trigger (if the blocks are touched afterwards, e.g. on fork())
as the offsets become wrong. This commit is a fix & regression test.
Change-Id: I28ed403e3891362a2dea674a49e786d3450d2983
Forward-port of the run script change in the testvnd
commit on the 3.3.0 branch by David.
Needed to cleanly run the testisofs test as root in
the Jenkins environment.
'While here,' also fix messy which output in testsh2.
Change-Id: I6ec472e1386a54ae74b6e55394f01fa7c5ce53a9
testmfs: catch MFS format changes
This test tests mkfs.mfs will generate the same FS image given the same
input files. mkproto creates a proto file (normalizing directory entry
order). The assumption is that a change in the output flags a tacit
change in FS format, and that a FS format change will cause the image
to change.
. Changes to mkfs.mfs that innocently change the format can
change the sha1 output in the script along with it.
. The assumption is that corresponding versions of mkfs.mfs and
MFS will always work together; otherwise a lot breaks (ramdisk etc.)
. Therefore, as long as a generated FS image stays the same with the
same input now, incompatible MFS changes will still be flagged,
even if they work together with the current mkfs.mfs.
testisofs: test ISO filesystem
. to test isofs: prepare an ISO FS image using writeisofs, copy it
to a RAM device, mount it using the iso9660fs server, compare the
SHA1 contents of the files on the ISO with the inputs.
. use su to run certain commands in the script as root
run script: run shell script tests
. they are installed without .sh so should be
searched for as such
. add diagnostic when tests are skipped
Change-Id: I30daff58e1e43903dacf3c99996a4a0e7d819b6b
Replaces commands/hexdump as well as commands/od.
No Minix-specific changes were needed.
test/testsh2.sh was modified to match the spacing
used in the output of the NetBSD od command.
Change-Id: I65ee1d30e8cdd546097462df7c38c2d38f3e891d
test75 sometimes false-fails if something else is going on
at the same time, presumably because the child doesn't spin
enough to register a nonzero getrusage() cpu time value, as
spin() uses the real time to limit the spinning.
this change forces spin() to do a minimum amount of spinning
before exiting, regardless of scheduling.
Change-Id: I57c63d22969bba418f36bcc8c5ace2b6fb445968
Define the file name templates as char arrays to prevent the
toolchain from mapping them read-only.
Change-Id: Ib2395587b62d4a6ff19c88adc4246dcb41344a53
. full number was needed to reliably trigger the race
condition
. takes a bit too long (7 mins on fast x86 hardware) for a
condition that "can't" happen again, so let's cut the iteration
count and trust that the test will trigger soon enough for
a similar condition in the future.
Change-Id: I2d38b87c25327adbbff91b7db6191648aa1dd8fd
. turns on mmap() functionality for files by default
. also causes exec() to use it to map in executables
without copying and with sharing those pages with the
disk cache and other instances of the executable
Change-Id: Idb94dfe110eed916cf83b12c45e1a77241a2cee5
padconf is specific to arm, so it's being moved to kernel/arch/earm.
Add a test case to ensure the proper error is returned on non-ARM
systems.
Change-Id: I07ebbe64825d59bc0ef9c818d3d54891dafb4419
-By adding MKGCC=yes and MKGCCCMDS=yes on the make commandline
it is now possible to compile and install GCC on the system.
Before doing this, if you are not using the build.sh script,
you will need to call the fetch scripts in order to retrieve
the sources of GCC and its dependencies.
-Reduce difference with NetBSD share/mk
Move Minix-specific parameters from bsd.gcc.mk to bsd.own.mk,
which is anyway patched, so that bsd.gcc.mk is now aligned
on the NetBSD version.
-Clean libraries dependencies, compiles stdc++ only if gcc is
also compiled (it is part of the gcc sources)
-Correct minix.h header sequence, cleanup spec headers.
-Fix cross-compilation from a 32bit host targeting MINIX/arm
Change-Id: I1b234af18eed4ab5675188244e931b2a2b7bd943
Implement getrusage.
These fields of struct rusage are not supported and always set to zero at this time
long ru_nswap; /* swaps */
long ru_inblock; /* block input operations */
long ru_oublock; /* block output operations */
long ru_msgsnd; /* messages sent */
long ru_msgrcv; /* messages received */
long ru_nvcsw; /* voluntary context switches */
long ru_nivcsw; /* involuntary context switches */
test75.c is the unit test for this new function
Change-Id: I3f1eb69de1fce90d087d76773b09021fc6106539
. test74 for mmap functionality
. vm: add a mem_file memory type that specifies an mmap()ped
memory range, backed by a file
. add fdref, an object that keeps track of FD references within
VM per process and so knows how to de-duplicate the use of FD's
by various mmap()ped ranges; there can be many more than there can
be FD's
. turned off for now, enable with 'filemap=1' as boot option
Change-Id: I640b1126cdaa522a0560301cf6732b7661555672
Primary purpose of change: to support the mmap implementation, VM must
know both (a) about some block metadata for FS cache blocks, i.e.
inode numbers and inode offsets where applicable; and (b) know about
*all* cache blocks, i.e. also of the FS primary caches and not just
the blocks that spill into the secondary one. This changes the
interface and VM data structures.
This change is only for the interface (libminixfs) and VM data
structures; the filesystem code is unmodified, so although the
secondary cache will be used as normal, blocks will not be annotated
with inode information until the FS is modified to provide this
information. Until it is modified, mmap of files will fail gracefully
on such filesystems.
This is indicated to VFS/VM by returning ENOSYS for REQ_PEEK.
Change-Id: I1d2df6c485e6c5e89eb28d9055076cc02629594e
This commit removes the secondary cache code implementation from
VM and its usage from libminixfs. It is to be replaced by a new
implementation.
Change-Id: I8fa3af06330e7604c7e0dd4cbe39d3ce353a05b1
. test70: regression test for m_out vfs race condition
The following tests use testcache.c to generate test i/o
patterns, generate random write data and verify the reads.
. test71: blackbox full-stack test of FS operation, testing
using the regular VFS interface crazy i/o patterns
with various working set sizes, triggering only
primary cache, also secondary cache, and finally
disk i/o and verifying contents all the time
. test72: unit test of libminixfs, implementing
functions it needs from -lsys and -lblockdriver
and the client in order to simulate a working
cache client and backend environment.
. test73: blackbox test of secondary vm cache in isolation
Change-Id: I1287e9753182b8719e634917ad158e3c1e079ceb
. vfs read_only() assumes vnode->v_vmnt is non-NULL, but it can
be NULL sometimes
. e.g. fchmod() on UDS triggered NULL deref; add a check and
add REQ_CHMOD to pfs so unix domain sockets can be fchmod()ded
. add to test56
Change-Id: I83c840f101b647516897cc99fcf472116d762012
. add -l option to list available tests
. add -t option to specify tests to run
. also improve the root check a bit by
not relying on an environment var
. do not print the human-friendly banner & summary
if a test list is given to make the test
results easy to parse
Change-Id: Id0f87d485240b1924d667af788338ae31c3dc94c
. make common.o link with the tests instead of being
#included as common.c
. fix warnings about missing prototypes by declaring functions
static
. reduces some duplicated code
Change-Id: Ic2a765d7f5886add5863190efec3fdd2d2ea2137
test69 requires superuser powers to adjust the time. This caused
the test to fail when run as a normal user. The patch adds test69
to the setuid list which will allow regular users to execute it.
Patch contributed by Antoine Leca.
This also adds the sys_settime() kernel call which allows for the adjusting
of the clock named realtime in the kernel. The existing sys_stime()
function is still needed for a separate job (setting the boottime). The
boottime is set in the readclock driver. The sys_settime() interface is
meant to be flexible and will support both clock_settime() and adjtime()
when adjtime() is implemented later.
settimeofday() was adjusted to use the clock_settime() interface.
One side note discovered during testing: uptime(1) (part of the last(1)),
uses wtmp to determine boottime (not Minix's times(2)). This leads `uptime`
to report odd results when you set the time to a time prior to boottime.
This isn't a new bug introduced by my changes. It's been there for a while.
In order to make it more clear that ticks should be used for timers
and realtime should be used for timestamps / displaying the date/time,
getuptime() was renamed to getticks() and getuptime2() was renamed to
getuptime().
Servers, drivers, libraries, tests, etc that use getuptime()/getuptime2()
have been updated. In instances where a realtime was calculated, the
calculation was changed to use realtime.
System calls clock_getres() and clock_gettime() were added to PM/libc.