Skip to content

Latest commit

 

History

History
466 lines (406 loc) · 37 KB

test.md

File metadata and controls

466 lines (406 loc) · 37 KB

Travis Test

example workflow

👉 RISC-V

  • Test checking correct behaviour:

    • RISC-V default examples:

      Click to expand
      Test Name Description In use
      test_riscv_example_001 Data Storage ✖️
      test_riscv_example_002 ALU operations
      test_riscv_example_003 Store/Load Data in Memory
      test_riscv_example_004 FPU operations
      test_riscv_example_005 Loop
      test_riscv_example_006 Branch
      test_riscv_example_007 Loop + Memory
      test_riscv_example_008 I/O Syscalls ✖️
      test_riscv_example_009 I/O Syscalls + Strings ✖️
      test_riscv_example_011 Subrutines
      test_riscv_example_012 Factorial
    • Libraries:

      Click to expand
      Test Name Description In use
      test_riscv_libraries_001 Min and Max
    • System calls:

      Click to expand
      Test Name Description In use
      test_riscv_syscall_001 print_int
      test_riscv_syscall_002 print_float
      test_riscv_syscall_003 print_double
      test_riscv_syscall_004 print_string
      test_riscv_syscall_005 read_int ✖️
      test_riscv_syscall_006 read_float ✖️
      test_riscv_syscall_007 read_double ✖️
      test_riscv_syscall_008 read_string ✖️
      test_riscv_syscall_009 sbrk
      test_riscv_syscall_010 exit
      test_riscv_syscall_011 print_char
      test_riscv_syscall_012 read_char ✖️
  • Tests that force errors to check that they are detected correctly:

    • Compilation:

      Click to expand
      Test Name Description In use
      test_riscv_error_compiler_001 Tag repeated (m1)
      test_riscv_error_compiler_002 Instruction not found (m2)
      test_riscv_error_compiler_003 Incorrect syntax in an instruction (m3)
      test_riscv_error_compiler_004 Nonexistent register (m4)
      test_riscv_error_compiler_005 Immediate number too large (m5)
      test_riscv_error_compiler_006 Immediate number not valid (m6)
      test_riscv_error_compiler_007 Invalid tag (m7)
      test_riscv_error_compiler_008 Address too large (m8)
      test_riscv_error_compiler_009 Invalid address (m9)
      test_riscv_error_compiler_010 Space allocation too large (m10) ✖️
      test_riscv_error_compiler_014 Incorrect directive (m14)
      test_riscv_error_compiler_015 Invalid value, must be a number (m15)
      test_riscv_error_compiler_016 Character string does not begin with " (m16)
      test_riscv_error_compiler_017 Character string not ending with " (m17)
      test_riscv_error_compiler_018 Number too large (m18)
      test_riscv_error_compiler_019 Empty number (m19)
      test_riscv_error_compiler_021 Data not aligned (m21)
      test_riscv_error_compiler_022 Number not positive (m22)
      test_riscv_error_compiler_023 Empty directive (m23)
      test_riscv_error_compiler_030 Empty file
    • Execution:

      Click to expand
      Test Name Description In use
      test_riscv_error_executor_001 Program without instructions
      test_riscv_error_executor_002 main tag does not exist
      test_riscv_error_executor_003 sp register in data segment
      test_riscv_error_executor_004 sp register in text segment
      test_riscv_error_executor_005 Memory writing in text segment
      test_riscv_error_executor_006 Memory reading from text segment
      test_riscv_error_executor_007 Memory write not aligned
      test_riscv_error_executor_008 Memory read not aligned
      test_riscv_error_executor_009 Write to register without permision
    • Sentinel (tests that check the parameter passing convention):

      Click to expand
      Test Name Description In use
      test_riscv_sentinels_001 Changing the a0 register inside test function
      test_riscv_sentinels_002 Changing the a1 register inside the test function
      test_riscv_sentinels_003 Changing the a2 register inside the test function
      test_riscv_sentinels_004 Changing the a3 register inside the test function
      test_riscv_sentinels_005 Changing the a4 register inside the test function
      test_riscv_sentinels_006 Changing the a5 register inside the test function
      test_riscv_sentinels_007 Changing the a6 register inside the test function
      test_riscv_sentinels_008 Changing the a7 register inside the test function
      test_riscv_sentinels_009 Changing the t0 register inside the test function
      test_riscv_sentinels_010 Changing the t1 register inside the test function
      test_riscv_sentinels_011 Changing the t2 register inside the test function
      test_riscv_sentinels_012 Changing the t3 register inside the test function
      test_riscv_sentinels_013 Changing the t4 register inside the test function
      test_riscv_sentinels_014 Changing the t5 register inside the test function
      test_riscv_sentinels_015 Changing the t6 register inside the test function
      test_riscv_sentinels_016 Changing the s0 register inside the test function
      test_riscv_sentinels_017 Changing the s1 register inside the test function
      test_riscv_sentinels_018 Changing the s2 register inside the test function
      test_riscv_sentinels_019 Changing the s3 register inside the test function
      test_riscv_sentinels_020 Changing the s4 register inside the test function
      test_riscv_sentinels_021 Changing the s5 register inside the test function
      test_riscv_sentinels_022 Changing the s6 register inside the test function
      test_riscv_sentinels_023 Changing the s7 register inside the test function
      test_riscv_sentinels_024 Changing the s8 register inside the test function
      test_riscv_sentinels_025 Changing the s9 register inside the test function
      test_riscv_sentinels_026 Changing the s10 register inside the test function
      test_riscv_sentinels_027 Changing the s11 register inside the test function
      test_riscv_sentinels_028 Changing the ra register inside the test function
      test_riscv_sentinels_029 Changing the sp register inside the test function
      test_riscv_sentinels_030 Changing the gp register inside test function
      test_riscv_sentinels_031 Changing the tp register inside the test function
      test_riscv_sentinels_032 Changing the s1 register inside the test function and saving to the stack
      test_riscv_sentinels_033 Changing the s1 register inside the test function and saving on stack, but without restoring
      test_riscv_sentinels_034 Changing register s1 inside the test function and saving to stack, but restoring another address
      test_riscv_sentinels_035 Changing register s1 inside the test function and saving to stack, but restoring another size
      test_riscv_sentinels_036 Changing of register s1 inside the test function and saving to stack, but the stack is overwritten
    • Instructions (tests that check the instruction set):

      Click to expand
      Test Name Description In use
      test_riscv_instruction_001 add
      test_riscv_instruction_002 addi
      test_riscv_instruction_003 sub
      test_riscv_instruction_004 lui
      test_riscv_instruction_005 jal
      test_riscv_instruction_006 jalr
      test_riscv_instruction_007 beq
      test_riscv_instruction_008 bne
      test_riscv_instruction_009 blt
      test_riscv_instruction_010 bge
      test_riscv_instruction_011 bltu
      test_riscv_instruction_012 bgeu
      test_riscv_instruction_013 lb, lh, lw, sb, sh, sw
      test_riscv_instruction_014 lbu, lhu
      test_riscv_instruction_015 slti
      test_riscv_instruction_016 sltiu
      test_riscv_instruction_017 xori
      test_riscv_instruction_018 ori
      test_riscv_instruction_019 andi
      test_riscv_instruction_020 div-2reg
      test_riscv_instruction_021 divu-2reg
      test_riscv_instruction_022 rotr
      test_riscv_instruction_023 sll
      test_riscv_instruction_024 slt
      test_riscv_instruction_025 sltu
      test_riscv_instruction_026 xori
      test_riscv_instruction_027 srl
      test_riscv_instruction_028 sra
      test_riscv_instruction_029 or
      test_riscv_instruction_030 and
      test_riscv_instruction_031 l.d y s.d
      test_riscv_instruction_032 mult
      test_riscv_instruction_033 multu
      test_riscv_instruction_034 mul
      test_riscv_instruction_035 addu
      test_riscv_instruction_036 addiu
      test_riscv_instruction_037 b
      test_riscv_instruction_038 div
      test_riscv_instruction_039 divu
      test_riscv_instruction_040 rem/mod
      test_riscv_instruction_041 modu
      test_riscv_instruction_042 bgt
      test_riscv_instruction_043 bgtu
      test_riscv_instruction_044 ble
      test_riscv_instruction_045 bleu
      test_riscv_instruction_046 nor
      test_riscv_instruction_047 nop
      test_riscv_instruction_048 move
      test_riscv_instruction_049 mthi, mtlo, mfhi, mflo
      test_riscv_instruction_050 subu
      test_riscv_instruction_051 beqz
      test_riscv_instruction_052 bgez
      test_riscv_instruction_053 bgezal
      test_riscv_instruction_054 bgtz
      test_riscv_instruction_055 blez
      test_riscv_instruction_056 blt
      test_riscv_instruction_057 bnez
      test_riscv_instruction_058 sqrt.s/d, li.s/d
      test_riscv_instruction_059 add.s/d
      test_riscv_instruction_060 sub.s/d
      test_riscv_instruction_061 abs.s/d
      test_riscv_instruction_062 mul.s/d
      test_riscv_instruction_063 div.s/d
      test_riscv_instruction_064 rsqrt.s/d
      test_riscv_instruction_065 cvt.s.d/d.s
      test_riscv_instruction_066 cvt.w.d/w.s
      test_riscv_instruction_067 cvt.s.w/cvt.d.w

👉 MIPS-32

  • Test checking correct behaviour:

    • MIPS-32 default examples:

      Click to expand
      Test Name Description In use
      test_mips_example_001 Data Storage ✖️
      test_mips_example_002 ALU operations
      test_mips_example_003 Store/Load Data in Memory
      test_mips_example_004 FPU operations
      test_mips_example_005 Loop
      test_mips_example_006 Branch
      test_mips_example_007 Loop + Memory
      test_mips_example_008 I/O Syscalls ✖️
      test_mips_example_009 I/O Syscalls + Strings ✖️
      test_mips_example_011 Subrutines
      test_mips_example_012 Factorial
    • Libraries:

      Click to expand
      Test Name Description In use
      test_mpis_libraries_001 Min and Max
    • System calls:

      Click to expand
      Test Name Description In use
      test_mips_syscall_001 print_int
      test_mips_syscall_002 print_float
      test_mips_syscall_003 print_double
      test_mips_syscall_004 print_string
      test_mips_syscall_005 read_int ✖️
      test_mips_syscall_006 read_float ✖️
      test_mips_syscall_007 read_double ✖️
      test_mips_syscall_008 read_string ✖️
      test_mips_syscall_009 sbrk
      test_mips_syscall_010 exit
      test_mips_syscall_011 print_char
      test_mips_syscall_012 read_char ✖️
  • Tests that force errors to check that they are detected correctly:

    • Compilation:

      Click to expand
      Test Name Description In use
      test_mips_error_compiler_001 Tag repeated (m1)
      test_mips_error_compiler_002 Instruction not found (m2)
      test_mips_error_compiler_003 Incorrect syntax in an instruction (m3)
      test_mips_error_compiler_004 Nonexistent register (m4)
      test_mips_error_compiler_005 Immediate number too large (m5)
      test_mips_error_compiler_006 Immediate number not valid (m6)
      test_mips_error_compiler_007 Invalid tag (m7)
      test_mips_error_compiler_008 Address too large (m8)
      test_mips_error_compiler_009 Invalid address (m9)
      test_mips_error_compiler_010 Space allocation too large (m10) ✖️
      test_mips_error_compiler_014 Incorrect directive (m14)
      test_mips_error_compiler_015 Invalid value, must be a number (m15)
      test_mips_error_compiler_016 Character string does not begin with " (m16)
      test_mips_error_compiler_017 Character string not ending with " (m17)
      test_mips_error_compiler_018 Number too large (m18)
      test_mips_error_compiler_019 Empty number (m19)
      test_mips_error_compiler_021 Data not aligned (m21)
      test_mips_error_compiler_022 Number not positive (m22)
      test_mips_error_compiler_023 Empty directive (m23)
      test_mips_error_compiler_030 Empty file
    • Execution:

      Click to expand
      Test Name Description In use
      test_mips_error_executor_001 Program without instructions
      test_mips_error_executor_002 main tag does not exist
      test_mips_error_executor_003 $sp register in data segment
      test_mips_error_executor_004 $sp register in text segment
      test_mips_error_executor_005 Memory writing in text segment
      test_mips_error_executor_006 Memory reading from text segment
      test_mips_error_executor_007 Memory write not aligned
      test_mips_error_executor_008 Memory read not aligned
      test_mips_error_executor_009 Write to register without permision
    • Sentinel (tests that check the parameter passing convention):

      Click to expand
      Test Name Description In use
      test_mips_sentinels_001 Changing the a0 register inside test function
      test_mips_sentinels_002 Changing the a1 register inside the test function
      test_mips_sentinels_003 Changing the a2 register inside the test function
      test_mips_sentinels_004 Changing the a3 register inside the test function
      test_mips_sentinels_005 Changing the fp register inside the test function
      test_mips_sentinels_006 Changing the gp register inside the test function
      test_mips_sentinels_007 Changing the k0 register inside the test function
      test_mips_sentinels_008 Changing the k1 register inside the test function
      test_mips_sentinels_009 Changing the ra register inside the test function
      test_mips_sentinels_010 Changing the s0 register inside the test function
      test_mips_sentinels_011 Changing the s1 register inside the test function
      test_mips_sentinels_012 Changing the s2 register inside the test function
      test_mips_sentinels_013 Changing the s3 register inside the test function
      test_mips_sentinels_014 Changing the s4 register inside the test function
      test_mips_sentinels_015 Changing the s5 register inside the test function
      test_mips_sentinels_016 Changing the s6 register inside the test function
      test_mips_sentinels_017 Changing the s7 register inside the test function
      test_mips_sentinels_018 Changing the sp register inside the test function
      test_mips_sentinels_019 Changing the t0 register inside the test function
      test_mips_sentinels_020 Changing the t1 register inside the test function
      test_mips_sentinels_021 Changing the t2 register inside the test function
      test_mips_sentinels_022 Changing the t3 register inside the test function
      test_mips_sentinels_023 Changing the t4 register inside the test function
      test_mips_sentinels_024 Changing the t5 register inside the test function
      test_mips_sentinels_025 Changing the t6 register inside the test function
      test_mips_sentinels_026 Changing the t7 register inside the test function
      test_mips_sentinels_027 Changing the t8 register inside the test function
      test_mips_sentinels_028 Changing the t9 register inside the test function
      test_mips_sentinels_029 Changing the v0 register inside the test function
      test_mips_sentinels_030 Changing the v1 register inside test function
      test_mips_sentinels_031 Changing the s0 register inside the test function and saving to the stack
      test_mips_sentinels_032 Changing the s0 register inside the test function and saving on stack, but without restoring
      test_mips_sentinels_033 Changing register s0 inside the test function and saving to stack, but restoring another address
      test_mips_sentinels_034 Changing register s0 inside the test function and saving to stack, but restoring another size
      test_mips_sentinels_035 Changing of register s0 inside the test function and saving to stack, but the stack is overwritten
    • Instructions (tests that check the instruction set):

      Click to expand
      Test Name Description In use
      test_mips_instruction_001 add
      test_mips_instruction_002 addi
      test_mips_instruction_003 sub
      test_mips_instruction_004 lui
      test_mips_instruction_005 jal
      test_mips_instruction_006 jalr
      test_mips_instruction_007 beq
      test_mips_instruction_008 bne
      test_mips_instruction_009 blt
      test_mips_instruction_010 bge
      test_mips_instruction_011 bltu
      test_mips_instruction_012 bgeu
      test_mips_instruction_013 lb, lh, lw, sb, sh, sw
      test_mips_instruction_014 lbu, lhu
      test_mips_instruction_015 slti
      test_mips_instruction_016 sltiu
      test_mips_instruction_017 xori
      test_mips_instruction_018 ori
      test_mips_instruction_019 andi
      test_mips_instruction_020 div-2reg
      test_mips_instruction_021 divu-2reg
      test_mips_instruction_022 rotr
      test_mips_instruction_023 sll
      test_mips_instruction_024 slt
      test_mips_instruction_025 sltu
      test_mips_instruction_026 xori
      test_mips_instruction_027 srl
      test_mips_instruction_028 sra
      test_mips_instruction_029 or
      test_mips_instruction_030 and
      test_mips_instruction_031 l.d y s.d
      test_mips_instruction_032 mult
      test_mips_instruction_033 multu
      test_mips_instruction_034 mul
      test_mips_instruction_035 addu
      test_mips_instruction_036 addiu
      test_mips_instruction_037 b
      test_mips_instruction_038 div
      test_mips_instruction_039 divu
      test_mips_instruction_040 rem/mod
      test_mips_instruction_041 modu
      test_mips_instruction_042 bgt
      test_mips_instruction_043 bgtu
      test_mips_instruction_044 ble
      test_mips_instruction_045 bleu
      test_mips_instruction_046 nor
      test_mips_instruction_047 nop
      test_mips_instruction_048 move
      test_mips_instruction_049 mthi, mtlo, mfhi, mflo
      test_mips_instruction_050 subu
      test_mips_instruction_051 beqz
      test_mips_instruction_052 bgez
      test_mips_instruction_053 bgezal
      test_mips_instruction_054 bgtz
      test_mips_instruction_055 blez
      test_mips_instruction_056 blt
      test_mips_instruction_057 bnez
      test_mips_instruction_058 sqrt.s/d, li.s/d
      test_mips_instruction_059 add.s/d
      test_mips_instruction_060 sub.s/d
      test_mips_instruction_061 abs.s/d
      test_mips_instruction_062 mul.s/d
      test_mips_instruction_063 div.s/d
      test_mips_instruction_064 rsqrt.s/d
      test_mips_instruction_065 cvt.s.d/d.s
      test_mips_instruction_066 cvt.w.d/w.s
      test_mips_instruction_067 cvt.s.w/cvt.d.w