Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 583779 Details for
Bug 800300
locktests fail in "READ LOCK THE WHOLE FILE BYTE BY BYTE" test case.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
The Python script helps in testing "last unlock based unref'ing" in NLM.
simple.py (text/x-python), 667 bytes, created by
krishnan parthasarathi
on 2012-05-11 09:33:33 UTC
(
hide
)
Description:
The Python script helps in testing "last unlock based unref'ing" in NLM.
Filename:
MIME Type:
Creator:
krishnan parthasarathi
Created:
2012-05-11 09:33:33 UTC
Size:
667 bytes
patch
obsolete
>#! /usr/bin/env python >import struct, fcntl, os, time, sys >try: > filename = sys.argv[1] >except IndexError: > print "Usage: simpletest filename" > sys.exit (1) > >f = open(filename, "w+") > ># Lock phase >lockdata = struct.pack('hhllhh', fcntl.F_WRLCK, 0, 0, 1, 0, 0) >rv = fcntl.fcntl(f, fcntl.F_SETLK, lockdata) >lockdata = struct.pack('hhllhh', fcntl.F_WRLCK, 0, 1, 1, 0, 0) >rv = fcntl.fcntl(f, fcntl.F_SETLK, lockdata) > ># Unlock phase >lockdata = struct.pack('hhllhh', fcntl.F_UNLCK, 0, 0, 1, 0, 0) >rv = fcntl.fcntl(f, fcntl.F_SETLK, lockdata) >lockdata = struct.pack('hhllhh', fcntl.F_UNLCK, 0, 1, 1, 0, 0) >rv = fcntl.fcntl(f, fcntl.F_SETLK, lockdata)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 800300
: 583779