swift/test/probe
Samuel Merritt 0a26bb20b1 Simplify callers of diskfile.[read|write]_metadata()
As it happens, diskfile.read_metadata() and diskfile.write_metadata()
can take either an open file or a filename as their first arguments
(since xattr.[get|set]xattr() can), so we can clean up a couple places
where we were opening a file just to call read_metadata() or
write_metadata() on it. This results in 2 fewer system calls.

Example strace output:

/* read_metadata(filename) */
getxattr("/mnt/sdb1/1/node/sdb1/afile", "user.some.key", 0x0, 0) = 10
getxattr("/mnt/sdb1/1/node/sdb1/afile", "user.some.key", "some-value", 10) = 10

/* fp = open(filename); read_metadata(fp) */
open("/mnt/sdb1/1/node/sdb1/afile", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
fgetxattr(4, "user.some.key", 0x0, 0)   = 10
fgetxattr(4, "user.some.key", "some-value", 10) = 10

Change-Id: I321d8663b9e9e47b8f3ee6c21a1b65b408bb80e6
2013-10-24 11:23:37 -07:00
..
__init__.py Add option to make probetests more brittle 2013-07-19 01:39:42 -07:00
common.py Change OpenStack LLC to Foundation 2013-09-20 01:02:31 +08:00
test_account_failures.py Change OpenStack LLC to Foundation 2013-09-20 01:02:31 +08:00
test_account_get_fake_responses_match.py Change OpenStack LLC to Foundation 2013-09-20 01:02:31 +08:00
test_container_failures.py Revert "Refactor common/utils methods to common/ondisk" 2013-10-07 17:18:09 -04:00
test_empty_device_handoff.py Change OpenStack LLC to Foundation 2013-09-20 01:02:31 +08:00
test_object_async_update.py Change OpenStack LLC to Foundation 2013-09-20 01:02:31 +08:00
test_object_failures.py Simplify callers of diskfile.[read|write]_metadata() 2013-10-24 11:23:37 -07:00
test_object_handoff.py Change OpenStack LLC to Foundation 2013-09-20 01:02:31 +08:00
test_replication_servers_working.py Change OpenStack LLC to Foundation 2013-09-20 01:02:31 +08:00