source: client/shared/lib/engine/tests/NoModify/Lock1.shtest @ de734df

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since de734df was 140b7c9, checked in by irina <irinagomez@…>, 14 years ago

test de particiones y bloqueos

git-svn-id: https://opengnsys.es/svn/branches/version1.0@1683 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100644
File size: 1.4 KB
Line 
1€jemplo de test de funciones de bloqueo de particiones e imagenes
2=================================================================
3# Funciones de bloqueo
4
5$ ogLock 1 1
6$ ls /var/lock/lock-dev-sda1
7/var/lock/lock-dev-sda1
8
9$ if ogIsLocked 1 1; then echo si; else echo no; fi
10si
11
12$ ls /var/lock/lock-dev-sda1
13/var/lock/lock-dev-sda1
14
15$ ogUnlock 1 1
16$ if ogIsLocked 1 1; then echo si; else echo no; fi
17no
18
19$ ogLockPartition 1 1
20$ if ogIsLocked 1 1; then echo si; else echo no; fi
21si
22
23$ ogUnlockPartition 1 1
24$ if ogIsLocked 1 1; then echo si; else echo no; fi
25no
26
27
28
29
30# Es necesario desmontar para probar ogCheck
31$ ogUnmount 1 1 >/dev/null 2>&1
32
33$ ogLock 1 1
34
35$ ogCheckFs 1 1
36OpenGnSys error:  ogCheckFs:  "1 1"
37
38$ ogUnlock 1 1
39
40$ ogCheckFs 1 1 >/dev/null 2>&1; echo $?
410
42
43
44# Bloqueo del repositorio
45
46$ ogIsRepoLocked; echo $?
471
48
49# FALTA: test bloqueo repo cuando esta bloqueado
50
51# bloqueo de imagenes
52
53
54
55# Creo una imagen ficticia
56$ touch $OGIMG/_test_.img
57
58$ ogLockImage REPO _test_
59$ ls $OGIMG/_test_.lock
60/opt/opengnsys/images/_test_.lock
61
62$ if ogIsImageLocked REPO _test_ ; then echo si; else echo no; fi
63si
64
65$ ogUnlockImage REPO _test_
66$ if ogIsImageLocked REPO _test_ ; then echo si; else echo no; fi
67no
68
69$ rm $OGIMG/_test_.*
70
71# Comprobando los errores (FALTA)
72$ ogLock
73OpenGnSys error:  ogLockPartition:  ""
74
75
76$ ogLock 1 10
77OpenGnSys error:  ogDiskToDev:  ""
78
79
80$ ogIsLocked
81OpenGnSys error:  ogIsLocked:  ""
82
83$ ogIsLocked 1 10
84OpenGnSys error:  ogDiskToDev:  ""
85
Note: See TracBrowser for help on using the repository browser.