You are on page 1of 6

!

dryrun_record
1
2 ===========================================
3 > Compiling your work
4
5 clang -Wall -Werror -g -fsanitize=address,leak,undefined -o testFlightDb testFlightDb.c FlightDb.c Tree.c
List.c Record.c
6
7 ===========================================
8 > Compilation test passed!
9

--------------------------------
** Compilation:

--------------------------------
clang -Wall -Werror -g -fsanitize=address,leak,undefined -o testFlightDb testFlightDb.c Tree.c FlightDb.c List.c
Record.c
clang -Wall -Werror -g -fsanitize=address,leak,undefined -o testFlightDb2 testFlightDb.c _2521_Tree.c FlightDb.c
List.c Record.c

Assessment
================================
** Tests for TreeInsert
================================

--------------------------------
** Test 1.1: TreeInsert (basic)
--------------------------------
** Test passed
--------------------------------
** Test 1.2: TreeInsert (duplicates)
--------------------------------
** Test passed
--------------------------------
** Test 1.3: TreeInsert (balancing - basic)
--------------------------------
** Test passed
--------------------------------
** Test 1.4: TreeInsert (balancing - basic)
--------------------------------
** Test passed
--------------------------------
** Test 1.5: TreeInsert (balancing - basic)
--------------------------------
** Test passed
--------------------------------
** Test 1.6: TreeInsert (balancing - basic)
--------------------------------
** Test passed
--------------------------------
** Test 1.7: TreeInsert (balancing - advanced)
--------------------------------
** Test passed
--------------------------------
** Test 1.8: TreeInsert (balancing - advanced)
--------------------------------
** Test passed
--------------------------------
** Test 1.9: TreeInsert (balancing - advanced)
--------------------------------
** Test passed
--------------------------------
** Test 1.10: TreeInsert (balancing - advanced)
--------------------------------
** Test passed
--------------------------------
** Test 1.11: TreeInsert (balancing - advanced)
--------------------------------
** Test passed
--------------------------------
** Test 1.12: TreeInsert (efficiency)
--------------------------------
** Test failed (timed out)
--------------------------------

!!specialmark () 10.00/16

================================
** Tests for TreeSearch
================================

--------------------------------
** Test 2.1: TreeSearch (item exists)
--------------------------------
** Test passed
--------------------------------
** Test 2.2: TreeSearch (item does not exist)
--------------------------------
** Test passed
--------------------------------

!!specialmark () 2.00/2
================================
** Tests for TreeSearchBetween
================================

--------------------------------
** Test 3.1: TreeSearchBetween (endpoints do not exist)
--------------------------------
** Test passed
--------------------------------
** Test 3.2: TreeSearchBetween (lower endpoint exists)
--------------------------------
** Test passed
--------------------------------
** Test 3.3: TreeSearchBetween (upper endpoint exists)
--------------------------------
** Test passed
--------------------------------
** Test 3.4: TreeSearchBetween (both endpoints exist)
--------------------------------
** Test passed
--------------------------------

!!specialmark () 4.00/4

================================
** Tests for TreeNext
================================

--------------------------------
** Test 4.1: TreeNext
--------------------------------
** Test passed
--------------------------------
** Test 4.2: TreeNext
--------------------------------
** Test passed
--------------------------------
** Test 4.3: TreeNext
--------------------------------
** Test passed
--------------------------------
** Test 4.4: TreeNext
--------------------------------
** Test passed
--------------------------------
** Test 4.5: TreeNext
--------------------------------
** Test passed
--------------------------------
** Test 4.6: TreeNext
--------------------------------
** Test passed
--------------------------------
** Test 4.7: TreeNext
--------------------------------
** Test passed
--------------------------------
** Test 4.8: TreeNext
--------------------------------
** Test passed
--------------------------------

!!specialmark () 8.00/8

================================
** Tests for DbInsertRecord
================================

--------------------------------
** Test 5.1: DbInsertRecord
--------------------------------
** Test passed
--------------------------------
** Test 5.2: DbInsertRecord
--------------------------------
** Test passed
--------------------------------
** Test 5.3: DbInsertRecord
--------------------------------
** Test passed
--------------------------------
** Test 5.4: DbInsertRecord
--------------------------------
** Test passed
--------------------------------
** Test 5.5: DbInsertRecord
--------------------------------
** Test passed
--------------------------------

!!specialmark () 6.00/6

================================
** Tests for DbFindByFlightNumber
================================

--------------------------------
** Test 6.1: DbFindByFlightNumber
--------------------------------
** Test passed
--------------------------------
** Test 6.2: DbFindByFlightNumber
--------------------------------
** Test passed
--------------------------------
** Test 6.3: DbFindByFlightNumber
--------------------------------
** Test passed
--------------------------------
** Test 6.4: DbFindByFlightNumber
--------------------------------
** Test passed
--------------------------------

!!specialmark () 8.00/8

================================
** Tests for DbFindByDepartureAirportDay
================================

--------------------------------
** Test 7.1: DbFindByDepartureAirportDay
--------------------------------
** Test passed
--------------------------------
** Test 7.2: DbFindByDepartureAirportDay
--------------------------------
** Test passed
--------------------------------
** Test 7.3: DbFindByDepartureAirportDay
--------------------------------
** Test passed
--------------------------------
** Test 7.4: DbFindByDepartureAirportDay
--------------------------------
** Test passed
--------------------------------

!!specialmark () 8.00/8

================================
** Tests for DbFindBetweenTimes
================================
--------------------------------
** Test 8.1: DbFindBetweenTimes
--------------------------------
** Test passed
--------------------------------
** Test 8.2: DbFindBetweenTimes
--------------------------------
** Test passed
--------------------------------
** Test 8.3: DbFindBetweenTimes
--------------------------------
** Test passed
--------------------------------
** Test 8.4: DbFindBetweenTimes
--------------------------------
** Test passed
--------------------------------
** Test 8.5: DbFindBetweenTimes
--------------------------------
** Test passed
--------------------------------
** Test 8.6: DbFindBetweenTimes
--------------------------------
** Test passed
--------------------------------
** Test 8.7: DbFindBetweenTimes
--------------------------------
** Test passed
--------------------------------
** Test 8.8: DbFindBetweenTimes
--------------------------------
** Test passed
--------------------------------
** Test 8.9: DbFindBetweenTimes (compiled with our Tree.c)
--------------------------------
** Test passed
--------------------------------

!!specialmark () 8.00/8

================================
** Tests for DbFindNextFlight
================================

--------------------------------
** Test 9.1: DbFindNextFlight
--------------------------------
** Test passed
--------------------------------
** Test 9.2: DbFindNextFlight
--------------------------------
** Test passed
--------------------------------
** Test 9.3: DbFindNextFlight
--------------------------------
** Test passed
--------------------------------
** Test 9.4: DbFindNextFlight
--------------------------------
** Test failed (incorrect output)

** First 80 lines of differences (your output on left):


Creating large DB... Creating large DB...

Finding first available flight for JQ771 from Saturday 1155 Finding first available flight for JQ771 from
Saturday 1155
Found flight: Found flight:
JQ771|ADL|MEL|Saturday 1155|105 JQ771|ADL|MEL|Saturday 1155|105
Creating large DB... Creating large DB...

Finding first available flight for VA400 from Monday 0000 Finding first available flight for VA400 from
Monday 0000
Found flight: | No flights found
YZ789|MEL|HBA|Tuesday 0900|75 <
--------------------------------
** Test 9.5: DbFindNextFlight
--------------------------------
** Test passed
--------------------------------
** Test 9.6: DbFindNextFlight
--------------------------------
** Test failed (abnormal termination)

Record.c:114:17: runtime error: member access within null pointer of type 'struct record'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Record.c:114:17 in
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3503182==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000022 (pc 0x0000004314e0 bp 0x7ffe552fe300
sp 0x7ffe552fdaa0 T0)
==3503182==The signal is caused by a READ memory access.
==3503182==Hint: address points to the zero page.
#0 0x4314e0 in strcmp (/tmp/COMP2521.3325905.run/testFlightDb+0x4314e0)
#1 0x4d60dd in DbFindNextFlight /tmp/COMP2521.3325905.run/FlightDb.c:203:15
#2 0x4cfa79 in doTestDbFindNextFlight /tmp/COMP2521.3325905.run/testFlightDb.c:781:16
#3 0x4cb64b in testDbFindNextFlight6 /tmp/COMP2521.3325905.run/testFlightDb.c:772:5
#4 0x4c8ddb in main /tmp/COMP2521.3325905.run/testFlightDb.c:229:13
#5 0x7fd6a7a56d09 in __libc_start_main csu/../csu/libc-start.c:308:16
#6 0x41e2e9 in _start (/tmp/COMP2521.3325905.run/testFlightDb+0x41e2e9)

AddressSanitizer can not provide additional info.


SUMMARY: AddressSanitizer: SEGV (/tmp/COMP2521.3325905.run/testFlightDb+0x4314e0) in strcmp
==3503182==ABORTING
--------------------------------
** Test 9.7: DbFindNextFlight (compiled with our Tree.c)
--------------------------------
** Test passed
--------------------------------

!!specialmark () 5.25/8

================================
** TEST SUMMARY
================================

TreeInsert 10.00/16
TreeSearch 2.00/2
TreeSearchBetween 4.00/4
TreeNext 8.00/8
DbInsertRecord 6.00/6
DbFindByFlightNumber 8.00/8
DbFindByDepartureAirportDay 8.00/8
DbFindBetweenTimes 8.00/8
DbFindNextFlight 5.25/8
--------------------------------

!!specialmark () 0.00/0

!!marktab ** MARKER'S ASSESSMENT **

Efficiency - TreeSearchBetween . .. .. (2) 2

Efficiency - TreeNext .. .. .. .. .. (2) 2

Efficiency - DbFindByFlightNumber .. .. (2) 2

Efficiency - DbFindByDepartureAirportDay (2) 2

Efficiency - DbFindBetweenTimes .. .. (2) 2

Efficiency - DbFindNextFlight .. .. .. (2) 2


^
+ ======================= +
+ Good job on efficiency! +
+ ======================= +

You might also like