SlideShare a Scribd company logo
Compatibility Testing 
using 
Patterns-based Trace Comparison 
Venkatesh-Prasad Ranganath, Kansas State University, USA 
Pradip Vallathol, University of Wisconsin-Madison, USA 
Pankaj Gupta, Microsoft Corporation, USA 
29th IEEE/ACM International Conference on 
Automated Software Engineering (ASE 2014) 
September 15 - 19, 2014 
Västerås, Sweden 
Thanks to Microsoft Research (India) and USB team (at Microsoft) for supporting this effort.
Compatibility Testing
Compatibility Testing: 
Syntactic Changes 
client.java! 
! service.getProperty(“name”) 
! 
service.java! 
! void getProperty(PropertyId id) { 
… 
}!
Compatibility Testing: 
Semantic Changes 
client1.c! 
! s.q = c; 
f(&s); 
s.q = c; 
g(&s); 
! 
client2.c! 
! s.q = c; 
f(&s); 
! 
g(&s); 
! 
serviceV1.c! 
@pre s.q == c 
void f(Record *s) { 
… 
// no changes to s.q 
} 
! 
@pre s.q == c 
void g(Record *s) { 
… 
}
Compatibility Testing: 
Semantic Changes 
client1.c! 
! s.q = c; 
f(&s); 
s.q = c; 
g(&s); 
! 
client2.c! 
! s.q = c; 
f(&s); 
! 
g(&s); 
! 
serviceV2.c! 
@pre s.q == c 
void f(Record *s) { 
… 
s.q = 0; 
} 
! 
@pre s.q == c 
void g(Record *s) { 
… 
} 
Incorrect!!
Common Reasons for 
Semantic Incompatibilities 
• Breaking semantic changes 
• Observational dependences and influences 
• Weak specifications 
• Assumptions
Compatibility Testing of 
Windows USB drivers 
When a USB 2.0 device is plugged into a USB 3.0 port on Win8, 
will USB 3.0 driver in Win8 behave similar to the USB 2.0 stack 
in Win7 (along both soBware and hardware interfaces)? 
Mouse 
Driver 
USB 
3.0 
Driver 
Stack 
USB3 
Controller 
Win8 
Mouse 
Driver 
USB 
2.0 
Driver 
Stack 
USB2 
Controller 
Win7 
USB 
2.0 
Mouse 
USB 
2.0 
Mouse
Why is it hard? 
• Clean room implementation of USB 3 driver 
• No part of USB 2 driver was reused 
• Regression tests were insufficient 
• Large testing surface 
• Number of unique USB devices 
• Possibilities in USB protocol 
• Multiple layers of variability 
• Device drivers, Controllers, & ASIC in devices
Compatibility Testing of 
Windows USB drivers 
When a USB 2.0 device is plugged into a USB 3.0 port on Win8, 
will USB 3.0 driver in Win8 behave similar to the USB 2.0 stack 
in Win7 (along both soBware and hardware interfaces)? 
Mouse 
Driver 
USB 
3.0 
Driver 
Stack 
USB3 
Controller 
Win8 
Mouse 
Driver 
USB 
2.0 
Driver 
Stack 
USB2 
Controller 
Win7 
USB 
2.0 
Mouse 
USB 
2.0 
Mouse
Compatibility Testing using 
Patterns-based Trace Comparison 
USB2 
Logs 
Tark 
(Miner) 
USB2 
Patterns 
USB3 
Log 
Tark 
(Miner) 
USB3 
Patterns 
IOCTLType=URB_FUNCTION_BULK_OR_INTERRUPT_TRA 
NSFER(0x09) 
&& 
IoCallDriverReturn 
&& 
IoCallDriverReturn.irql=2 
&& 
IoCallDriverReturn.status=0xC000000E 
USB2 
Patterns 
USB3 
Patterns 
Structural 
and 
Temporal 
Pattern 
Diffing 
DispatchIrp 
forward 
alternates 
with 
IrpCompletion 
&& 
PreIoCompleteRequest 
when 
IOCTLType=IRP_MJ_PNP(0x1B),IRP_MN_START_DEVICE(0x00), 
irpID=SAME, 
and 
IrpSubmitDetails.irp.ioStackLocation.control=SAME
Trace Collection 
Function Driver 
(Mouse Driver) 
Filter Driver 
USB Driver 
USB Controller 
USB Device 
(Mouse)
Structural Patterns 
fopen 
21=fopen(, 
“r”) 
21=fopen 
21 
= 
fopen(“passwd.txt”, 
“r”) 
USB 2.0 driver completed 
isochronous requests at 
DISPATCH_LEVEL IRQ while 
USB 3.0 driver completed 
similar request at 
PASSIVE_LEVEL IRQ. 
Mining Quantified Temporal Rules: Formalism, Algorithms, and Evaluation, WCRE’09
Temporal Patterns with 
Data Flow 
USB 3.0 driver failed to 
communicate the 
corresponding interface when 
serving a request to select a 
configuration of a device. 
interfaceHandle attribute 
remained unchanged. 
h=fopen 
.... 
fclose(h) 
(h!=0 
&& 
h=fopen) 
.... 
fclose(h) 
21=fopen(, 
“r”) 
.... 
fclose(21) 
21=fopen 
.... 
fclose(21) 
fopen 
.... 
fclose 
21 
= 
fopen(“passwd.txt”, 
“r”) 
.... 
fclose(21) 
Mining Quantified Temporal Rules: Formalism, Algorithms, and Evaluation, WCRE’09
What is reported? 
Presence of previously unobserved patterns 
! 
! 
Absence of previously observed patterns 
Comment: This should be intersection
Is it effective? 
We detected 14 unique bugs (25 bugs) by 
testing 14 devices with regression tested 
USB 3.0 driver.
Is it expensive? 
• Worst case mining time was 115 minutes 
• Worst case diffing time was 48 minutes 
• Non-empty reports analysis took ~2 hours 
• Few reports required 24 hours
Domain Knowledge 
# of attributes: 361 
# of ignored attributes: 108 (361 - 108 = 253) 
# of necessary attributes: 29 (253 - 29 = 224) 
# of NULL abstracted attributes: 23 
# of unquantifiable attributes: 75 
# of quantifiable attributes: 150 
# of data flows: 17 (between 26 attributes)
User Feedback 
Device Known Detected 
Simplified Compacted Reported False +ve Structural Temporal 
1 0 9844 932 478 478 11 + 454 6 / 9 4 / 4 
2* 932 2545 121 63 15 0 + 11 1 / 1 1 / 3 
3 965 743 41 21 4 1 + 0 0 / 0 1 / 3 
4 965 1372 67 34 2 1 + 1 0 / 0 0 / 0 
5* 2141 26118 1114 571 55 26 + 29 0 / 0 0 / 0 
6 2141 26126 1054 541 0 0 + 0 0 / 0 0 / 0 
7 2141 2320 84 44 0 0 + 0 0 / 0 0 / 0 
8 2141 27804 1185 608 2 1 + 0 1 / 1 0 / 0 
9 2141 34985 413 217 115 2 + 96 2 / 14 2 / 3 
10 2141 51556 429 231 59 15 + 41 1 / 1 2 / 2 
11 2141 695 35 18 0 0 + 0 0 / 0 0 / 0 
12 2141 1372 67 34 0 0 + 0 0 / 0 0 / 0 
13 2141 3315 122 72 24 19 + 4 1 / 1 0 / 0 
14* 2141 9299 103 54 3 0 + 0 2 / 3 0 / 0
Smart Presentation 
Device Known Detected 
Simplified Compacted Reported False +ve Structural Temporal 
1 0 9844 932 478 478 11 + 454 6 / 9 4 / 4 
2* 932 2545 121 63 15 0 + 11 1 / 1 1 / 3 
3 965 743 41 21 4 1 + 0 0 / 0 1 / 3 
4 965 1372 67 34 2 1 + 1 0 / 0 0 / 0 
5* 2141 26118 1114 571 55 26 + 29 0 / 0 0 / 0 
6 2141 26126 1054 541 0 0 + 0 0 / 0 0 / 0 
7 2141 2320 84 44 0 0 + 0 0 / 0 0 / 0 
8 2141 27804 1185 608 2 1 + 0 1 / 1 0 / 0 
9 2141 34985 413 217 115 2 + 96 2 / 14 2 / 3 
10 2141 51556 429 231 59 15 + 41 1 / 1 2 / 2 
11 2141 695 35 18 0 0 + 0 0 / 0 0 / 0 
12 2141 1372 67 34 0 0 + 0 0 / 0 0 / 0 
13 2141 3315 122 72 24 19 + 4 1 / 1 0 / 0 
14* 2141 9299 103 54 3 0 + 0 2 / 3 0 / 0
Lessons Learned 
• If domain knowledge is available, use it 
• If a feedback loop can be established, set it up 
• Presentation matters 
• Embrace the unorthodox
Limitations 
• Detects a class of incompatibilities
Threats to Validity 
• Generalization needs more experiments 
• Effect of latent factors need to be studied
Key Takeaways 
• An approach to compatibility testing via 
patterns-based trace comparison. 
• The use of structural and temporal patterns as 
trace abstractions to enable software 
engineering and maintenance tasks. 
• Of course, the lessons learned :)

More Related Content

Similar to Compatibility Testing using Patterns-based Trace Comparison

Analyzing OS X Systems Performance with the USE Method
Analyzing OS X Systems Performance with the USE MethodAnalyzing OS X Systems Performance with the USE Method
Analyzing OS X Systems Performance with the USE Method
Brendan Gregg
 
MeetBSD2014 Performance Analysis
MeetBSD2014 Performance AnalysisMeetBSD2014 Performance Analysis
MeetBSD2014 Performance Analysis
Brendan Gregg
 
Lab 1 reference manual
Lab 1 reference manualLab 1 reference manual
Lab 1 reference manual
trayyoo
 
Mining Assumptions for Software Components using Machine Learning
Mining Assumptions for Software Components using Machine LearningMining Assumptions for Software Components using Machine Learning
Mining Assumptions for Software Components using Machine Learning
Lionel Briand
 
SIG-NOC Tools survey results
SIG-NOC Tools survey resultsSIG-NOC Tools survey results
Application Performance Troubleshooting 1x1 - Von Schweinen, Schlangen und Pa...
Application Performance Troubleshooting 1x1 - Von Schweinen, Schlangen und Pa...Application Performance Troubleshooting 1x1 - Von Schweinen, Schlangen und Pa...
Application Performance Troubleshooting 1x1 - Von Schweinen, Schlangen und Pa...
rschuppe
 
Testar2014 presentation
Testar2014 presentationTestar2014 presentation
Testar2014 presentation
Tanja Vos
 
Webinar: Untethering Compute from Storage
Webinar: Untethering Compute from StorageWebinar: Untethering Compute from Storage
Webinar: Untethering Compute from Storage
Avere Systems
 
Crossing the Boundaries: Development Strategies for (P)SoCs
Crossing the Boundaries: Development Strategies for (P)SoCsCrossing the Boundaries: Development Strategies for (P)SoCs
Crossing the Boundaries: Development Strategies for (P)SoCs
Andreas Koschak
 
Machine Learning Impact on IoT - Part 2
Machine Learning Impact on IoT - Part 2Machine Learning Impact on IoT - Part 2
Machine Learning Impact on IoT - Part 2
Value Amplify Consulting
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniques
Fincy V.J
 
KHAN_FAHAD_FL14
KHAN_FAHAD_FL14KHAN_FAHAD_FL14
KHAN_FAHAD_FL14
Fahad Naeem
 
Understanding and Improving Device Access Complexity
Understanding and Improving Device Access ComplexityUnderstanding and Improving Device Access Complexity
Understanding and Improving Device Access Complexity
asimkadav
 
Master Serial Killer - DEF CON 22 - ICS Village
Master Serial Killer - DEF CON 22 - ICS VillageMaster Serial Killer - DEF CON 22 - ICS Village
Master Serial Killer - DEF CON 22 - ICS Village
Chris Sistrunk
 
OpManager training - Device discovery and classification.
OpManager training - Device discovery and classification.OpManager training - Device discovery and classification.
OpManager training - Device discovery and classification.
ManageEngine, Zoho Corporation
 
Effective Fault-Localization Techniques for Concurrent Software
Effective Fault-Localization Techniques for Concurrent SoftwareEffective Fault-Localization Techniques for Concurrent Software
Effective Fault-Localization Techniques for Concurrent Software
Sangmin Park
 
Seacon Continuous Delivery Pipeline Tools Track
Seacon Continuous Delivery Pipeline Tools TrackSeacon Continuous Delivery Pipeline Tools Track
Seacon Continuous Delivery Pipeline Tools Track
Mark Rendell
 
When Web Services Go Bad
When Web Services Go BadWhen Web Services Go Bad
When Web Services Go Bad
Steve Loughran
 
Object Tracking with Instance Matching and Online Learning
Object Tracking with Instance Matching and Online LearningObject Tracking with Instance Matching and Online Learning
Object Tracking with Instance Matching and Online Learning
Jui-Hsin (Larry) Lai
 
Automatically Discovering, Reporting and Reproducing Android Application Crashes
Automatically Discovering, Reporting and Reproducing Android Application CrashesAutomatically Discovering, Reporting and Reproducing Android Application Crashes
Automatically Discovering, Reporting and Reproducing Android Application Crashes
Kevin Moran
 

Similar to Compatibility Testing using Patterns-based Trace Comparison (20)

Analyzing OS X Systems Performance with the USE Method
Analyzing OS X Systems Performance with the USE MethodAnalyzing OS X Systems Performance with the USE Method
Analyzing OS X Systems Performance with the USE Method
 
MeetBSD2014 Performance Analysis
MeetBSD2014 Performance AnalysisMeetBSD2014 Performance Analysis
MeetBSD2014 Performance Analysis
 
Lab 1 reference manual
Lab 1 reference manualLab 1 reference manual
Lab 1 reference manual
 
Mining Assumptions for Software Components using Machine Learning
Mining Assumptions for Software Components using Machine LearningMining Assumptions for Software Components using Machine Learning
Mining Assumptions for Software Components using Machine Learning
 
SIG-NOC Tools survey results
SIG-NOC Tools survey resultsSIG-NOC Tools survey results
SIG-NOC Tools survey results
 
Application Performance Troubleshooting 1x1 - Von Schweinen, Schlangen und Pa...
Application Performance Troubleshooting 1x1 - Von Schweinen, Schlangen und Pa...Application Performance Troubleshooting 1x1 - Von Schweinen, Schlangen und Pa...
Application Performance Troubleshooting 1x1 - Von Schweinen, Schlangen und Pa...
 
Testar2014 presentation
Testar2014 presentationTestar2014 presentation
Testar2014 presentation
 
Webinar: Untethering Compute from Storage
Webinar: Untethering Compute from StorageWebinar: Untethering Compute from Storage
Webinar: Untethering Compute from Storage
 
Crossing the Boundaries: Development Strategies for (P)SoCs
Crossing the Boundaries: Development Strategies for (P)SoCsCrossing the Boundaries: Development Strategies for (P)SoCs
Crossing the Boundaries: Development Strategies for (P)SoCs
 
Machine Learning Impact on IoT - Part 2
Machine Learning Impact on IoT - Part 2Machine Learning Impact on IoT - Part 2
Machine Learning Impact on IoT - Part 2
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniques
 
KHAN_FAHAD_FL14
KHAN_FAHAD_FL14KHAN_FAHAD_FL14
KHAN_FAHAD_FL14
 
Understanding and Improving Device Access Complexity
Understanding and Improving Device Access ComplexityUnderstanding and Improving Device Access Complexity
Understanding and Improving Device Access Complexity
 
Master Serial Killer - DEF CON 22 - ICS Village
Master Serial Killer - DEF CON 22 - ICS VillageMaster Serial Killer - DEF CON 22 - ICS Village
Master Serial Killer - DEF CON 22 - ICS Village
 
OpManager training - Device discovery and classification.
OpManager training - Device discovery and classification.OpManager training - Device discovery and classification.
OpManager training - Device discovery and classification.
 
Effective Fault-Localization Techniques for Concurrent Software
Effective Fault-Localization Techniques for Concurrent SoftwareEffective Fault-Localization Techniques for Concurrent Software
Effective Fault-Localization Techniques for Concurrent Software
 
Seacon Continuous Delivery Pipeline Tools Track
Seacon Continuous Delivery Pipeline Tools TrackSeacon Continuous Delivery Pipeline Tools Track
Seacon Continuous Delivery Pipeline Tools Track
 
When Web Services Go Bad
When Web Services Go BadWhen Web Services Go Bad
When Web Services Go Bad
 
Object Tracking with Instance Matching and Online Learning
Object Tracking with Instance Matching and Online LearningObject Tracking with Instance Matching and Online Learning
Object Tracking with Instance Matching and Online Learning
 
Automatically Discovering, Reporting and Reproducing Android Application Crashes
Automatically Discovering, Reporting and Reproducing Android Application CrashesAutomatically Discovering, Reporting and Reproducing Android Application Crashes
Automatically Discovering, Reporting and Reproducing Android Application Crashes
 

More from Venkatesh Prasad Ranganath

SeMA: A Design Methodology for Building Secure Android Apps
SeMA: A Design Methodology for Building Secure Android AppsSeMA: A Design Methodology for Building Secure Android Apps
SeMA: A Design Methodology for Building Secure Android Apps
Venkatesh Prasad Ranganath
 
Are free Android app security analysis tools effective in detecting known vul...
Are free Android app security analysis tools effective in detecting known vul...Are free Android app security analysis tools effective in detecting known vul...
Are free Android app security analysis tools effective in detecting known vul...
Venkatesh Prasad Ranganath
 
Benchpress: Analyzing Android App Vulnerability Benchmark Suites
Benchpress:  Analyzing Android App Vulnerability Benchmark SuitesBenchpress:  Analyzing Android App Vulnerability Benchmark Suites
Benchpress: Analyzing Android App Vulnerability Benchmark Suites
Venkatesh Prasad Ranganath
 
Why do Users kill HPC Jobs?
Why do Users kill HPC Jobs?Why do Users kill HPC Jobs?
Why do Users kill HPC Jobs?
Venkatesh Prasad Ranganath
 
Behavior Driven Development [10] - Software Testing Techniques (CIS640)
Behavior Driven Development [10] - Software Testing Techniques (CIS640)Behavior Driven Development [10] - Software Testing Techniques (CIS640)
Behavior Driven Development [10] - Software Testing Techniques (CIS640)
Venkatesh Prasad Ranganath
 
Code Coverage [9] - Software Testing Techniques (CIS640)
Code Coverage [9] - Software Testing Techniques (CIS640)Code Coverage [9] - Software Testing Techniques (CIS640)
Code Coverage [9] - Software Testing Techniques (CIS640)
Venkatesh Prasad Ranganath
 
Equivalence Class Testing [8] - Software Testing Techniques (CIS640)
Equivalence Class Testing [8] - Software Testing Techniques (CIS640)Equivalence Class Testing [8] - Software Testing Techniques (CIS640)
Equivalence Class Testing [8] - Software Testing Techniques (CIS640)
Venkatesh Prasad Ranganath
 
Boundary Value Testing [7] - Software Testing Techniques (CIS640)
Boundary Value Testing [7] - Software Testing Techniques (CIS640)Boundary Value Testing [7] - Software Testing Techniques (CIS640)
Boundary Value Testing [7] - Software Testing Techniques (CIS640)
Venkatesh Prasad Ranganath
 
Property Based Testing [5] - Software Testing Techniques (CIS640)
Property Based Testing [5] - Software Testing Techniques (CIS640)Property Based Testing [5] - Software Testing Techniques (CIS640)
Property Based Testing [5] - Software Testing Techniques (CIS640)
Venkatesh Prasad Ranganath
 
Intro to Python3 [2] - Software Testing Techniques (CIS640)
Intro to Python3 [2] - Software Testing Techniques (CIS640)Intro to Python3 [2] - Software Testing Techniques (CIS640)
Intro to Python3 [2] - Software Testing Techniques (CIS640)
Venkatesh Prasad Ranganath
 
Unit testing [4] - Software Testing Techniques (CIS640)
Unit testing [4] - Software Testing Techniques (CIS640)Unit testing [4] - Software Testing Techniques (CIS640)
Unit testing [4] - Software Testing Techniques (CIS640)
Venkatesh Prasad Ranganath
 
Testing concepts [3] - Software Testing Techniques (CIS640)
Testing concepts [3] - Software Testing Techniques (CIS640)Testing concepts [3] - Software Testing Techniques (CIS640)
Testing concepts [3] - Software Testing Techniques (CIS640)
Venkatesh Prasad Ranganath
 
Introduction [1] - Software Testing Techniques (CIS640)
Introduction [1] - Software Testing Techniques (CIS640)Introduction [1] - Software Testing Techniques (CIS640)
Introduction [1] - Software Testing Techniques (CIS640)
Venkatesh Prasad Ranganath
 

More from Venkatesh Prasad Ranganath (13)

SeMA: A Design Methodology for Building Secure Android Apps
SeMA: A Design Methodology for Building Secure Android AppsSeMA: A Design Methodology for Building Secure Android Apps
SeMA: A Design Methodology for Building Secure Android Apps
 
Are free Android app security analysis tools effective in detecting known vul...
Are free Android app security analysis tools effective in detecting known vul...Are free Android app security analysis tools effective in detecting known vul...
Are free Android app security analysis tools effective in detecting known vul...
 
Benchpress: Analyzing Android App Vulnerability Benchmark Suites
Benchpress:  Analyzing Android App Vulnerability Benchmark SuitesBenchpress:  Analyzing Android App Vulnerability Benchmark Suites
Benchpress: Analyzing Android App Vulnerability Benchmark Suites
 
Why do Users kill HPC Jobs?
Why do Users kill HPC Jobs?Why do Users kill HPC Jobs?
Why do Users kill HPC Jobs?
 
Behavior Driven Development [10] - Software Testing Techniques (CIS640)
Behavior Driven Development [10] - Software Testing Techniques (CIS640)Behavior Driven Development [10] - Software Testing Techniques (CIS640)
Behavior Driven Development [10] - Software Testing Techniques (CIS640)
 
Code Coverage [9] - Software Testing Techniques (CIS640)
Code Coverage [9] - Software Testing Techniques (CIS640)Code Coverage [9] - Software Testing Techniques (CIS640)
Code Coverage [9] - Software Testing Techniques (CIS640)
 
Equivalence Class Testing [8] - Software Testing Techniques (CIS640)
Equivalence Class Testing [8] - Software Testing Techniques (CIS640)Equivalence Class Testing [8] - Software Testing Techniques (CIS640)
Equivalence Class Testing [8] - Software Testing Techniques (CIS640)
 
Boundary Value Testing [7] - Software Testing Techniques (CIS640)
Boundary Value Testing [7] - Software Testing Techniques (CIS640)Boundary Value Testing [7] - Software Testing Techniques (CIS640)
Boundary Value Testing [7] - Software Testing Techniques (CIS640)
 
Property Based Testing [5] - Software Testing Techniques (CIS640)
Property Based Testing [5] - Software Testing Techniques (CIS640)Property Based Testing [5] - Software Testing Techniques (CIS640)
Property Based Testing [5] - Software Testing Techniques (CIS640)
 
Intro to Python3 [2] - Software Testing Techniques (CIS640)
Intro to Python3 [2] - Software Testing Techniques (CIS640)Intro to Python3 [2] - Software Testing Techniques (CIS640)
Intro to Python3 [2] - Software Testing Techniques (CIS640)
 
Unit testing [4] - Software Testing Techniques (CIS640)
Unit testing [4] - Software Testing Techniques (CIS640)Unit testing [4] - Software Testing Techniques (CIS640)
Unit testing [4] - Software Testing Techniques (CIS640)
 
Testing concepts [3] - Software Testing Techniques (CIS640)
Testing concepts [3] - Software Testing Techniques (CIS640)Testing concepts [3] - Software Testing Techniques (CIS640)
Testing concepts [3] - Software Testing Techniques (CIS640)
 
Introduction [1] - Software Testing Techniques (CIS640)
Introduction [1] - Software Testing Techniques (CIS640)Introduction [1] - Software Testing Techniques (CIS640)
Introduction [1] - Software Testing Techniques (CIS640)
 

Recently uploaded

GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
aymanquadri279
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 

Recently uploaded (20)

GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 

Compatibility Testing using Patterns-based Trace Comparison

  • 1. Compatibility Testing using Patterns-based Trace Comparison Venkatesh-Prasad Ranganath, Kansas State University, USA Pradip Vallathol, University of Wisconsin-Madison, USA Pankaj Gupta, Microsoft Corporation, USA 29th IEEE/ACM International Conference on Automated Software Engineering (ASE 2014) September 15 - 19, 2014 Västerås, Sweden Thanks to Microsoft Research (India) and USB team (at Microsoft) for supporting this effort.
  • 3. Compatibility Testing: Syntactic Changes client.java! ! service.getProperty(“name”) ! service.java! ! void getProperty(PropertyId id) { … }!
  • 4. Compatibility Testing: Semantic Changes client1.c! ! s.q = c; f(&s); s.q = c; g(&s); ! client2.c! ! s.q = c; f(&s); ! g(&s); ! serviceV1.c! @pre s.q == c void f(Record *s) { … // no changes to s.q } ! @pre s.q == c void g(Record *s) { … }
  • 5. Compatibility Testing: Semantic Changes client1.c! ! s.q = c; f(&s); s.q = c; g(&s); ! client2.c! ! s.q = c; f(&s); ! g(&s); ! serviceV2.c! @pre s.q == c void f(Record *s) { … s.q = 0; } ! @pre s.q == c void g(Record *s) { … } Incorrect!!
  • 6. Common Reasons for Semantic Incompatibilities • Breaking semantic changes • Observational dependences and influences • Weak specifications • Assumptions
  • 7. Compatibility Testing of Windows USB drivers When a USB 2.0 device is plugged into a USB 3.0 port on Win8, will USB 3.0 driver in Win8 behave similar to the USB 2.0 stack in Win7 (along both soBware and hardware interfaces)? Mouse Driver USB 3.0 Driver Stack USB3 Controller Win8 Mouse Driver USB 2.0 Driver Stack USB2 Controller Win7 USB 2.0 Mouse USB 2.0 Mouse
  • 8. Why is it hard? • Clean room implementation of USB 3 driver • No part of USB 2 driver was reused • Regression tests were insufficient • Large testing surface • Number of unique USB devices • Possibilities in USB protocol • Multiple layers of variability • Device drivers, Controllers, & ASIC in devices
  • 9. Compatibility Testing of Windows USB drivers When a USB 2.0 device is plugged into a USB 3.0 port on Win8, will USB 3.0 driver in Win8 behave similar to the USB 2.0 stack in Win7 (along both soBware and hardware interfaces)? Mouse Driver USB 3.0 Driver Stack USB3 Controller Win8 Mouse Driver USB 2.0 Driver Stack USB2 Controller Win7 USB 2.0 Mouse USB 2.0 Mouse
  • 10. Compatibility Testing using Patterns-based Trace Comparison USB2 Logs Tark (Miner) USB2 Patterns USB3 Log Tark (Miner) USB3 Patterns IOCTLType=URB_FUNCTION_BULK_OR_INTERRUPT_TRA NSFER(0x09) && IoCallDriverReturn && IoCallDriverReturn.irql=2 && IoCallDriverReturn.status=0xC000000E USB2 Patterns USB3 Patterns Structural and Temporal Pattern Diffing DispatchIrp forward alternates with IrpCompletion && PreIoCompleteRequest when IOCTLType=IRP_MJ_PNP(0x1B),IRP_MN_START_DEVICE(0x00), irpID=SAME, and IrpSubmitDetails.irp.ioStackLocation.control=SAME
  • 11. Trace Collection Function Driver (Mouse Driver) Filter Driver USB Driver USB Controller USB Device (Mouse)
  • 12. Structural Patterns fopen 21=fopen(, “r”) 21=fopen 21 = fopen(“passwd.txt”, “r”) USB 2.0 driver completed isochronous requests at DISPATCH_LEVEL IRQ while USB 3.0 driver completed similar request at PASSIVE_LEVEL IRQ. Mining Quantified Temporal Rules: Formalism, Algorithms, and Evaluation, WCRE’09
  • 13. Temporal Patterns with Data Flow USB 3.0 driver failed to communicate the corresponding interface when serving a request to select a configuration of a device. interfaceHandle attribute remained unchanged. h=fopen .... fclose(h) (h!=0 && h=fopen) .... fclose(h) 21=fopen(, “r”) .... fclose(21) 21=fopen .... fclose(21) fopen .... fclose 21 = fopen(“passwd.txt”, “r”) .... fclose(21) Mining Quantified Temporal Rules: Formalism, Algorithms, and Evaluation, WCRE’09
  • 14. What is reported? Presence of previously unobserved patterns ! ! Absence of previously observed patterns Comment: This should be intersection
  • 15. Is it effective? We detected 14 unique bugs (25 bugs) by testing 14 devices with regression tested USB 3.0 driver.
  • 16. Is it expensive? • Worst case mining time was 115 minutes • Worst case diffing time was 48 minutes • Non-empty reports analysis took ~2 hours • Few reports required 24 hours
  • 17. Domain Knowledge # of attributes: 361 # of ignored attributes: 108 (361 - 108 = 253) # of necessary attributes: 29 (253 - 29 = 224) # of NULL abstracted attributes: 23 # of unquantifiable attributes: 75 # of quantifiable attributes: 150 # of data flows: 17 (between 26 attributes)
  • 18. User Feedback Device Known Detected Simplified Compacted Reported False +ve Structural Temporal 1 0 9844 932 478 478 11 + 454 6 / 9 4 / 4 2* 932 2545 121 63 15 0 + 11 1 / 1 1 / 3 3 965 743 41 21 4 1 + 0 0 / 0 1 / 3 4 965 1372 67 34 2 1 + 1 0 / 0 0 / 0 5* 2141 26118 1114 571 55 26 + 29 0 / 0 0 / 0 6 2141 26126 1054 541 0 0 + 0 0 / 0 0 / 0 7 2141 2320 84 44 0 0 + 0 0 / 0 0 / 0 8 2141 27804 1185 608 2 1 + 0 1 / 1 0 / 0 9 2141 34985 413 217 115 2 + 96 2 / 14 2 / 3 10 2141 51556 429 231 59 15 + 41 1 / 1 2 / 2 11 2141 695 35 18 0 0 + 0 0 / 0 0 / 0 12 2141 1372 67 34 0 0 + 0 0 / 0 0 / 0 13 2141 3315 122 72 24 19 + 4 1 / 1 0 / 0 14* 2141 9299 103 54 3 0 + 0 2 / 3 0 / 0
  • 19. Smart Presentation Device Known Detected Simplified Compacted Reported False +ve Structural Temporal 1 0 9844 932 478 478 11 + 454 6 / 9 4 / 4 2* 932 2545 121 63 15 0 + 11 1 / 1 1 / 3 3 965 743 41 21 4 1 + 0 0 / 0 1 / 3 4 965 1372 67 34 2 1 + 1 0 / 0 0 / 0 5* 2141 26118 1114 571 55 26 + 29 0 / 0 0 / 0 6 2141 26126 1054 541 0 0 + 0 0 / 0 0 / 0 7 2141 2320 84 44 0 0 + 0 0 / 0 0 / 0 8 2141 27804 1185 608 2 1 + 0 1 / 1 0 / 0 9 2141 34985 413 217 115 2 + 96 2 / 14 2 / 3 10 2141 51556 429 231 59 15 + 41 1 / 1 2 / 2 11 2141 695 35 18 0 0 + 0 0 / 0 0 / 0 12 2141 1372 67 34 0 0 + 0 0 / 0 0 / 0 13 2141 3315 122 72 24 19 + 4 1 / 1 0 / 0 14* 2141 9299 103 54 3 0 + 0 2 / 3 0 / 0
  • 20. Lessons Learned • If domain knowledge is available, use it • If a feedback loop can be established, set it up • Presentation matters • Embrace the unorthodox
  • 21. Limitations • Detects a class of incompatibilities
  • 22. Threats to Validity • Generalization needs more experiments • Effect of latent factors need to be studied
  • 23. Key Takeaways • An approach to compatibility testing via patterns-based trace comparison. • The use of structural and temporal patterns as trace abstractions to enable software engineering and maintenance tasks. • Of course, the lessons learned :)