Changeset 577 for trunk/test
- Timestamp:
- May 1, 2022, 12:24:37 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/testrun_2g.sh
r551 r577 204 204 UUID=$(uuidgen) 205 205 mv ./file.delta file.${SH_LOCALHOST}.${UUID} 206 cp file.${SH_LOCALHOST}.${UUID} "./file.${ALTHOST}.${UUID}" 206 if [ "x${SH_LOCALHOST}" != "x${ALTHOST}" ] 207 then 208 cp file.${SH_LOCALHOST}.${UUID} "./file.${ALTHOST}.${UUID}" 209 fi 207 210 208 211 # … … 223 226 fi 224 227 228 NHOSTS=1 229 225 230 ./yulectl -c "DELTA:${UUID}" ${SH_LOCALHOST} 226 231 if [ $? -ne 0 ]; then … … 229 234 return 1 230 235 fi 231 ./yulectl -c "DELTA:${UUID}" ${ALTHOST} 232 if [ $? -ne 0 ]; then 233 [ -z "$verbose" ] || log_msg_fail "yulectl (2)"; 234 kill $PROC_S; kill $PROC_Y; 235 return 1 236 fi 236 237 if [ "x${SH_LOCALHOST}" != "x${ALTHOST}" ] 238 then 239 ./yulectl -c "DELTA:${UUID}" ${ALTHOST} 240 NHOSTS=2 241 if [ $? -ne 0 ]; then 242 [ -z "$verbose" ] || log_msg_fail "yulectl (2)"; 243 kill $PROC_S; kill $PROC_Y; 244 return 1 245 fi 246 fi 247 237 248 NR=$( ./yulectl -c LIST | grep ${UUID} | grep -v grep | wc -l ) 238 if [ $NR -ne 2]; then249 if [ $NR -ne $NHOSTS ]; then 239 250 [ -z "$verbose" ] || log_msg_fail "yulectl (3)"; 240 251 [ -z "$verbose" ] || ./yulectl -c LIST … … 249 260 done 250 261 # 251 NR=$( ./yulectl -c LIST | grep ${UUID} | grep -v grep | wc -l ) 262 NR=$( ./yulectl -c LISTALL | grep ${UUID} | grep SENT | grep -v grep | wc -l ) 263 # NR=$( ./yulectl -c LIST | grep ${UUID} | grep -v grep | wc -l ) 252 264 if [ $NR -ne 1 ]; then 253 265 [ -z "$verbose" ] || log_msg_fail "yulectl (4)"; … … 330 342 else 331 343 mv ./file.delta file.${SH_LOCALHOST}.${UUID} 332 cp file.${SH_LOCALHOST}.${UUID} "./file.${ALTHOST}.${UUID}" 344 if [ "x${SH_LOCALHOST}" != "x${ALTHOST}" ] 345 then 346 cp file.${SH_LOCALHOST}.${UUID} "./file.${ALTHOST}.${UUID}" 347 fi 333 348 fi 334 349 [ -z "$verbose" ] || log_msg_ok "... DeltaDB copied as file.${SH_LOCALHOST}.${UUID} ..."; … … 351 366 fi 352 367 368 NHOSTS=1 369 353 370 ./yulectl -c "DELTA:${UUID}" ${SH_LOCALHOST} 354 371 if [ $? -ne 0 ]; then … … 357 374 return 1 358 375 fi 359 ./yulectl -c "DELTA:${UUID}" ${ALTHOST} 360 if [ $? -ne 0 ]; then 361 [ -z "$verbose" ] || log_msg_fail "yulectl (2)"; 362 kill $PROC_S; kill $PROC_Y; 363 return 1 364 fi 376 377 if [ "x${SH_LOCALHOST}" != "x${ALTHOST}" ] 378 then 379 ./yulectl -c "DELTA:${UUID}" ${ALTHOST} 380 NHOSTS=2 381 if [ $? -ne 0 ]; then 382 [ -z "$verbose" ] || log_msg_fail "yulectl (2)"; 383 kill $PROC_S; kill $PROC_Y; 384 return 1 385 fi 386 fi 387 365 388 NR=$( ./yulectl -c LIST | grep ${UUID} | grep -v grep | wc -l ) 366 if [ $NR -ne 2]; then389 if [ $NR -ne $NHOSTS ]; then 367 390 [ -z "$verbose" ] || log_msg_fail "yulectl (3)"; 368 391 [ -z "$verbose" ] || ./yulectl -c LIST … … 378 401 done 379 402 # 380 NR=$( ./yulectl -c LIST | grep ${UUID}| grep -v grep | wc -l )403 NR=$( ./yulectl -c LISTALL | grep ${UUID} | grep SENT | grep -v grep | wc -l ) 381 404 if [ $NR -ne 1 ]; then 382 [ -z "$verbose" ] || log_msg_fail "yulectl (4) ";405 [ -z "$verbose" ] || log_msg_fail "yulectl (4): ${UUID}"; 383 406 [ -z "$verbose" ] || ./yulectl -c LISTALL 384 kill $PROC_S; kill $PROC_Y; 385 return 1 386 fi 387 [ -z "$verbose" ] || OLINE=$( ./yulectl -c LIST | grep ${UUID} ) 407 [ -z "$verbose" ] || echo "(now just LIST)" 408 [ -z "$verbose" ] || ./yulectl -c LIST 409 kill $PROC_S; kill $PROC_Y; 410 return 1 411 fi 412 [ -z "$verbose" ] || OLINE=$( ./yulectl -c LISTALL | grep ${UUID} ) 388 413 [ -z "$verbose" ] || echo "${OLINE}" 389 414 … … 607 632 chmod 644 ./file.${SH_LOCALHOST} 608 633 609 cp ./testrc_2 "./rc.${ALTHOST}" 610 cp ./file.${SH_LOCALHOST} "./file.${ALTHOST}" 2>/dev/null 611 chmod 644 ./rc.${ALTHOST} 612 chmod 644 ./file.${ALTHOST} 634 if [ "x${SH_LOCALHOST}" != "x${ALTHOST}" ] 635 then 636 cp ./testrc_2 "./rc.${ALTHOST}" 637 cp ./file.${SH_LOCALHOST} "./file.${ALTHOST}" 2>/dev/null 638 chmod 644 ./rc.${ALTHOST} 639 chmod 644 ./file.${ALTHOST} 640 fi 613 641 } 614 642
Note:
See TracChangeset
for help on using the changeset viewer.