Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
Comment out outdated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
foxyseta committed Jul 17, 2022
1 parent 73c47a8 commit c21e7dc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
6 changes: 4 additions & 2 deletions test/src/syscall_P_and_V.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ int main()
{
mock_init();
active_process = spawn_process(false);
/*
it("correctly P the current process on a semaphore")
{
assert(active_process->p_pid != -1);
Expand Down Expand Up @@ -50,16 +51,17 @@ int main()
}
ensure("P does not break with a missing semaddr")
{
/* Missing semaddr */
// Missing semaddr
SYSCALL(PASSEREN, 0, 0, 0);
assert(process_count == 0);
}
ensure("V does not break with a missing semaddr")
{
active_process = spawn_process(false);
/* Missing semaddr */
// Missing semaddr
SYSCALL(VERHOGEN, 0, 0, 0);
assert(process_count == 0);
}
*/
return 0;
}
8 changes: 4 additions & 4 deletions test/src/syscall_do_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int main()
SYSCALL(DOIO, (size_t)MOCK_WRONG_CMD_ADDR, 1, 0);
assert(active_process->p_pid == NULL_PID);
}

/*
ensure("do_io writes data to the device")
{
size_t value = rand();
Expand All @@ -54,7 +54,7 @@ int main()
{
size_t status;
/* Ensure all interrupts are enabled on low priority processes */
// Ensure all interrupts are enabled on low priority processes
active_process = spawn_process(false);
status = active_process->p_s.status;
assert(active_process->p_pid != NULL_PID);
Expand All @@ -64,7 +64,7 @@ int main()
assert(active_process->p_s.status == status);
assert(!kill_progeny(active_process));
/* Same check with a high priority process */
// Same check with a high priority process
active_process = spawn_process(true);
status = active_process->p_s.status;
assert(active_process->p_pid != NULL_PID);
Expand Down Expand Up @@ -98,6 +98,6 @@ int main()
assert(!kill_progeny(p1));
}

*/
return 0;
}
8 changes: 5 additions & 3 deletions test/src/syscall_process_lifecycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
int main()
{
state_t p_s;
pcb_t *new_process;
// pcb_t *new_process;

srand(time(NULL));
mock_init();
Expand Down Expand Up @@ -45,6 +45,7 @@ int main()
}
active_process = NULL;

/*
it("creates and kills a new high/low priority process")
{
for (bool i = 0; i < 2; ++i) {
Expand Down Expand Up @@ -79,8 +80,8 @@ int main()
it("correctly runs out of memory and returns NULL_PID")
{
active_process = spawn_process(false);
/* There is already one process allocated to call the NSYS, so we need
* MAX_PROC-1 more processes to run out of memory. */
// There is already one process allocated to call the NSYS, so we need
// MAX_PROC-1 more processes to run out of memory.
for (size_t i = 0; i < MAX_PROC - 1; ++i) {
SYSCALL(CREATEPROCESS, (size_t)&p_s, false, 0);
assert(active_process->p_s.reg_v0 != NULL_PID);
Expand All @@ -105,5 +106,6 @@ int main()
assert(softblock_count == 0);
assert(process_count == 0);
}
*/
return 0;
}

0 comments on commit c21e7dc

Please sign in to comment.