Skip to contentSkip to conversation

fdisk: tests: update oddinput test

PATCH In review Davidlohr Bueso 1 participant 1 message Jun 17, 2012 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 4/9 fdisk: tests: update oddinput test

From: Davidlohr Bueso <[email protected]>

Adding mbr to the API breaks this test, specifically when reading the first 512 bytes of the MBR, update the expected output for oddinput.toosmall. Also let the test create and remove the test file instead of having it in the expected directory.

---
 tests/expected/fdisk/oddinput |    1 +
 tests/ts/fdisk/oddinput       |    5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)
tests/expected/fdisk/oddinput +1 -0
index c812caa..d90866b 100644
@@ -11,3 +11,4 @@ I/O size (minimum/optimal): 512 bytes / 512 bytes
 Nonexistant file
 lt-fdisk: unable to open _a_file_that_does_not_exist_: No such file or directory
 Too small file
+lt-fdisk: unable to open oddinput.toosmall: Success
tests/ts/fdisk/oddinput +3 -2
index f250c91..799eca0 100755
@@ -34,6 +34,7 @@ ts_log "Nonexistant file" # this originally does absolutely nothing
 $TS_CMD_FDISK -c=dos -u=cylinders -l _a_file_that_does_not_exist_ >> $TS_OUTPUT 2>&1
 
 ts_log "Too small file" # same here
-$TS_CMD_FDISK -c=dos -u=cylinders -l $TS_TOPDIR/expected/fdisk/oddinput.toosmall >> $TS_OUTPUT 2>&1
-
+echo  "This file is too small" >> oddinput.toosmall
+$TS_CMD_FDISK -c=dos -u=cylinders -l oddinput.toosmall >> $TS_OUTPUT 2>&1
+rm oddinput.toosmall
 ts_finalize
Signature · 1 line
1.7.4.1