我正在从事 Pintos Project #2。我已经实现了大部分系统调用。在 exec 系统调用中,有一个测试 exec-missing 根据文件中的注释检查:
/* Tries to execute a nonexistent process.
The exec system call must return -1. */
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
void
test_main (void)
{
msg ("exec(\"no-such-file\"): %d", exec ("no-such-file"));
}
我想不出我们如何在我的执行代码中检查这个。我已经正确检查了帧指针,可能缺少什么?