mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-27 12:15:08 +00:00
Make inotify-based universal variable notifier tests pass
This commit is contained in:
parent
8cbd66b0f9
commit
7e44bcfd8a
2 changed files with 3 additions and 1 deletions
|
@ -1665,7 +1665,7 @@ public:
|
||||||
{
|
{
|
||||||
struct inotify_event evt = {};
|
struct inotify_event evt = {};
|
||||||
ssize_t read_amt = read(watch_fd, &evt, sizeof evt);
|
ssize_t read_amt = read(watch_fd, &evt, sizeof evt);
|
||||||
if (read_amt >= sizeof evt)
|
if (read_amt >= (ssize_t)sizeof evt)
|
||||||
{
|
{
|
||||||
if (evt.mask & (IN_DELETE_SELF | IN_MOVE_SELF))
|
if (evt.mask & (IN_DELETE_SELF | IN_MOVE_SELF))
|
||||||
{
|
{
|
||||||
|
|
|
@ -2371,7 +2371,9 @@ static void test_universal_notifiers()
|
||||||
test_notifiers_with_strategy(universal_notifier_t::strategy_notifyd);
|
test_notifiers_with_strategy(universal_notifier_t::strategy_notifyd);
|
||||||
#endif
|
#endif
|
||||||
#if __linux || linux
|
#if __linux || linux
|
||||||
|
if (system("mkdir -p /tmp/fish_uvars_test/ && touch /tmp/fish_uvars_test/varsfile.txt")) err(L"mkdir failed");
|
||||||
test_notifiers_with_strategy(universal_notifier_t::strategy_inotify);
|
test_notifiers_with_strategy(universal_notifier_t::strategy_inotify);
|
||||||
|
if (system("rm -Rf /tmp/fish_uvars_test/")) err(L"rm failed");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue