tests/test-audit-path
author Nicolas Dumazet <nicdumz.commits@gmail.com>
Thu, 19 Nov 2009 11:06:01 +0900
branchstable
changeset 9900 8939900073a8
parent 7681 c6f3ff294fe0
permissions -rwxr-xr-x
inotify: improve error messages * prefix messages by inotify-(client|server) * make sure that all warning and abort messages use the same format. * in the case where inotify.sock is an old broken symlink, say so and abort instead of trying to overwrite the already existing link

#!/bin/sh

hg init

echo % should fail
hg add .hg/00changelog.i

mkdir a
echo a > a/a
hg ci -Ama
ln -s a b
echo b > a/b

echo % should fail
hg add b/b

echo % should succeed
hg add b

echo % should still fail - maybe
hg add b/b

echo % unbundle tampered bundle
hg init target
cd target
hg unbundle $TESTDIR/tampered.hg

echo % attack .hg/test
hg manifest -r0
hg update -Cr0

echo % attack foo/.hg/test
hg manifest -r1
hg update -Cr1

echo % attack back/test where back symlinks to ..
hg manifest -r2
hg update -Cr2

echo % attack ../test
hg manifest -r3
hg update -Cr3

echo % attack /tmp/test
hg manifest -r4
hg update -Cr4 2>&1 | sed -e "s|/.*/test-audit-path|[HGTMP]/test-audit-path|"

exit 0