File: note.test

package info (click to toggle)
partclone 0.3.23%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,152 kB
  • sloc: ansic: 112,812; sh: 4,756; xml: 2,410; makefile: 502; perl: 106; asm: 35; sed: 16
file content (26 lines) | stat: -rwxr-xr-x 692 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
set -e

. "$(dirname "$0")"/_common
fs="dd"
ptlfs="../src/partclone.dd"
dd_count=$((normal_size/2))

echo -e "partclone.dd test"
echo -e "====================\n"
_ptlbreak
[ -f $raw ] && rm $raw
echo -e "create raw file $raw\n"
echo -e "    dd if=/dev/urandom of=$raw bs=$dd_bs count=$dd_count\n"
dd if=/dev/urandom of=$raw bs=$dd_bs count=$dd_count
smd5=$(md5sum $raw)

echo -e "\nclone $raw to $img\n"
[ -f $img ] && rm $img
echo -e "    $ptlfs -d -s $raw -O $img -F -L $logfile -n note test\n"
_ptlbreak
$ptlfs -d -s $raw -O $img -F -L $logfile -n "note test"
_check_return_code
$ptlfs -d -N -s $raw -O $img -F -L $logfile -n "note test"
_check_return_code
echo "note test ok"