adding testing.txt and initial test results
[melted] / docs / testing.txt
1
2 MLT Miracle Test Procedure
3
4 Copyright (C) 2003 Ushodaya Enterprised Limited
5 Author: Dan Dennedy <dan@dennedy.org>
6 Last Revision: 2003-01-17
7
8 NOTE: THIS DOCUMENT REQUIRES REVISION TO NEW, EXPECTED BEHAVIOR FROM MIRACLE.
9
10 Tests are divided into 9 sections:
11
12    1. Command Line Usage
13    2. Unit Management
14    3. Server Configuration
15    4. Simple Playback
16    5. Multi-unit Playback
17    6. Unit Configuration
18    7. Advanced Playback
19    8. Bus Reset
20    9. Server Side Queuing
21
22 Each section contains many tests which I've divided into a minimum of two lines:
23
24 n.m action to carry out
25 --> expected result
26
27 Further lines may appear to show the actual results when they deviate from what
28 I expected or if there are special cases to consider.
29
30 Sequential tests are indicated as:
31
32 n.m.o action to carry out
33 --> expected result
34
35 It is suggested that you run top during the testing and note cpu hikes
36 or any excessive memory usage related to an operation.
37
38
39 0. Introduction
40 ---------------
41
42 The tests following are by no means exhaustive, but they should cover typical
43 use cases - creativity is encouraged with more cases being added where necessary.
44 This document should also be maintained to dictate actual state, especially with
45 regard to a final release. Unit test cases are encouraged, but are excluded from
46 this document.
47
48 It is important to carry out the full test cycle when preparing a final release.
49 In this situation, please resist the temptation to bug fix a given test case and
50 resume the tests from that point onward - it is better to repeat from the
51 beginning (but you can of course employ common sense in this situation).
52
53 Before starting the final tests, please delete/backup your current
54 /etc/dv139d.conf file. This (more or less) ensures that tests are carried out
55 for a virgin install.
56
57
58 1. Command Line Usage
59 ---------------------
60
61 Run these from the top level project directory
62
63 1.1.0 Start dv1394d in interactive mode: src/dv1394d -test
64 --> dv1394d starts interactively and reports:
65 (5) Starting server on 5250.
66 (5) lt-dv1394d version 0.1.0 listening on port 5250
67
68 1.1.1 Stop the server by pressing Ctrl-C
69 --> dv1394d returns the following and returns control to the console:
70 (5) lt-dv1394d version 0.1.0 server terminated.
71
72 1.2.2 Start dv1394d as a daemon: src/dv1394d
73 --> control returns to the console
74
75 1.2.3 Verify dv1394d is running: ps ax
76 --> five dv1394d (or lt-dv1394d) processes are running
77
78 1.2.4 Verify successful dv1394d startup using syslog: sudo tail /var/log/syslog
79 --> dv1394d: lt-dv1394d version 0.1.0 listening on port 5250
80
81 1.2.5 Verify connectivity on port 5250: telnet localhost 5250
82 --> 100 VTR Ready
83
84 1.2.6 Test clean disconnect: BYE
85 --> Connection closed by foreign host.
86
87 1.2.7 Stop the daemon: killall lt-dv1394d
88 --> no errors
89
90 1.2.8 Verify a clean server shutdown: sudo tail /var/log/syslog
91 --> dv1394d: shutdown complete.
92
93 1.3.0 Start dv1394d on a different port: src/dv1394d -port 5260
94
95 1.3.1 Verify successful dv1394d startup using syslog: sudo tail /var/log/syslog
96 --> dv1394d: lt-dv1394d version 0.1.0 listening on port 5260
97
98 1.3.2 Verify connectivity on port 5260: telnet localhost 5260
99 --> 100 VTR Ready
100
101 1.3.3 Test clean disconnect: BYE
102 --> Connection closed by foreign host.
103
104 1.3.4 Stop the daemon: killall lt-dv1394d
105 --> no errors
106
107
108 2. Unit Management
109 ------------------
110
111 Start the dv1394d server and connect to it with telnet or a protocol-
112 level client. Make sure a DV device is connected and powered.
113
114 2.1 List the AV/C devices on the bus: NLS
115 --> 201 OK
116 --> one or more lines listing devices with GUID in second column
117
118 2.2 Add a device as a dv1394d unit: UADD {GUID}
119 --> 201 OK
120 --> U0
121
122 2.3 List the units: ULS
123 --> 201 OK
124 --> U0 ?? {GUID} 1
125 --> It is important that the last column is '1' to indicate it is online.
126
127 2.4 Add an offline unit by using some bogus GUID value: UADD foo
128 --> 201 OK
129 --> U1
130
131 2.3 List the units: ULS
132 --> 201 OK
133 --> U0 ?? {GUID} 1
134 --> U1 00 0000000f00055c1 0
135 --> It is important that the last column of the last row is '0' to
136         indicate offline.
137
138 2.4 Attempt unit commands for a unit that does not exist: LOAD U6 foo
139 --> 403 Unit not found
140
141 2.5 Attempt unit commands without specifying a unit: PLAY
142 --> 402 Argument missing
143
144 2.6 Attempt unit commands for a unit that is offline: PLAY U1
145 --> 403 Unit not found
146
147 2.7.0 Load a clip into an offline unit: LOAD U1 test.dv
148 --> 200 OK
149
150 2.7.1 Verify the status of the offline unit: USTA U1
151 --> 202 OK
152 --> 1 offline "test.dv" 0 1000 29.97 0 65720
153 --> only the first 3 columns are relevant in this test
154
155 2.9 Set the property of an online unit: USET U0 points=use
156 --> 200 OK
157
158 2.8 Set the property of an offline unit: USET U1 points=ignore
159 --> 200 OK
160
161
162 3. Server Configuration
163 -----------------------
164
165 Start dv1394d if not already started from a previous test.
166
167 3.1 Get the hard-coded default root property value: GET root
168 --> 202 OK
169 --> /
170
171 3.2 List the files and subdirectories at the root: CLS /
172 --> 201 OK
173 --> "bin/"
174 --> ...
175
176 3.3 Change the server root to a place where clips are stored: e.g.,
177     SET root=/tmp
178 --> 200 OK
179
180 3.4 Get the new value of the root property value: GET root
181 --> 202 OK
182 --> /tmp/
183 --> Notice that if you did not use a trailing slash in step 2.3, one is
184     added for you and appears in this step. This is normal and correct.
185
186 3.5 List the files and subdirectories at the root: CLS /
187 --> 201 OK
188 --> zero or more lines listing subdirectories followed by files.
189
190 3.6 Try to set a property that does not exist: SET foo=bar
191 --> 405 Argument value out of range
192
193 3.7 Try to set no property or value: SET
194 --> 402 Argument missing
195
196 3.8 Attempt a bogus command: FOO
197 --> 400 Unknown command
198
199 XXX 3.9 Attempt the incorrect case for a command: get root
200 XXX --> 400 Unknown command
201
202 3.10 Attempt case insensitivity of property key: GET Root
203 --> 202 OK
204 --> /tmp/
205
206
207 4. Simple Playback
208 -------------------
209
210 Start dv1394d or restart if already started.
211 Add an online unit.
212 Set the server root property if desired.
213
214 4.1.0 Load a clip into the unit: LOAD U0 test.dv
215 --> 200 OK
216
217 4.1.1 Check the unit status: USTA U0
218 --> 202 OK
219 --> 0 stopped "test.dv" 0 1000 29.97 0 65720
220 --> Only the first 3 columns are relevant in this test.
221 --> The remaining columns are only relevant to the tester.
222
223 4.2.0 Play the clip: PLAY U0
224 --> 200 OK
225 --> Verify audio and video output
226
227 4.2.1 Check the unit status: USTA U0
228 --> 202 OK
229 --> 0 playing "test.dv" 1739 1000 29.97 0 65720
230 --> Only the first 3 columns are relevant in this test.
231 --> The remaining columns are only relevant to the tester.
232
233 4.3.0 Pause playback: PAUSE U0
234 --> 200 OK
235 --> Verify video continues, but audio is muted.
236
237 4.3.1 Check the unit status: USTA U0
238 --> 202 OK
239 --> 0 playing "test.dv" 1739 0 29.97 0 65720
240 --> The fifth column --------^ should be 0; it indicates speed.
241
242 4.3.2 Stop playback: STOP U0
243 --> 200 OK
244 --> The analog video output stops
245
246 4.3.3 Pause playback: PAUSE U0
247 --> 200 OK
248 --> Analog video starts again, but it is held on the same frame
249     paused in 4.3.0.
250
251 4.3.4 Stop playback: STOP U0
252 --> 200 OK
253 --> The analog video signal ceases.
254
255 4.3.5 Rewind the unit: REW U0
256 --> 200 OK
257
258 4.3.6 Play the unit: PLAY U0
259 --> 200 OK
260 --> Analog audio and video are produced from the beginning of the file.
261
262 4.4 Stop the server during playback and ensure clean shutdown.
263
264
265 5. Multi-unit Playback
266 -----------------------
267
268 Start dv1394d or restart if already started.
269 Add *2* online units.
270 Set the server root property if desired.
271
272 5.1.0 Load a clip into one unit: LOAD U0 test.dv
273 --> 200 OK
274
275 5.1.1 Load a clip into the other unit: LOAD U1 test.dv
276 --> 200 OK
277
278 5.1.2 Start playing one unit: PLAY U0
279 --> 200 OK
280 --> Verify audio and video output
281
282 5.1.3 Start playing the other unit: PLAY U1
283 --> 200 OK
284 --> Verify audio and video output of both units
285
286 5.2 Verify independence of units by pausing one of them: PAUSE U0
287 --> 200 OK
288 --> Verify video continues, but audio is muted on the first unit only.
289
290 5.3 Stop the server during multi-unit playback and ensure clean shutdown.
291
292
293 6. Advanced Playback
294 --------------------
295
296 Start dv1394d or restart if already started.
297 Add *2* online units.
298 Set the server root property if desired.
299
300 Trick play modes:
301
302 6.1.0 Load a clip: LOAD U0 test.dv
303 --> 200 OK
304
305 6.1.1 Start playback by pausing on the first frame: PAUSE U0
306 --> 200 OK
307 --> analog video starts, but audio is muted.
308
309 6.1.2 Play fast forward: FF U0 test.dv
310 --> 200 OK
311 --> verify video is playing fast in the forward direction.
312
313 6.1.3 Get unit status: USTA U0
314 --> 202 OK
315 --> 0 playing "test.dv" 219 2000 29.97 0 65720
316 --> The important column is --^, indicates speed
317
318 6.1.4 Play fast reverse: REW U0 test.dv
319 --> 200 OK
320 --> verify analog video output is fast in the reverse direction.
321
322 6.1.5 Get unit status: USTA U0
323 --> 202 OK
324 --> 0 playing "test.dv" 4621 -2000 29.97 0 65720
325 --> The important column is ---^, negative mean reverse
326
327 6.1.6 Play slow forward: PLAY U0 500
328 --> 200 OK
329 --> Verify the analog video output is slow in the forward direction.
330
331 6.1.7 Play reverse normal speed: PLAY U0 -1000
332 --> 200 OK
333 --> Verify the analog video output is at a normal speed in the reverse direction.
334 --> Audio output is reverse, but not the field order of video
335
336 Loading while playing:
337
338 6.2.0 Stop the unit (might be playing): STOP U0
339 --> 200 OK
340
341 6.2.1 Rewing the unit: REW U0
342 --> 200 OK
343
344 6.2.2 Start playing: PLAY U0
345 --> 200 OK
346 --> verify analog audio and video output
347
348 6.2.3 Load another clip: LOAD test002.dv
349 --> 200 OK
350 --> playback seamlessly switches to the new clip
351 --> verify the analog appearance of the video makes a clean switch
352
353 6.2.4 Load another clip, this time with in and out points:
354       LOAD test.dv 100 500 (whatever works for your test footage)
355 --> 200 OK
356 --> verify the analog appearance of the video makes a clean switch
357
358 6.2.5 Get unit status: USTA U0
359 --> 202 OK
360 --> 0 playing "test.dv" 403 1000 29.97 100 500
361 --> verify position -----^ is beyond --^ in point, last column is the out
362     point specified in the previous step.
363
364 Edit points:
365
366 6.3.0 Load a clip: LOAD U0 test.dv
367 --> 200 OK
368
369 6.3.1 Pause the playback unit: PAUSE U0
370 --> 200 OK
371
372 6.3.2 Set the in point: SIN U0 100
373 --> 200 OK
374 --> verify the frame displayed in analog video out changes
375
376 6.3.4 Get the unit status: USTA U0
377 --> 202 OK
378 --> 0 playing "test.dv" 100 0 29.97 100 65720
379 --> verify position -----^ and in ---^
380
381 6.3.5 Change the mode of the unit to not restrict playback to the edit
382       region: USET U0 points=ignore
383 --> 200 OK
384
385 6.3.6 Jump to a frame before the in frame: GOTO U0 50
386 --> 200 OK
387
388 6.3.7 Get the unit status: USTA U0
389 --> 202 OK
390 --> 0 playing "test.dv" 50 0 29.97 100 65720
391 --> position -----------^ preceeds -^ (in)
392
393 6.3.8 Set the unit mode to restrict playback to the edit region: USET U0 points=use
394 --> 200 OK
395 --> verify frame on analog video output changes
396
397 6.3.9 Get the unit status: USTA U0
398 --> 202 OK
399 --> 0 playing "test.dv" 100 0 29.97 100 65720
400 --> verify position -----^ and in ---^
401
402 6.3.10 Clear the in point: SIN U0 -1
403 --> 200 OK
404
405 6.3.11 Get the unit status: USTA U0
406 --> 202 OK
407 --> 0 playing "test.dv" 100 0 29.97 0 65720
408 --> verify the in point is reset ---^
409
410 The above sequence should be repeated in a similar manner for the out point
411 using the SOUT command.
412
413 Transfer:
414
415 6.4.0 Load a clip into the first unit: LOAD U0 test.dv
416 --> 200 OK
417
418 6.4.1 Load a clip into the second unit: LOAD U1 test002.dv
419 --> 200 OK
420
421 6.4.2 Start playing the first unit: PLAY U0
422 --> 200 OK
423 --> verify audio and video analog output
424
425 6.4.3 Set an in point on the clip in the second unit: SIN U1 100
426 --> 200 OK
427
428 6.4.4 Play the second unit: PLAY U1
429 --> 200 OK
430 --> note the beginning footage
431
432 6.4.5 Transfer the clip from the second to the first unit: XFER U1 U0
433 --> 200 OK
434 --> verify a clean switch on the analog audio and video output of the first unit.
435 --> upon transfer it should play the same footage previewed in step 6.4.4
436
437 6.4.5 Get the first unit's status: USTA U0
438 --> 202 OK
439 --> 0 playing "test002.dv" 963 1000 29.97 100 2502
440 --> note the in point set from U1 ---------^
441
442
443 7. Unit Configuration
444 ---------------------
445
446 Start dv1394d or restart if already started.
447 Add an online unit.
448 Set the server root property if desired.
449
450 7.1.0 Load a short clip: LOAD U0 test.dv
451 --> 200 OK
452
453 7.1.1 Play a clip: PLAY U0
454 --> 200 OK
455 --> Wait until it gets to the end, and it should pause on the last frame.
456
457 7.1.2 Make the clip start looping: USET U0 eof=loop
458 --> 200 OK
459 --> verify the clip starts playing from the beginning and loops
460
461 7.2.0 Set the in point: SIN U0 10
462 --> 200 OK
463 --> playback pauses at in point (verify with USTA U0)
464
465 7.2.1 Set the out point: SOUT U0 200
466 --> 200 OK
467 --> playback pauses at in point (verify with USTA U0)
468
469 7.2.2 Start playing again: PLAY U0
470 --> 200 OK
471 --> verify playback loops between in and out points
472
473 7.3 Tell the unit to ignore the edit points: USET U0 points=ignore
474 --> 200 OK
475 --> verify playback loops over entire video file
476
477 7.4 Get the current value of the points property: UGET U0 points
478 --> 202 OK
479 --> ignore
480
481
482 8. Bus Reset
483 ------------
484
485 Stop dv1394d if it is already running/.
486 Connect two DV devices.
487 Run these from the top level project directory.
488
489 8.1.0 Start dv1394d in interactive mode: src/dv1394d -test
490 --> dv1394d starts interactively and reports:
491 --> (5) Starting server on 5250.
492 --> (5) lt-dv1394d version 0.1.0 listening on port 5250
493 --> Watch the activity in this console during these tests.
494
495 8.1.1 Connect: telnet localhost 5250
496 --> 100 VTR Ready
497
498 8.1.2 List the AV/C devices on the bus: NLS
499 --> 201 OK
500 --> one or more lines listing devices with GUID in second column
501
502 8.1.3 Add a device as a dv1394d unit: UADD {GUID}
503 --> 201 OK
504 --> U0
505
506 8.1.3 Add another device as a dv1394d unit: UADD {GUID}
507 --> 201 OK
508 --> U1
509
510 8.1.4 Get a status list of units: ULS
511 --> 201 OK
512 --> U0 01 0007360000000001 1
513 --> U1 03 0003f3001100065a 1
514 --> Both units are online.
515
516 8.1.5 Disconnect a device
517 --> see messasges from dv1394d
518
519 8.1.6 Get a status list of units: ULS
520 --> 201 OK
521 --> U0 01 0007360000000001 1
522 --> U1 03 0003f3001100065a 0
523 --> One unit is offlne.
524
525 8.1.7 Load a clip into the offline unit: LOAD /var/dv1394d/test.dv
526 --> 200 OK
527
528 8.1.8 Try to play the offline unit: PLAY U1
529 --> 403 Unit not found
530
531 8.1.9 Reconnect the device
532 --> see messages from dv1394d
533
534 8.1.10 Get a status list of units: ULS
535 --> 201 OK
536 --> U0 01 0007360000000001 1
537 --> U1 03 0003f3001100065a 1
538 --> Both units are online.
539
540 8.1.11 Start playing: PLAY U1
541 --> 200 OK
542
543 8.1.12 Disconnect a device
544 --> U1 stops playing
545
546 8.1.13 Reconnect disconnected device
547
548 8.1.14 Start playing: PLAY U1
549 --> 200 OK
550
551 9. Server Side Queuing
552 ----------------------
553
554 This section is designed to test the server side queuing implementation added
555 in the 0.2.2 release of dv1394d. Only one unit is used for these test cases, and
556 users are encouraged to test with multiple units online. It is assumed that a
557 number of dv files are available for use in the servers ROOT directory - this
558 document assumes that they are named test001.dv and up.
559
560 9.1.0 Start dv1394d in interactive mode and add a unit (all tests will assume U0)
561 --> server started with unit 0 available
562
563 9.1.1 Obtain a dv1394d shell (via telnet or other app).
564 --> 100 VTR (if reported by the client)
565
566 9.1.2 Load a clip with LOAD U0 test001.dv and PAUSE U0
567 --> 200 OK
568
569 9.1.3 List the clips with LIST U0
570 --> 201 OK
571 --> 1
572 --> 0 "test001.dv" 0 6999 7000 7000
573 --> The 1 on the second line denotes the number of times the list has been changed
574         via user commands (known as the 'generation' number).
575 --> The third line and beyond reports the clip index (from 0 to n), file loaded, in point,
576         out point, real size of the file and the calculated size (out - in + 1 ).
577
578 9.1.4 Check the unit status with USTA U0
579 --> 202 OK
580 --> 0 paused "test001.dv" 0 0 25.00 0 6999 7000 "test001.dv" 0 0 6999 7000 1 1 0
581 --> The last two fields indicate the generation number and current clip resp.
582
583 9.1.5 Append a clip with APND U0 test002.dv followed by LIST U0
584 --> 201 OK
585 --> 2
586 --> 0 "test001.dv" 0 6999 7000 7000
587 --> 1 "test002.dv" 0 6999 7000 7000
588 --> Check that USTA U0 reports a generation of 2 and current clip of 0
589
590 9.1.6 Move clip 1 to clip 0 with MOVE U0 1 0 followed by LIST U0
591 --> 201 OK
592 --> 3
593 --> 0 "test002.dv" 0 6999 7000 7000
594 --> 1 "test001.dv" 0 6999 7000 7000
595 --> Check that USTA U0 reports a generation of 3 and current clip of 1
596
597 9.1.7 Move clip 0 to clip 1 with MOVE U0 0 1 followed by LIST U0
598 --> 201 OK
599 --> 4
600 --> 0 "test001.dv" 0 6999 7000 7000
601 --> 1 "test002.dv" 0 6999 7000 7000
602 --> Check that USTA U0 reports a generation of 4 and current clip of 0
603 --> Note that the order in which you run 9.1.6 and 9.1.7 shouldn't matter as the
604         result will be identical
605
606 9.1.8 Change the position to the next clip with GOTO U0 0 +1
607 --> 200 OK
608 --> Check that USTA U0 reports a generation of 4 and current clip of 1
609
610 9.1.9 Remove all but the playing clip with CLEAN U0 followed by LIST U0
611 --> 201 OK
612 --> 5
613 --> 0 "test002.dv" 0 6999 7000 7000
614 --> Check that USTA U0 reports a generation of 5 and current clip of 0
615
616 9.1.10 Insert test001.dv back into the list using INSERT U0 test001.dv and run LIST U0
617 --> 201 OK
618 --> 6
619 --> 0 "test001.dv" 0 6999 7000 7000
620 --> 1 "test002.dv" 0 6999 7000 7000
621 --> Check that USTA U0 reports a generation of 6 and current clip of 1
622
623 9.1.11 Insert test003.dv at position 2 using INSERT U0 test001.dv 3 and run LIST U0
624 --> 201 OK
625 --> 7
626 --> 0 "test001.dv" 0 6999 7000 7000
627 --> 1 "test002.dv" 0 6999 7000 7000
628 --> 2 "test003.dv" 0 6999 7000 7000
629 --> Check that USTA U0 reports a generation of 7 and current clip of 1
630
631 9.1.12 Change the in point of the current clip using SIN U0 5000 and run LIST U0
632 --> 201 OK
633 --> 8
634 --> 0 "test001.dv" 0 6999 7000 7000
635 --> 1 "test002.dv" 5000 6999 7000 2000
636 --> 2 "test003.dv" 0 6999 7000 7000
637 --> Check that USTA U0 reports a generation of 8 and current clip of 1
638
639 9.1.13 Change the out point of the following clip using SOUT U0 5000 +1 and run LIST U0
640 --> 201 OK
641 --> 9
642 --> 0 "test001.dv" 0 6999 7000 7000
643 --> 1 "test002.dv" 5000 6999 7000 2000
644 --> 2 "test003.dv" 0 5000 7000 5001
645 --> Check that USTA U0 reports a generation of 9 and current clip of 2
646
647 9.1.14 Change the in point of the current clip to 1000 using SIN U0 1000 and run LIST U0
648 --> 201 OK
649 --> 10
650 --> 0 "test001.dv" 0 6999 7000 7000
651 --> 1 "test002.dv" 5000 6999 7000 2000
652 --> 2 "test003.dv" 1000 5000 7000 4001
653 --> Check that USTA U0 reports a generation of 10 and current clip of 2
654
655 9.1.15 Ignore the in/out points by running USET U0 points=ignore and run LIST U0
656 --> 201 OK
657 --> 11
658 --> 0 "test001.dv" 0 6999 7000 7000
659 --> 1 "test002.dv" 5000 6999 7000 7000
660 --> 2 "test003.dv" 1000 5000 7000 7000
661 --> Check that USTA U0 reports a generation of 11 and current clip of 2
662
663 9.1.16 Turn the in/out points on again by running USET U0 points=use and run LIST U0
664 --> 201 OK
665 --> 12
666 --> 0 "test001.dv" 0 6999 7000 7000
667 --> 1 "test002.dv" 5000 6999 7000 2000
668 --> 2 "test003.dv" 1000 5000 7000 4001
669 --> Check that USTA U0 reports a generation of 12 and current clip of 2
670
671 9.1.17 Remove the current clip using REMOVE U0 and run LIST U0
672 --> 201 OK
673 --> 13
674 --> 0 "test001.dv" 0 6999 7000 7000
675 --> 1 "test002.dv" 5000 6999 7000 2000
676 --> Check that USTA U0 reports a generation of 13 and current clip of 0
677
678 9.1.17 Remove the next clip using REMOVE U0 +1 and run LIST U0
679 --> 201 OK
680 --> 14
681 --> 0 "test001.dv" 0 6999 7000 7000
682 --> Check that USTA U0 reports a generation of 14 and current clip of 0