~james-page/ubuntu/raring/openvswitch/lts-raring-backport-dkms

« back to all changes in this revision

Viewing changes to tests/ovsdb-tool.at

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-08-07 16:00:53 UTC
  • mfrom: (5.1.25 sid)
  • Revision ID: package-import@ubuntu.com-20120807160053-nj4pgmkn6bp8t4md
Tags: 1.4.2+git20120612-9ubuntu1
* Merge from Debian unstable; remaining changes:
  - d/control: Disable openvswitch-datapath-dkms package.
* Dropped changes:
  - d/patches/kernel_3.5_support.patch: Superceded by 
    bug-684057-ovs-ctl-Add-support-for-newer-module-name.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
AT_KEYWORDS([ovsdb file positive])
53
53
AT_DATA([schema], [ORDINAL_SCHEMA
54
54
])
55
 
touch .db.~lock~
 
55
dnl Make sure that "ovsdb-tool create" works with a dangling symlink,
 
56
dnl creating the target of the symlink rather than replacing the symlink
 
57
dnl with a regular file, and that the lockfile gets created relative to
 
58
dnl the symlink's target.
 
59
mkdir dir
 
60
: > dir/.db.~lock~
 
61
ln -s dir/db db
 
62
AT_SKIP_IF([test ! -h db])
56
63
AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore])
57
64
dnl Do a bunch of random transactions that put crap in the database log.
58
65
AT_CHECK(
120
127
dnl Now compact the database in-place.
121
128
touch .db.tmp.~lock~
122
129
AT_CHECK([[ovsdb-tool compact db]], [0], [], [ignore])
 
130
dnl Make sure that "db" is still a symlink to dir/db instead of getting
 
131
dnl replaced by a regular file.
 
132
AT_CHECK([test ! -e .db.~lock])
 
133
AT_CHECK([test -h db])
 
134
AT_CHECK([test -f dir/db])
123
135
dnl We can't fully re-check the contents of the database log, because the
124
136
dnl order of the records is not predictable, but there should only be 4 lines
125
137
dnl in it now.