~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to tests/tail-2/inotify-rotate.sh

  • Committer: Colin Watson
  • Date: 2013-10-30 15:48:33 UTC
  • mfrom: (8.3.5 sid)
  • Revision ID: cjwatson@canonical.com-20131030154833-xdt6e1yfffqom1c4
merge from Debian 8.21-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
# ensure that tail -F handles rotation
3
3
 
4
 
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
 
4
# Copyright (C) 2009-2013 Free Software Foundation, Inc.
5
5
 
6
6
# This program is free software: you can redistribute it and/or modify
7
7
# it under the terms of the GNU General Public License as published by
47
47
    # Normally less than a second is required here, but with heavy load
48
48
    # and a lot of disk activity, even 20 seconds is insufficient, which
49
49
    # leads to this timeout killing tail before the "ok" is written below.
50
 
    :>k && :>x && timeout 40 tail -F k > out 2>&1 &
 
50
    :>k && :>x || framework_failure_ failed to initialize files
 
51
    timeout 40 tail -F k > out 2>&1 &
51
52
    pid=$!
52
53
    sleep .1
53
54
    echo b > k;
65
66
    test $found = 0 && { cat out; fail_ failed to detect echoed '"ok"'; }
66
67
done
67
68
 
 
69
wait
68
70
Exit $fail