validateint doesn't test something interesting on RISC-V; delete it.
This commit is contained in:
parent
b564fca246
commit
c612d452fd
|
@ -1772,40 +1772,16 @@ sbrktest(void)
|
||||||
printf(stdout, "sbrk test OK\n");
|
printf(stdout, "sbrk test OK\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
validateint(int *p)
|
|
||||||
{
|
|
||||||
/* XXX int res;
|
|
||||||
asm("mov %%esp, %%ebx\n\t"
|
|
||||||
"mov %3, %%esp\n\t"
|
|
||||||
"int %2\n\t"
|
|
||||||
"mov %%ebx, %%esp" :
|
|
||||||
"=a" (res) :
|
|
||||||
"a" (SYS_sleep), "n" (T_SYSCALL), "c" (p) :
|
|
||||||
"ebx");
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
validatetest(void)
|
validatetest(void)
|
||||||
{
|
{
|
||||||
int hi, pid;
|
int hi;
|
||||||
uint64 p;
|
uint64 p;
|
||||||
|
|
||||||
printf(stdout, "validate test\n");
|
printf(stdout, "validate test\n");
|
||||||
hi = 1100*1024;
|
hi = 1100*1024;
|
||||||
|
|
||||||
for(p = 0; p <= (uint)hi; p += PGSIZE){
|
for(p = 0; p <= (uint)hi; p += PGSIZE){
|
||||||
if((pid = fork()) == 0){
|
|
||||||
// try to crash the kernel by passing in a badly placed integer
|
|
||||||
validateint((int*)p);
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
sleep(0);
|
|
||||||
sleep(0);
|
|
||||||
kill(pid);
|
|
||||||
wait();
|
|
||||||
|
|
||||||
// try to crash the kernel by passing in a bad string pointer
|
// try to crash the kernel by passing in a bad string pointer
|
||||||
if(link("nosuchfile", (char*)p) != -1){
|
if(link("nosuchfile", (char*)p) != -1){
|
||||||
printf(stdout, "link should not succeed\n");
|
printf(stdout, "link should not succeed\n");
|
||||||
|
|
Loading…
Reference in a new issue