This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug testsuite/4444] New: statfs failure in systemtap.syscalls


In ppc64 we used to see the statfs failure. This is due to differnce in expected
and actual strings.

Systemtap.log shows
==================================
statfs: ustat (42, 0x0000000012345678) = -22 (EINVAL)
statfs: statfs ("abc", 0x0000000012345678) = -2 (ENOENT)
statfs: fstatfs (77, 0x0000000012345678) = -9 (EBADF)
statfs: exit_group (0) =
  statfs: exit (0) =
--------- EXPECTED and NOT MATCHED ----------
statfs: ustat \(42, 0x12345678\) =
statfs: statfs \("abc", 0x12345678\) =
statfs: fstatfs \(77, 0x12345678\) =
======================================

Since address in 64-bit systems are always 8byte for both the 32-bit compiled
and 64 bit compiled executables, we should make sure that for 64-bit systems,
right value is being compared irrespective of 32-bit or 64-bit compilation.

So we should use "defined( __powerpc__) || defined(__x86_64__) " to identify the
64-bit system rather than "__WORDSIZE".

Test case shows 
===========================================

  ustat(42, (struct ustat *)0x12345678);
#if __WORDSIZE == 64
  // ustat (42, 0x0000000012345678) =
#else
  // ustat (42, 0x12345678) =
#endif

  statfs("abc", (struct statfs *)0x12345678);
#if __WORDSIZE == 64
  // statfs ("abc", 0x0000000012345678) =
#else
  // statfs ("abc", 0x12345678) =
#endif

  fstatfs(77, (struct statfs *)0x12345678);
#if __WORDSIZE == 64
  // fstatfs (77, 0x0000000012345678) =
#else
  // fstatfs (77, 0x12345678) =
#endif
======================================

Above should be modified as 
=======================================
ustat(42, (struct ustat *)0x12345678);
#if defined( __powerpc__) || defined(__x86_64__)
  // ustat (42, 0x0000000012345678) =
#else
  // ustat (42, 0x12345678) =
#endif

  statfs("abc", (struct statfs *)0x12345678);
#if defined( __powerpc__) || defined(__x86_64__)
  // statfs ("abc", 0x0000000012345678) =
#else
  // statfs ("abc", 0x12345678) =
#endif

  fstatfs(77, (struct statfs *)0x12345678);
#if defined( __powerpc__) || defined(__x86_64__)
  // fstatfs (77, 0x0000000012345678) =
#else
  // fstatfs (77, 0x12345678) =
#endif
=================================================

I have tested this successfully on my ppc64 system.

-- 
           Summary: statfs failure in systemtap.syscalls
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: srinivasa at in dot ibm dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=4444

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]