File: 064_url_readonly

package info (click to toggle)
fsvs 1.2.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 2,964 kB
  • ctags: 1,464
  • sloc: ansic: 16,650; sh: 5,885; perl: 783; makefile: 338; python: 90
file content (37 lines) | stat: -rwxr-xr-x 640 bytes parent folder | download | duplicates (3)
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
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash

set -e 
$PREPARE_CLEAN > /dev/null
$INCLUDE_FUNCS
cd $WC


logfile=$LOGDIR/064.url_readonly

echo $$ > $$

for ro in readonly readonly:1 ro ro:1
do
	echo $ro,$REPURL | $BINdflt urls load
	# Allow an error code.
	$BINq ci -mBUG || true
	if $BINdflt log -rHEAD | grep BUG
	then
		$ERROR "readonly flag '$ro' did commit"
	fi
done

# As the URL is the same, it should work with a simple change, too.
$BINdflt urls ro:0,$REPURL
if [[ `$BINdflt urls dump | wc -l` -ne 1 ]]
then
	$ERROR "url change doesn't work"
fi

if $BINq ci -m1
then
	$SUCCESS "readonly flag with value=0 taken"
else
	$ERROR "Expected commit with readonly=0"
fi