]> granicus.if.org Git - strace/commitdiff
Implement -e trace=%statfs option
authorAbhishek Tiwari <erabhishektiwarics@gmail.com>
Wed, 29 Mar 2017 09:03:34 +0000 (14:33 +0530)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 7 Apr 2017 01:21:36 +0000 (01:21 +0000)
linux/*/syscallent*.h part is modified automatically by:

sed -i 's/TF\(,[[:space:]]*SEN.*[_"]statv\?fs\)/TF|TSF\1/' \
linux/*/syscallent*.h

[ldv: rewritten trace_statfs.test using sched.test as a template]

* sysent.h (TRACE_STATFS): New macro.
* syscall.c: Alias TSF to TRACE_STATFS around syscallent.h inclusion.
* qualify.c (lookup_class): Add SCHED_STATFS for "%statfs".
* strace.1 (.SS Filtering): Add information about %statfs syscall class.
* NEWS: Mention this change.
* linux/64/syscallent.h (statfs): Add TSF flag.
* linux/aarch64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/32/syscallent.h (statfs64): Likewise.
* linux/arm/syscallent.h (statfs, statfs64): Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/crisv10/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* linux/alpha/syscallent.h (osf_statfs, osf_statfs64, statfs): Likewise.
* linux/mips/syscallent-compat.h (*_statfs, *_statvfs): Likewise.
* tests/trace_statfs.test: New test.
* tests/Makefile.am (DECODER_TESTS): Add it.
* tests/ksysent.c (TSF): New macro, defined to 0.
* tests/nsyscalls.c: Likewise.

37 files changed:
NEWS
linux/32/syscallent.h
linux/64/syscallent.h
linux/aarch64/syscallent.h
linux/alpha/syscallent.h
linux/arm/syscallent.h
linux/avr32/syscallent.h
linux/bfin/syscallent.h
linux/crisv10/syscallent.h
linux/hppa/syscallent.h
linux/i386/syscallent.h
linux/ia64/syscallent.h
linux/m68k/syscallent.h
linux/microblaze/syscallent.h
linux/mips/syscallent-compat.h
linux/mips/syscallent-n32.h
linux/mips/syscallent-n64.h
linux/mips/syscallent-o32.h
linux/powerpc/syscallent.h
linux/powerpc64/syscallent.h
linux/s390/syscallent.h
linux/s390x/syscallent.h
linux/sh/syscallent.h
linux/sh64/syscallent.h
linux/sparc/syscallent.h
linux/sparc64/syscallent.h
linux/x32/syscallent.h
linux/x86_64/syscallent.h
linux/xtensa/syscallent.h
qualify.c
strace.1
syscall.c
sysent.h
tests/Makefile.am
tests/ksysent.c
tests/nsyscalls.c
tests/trace_statfs.test [new file with mode: 0755]

diff --git a/NEWS b/NEWS
index 18d217ec9ff4f15f51cd4d225ce50564c65018e1..80e2031a40c0dcca014961659c1cb2f25d0a7b43 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ Noteworthy changes in release ?.?? (????-??-??)
   * Enhanced decoding of sched_setattr syscall.
   * Added -e trace=%sched option for tracing sched_* syscalls.
   * Added -e trace=%clock option for tracing clock_* syscalls.
+  * Added -e trace=%statfs option for tracing statfs, statfs64 and statvfs
+    syscalls.
   * Implemented decoding of signal mask in rt_sigreturn syscall on alpha, arc,
     arm, avr32, bfin, cris, hppa, m68k, metag, microblaze, mips, nios2, or1k,
     powerpc, powerpc64, riscv, sh, sh64, sparc, sparc64, tile, x86, and xtensa
index 236ac10e524c30a431210517a0b2729dcc814fad..530645f31178bf8b4099f2719c9b505380fb29a9 100644 (file)
@@ -44,7 +44,7 @@
 [ 40] = { 5,   TF,             SEN(mount),                     "mount"                 },
 [ 41] = { 2,   TF,             SEN(pivotroot),                 "pivot_root"            },
 [ 42] = { 3,   0,              SEN(nfsservctl),                "nfsservctl"            },
-[ 43] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[ 43] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [ 44] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [ 45] = { 3,   TF,             SEN(truncate64),                "truncate64"            },
 [ 46] = { 3,   TD,             SEN(ftruncate64),               "ftruncate64"           },
index e263bb012d7c9f532bff2052568067e0a70c4228..9d2edecffbefda6819fc88cfdbbb6eaf21a006c5 100644 (file)
@@ -41,7 +41,7 @@
 [ 40] = { 5,   TF,             SEN(mount),                     "mount"                 },
 [ 41] = { 2,   TF,             SEN(pivotroot),                 "pivot_root"            },
 [ 42] = { 3,   0,              SEN(nfsservctl),                "nfsservctl"            },
-[ 43] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[ 43] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [ 44] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [ 45] = { 2,   TF,             SEN(truncate),                  "truncate"              },
 [ 46] = { 2,   TD,             SEN(ftruncate),                 "ftruncate"             },
index 6b23f8c22bcd4fbfa5390a7ec8c16480bc8f4147..e760fdc49034040f88228593f4d7371d42888e0b 100644 (file)
@@ -45,7 +45,7 @@
 [1053] = { 4,  TD,             SEN(fadvise64),         "fadvise64"     },
 [1054] = { 4,  TD|TF,          SEN(newfstatat),        "newfstatat"    },
 [1055] = { 2,  TD,             SEN(fstatfs),           "fstatfs"       },
-[1056] = { 2,  TF,             SEN(statfs),            "statfs"        },
+[1056] = { 2,  TF|TSF,         SEN(statfs),            "statfs"        },
 [1057] = { 3,  TD,             SEN(lseek),             "lseek"         },
 [1058] = { 6,  TD|TM|SI,       SEN(mmap),              "mmap"          },
 [1059] = { 1,  0,              SEN(alarm),             "alarm"         },
index 8a427308c9038057fb07d80b8eb4274b7eb69dce..e8d21f3fa0402a86c3855aa8aeefd60b89fcca07 100644 (file)
 [157] = { 5,   0,              SEN(printargs),                 "osf_sigwaitprim"       }, /* not implemented */
 [158] = { 5,   0,              SEN(printargs),                 "osf_nfssvc"            }, /* not implemented */
 [159] = { 4,   0,              SEN(printargs),                 "osf_getdirentries"     },
-[160] = { 3,   TF,             SEN(osf_statfs),                "osf_statfs"            },
+[160] = { 3,   TF|TSF,         SEN(osf_statfs),                "osf_statfs"            },
 [161] = { 3,   TD,             SEN(osf_fstatfs),               "osf_fstatfs"           },
 [162] = { },
 [163] = { 5,   0,              SEN(printargs),                 "osf_asynch_daemon"     }, /* not implemented */
 [224] = { 2,   TF,             SEN(printargs),                 "osf_stat"              },
 [225] = { 2,   TF,             SEN(printargs),                 "osf_lstat"             },
 [226] = { 2,   TD,             SEN(printargs),                 "osf_fstat"             },
-[227] = { 3,   TF,             SEN(osf_statfs),                "osf_statfs64"          },
+[227] = { 3,   TF|TSF,         SEN(osf_statfs),                "osf_statfs64"          },
 [228] = { 3,   TD,             SEN(osf_fstatfs),               "osf_fstatfs64"         },
 [229 ... 232] = { },
 [233] = { 1,   0,              SEN(getpgid),                   "getpgid"               },
 [325] = { 1,   NF,             SEN(setfsuid),                  "setfsuid"              },
 [326] = { 1,   NF,             SEN(setfsgid),                  "setfsgid"              },
 [327] = { 2,   0,              SEN(ustat),                     "ustat"                 },
-[328] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[328] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [329] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [330] = { 2,   TSC,            SEN(sched_setparam),            "sched_setparam"        },
 [331] = { 2,   TSC,            SEN(sched_getparam),            "sched_getparam"        },
index 6444e4ff89a6b7bfbb58a699e3d278cf095a4b8b..749e02e1c946159f473c2eb1baf06910e05b59fd 100644 (file)
 [ 96] = { 2,   0,              SEN(getpriority),               "getpriority"           },
 [ 97] = { 3,   0,              SEN(setpriority),               "setpriority"           },
 [ 98] = { 4,   0,              SEN(profil),                    "profil"                },
-[ 99] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[ 99] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [100] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [101] = { 3,   0,              SEN(ioperm),                    "ioperm"                },
 [102] = { 2,   TD,             SEN(socketcall),                "socketcall"            },
 [263] = { 2,   TCL,            SEN(clock_gettime),             "clock_gettime"         },
 [264] = { 2,   TCL,            SEN(clock_getres),              "clock_getres"          },
 [265] = { 4,   TCL,            SEN(clock_nanosleep),           "clock_nanosleep"       },
-[266] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[266] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [267] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [268] = { 3,   TS,             SEN(tgkill),                    "tgkill"                },
 [269] = { 2,   TF,             SEN(utimes),                    "utimes"                },
index 84e409d193d977ce639843af6970806e34079615..9388cdbc736d53d615bbfe19c82fbeab0d78d398 100644 (file)
 [ 96] = { 2,   0,              SEN(getpriority),               "getpriority"           },
 [ 97] = { 3,   0,              SEN(setpriority),               "setpriority"           },
 [ 98] = { 4,   TP,             SEN(wait4),                     "wait4"                 },
-[ 99] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[ 99] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [100] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [101] = { 0,   0,              SEN(vhangup),                   "vhangup"               },
 [102] = { 2,   TS,             SEN(sigaltstack),               "sigaltstack"           },
 [216] = { 2,   TCL,            SEN(clock_gettime),             "clock_gettime"         },
 [217] = { 2,   TCL,            SEN(clock_getres),              "clock_getres"          },
 [218] = { 4,   TCL,            SEN(clock_nanosleep),           "clock_nanosleep"       },
-[219] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[219] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [220] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [221] = { 3,   TS,             SEN(tgkill),                    "tgkill"                },
 [222] = { },
index 83e49c2021d5359fc15fc676a476ac9854c8c7c1..c7fab128d23b62193fe060f257717e07303371e9 100644 (file)
 [ 96] = { 2,   0,              SEN(getpriority),               "getpriority"           },
 [ 97] = { 3,   0,              SEN(setpriority),               "setpriority"           },
 [ 98] = { 4,   0,              SEN(profil),                    "profil"                },
-[ 99] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[ 99] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [100] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [101] = { 3,   0,              SEN(ioperm),                    "ioperm"                },
 [102] = { 2,   TD,             SEN(socketcall),                "socketcall"            },
 [266] = { 2,   TCL,            SEN(clock_gettime),             "clock_gettime"         },
 [267] = { 2,   TCL,            SEN(clock_getres),              "clock_getres"          },
 [268] = { 4,   TCL,            SEN(clock_nanosleep),           "clock_nanosleep"       },
-[269] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[269] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [270] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [271] = { 3,   TS,             SEN(tgkill),                    "tgkill"                },
 [272] = { 2,   TF,             SEN(utimes),                    "utimes"                },
index a66792d0d343d21a1402afc2fae63b543b9780d2..42a91f3eb13e54135096069cb52495138b9558a7 100644 (file)
@@ -97,7 +97,7 @@
 [ 96] = { 2,   0,              SEN(getpriority),               "getpriority"           },
 [ 97] = { 3,   0,              SEN(setpriority),               "setpriority"           },
 [ 98] = { 4,   0,              SEN(profil),                    "profil"                },
-[ 99] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[ 99] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [100] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [101] = { 3,   0,              SEN(ioperm),                    "ioperm"                },
 [102] = { 2,   TD,             SEN(socketcall),                "socketcall"            },
 [265] = { 2,   TCL,            SEN(clock_gettime),             "clock_gettime"         },
 [266] = { 2,   TCL,            SEN(clock_getres),              "clock_getres"          },
 [267] = { 4,   TCL,            SEN(clock_nanosleep),           "clock_nanosleep"       },
-[268] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[268] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [269] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [270] = { 3,   TS,             SEN(tgkill),                    "tgkill"                },
 [271] = { 2,   TF,             SEN(utimes),                    "utimes"                },
index f95944d254450ca34044d8be3dd346e852497ec6..28cfd9d314f4aba67d50a1eea29f1d5fc7880b9c 100644 (file)
 [ 96] = { 2,   0,              SEN(getpriority),               "getpriority"           },
 [ 97] = { 3,   0,              SEN(setpriority),               "setpriority"           },
 [ 98] = { 4,   TN,             SEN(recv),                      "recv"                  },
-[ 99] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[ 99] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [100] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [101] = { 2,   TF,             SEN(stat64),                    "stat64"                },
 [102] = { },
 [295] = { 6,   TM,             SEN(move_pages),                "move_pages"            },
 [296] = { 3,   0,              SEN(getcpu),                    "getcpu"                },
 [297] = { 6,   TD,             SEN(epoll_pwait),               "epoll_pwait"           },
-[298] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[298] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [299] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [300] = { 4,   0,              SEN(kexec_load),                "kexec_load"            },
 [301] = { 4,   TD|TF,          SEN(utimensat),                 "utimensat"             },
index 7966eb1df9e36e3926748666135c878c52803655..6222ac55386bd485b6bb16e6b8a4ca270200b4e1 100644 (file)
 [ 96] = { 2,   0,              SEN(getpriority),               "getpriority"           },
 [ 97] = { 3,   0,              SEN(setpriority),               "setpriority"           },
 [ 98] = { 4,   0,              SEN(profil),                    "profil"                },
-[ 99] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[ 99] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [100] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [101] = { 3,   0,              SEN(ioperm),                    "ioperm"                },
 [102] = { 2,   TD,             SEN(socketcall),                "socketcall"            },
 [265] = { 2,   TCL,            SEN(clock_gettime),             "clock_gettime"         },
 [266] = { 2,   TCL,            SEN(clock_getres),              "clock_getres"          },
 [267] = { 4,   TCL,            SEN(clock_nanosleep),           "clock_nanosleep"       },
-[268] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[268] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [269] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [270] = { 3,   TS,             SEN(tgkill),                    "tgkill"                },
 [271] = { 2,   TF,             SEN(utimes),                    "utimes"                },
index c226bc6ee971b15a3a19a334b14acced308d03a5..110622cc979aeb2b8192f1b4bd85695d812823fa 100644 (file)
 [1100] = { 3,  TD,             SEN(fchown),                    "fchown"                },
 [1101] = { 2,  0,              SEN(getpriority),               "getpriority"           },
 [1102] = { 3,  0,              SEN(setpriority),               "setpriority"           },
-[1103] = { 2,  TF,             SEN(statfs),                    "statfs"                },
+[1103] = { 2,  TF|TSF,         SEN(statfs),                    "statfs"                },
 [1104] = { 2,  TD,             SEN(fstatfs),                   "fstatfs"               },
 [1105] = { 0,  NF,             SEN(gettid),                    "gettid"                },
 [1106] = { 3,  TI,             SEN(semget),                    "semget"                },
 [1255] = { 2,  TCL,            SEN(clock_getres),              "clock_getres"          },
 [1256] = { 4,  TCL,            SEN(clock_nanosleep),           "clock_nanosleep"       },
 [1257] = { 3,  TD,             SEN(fstatfs64),                 "fstatfs64"             },
-[1258] = { 3,  TF,             SEN(statfs64),                  "statfs64"              },
+[1258] = { 3,  TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [1259] = { 6,  TM,             SEN(mbind),                     "mbind"                 },
 [1260] = { 5,  TM,             SEN(get_mempolicy),             "get_mempolicy"         },
 [1261] = { 3,  TM,             SEN(set_mempolicy),             "set_mempolicy"         },
index 0364ab970399058f7953a1a724ab9cedca25c836..b22f6a183c54dfa69f2b21190e48a990863a973b 100644 (file)
 [ 96] = { 2,   0,              SEN(getpriority),               "getpriority"           },
 [ 97] = { 3,   0,              SEN(setpriority),               "setpriority"           },
 [ 98] = { 4,   0,              SEN(profil),                    "profil"                },
-[ 99] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[ 99] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [100] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [101] = { 3,   0,              SEN(ioperm),                    "ioperm"                },
 [102] = { 2,   TD,             SEN(socketcall),                "socketcall"            },
 [260] = { 2,   TCL,            SEN(clock_gettime),             "clock_gettime"         },
 [261] = { 2,   TCL,            SEN(clock_getres),              "clock_getres"          },
 [262] = { 4,   TCL,            SEN(clock_nanosleep),           "clock_nanosleep"       },
-[263] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[263] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [264] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [265] = { 3,   TS,             SEN(tgkill),                    "tgkill"                },
 [266] = { 2,   TF,             SEN(utimes),                    "utimes"                },
index e7cb98c5a7bf98b652856d821841e200df06367e..2b873c7994d2d1b9809f4b3b2428ab288f4bcb12 100644 (file)
 [ 96] = { 2,   0,              SEN(getpriority),               "getpriority"           },
 [ 97] = { 3,   0,              SEN(setpriority),               "setpriority"           },
 [ 98] = { 4,   0,              SEN(profil),                    "profil"                },
-[ 99] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[ 99] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [100] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [101] = { 3,   0,              SEN(ioperm),                    "ioperm"                },
 [102] = { 2,   TD,             SEN(socketcall),                "socketcall"            },
 [265] = { 2,   TCL,            SEN(clock_gettime),             "clock_gettime"         },
 [266] = { 2,   TCL,            SEN(clock_getres),              "clock_getres"          },
 [267] = { 4,   TCL,            SEN(clock_nanosleep),           "clock_nanosleep"       },
-[268] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[268] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [269] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [270] = { 3,   TS,             SEN(tgkill),                    "tgkill"                },
 [271] = { 2,   TF,             SEN(utimes),                    "utimes"                },
index 5d44918482aff82fe781d5cef029f472568dca8f..c30b00c96a3fc19548e29ce2d8ba4cd9a772460c 100644 (file)
@@ -33,7 +33,7 @@
 [  32] = { 0,  0,      SEN(printargs),         "svr4_gtty"     },
 [  33] = { 0,  0,      SEN(printargs),         "svr4_access"   },
 [  34] = { 0,  0,      SEN(printargs),         "svr4_nice"     },
-[  35] = { 0,  TF,     SEN(printargs),         "svr4_statfs"   },
+[  35] = { 0,  TF|TSF, SEN(printargs),         "svr4_statfs"   },
 [  36] = { 0,  0,      SEN(printargs),         "svr4_sync"     },
 [  37] = { 0,  0,      SEN(printargs),         "svr4_kill"     },
 [  38] = { 0,  TD,     SEN(printargs),         "svr4_fstatfs"  },
@@ -96,7 +96,7 @@
 [ 100] = { 0,  0,      SEN(printargs),         "svr4_setcontext"       },
 [ 101] = { 0,  0,      SEN(printargs),         "svr4_evsys"    },
 [ 102] = { 0,  0,      SEN(printargs),         "svr4_evtrapret"        },
-[ 103] = { 0,  TF,     SEN(printargs),         "svr4_statvfs"  },
+[ 103] = { 0,  TF|TSF, SEN(printargs),         "svr4_statvfs"  },
 [ 104] = { 0,  TD,     SEN(printargs),         "svr4_fstatvfs" },
 [ 105] = { },
 [ 106] = { 0,  0,      SEN(printargs),         "svr4_nfssys"   },
 [1032] = { 0,  0,      SEN(printargs),         "sysv_gtty"     },
 [1033] = { 0,  0,      SEN(printargs),         "sysv_access"   },
 [1034] = { 0,  0,      SEN(printargs),         "sysv_nice"     },
-[1035] = { 0,  TF,     SEN(printargs),         "sysv_statfs"   },
+[1035] = { 0,  TF|TSF, SEN(printargs),         "sysv_statfs"   },
 [1036] = { 0,  0,      SEN(printargs),         "sysv_sync"     },
 [1037] = { 0,  0,      SEN(printargs),         "sysv_kill"     },
 [1038] = { 0,  TD,     SEN(printargs),         "sysv_fstatfs"  },
 [1171] = { 0,  0,      SEN(printargs),         "sysv_sigstack" },
 [1172] = { 0,  0,      SEN(printargs),         "sysv_sigaltstack"      },
 [1173] = { 0,  0,      SEN(printargs),         "sysv_sigsendset"       },
-[1174] = { 0,  TF,     SEN(printargs),         "sysv_statvfs"  },
+[1174] = { 0,  TF|TSF, SEN(printargs),         "sysv_statvfs"  },
 [1175] = { 0,  TD,     SEN(printargs),         "sysv_fstatvfs" },
 [1176] = { 0,  0,      SEN(printargs),         "sysv_getpmsg"  },
 [1177] = { 0,  0,      SEN(printargs),         "sysv_putpmsg"  },
 [2157] = { 0,  0,      SEN(printargs),         "bsd43_nfs_mount"       },
 [2158] = { 0,  0,      SEN(printargs),         "bsd43_nfs_svc" },
 [2159] = { 0,  0,      SEN(printargs),         "bsd43_getdirentries"   },
-[2160] = { 0,  TF,     SEN(printargs),         "bsd43_statfs"  },
+[2160] = { 0,  TF|TSF, SEN(printargs),         "bsd43_statfs"  },
 [2161] = { 0,  TD,     SEN(printargs),         "bsd43_fstatfs" },
 [2162] = { 0,  0,      SEN(printargs),         "bsd43_unmount" },
 [2163] = { 0,  0,      SEN(printargs),         "bsd43_async_daemon"    },
 [3032] = { 0,  0,      SEN(printargs),         "posix_gtty"    },
 [3033] = { 0,  0,      SEN(printargs),         "posix_access"  },
 [3034] = { 0,  0,      SEN(printargs),         "posix_nice"    },
-[3035] = { 0,  TF,     SEN(printargs),         "posix_statfs"  },
+[3035] = { 0,  TF|TSF, SEN(printargs),         "posix_statfs"  },
 [3036] = { 0,  0,      SEN(printargs),         "posix_sync"    },
 [3037] = { 0,  0,      SEN(printargs),         "posix_kill"    },
 [3038] = { 0,  TD,     SEN(printargs),         "posix_fstatfs" },
index bce788fbcde1c1f1edbb40b98fe57b0dd268cda9..9a08c898f876002abc5bd541b3b20fa36b4dea09 100644 (file)
 [6131] = { 3,  TF,             SEN(mknod),                     "mknod"                 },
 [6132] = { 1,  NF,             SEN(personality),               "personality"           },
 [6133] = { 2,  0,              SEN(ustat),                     "ustat"                 },
-[6134] = { 2,  TF,             SEN(statfs),                    "statfs"                },
+[6134] = { 2,  TF|TSF,         SEN(statfs),                    "statfs"                },
 [6135] = { 2,  TD,             SEN(fstatfs),                   "fstatfs"               },
 [6136] = { 3,  0,              SEN(sysfs),                     "sysfs"                 },
 [6137] = { 2,  0,              SEN(getpriority),               "getpriority"           },
 [6214] = { 0,  0,              SEN(restart_syscall),           "restart_syscall"       },
 [6215] = { 4,  TI,             SEN(semtimedop),                "semtimedop"            },
 [6216] = { 4,  TD,             SEN(fadvise64_64),              "fadvise64"             },
-[6217] = { 3,  TF,             SEN(statfs64),                  "statfs64"              },
+[6217] = { 3,  TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [6218] = { 3,  TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [6219] = { 4,  TD|TN,          SEN(sendfile64),                "sendfile64"            },
 [6220] = { 3,  0,              SEN(timer_create),              "timer_create"          },
index 37c20240cbbc501d9b81c19880cbd28036c5e1cc..7f8273a7bf64e1d5dea60a8bda0c34d1dedace39 100644 (file)
 [5131] = { 3,  TF,             SEN(mknod),                     "mknod"                 },
 [5132] = { 1,  NF,             SEN(personality),               "personality"           },
 [5133] = { 2,  0,              SEN(ustat),                     "ustat"                 },
-[5134] = { 2,  TF,             SEN(statfs),                    "statfs"                },
+[5134] = { 2,  TF|TSF,         SEN(statfs),                    "statfs"                },
 [5135] = { 2,  TD,             SEN(fstatfs),                   "fstatfs"               },
 [5136] = { 3,  0,              SEN(sysfs),                     "sysfs"                 },
 [5137] = { 2,  0,              SEN(getpriority),               "getpriority"           },
index 4e5797ea2fe8d86e219a59fedd6e651c5580b0c2..58ba621127a485f503300e263e72f012ace472b5 100644 (file)
@@ -99,7 +99,7 @@
 [4096] = { 2,  0,              SEN(getpriority),               "getpriority"           },
 [4097] = { 3,  0,              SEN(setpriority),               "setpriority"           },
 [4098] = { 0,  0,              SEN(profil),                    "profil"                },
-[4099] = { 2,  TF,             SEN(statfs),                    "statfs"                },
+[4099] = { 2,  TF|TSF,         SEN(statfs),                    "statfs"                },
 [4100] = { 2,  TD,             SEN(fstatfs),                   "fstatfs"               },
 [4101] = { 3,  0,              SEN(ioperm),                    "ioperm"                },
 [4102] = { 2,  TD,             SEN(socketcall),                "socketcall"            },
 [4252] = { 1,  0,              SEN(set_tid_address),           "set_tid_address"       },
 [4253] = { 0,  0,              SEN(restart_syscall),           "restart_syscall"       },
 [4254] = { 7,  TD,             SEN(fadvise64_64),              "fadvise64"             },
-[4255] = { 3,  TF,             SEN(statfs64),                  "statfs64"              },
+[4255] = { 3,  TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [4256] = { 3,  TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [4257] = { 3,  0,              SEN(timer_create),              "timer_create"          },
 [4258] = { 4,  0,              SEN(timer_settime),             "timer_settime"         },
index 86e3a3f6e21f8ae1da566c7629fd5ca8b88d91bc..d8dd2f63e47048cf5a87107a9aa76181d518b3ca 100644 (file)
 [ 96] = { 2,   0,              SEN(getpriority),               "getpriority"           },
 [ 97] = { 3,   0,              SEN(setpriority),               "setpriority"           },
 [ 98] = { 4,   0,              SEN(profil),                    "profil"                },
-[ 99] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[ 99] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [100] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [101] = { 3,   0,              SEN(ioperm),                    "ioperm"                },
 [102] = { 2,   TD,             SEN(socketcall),                "socketcall"            },
 [249] = { 2,   0,              SEN(printargs),                 "swapcontext"           },
 [250] = { 3,   TS,             SEN(tgkill),                    "tgkill"                },
 [251] = { 2,   TF,             SEN(utimes),                    "utimes"                },
-[252] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[252] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [253] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [254] = { 6,   TD,             SEN(fadvise64_64),              "fadvise64_64"          },
 [255] = { 1,   0,              SEN(printargs),                 "rtas"                  },
index 77f91fa6e4f4b29de0c2e57d4cce2c4a1e092917..18d5af2adb9afd1650febf9b61ffd7964c09e8e0 100644 (file)
 [ 96] = { 2,   0,              SEN(getpriority),               "getpriority"           },
 [ 97] = { 3,   0,              SEN(setpriority),               "setpriority"           },
 [ 98] = { 4,   0,              SEN(profil),                    "profil"                },
-[ 99] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[ 99] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [100] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [101] = { 3,   0,              SEN(ioperm),                    "ioperm"                },
 [102] = { 2,   TD,             SEN(socketcall),                "socketcall"            },
 [249] = { 2,   0,              SEN(printargs),                 "swapcontext"           },
 [250] = { 3,   TS,             SEN(tgkill),                    "tgkill"                },
 [251] = { 2,   TF,             SEN(utimes),                    "utimes"                },
-[252] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[252] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [253] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [254] = { },
 [255] = { 1,   0,              SEN(printargs),                 "rtas"                  },
index 3b5dc5b07d4b1a658c5c377fa450505277d4a007..009a700b9dc5cacf87d347b07384cd9db0be4f8a 100644 (file)
 [ 96] = { 2,   0,              SEN(getpriority),               "getpriority"           },
 [ 97] = { 3,   0,              SEN(setpriority),               "setpriority"           },
 [ 98] = { },
-[ 99] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[ 99] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [100] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [101] = { 3,   0,              SEN(ioperm),                    "ioperm"                },
 [102] = { 2,   TD,             SEN(socketcall),                "socketcall"            },
 [262] = { 4,   TCL,            SEN(clock_nanosleep),           "clock_nanosleep"       },
 [263] = { 5,   0,              SEN(vserver),                   "vserver"               },
 [264] = { 6,   TD,             SEN(fadvise64_64),              "fadvise64_64"          },
-[265] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[265] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [266] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [267] = { 5,   TM|SI,          SEN(remap_file_pages),          "remap_file_pages"      },
 [268] = { 6,   TM,             SEN(mbind),                     "mbind"                 },
index 0e82385ac4f1ec96f036c695ee8e57dda03db2d6..d71b09351159e676cd2a713363181a7d4a16fc67 100644 (file)
 [ 96] = { 2,   0,              SEN(getpriority),               "getpriority"           },
 [ 97] = { 3,   0,              SEN(setpriority),               "setpriority"           },
 [ 98] = { },
-[ 99] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[ 99] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [100] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [101] = { },
 [102] = { 2,   TD,             SEN(socketcall),                "socketcall"            },
 [262] = { 4,   TCL,            SEN(clock_nanosleep),           "clock_nanosleep"       },
 [263] = { 5,   0,              SEN(vserver),                   "vserver"               },
 [264] = { },
-[265] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[265] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [266] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [267] = { 5,   TM|SI,          SEN(remap_file_pages),          "remap_file_pages"      },
 [268] = { 6,   TM,             SEN(mbind),                     "mbind"                 },
index 92ec42246b08cbb24809807f5179d35e07f3446d..7e95c84dcb75954024d285615b46b67ff4f512a2 100644 (file)
 [ 96] = { 2,   0,              SEN(getpriority),               "getpriority"           },
 [ 97] = { 3,   0,              SEN(setpriority),               "setpriority"           },
 [ 98] = { 4,   0,              SEN(profil),                    "profil"                },
-[ 99] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[ 99] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [100] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [101] = { 3,   0,              SEN(ioperm),                    "ioperm"                },
 [102] = { 2,   TD,             SEN(socketcall),                "socketcall"            },
 [265] = { 2,   TCL,            SEN(clock_gettime),             "clock_gettime"         },
 [266] = { 2,   TCL,            SEN(clock_getres),              "clock_getres"          },
 [267] = { 4,   TCL,            SEN(clock_nanosleep),           "clock_nanosleep"       },
-[268] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[268] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [269] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [270] = { 3,   TS,             SEN(tgkill),                    "tgkill"                },
 [271] = { 2,   TF,             SEN(utimes),                    "utimes"                },
index cf64fe4edb1880e9e857f3278f303c36b14f5d77..3d8f9806f4a8548210ce5ed271dd321487a88866 100644 (file)
 [ 96] = { 2,   0,              SEN(getpriority),               "getpriority"           },
 [ 97] = { 3,   0,              SEN(setpriority),               "setpriority"           },
 [ 98] = { 4,   0,              SEN(profil),                    "profil"                },
-[ 99] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[ 99] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [100] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [101] = { 3,   0,              SEN(ioperm),                    "ioperm"                },
 [102] = { 2,   TD,             SEN(socketcall),                "socketcall"            },
 [293] = { 2,   TCL,            SEN(clock_gettime),             "clock_gettime"         },
 [294] = { 2,   TCL,            SEN(clock_getres),              "clock_getres"          },
 [295] = { 4,   TCL,            SEN(clock_nanosleep),           "clock_nanosleep"       },
-[296] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[296] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [297] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [298] = { 3,   TS,             SEN(tgkill),                    "tgkill"                },
 [299] = { 2,   TF,             SEN(utimes),                    "utimes"                },
index 3c3c94629c5a24f9cb891df05d83c18b29336a93..346c26e1d7d0609688b8f8c1e5e4d8f801f80e00 100644 (file)
 [154] = { 3,   TD,             SEN(getdents64),                "getdents64"            },
 [155] = { 3,   TD,             SEN(fcntl64),                   "fcntl64"               },
 [156] = { 2,   TD,             SEN(inotify_rm_watch),          "inotify_rm_watch"      },
-[157] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[157] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [158] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [159] = { 1,   TF,             SEN(umount),                    "umount"                },
 [160] = { 3,   TSC,            SEN(sched_setaffinity),         "sched_set_affinity"    },
 [231] = { 1,   0,              SEN(time),                      "time"                  },
 [232] = { 6,   TD,             SEN(splice),                    "splice"                },
 [233] = { 1,   0,              SEN(stime),                     "stime"                 },
-[234] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[234] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [235] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [236] = { 5,   TD,             SEN(llseek),                    "_llseek"               },
 [237] = { 2,   TM,             SEN(mlock),                     "mlock"                 },
index be6a3d9916756e05b82dd372ec66c0d375181b28..ba53df459a5e5137ad9e235f426404da5f08e84f 100644 (file)
 [154] = { 3,   TD,             SEN(getdents64),                "getdents64"            },
 [155] = { },
 [156] = { 2,   TD,             SEN(inotify_rm_watch),          "inotify_rm_watch"      },
-[157] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[157] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [158] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [159] = { 1,   TF,             SEN(umount),                    "umount"                },
 [160] = { 3,   TSC,            SEN(sched_setaffinity),         "sched_set_affinity"    },
 [231] = { },
 [232] = { 6,   TD,             SEN(splice),                    "splice"                },
 [233] = { 1,   0,              SEN(stime),                     "stime"                 },
-[234] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[234] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [235] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [236] = { 5,   TD,             SEN(llseek),                    "_llseek"               },
 [237] = { 2,   TM,             SEN(mlock),                     "mlock"                 },
index f8be3253a41cc4e8e67831ba9b196a1df71607b3..a36305749a7966aa334b14d88133a5ca636f95ab 100644 (file)
 [134] = { 1,   TF,             SEN(printargs),                 "64:uselib"             },
 [135] = { 1,   NF,             SEN(personality),               "personality"           },
 [136] = { 2,   0,              SEN(ustat),                     "ustat"                 },
-[137] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[137] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [138] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [139] = { 3,   0,              SEN(sysfs),                     "sysfs"                 },
 [140] = { 2,   0,              SEN(getpriority),               "getpriority"           },
index 2aa20bd93ec07b5910c9ddb7f81ba19e311e7e08..46bea58c5327c44805e254d5810f3a52b3283b2f 100644 (file)
 [134] = { 1,   TF,             SEN(uselib),                    "uselib"                },
 [135] = { 1,   NF,             SEN(personality),               "personality"           },
 [136] = { 2,   0,              SEN(ustat),                     "ustat"                 },
-[137] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[137] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [138] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
 [139] = { 3,   0,              SEN(sysfs),                     "sysfs"                 },
 [140] = { 2,   0,              SEN(getpriority),               "getpriority"           },
index 21dea9fd3470078dde072c29991754ac3014c490..2215b6ab7e80419bdbc9037edd123dc99f8a8d7a 100644 (file)
 [181] = { 1,   NF,             SEN(setfsgid),                  "setfsgid"              },
 [182] = { 3,   0,              SEN(sysfs),                     "sysfs"                 },
 [183] = { 2,   0,              SEN(ustat),                     "ustat"                 },
-[184] = { 2,   TF,             SEN(statfs),                    "statfs"                },
+[184] = { 2,   TF|TSF,         SEN(statfs),                    "statfs"                },
 [185] = { 2,   TD,             SEN(fstatfs),                   "fstatfs"               },
-[186] = { 3,   TF,             SEN(statfs64),                  "statfs64"              },
+[186] = { 3,   TF|TSF,         SEN(statfs64),                  "statfs64"              },
 [187] = { 3,   TD,             SEN(fstatfs64),                 "fstatfs64"             },
 [188] = { 2,   0,              SEN(setrlimit),                 "setrlimit"             },
 [189] = { 2,   0,              SEN(getrlimit),                 "getrlimit"             },
index 6ab3033913b3d7461f0ac4820498946669376609..157d3138158b1910628c4f8a19b303ec3ace635c 100644 (file)
--- a/qualify.c
+++ b/qualify.c
@@ -221,6 +221,7 @@ lookup_class(const char *s)
                { "%network",   TRACE_NETWORK   },
                { "%sched",     TRACE_SCHED     },
                { "%clock",     TRACE_CLOCK     },
+               { "%statfs",    TRACE_STATFS    },
        };
 
        unsigned int i;
index 0c0f1a7ab50494287e0544fa7473c6a3bd096264..84ff4ee8667c30dcc7e5412b5656766bdc4d55ee 100644 (file)
--- a/strace.1
+++ b/strace.1
@@ -432,6 +432,9 @@ Trace all scheduler-related (sched_*) system calls.
 .BR "\-e\ trace" = %clock
 Trace all clock-related (clock_*) system calls.
 .TP
+.BR "\-e\ trace" = %statfs
+Trace statfs, statfs64, and statvfs system calls.
+.TP
 \fB\-e\ abbrev\fR=\,\fIset\fR
 Abbreviate the output from printing each member of large structures.
 The default is
index 5ca46d1e26b76f10d99d949a85d5f22010c05d46..36d57fb6173273696edd4ec900f11acb6ba9d582 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -78,6 +78,7 @@
 #define TM TRACE_MEMORY
 #define TSC TRACE_SCHED
 #define TCL TRACE_CLOCK
+#define TSF TRACE_STATFS
 #define NF SYSCALL_NEVER_FAILS
 #define MA MAX_ARGS
 #define SI STACKTRACE_INVALIDATE_CACHE
@@ -115,6 +116,7 @@ static const struct_sysent sysent2[] = {
 #undef TM
 #undef TSC
 #undef TCL
+#undef TSF
 #undef NF
 #undef MA
 #undef SI
index 53a4a0a843c7286fac6c75620f58b57673134126..dce9188bf6d591e3a9f995ee17b20ce76afb10b7 100644 (file)
--- a/sysent.h
+++ b/sysent.h
@@ -23,5 +23,6 @@ typedef struct sysent {
 #define COMPAT_SYSCALL_TYPES   04000   /* A compat syscall that uses compat types. */
 #define TRACE_SCHED            010000  /* Trace scheduler-related syscalls. */
 #define TRACE_CLOCK            020000  /* Trace clock-related syscalls. */
+#define TRACE_STATFS           040000  /* Trace statfs, statfs64, and statvfs syscalls. */
 
 #endif /* !STRACE_SYSENT_H */
index a1b4d9df35684e5a9baaa23d52a00207a2f11fa3..96dcb6eea5a36df996ca09345c7df3f8a117be58 100644 (file)
@@ -542,6 +542,7 @@ DECODER_TESTS = \
        sigaltstack.test \
        statfs.test \
        sun_path.test \
+       trace_statfs.test \
        uio.test \
        umount.test \
        umount2.test \
index 724136925e5a0f44c29ea87a48d5b91b6c51f596..1b210e6d1d07b33f5d9dad83d8456c080e6b2263 100644 (file)
@@ -42,6 +42,7 @@
 #define TM 0
 #define TSC 0
 #define TCL 0
+#define TSF 0
 #define NF 0
 #define MA 0
 #define SI 0
index 1094389888e016190f54dc4f40e03ffc1e58d4a2..b060bd1b3dcf06440359c2368be33421e1429359 100644 (file)
@@ -43,6 +43,7 @@
 #define TM 0
 #define TSC 0
 #define TCL 0
+#define TSF 0
 #define NF 0
 #define MA 0
 #define SI 0
diff --git a/tests/trace_statfs.test b/tests/trace_statfs.test
new file mode 100755 (executable)
index 0000000..df213b9
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# Check -e trace=%statfs option.
+#
+# Copyright (c) 2017 The strace developers.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+#    derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+. "${srcdir=.}/init.sh"
+
+while read w s; do {
+       try_run_prog "../$s" || continue
+       run_strace -a$w -e%statfs ../$s > "$EXP"
+       match_diff "$LOG" "$EXP"
+} < /dev/null; done << EOF
+17 statfs
+23 statfs64
+EOF
+
+grep -E -v '^(#|statfs)' \
+       < "$srcdir/pure_executables.list" > negative.list
+
+while read s; do {
+       try_run_prog "../$s" || continue
+       run_strace -qq -esignal=none -e%statfs ../$s > /dev/null
+       match_diff "$LOG" /dev/null
+} < /dev/null; done < negative.list