The Knowbot Program test cases exercises many fundamental
aspects of the Knowbot Operating System and its environment.
Most are intended to be run by submitting them as KPs to a
running KOS. The great majority run without operator
intervention; exceptions will be noted.
KP Capabilities
- null.py
- Does nothing but allow the __main__() entry to point
to fall through.
- dummy.py
- Accomplishes nothing, but consumes some CPU
resources in the process.
- clone.py
- Locates all the KOSs and sends a clone to as many as it
can, excepting the current host. The clones do not
propogate.
- kpimport.mime
- Exercise import of module transported with the KP from MIME
package.
- migrate.py,
pickle.mime
- Migrate to all the active kernels in the namespace -
uses suitcase, as well. pickle.mime
is a transportable-state version.
- migrate-home.py
- This KP migrates to the current KOS repeatedly. This tests
the support for the suitcase and state migration.
- migrate-connector.py
- Migrate, retaining a working SimpleIOAPI connector.
- wander.py
- Migrate randomly among kernels, visiting each at most once.
A limit on the number of hops is imposed as well.
- read-input.py
- Read a line from the standard input stream.
- stdio.py
- Exercise standard I/O streams. This is used to test the
various remote-stream implementations.
- sleepy.py
- Sleep for a specified time. The time to sleep is specified
using a file in the KP's suitcase.
- triggerclient.py,
triggerserver.py
- Exercise conditional variables.
- generic.py
- Test receipt of ``command line'' arguments passed to the KP
using metadata. The arguments are received via
sys.argv
, just as they would be when running the
program from the command line.
- list-suitcase.py
- Produce list of KP suitcase contents; this tests the
SuitcaseFilesystem
class.
- suitcase.py
- Exercise the suitcase a bit; test creating, reading,
and writing files, and create a directory within the suitcase
as well.
- suitcase1.py
- Wander around and exercise the suitcase at each KOS. This
includes more exercising of the path manipulation and
interpretation by the SuitcaseFilesystem
class.
- load-suitcase.py
- Produce a dictionary of the KP suitcase contents.
KOS Services
- list-services.py
- Produce list of services available at the current KOS.
- list-namespace.py
- Produce list of entries in namespace, similar to
nslist.
Error Conditions
- exit.py,
exit-init.py,
exit-load.py,
exit-trig.py,
exit0.py,
exit1.py,
exitstring.py
- Exit in various operational phases to test proper handling
of possible exit points.
- badmetadata.mime,
badmime.mime,
empty.mime,
nocode.mime
- Errors in MIME packaging; these test the ????
- err-init.py,
err-load.py,
err-main.py,
err-noclass.py,
err-nomain.py,
err-syntax.py,
err-trig-2.py,
err-trig.py
- KPs which generate errors which should be detected by the
Supervisor component of the KOS.
- killme.py
- A KP which should be killed from another process will
running. This tests the ability of the KOS kernel to
determine the loss of the process and handle the error.
- core-init.py,
core-load.py,
core-main.py
- KPs which cause the Python interpreter running the
Supervisor to core dump in various operational phases. This
tests the ability of the KOS kernel to correctly detect this
event.
- unpicklable.py
- Cause a migration failure due to an unpicklable value
stored on the KP object.
Loading Conditions
- 7clones.py
- Three generations of clone bifurcation, plus the
original makes seven KPs. This started as a performance
check.
- swarm.py
- Create lots of KPs and have them run around. This can
crash the system.
- stress_suitcase.py
- Suitcase filesystem tests. This is not a KP; run
$KOSROOT/testcases/stress_suitcase.py from
a command line.
- connector-cleanup.py
- Exercise conflicting connector registration and bookkeeping.
- limit_submit.py
- Exercise submit mechanism's "limit" capability.
Extension-specific Tests
- http.py
- Exercise the HTTP plugin by loading several URLs specified
on the KP's ``command line.'' Each retrieved document and the
time it took to retrieve is printed to the KP's standard
output.
- ifinder.py
- Exercise interface-finder plugin 'ifinder', migrating
among KOSs and collecting information about the interfaces
available at each.
- iotest.py
- Exercise user-interface interaction using a migrated
connector. This tests the ability of the KOE to rebuild a
connection between a KP and a service (which may be another
KP).
Miscellaneous Tests
- gzip_kp.py
- Exercise implicit-gzipping suitcase interface
- server.py,
client.py
- Basic service provider and consumer
- multiclient.py,
multiserver.py
- Slightly more complex service provider and consumer