Ramdisks

Chris Johns chrisj at rtems.org
Thu Apr 6 23:24:08 UTC 2017


On 07/04/2017 08:50, Mathew Benson wrote:
> I basically do that too.  But can you do it again to create another RAM
> disk?

No I cannot. Could you please raise a ticket?

I tested this with:

diff --git a/testsuites/libtests/block03/init.c 
b/testsuites/libtests/block03/init.c
index f2a18b9a7c..1ad0a6dc5c 100644
--- a/testsuites/libtests/block03/init.c
+++ b/testsuites/libtests/block03/init.c
@@ -129,13 +129,16 @@ static rtems_task Init(rtems_task_argument argument)
    rtems_status_code sc = RTEMS_SUCCESSFUL;
    rtems_bdbuf_buffer *bd = NULL;
    dev_t dev = 0;
+  dev_t dev1 = 0;

    TEST_BEGIN();

    sc = rtems_disk_io_initialize();
    ASSERT_SC(sc);

-  sc = ramdisk_register(BLOCK_SIZE, BLOCK_COUNT, false, "/dev/rda", &dev);
+  sc = ramdisk_register(BLOCK_SIZE, BLOCK_COUNT, false, "/dev/rda0", &dev);
+  ASSERT_SC(sc);
+  sc = ramdisk_register(BLOCK_SIZE, BLOCK_COUNT, false, "/dev/rda1", 
&dev1);
    ASSERT_SC(sc);

    dd = rtems_disk_obtain(dev);

ruru erc32 $ rtems-test --rtems-bsp=erc32 --report-mode=all `find . 
-name block03.exe` 
 
 
 

RTEMS Testing - Tester, 4.12.not_released
  Command Line: /opt/work/rtems/4.12/bin/rtems-test --rtems-bsp=erc32 
--report-mode=all 
./sparc-rtems4.12/c/erc32/testsuites/libtests/block03/block03.exe
  Python: 2.7.13 (default, Jan 12 2017, 01:19:30) [GCC 4.2.1 Compatible 
FreeBSD Clang 3.8.0 (tags/RELEASE_380/final 262564)]
[1/1] p:0 f:0 u:0 e:0 I:0 B:0 t:0 i:0 | sparc/erc32: block03.exe
[1/1] p:0 f:0 u:0 e:0 I:0 B:0 t:0 i:0 | sparc/erc32: block03.exe
 > gdb: /opt/work/rtems/4.12/bin/sparc-rtems4.12-gdb -i=mi --nx --quiet 
./sparc-rtems4.12/c/erc32/testsuites/libtests/block03/block03.exe
 > Reading symbols from 
./sparc-rtems4.12/c/erc32/testsuites/libtests/block03/block03.exe...
 > done.
 > target sim
 > Connected to the simulator.
 > load
 > run
 > Starting program: 
/opt/work/chris/rtems/kernel/bsps/erc32/sparc-rtems4.12/c/erc32/testsuites/libtests/block03/block03.exe
] *** BEGIN OF TEST BLOCK 3 ***
] 
/opt/work/chris/rtems/kernel/rtems.git/c/src/../../testsuites/libtests/block03/init.c: 
142 (sc) == RTEMS_SUCCESSFUL
 > [Inferior 1 (process 42000) exited normally]
Result: failed     Time: 0:00:01.082423 block03.exe

Passed:        0
Failed:        1
User Input:    0
Expected Fail: 0
Indeterminate: 0
Benchmark:     0
Timeout:       0
Invalid:       0
----------------
Total:         1

Failures:
  block03.exe
Average test time: 0:00:01.560909
Testing time     : 0:00:01.560909

Thanks
Chris



More information about the users mailing list