Reputation: 21
I'm developing a operating system and I need a test program (function of any kind) to test certain internal features. I cannot find any appropriate program to do this job. Probably one of you knows one. The program should be open source, written in C with very little user library usage (only file IO, pthreads, stdio, stdlib preferred) and must have a binary size of at least 2MB.
Thanks for any suggestions.
Upvotes: 2
Views: 168
Reputation: 78993
There are many different flavors of shells around that are open source. You should be able to chose one that uses the right functionalities from the OS to provide a good test.
The shells that are accessible in the busybox package are probably a good starting point.
Upvotes: 1
Reputation: 72473
/* "Big Hello". */
/* Hereby placed in the public domain. */
#include <stdio.h>
char mem[1<<21] = { 1 };
int main(void)
{
printf( "Hello, world!\n" );
return 0;
}
Seriously though, I doubt a particular file size of the executable is really what you want. What is it you really want from a program that a plain old "Hello world" isn't complicated enough to exercise?
Upvotes: 1